crew-recommendation-ui 0.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.
- package/README.md +156 -0
- package/dist/Card-C6fF0ZrH.js +197 -0
- package/dist/Card-C6fF0ZrH.js.map +1 -0
- package/dist/dls/index.d.ts +8 -0
- package/dist/dls/index.d.ts.map +1 -0
- package/dist/dls/index.js +25 -0
- package/dist/dls/index.js.map +1 -0
- package/dist/dls/tokens/colors.d.ts +77 -0
- package/dist/dls/tokens/colors.d.ts.map +1 -0
- package/dist/dls/tokens/index.d.ts +215 -0
- package/dist/dls/tokens/index.d.ts.map +1 -0
- package/dist/dls/tokens/spacing.d.ts +46 -0
- package/dist/dls/tokens/spacing.d.ts.map +1 -0
- package/dist/dls/tokens/typography.d.ts +102 -0
- package/dist/dls/tokens/typography.d.ts.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/package.json +60 -0
- package/dist/recommendation/components/Card.d.ts +13 -0
- package/dist/recommendation/components/Card.d.ts.map +1 -0
- package/dist/recommendation/components/index.d.ts +6 -0
- package/dist/recommendation/components/index.d.ts.map +1 -0
- package/dist/recommendation/index.d.ts +9 -0
- package/dist/recommendation/index.d.ts.map +1 -0
- package/dist/recommendation/index.js +6 -0
- package/dist/recommendation/index.js.map +1 -0
- package/dist/recommendation/types.d.ts +71 -0
- package/dist/recommendation/types.d.ts.map +1 -0
- package/dist/typography-zz5GzgjI.js +245 -0
- package/dist/typography-zz5GzgjI.js.map +1 -0
- package/package.json +60 -0
- package/src/dls/index.ts +15 -0
- package/src/dls/tokens/colors.ts +94 -0
- package/src/dls/tokens/index.ts +30 -0
- package/src/dls/tokens/spacing.ts +62 -0
- package/src/dls/tokens/typography.ts +119 -0
- package/src/index.ts +25 -0
- package/src/recommendation/components/Card.tsx +191 -0
- package/src/recommendation/components/index.ts +14 -0
- package/src/recommendation/index.ts +15 -0
- package/src/recommendation/types.ts +87 -0
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Design Language System - Tokens
|
|
3
|
+
* Export all design tokens from a single entry point
|
|
4
|
+
*/
|
|
5
|
+
export * from './colors';
|
|
6
|
+
export * from './spacing';
|
|
7
|
+
export * from './typography';
|
|
8
|
+
export declare const tokens: {
|
|
9
|
+
readonly colors: {
|
|
10
|
+
readonly primary: {
|
|
11
|
+
readonly 50: "#f0f9ff";
|
|
12
|
+
readonly 100: "#e0f2fe";
|
|
13
|
+
readonly 200: "#bae6fd";
|
|
14
|
+
readonly 300: "#7dd3fc";
|
|
15
|
+
readonly 400: "#38bdf8";
|
|
16
|
+
readonly 500: "#0ea5e9";
|
|
17
|
+
readonly 600: "#0284c7";
|
|
18
|
+
readonly 700: "#0369a1";
|
|
19
|
+
readonly 800: "#075985";
|
|
20
|
+
readonly 900: "#0c4a6e";
|
|
21
|
+
};
|
|
22
|
+
readonly neutral: {
|
|
23
|
+
readonly 0: "#ffffff";
|
|
24
|
+
readonly 50: "#fafafa";
|
|
25
|
+
readonly 100: "#f4f4f5";
|
|
26
|
+
readonly 200: "#e4e4e7";
|
|
27
|
+
readonly 300: "#d4d4d8";
|
|
28
|
+
readonly 400: "#a1a1aa";
|
|
29
|
+
readonly 500: "#71717a";
|
|
30
|
+
readonly 600: "#52525b";
|
|
31
|
+
readonly 700: "#3f3f46";
|
|
32
|
+
readonly 800: "#27272a";
|
|
33
|
+
readonly 900: "#18181b";
|
|
34
|
+
readonly 950: "#09090b";
|
|
35
|
+
};
|
|
36
|
+
readonly success: {
|
|
37
|
+
readonly 50: "#f0fdf4";
|
|
38
|
+
readonly 100: "#dcfce7";
|
|
39
|
+
readonly 500: "#22c55e";
|
|
40
|
+
readonly 600: "#16a34a";
|
|
41
|
+
readonly 700: "#15803d";
|
|
42
|
+
};
|
|
43
|
+
readonly warning: {
|
|
44
|
+
readonly 50: "#fffbeb";
|
|
45
|
+
readonly 100: "#fef3c7";
|
|
46
|
+
readonly 500: "#f59e0b";
|
|
47
|
+
readonly 600: "#d97706";
|
|
48
|
+
readonly 700: "#b45309";
|
|
49
|
+
};
|
|
50
|
+
readonly error: {
|
|
51
|
+
readonly 50: "#fef2f2";
|
|
52
|
+
readonly 100: "#fee2e2";
|
|
53
|
+
readonly 500: "#ef4444";
|
|
54
|
+
readonly 600: "#dc2626";
|
|
55
|
+
readonly 700: "#b91c1c";
|
|
56
|
+
};
|
|
57
|
+
readonly card: {
|
|
58
|
+
readonly background: {
|
|
59
|
+
readonly light: "#ffffff";
|
|
60
|
+
readonly dark: "#1a1a1a";
|
|
61
|
+
};
|
|
62
|
+
readonly border: {
|
|
63
|
+
readonly light: "#e4e4e7";
|
|
64
|
+
readonly dark: "#3f3f46";
|
|
65
|
+
};
|
|
66
|
+
readonly selected: {
|
|
67
|
+
readonly light: "#e0f2fe";
|
|
68
|
+
readonly dark: "#0c4a6e";
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
readonly categoryHue: {
|
|
72
|
+
readonly hotel: 220;
|
|
73
|
+
readonly flight: 200;
|
|
74
|
+
readonly cab: 35;
|
|
75
|
+
readonly restaurant: 15;
|
|
76
|
+
readonly gifting: 280;
|
|
77
|
+
readonly default: 220;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
readonly spacing: {
|
|
81
|
+
readonly 0: 0;
|
|
82
|
+
readonly 0.5: 2;
|
|
83
|
+
readonly 1: 4;
|
|
84
|
+
readonly 1.5: 6;
|
|
85
|
+
readonly 2: 8;
|
|
86
|
+
readonly 2.5: 10;
|
|
87
|
+
readonly 3: 12;
|
|
88
|
+
readonly 3.5: 14;
|
|
89
|
+
readonly 4: 16;
|
|
90
|
+
readonly 5: 20;
|
|
91
|
+
readonly 6: 24;
|
|
92
|
+
readonly 7: 28;
|
|
93
|
+
readonly 8: 32;
|
|
94
|
+
readonly 9: 36;
|
|
95
|
+
readonly 10: 40;
|
|
96
|
+
readonly 11: 44;
|
|
97
|
+
readonly 12: 48;
|
|
98
|
+
readonly 14: 56;
|
|
99
|
+
readonly 16: 64;
|
|
100
|
+
readonly 20: 80;
|
|
101
|
+
readonly 24: 96;
|
|
102
|
+
readonly 28: 112;
|
|
103
|
+
readonly 32: 128;
|
|
104
|
+
};
|
|
105
|
+
readonly semanticSpacing: {
|
|
106
|
+
readonly cardPadding: 16;
|
|
107
|
+
readonly cardGap: 12;
|
|
108
|
+
readonly sectionGap: 24;
|
|
109
|
+
readonly listItemGap: 12;
|
|
110
|
+
readonly listPadding: 16;
|
|
111
|
+
readonly buttonPaddingX: 16;
|
|
112
|
+
readonly buttonPaddingY: 8;
|
|
113
|
+
readonly buttonGap: 8;
|
|
114
|
+
readonly inputPaddingX: 12;
|
|
115
|
+
readonly inputPaddingY: 8;
|
|
116
|
+
readonly screenMarginX: 16;
|
|
117
|
+
readonly screenMarginY: 16;
|
|
118
|
+
};
|
|
119
|
+
readonly fontFamily: {
|
|
120
|
+
readonly sans: "Inter, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif";
|
|
121
|
+
readonly mono: "ui-monospace, SFMono-Regular, \"SF Mono\", Consolas, monospace";
|
|
122
|
+
};
|
|
123
|
+
readonly fontSize: {
|
|
124
|
+
readonly xs: 12;
|
|
125
|
+
readonly sm: 14;
|
|
126
|
+
readonly base: 16;
|
|
127
|
+
readonly lg: 18;
|
|
128
|
+
readonly xl: 20;
|
|
129
|
+
readonly '2xl': 24;
|
|
130
|
+
readonly '3xl': 30;
|
|
131
|
+
readonly '4xl': 36;
|
|
132
|
+
readonly '5xl': 48;
|
|
133
|
+
};
|
|
134
|
+
readonly fontWeight: {
|
|
135
|
+
readonly normal: "400";
|
|
136
|
+
readonly medium: "500";
|
|
137
|
+
readonly semibold: "600";
|
|
138
|
+
readonly bold: "700";
|
|
139
|
+
};
|
|
140
|
+
readonly lineHeight: {
|
|
141
|
+
readonly tight: 1.25;
|
|
142
|
+
readonly snug: 1.375;
|
|
143
|
+
readonly normal: 1.5;
|
|
144
|
+
readonly relaxed: 1.625;
|
|
145
|
+
readonly loose: 2;
|
|
146
|
+
};
|
|
147
|
+
readonly letterSpacing: {
|
|
148
|
+
readonly tighter: -0.5;
|
|
149
|
+
readonly tight: -0.25;
|
|
150
|
+
readonly normal: 0;
|
|
151
|
+
readonly wide: 0.25;
|
|
152
|
+
readonly wider: 0.5;
|
|
153
|
+
};
|
|
154
|
+
readonly textStyles: {
|
|
155
|
+
readonly h1: {
|
|
156
|
+
readonly fontSize: 30;
|
|
157
|
+
readonly fontWeight: "700";
|
|
158
|
+
readonly lineHeight: 1.25;
|
|
159
|
+
readonly letterSpacing: -0.25;
|
|
160
|
+
};
|
|
161
|
+
readonly h2: {
|
|
162
|
+
readonly fontSize: 24;
|
|
163
|
+
readonly fontWeight: "600";
|
|
164
|
+
readonly lineHeight: 1.25;
|
|
165
|
+
readonly letterSpacing: -0.25;
|
|
166
|
+
};
|
|
167
|
+
readonly h3: {
|
|
168
|
+
readonly fontSize: 20;
|
|
169
|
+
readonly fontWeight: "600";
|
|
170
|
+
readonly lineHeight: 1.375;
|
|
171
|
+
};
|
|
172
|
+
readonly h4: {
|
|
173
|
+
readonly fontSize: 18;
|
|
174
|
+
readonly fontWeight: "500";
|
|
175
|
+
readonly lineHeight: 1.375;
|
|
176
|
+
};
|
|
177
|
+
readonly body: {
|
|
178
|
+
readonly fontSize: 16;
|
|
179
|
+
readonly fontWeight: "400";
|
|
180
|
+
readonly lineHeight: 1.5;
|
|
181
|
+
};
|
|
182
|
+
readonly bodySmall: {
|
|
183
|
+
readonly fontSize: 14;
|
|
184
|
+
readonly fontWeight: "400";
|
|
185
|
+
readonly lineHeight: 1.5;
|
|
186
|
+
};
|
|
187
|
+
readonly cardTitle: {
|
|
188
|
+
readonly fontSize: 18;
|
|
189
|
+
readonly fontWeight: "600";
|
|
190
|
+
readonly lineHeight: 1.375;
|
|
191
|
+
};
|
|
192
|
+
readonly cardSubtitle: {
|
|
193
|
+
readonly fontSize: 14;
|
|
194
|
+
readonly fontWeight: "400";
|
|
195
|
+
readonly lineHeight: 1.5;
|
|
196
|
+
};
|
|
197
|
+
readonly cardPrice: {
|
|
198
|
+
readonly fontSize: 20;
|
|
199
|
+
readonly fontWeight: "700";
|
|
200
|
+
readonly lineHeight: 1.25;
|
|
201
|
+
};
|
|
202
|
+
readonly label: {
|
|
203
|
+
readonly fontSize: 14;
|
|
204
|
+
readonly fontWeight: "500";
|
|
205
|
+
readonly lineHeight: 1.5;
|
|
206
|
+
};
|
|
207
|
+
readonly caption: {
|
|
208
|
+
readonly fontSize: 12;
|
|
209
|
+
readonly fontWeight: "400";
|
|
210
|
+
readonly lineHeight: 1.5;
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
export type Tokens = typeof tokens;
|
|
215
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dls/tokens/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAO7B,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUT,CAAC;AAEX,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spacing tokens for consistent layout across components
|
|
3
|
+
* Based on a 4px grid system
|
|
4
|
+
*/
|
|
5
|
+
export declare const spacing: {
|
|
6
|
+
readonly 0: 0;
|
|
7
|
+
readonly 0.5: 2;
|
|
8
|
+
readonly 1: 4;
|
|
9
|
+
readonly 1.5: 6;
|
|
10
|
+
readonly 2: 8;
|
|
11
|
+
readonly 2.5: 10;
|
|
12
|
+
readonly 3: 12;
|
|
13
|
+
readonly 3.5: 14;
|
|
14
|
+
readonly 4: 16;
|
|
15
|
+
readonly 5: 20;
|
|
16
|
+
readonly 6: 24;
|
|
17
|
+
readonly 7: 28;
|
|
18
|
+
readonly 8: 32;
|
|
19
|
+
readonly 9: 36;
|
|
20
|
+
readonly 10: 40;
|
|
21
|
+
readonly 11: 44;
|
|
22
|
+
readonly 12: 48;
|
|
23
|
+
readonly 14: 56;
|
|
24
|
+
readonly 16: 64;
|
|
25
|
+
readonly 20: 80;
|
|
26
|
+
readonly 24: 96;
|
|
27
|
+
readonly 28: 112;
|
|
28
|
+
readonly 32: 128;
|
|
29
|
+
};
|
|
30
|
+
export declare const semanticSpacing: {
|
|
31
|
+
readonly cardPadding: 16;
|
|
32
|
+
readonly cardGap: 12;
|
|
33
|
+
readonly sectionGap: 24;
|
|
34
|
+
readonly listItemGap: 12;
|
|
35
|
+
readonly listPadding: 16;
|
|
36
|
+
readonly buttonPaddingX: 16;
|
|
37
|
+
readonly buttonPaddingY: 8;
|
|
38
|
+
readonly buttonGap: 8;
|
|
39
|
+
readonly inputPaddingX: 12;
|
|
40
|
+
readonly inputPaddingY: 8;
|
|
41
|
+
readonly screenMarginX: 16;
|
|
42
|
+
readonly screenMarginY: 16;
|
|
43
|
+
};
|
|
44
|
+
export type Spacing = typeof spacing;
|
|
45
|
+
export type SemanticSpacing = typeof semanticSpacing;
|
|
46
|
+
//# sourceMappingURL=spacing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spacing.d.ts","sourceRoot":"","sources":["../../../src/dls/tokens/spacing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;CAyBV,CAAC;AAGX,eAAO,MAAM,eAAe;;;;;;;;;;;;;CAsBlB,CAAC;AAEX,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC;AACrC,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typography tokens for consistent text styling
|
|
3
|
+
*/
|
|
4
|
+
export declare const fontFamily: {
|
|
5
|
+
readonly sans: "Inter, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif";
|
|
6
|
+
readonly mono: "ui-monospace, SFMono-Regular, \"SF Mono\", Consolas, monospace";
|
|
7
|
+
};
|
|
8
|
+
export declare const fontSize: {
|
|
9
|
+
readonly xs: 12;
|
|
10
|
+
readonly sm: 14;
|
|
11
|
+
readonly base: 16;
|
|
12
|
+
readonly lg: 18;
|
|
13
|
+
readonly xl: 20;
|
|
14
|
+
readonly '2xl': 24;
|
|
15
|
+
readonly '3xl': 30;
|
|
16
|
+
readonly '4xl': 36;
|
|
17
|
+
readonly '5xl': 48;
|
|
18
|
+
};
|
|
19
|
+
export declare const fontWeight: {
|
|
20
|
+
readonly normal: "400";
|
|
21
|
+
readonly medium: "500";
|
|
22
|
+
readonly semibold: "600";
|
|
23
|
+
readonly bold: "700";
|
|
24
|
+
};
|
|
25
|
+
export declare const lineHeight: {
|
|
26
|
+
readonly tight: 1.25;
|
|
27
|
+
readonly snug: 1.375;
|
|
28
|
+
readonly normal: 1.5;
|
|
29
|
+
readonly relaxed: 1.625;
|
|
30
|
+
readonly loose: 2;
|
|
31
|
+
};
|
|
32
|
+
export declare const letterSpacing: {
|
|
33
|
+
readonly tighter: -0.5;
|
|
34
|
+
readonly tight: -0.25;
|
|
35
|
+
readonly normal: 0;
|
|
36
|
+
readonly wide: 0.25;
|
|
37
|
+
readonly wider: 0.5;
|
|
38
|
+
};
|
|
39
|
+
export declare const textStyles: {
|
|
40
|
+
readonly h1: {
|
|
41
|
+
readonly fontSize: 30;
|
|
42
|
+
readonly fontWeight: "700";
|
|
43
|
+
readonly lineHeight: 1.25;
|
|
44
|
+
readonly letterSpacing: -0.25;
|
|
45
|
+
};
|
|
46
|
+
readonly h2: {
|
|
47
|
+
readonly fontSize: 24;
|
|
48
|
+
readonly fontWeight: "600";
|
|
49
|
+
readonly lineHeight: 1.25;
|
|
50
|
+
readonly letterSpacing: -0.25;
|
|
51
|
+
};
|
|
52
|
+
readonly h3: {
|
|
53
|
+
readonly fontSize: 20;
|
|
54
|
+
readonly fontWeight: "600";
|
|
55
|
+
readonly lineHeight: 1.375;
|
|
56
|
+
};
|
|
57
|
+
readonly h4: {
|
|
58
|
+
readonly fontSize: 18;
|
|
59
|
+
readonly fontWeight: "500";
|
|
60
|
+
readonly lineHeight: 1.375;
|
|
61
|
+
};
|
|
62
|
+
readonly body: {
|
|
63
|
+
readonly fontSize: 16;
|
|
64
|
+
readonly fontWeight: "400";
|
|
65
|
+
readonly lineHeight: 1.5;
|
|
66
|
+
};
|
|
67
|
+
readonly bodySmall: {
|
|
68
|
+
readonly fontSize: 14;
|
|
69
|
+
readonly fontWeight: "400";
|
|
70
|
+
readonly lineHeight: 1.5;
|
|
71
|
+
};
|
|
72
|
+
readonly cardTitle: {
|
|
73
|
+
readonly fontSize: 18;
|
|
74
|
+
readonly fontWeight: "600";
|
|
75
|
+
readonly lineHeight: 1.375;
|
|
76
|
+
};
|
|
77
|
+
readonly cardSubtitle: {
|
|
78
|
+
readonly fontSize: 14;
|
|
79
|
+
readonly fontWeight: "400";
|
|
80
|
+
readonly lineHeight: 1.5;
|
|
81
|
+
};
|
|
82
|
+
readonly cardPrice: {
|
|
83
|
+
readonly fontSize: 20;
|
|
84
|
+
readonly fontWeight: "700";
|
|
85
|
+
readonly lineHeight: 1.25;
|
|
86
|
+
};
|
|
87
|
+
readonly label: {
|
|
88
|
+
readonly fontSize: 14;
|
|
89
|
+
readonly fontWeight: "500";
|
|
90
|
+
readonly lineHeight: 1.5;
|
|
91
|
+
};
|
|
92
|
+
readonly caption: {
|
|
93
|
+
readonly fontSize: 12;
|
|
94
|
+
readonly fontWeight: "400";
|
|
95
|
+
readonly lineHeight: 1.5;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
export type FontFamily = typeof fontFamily;
|
|
99
|
+
export type FontSize = typeof fontSize;
|
|
100
|
+
export type FontWeight = typeof fontWeight;
|
|
101
|
+
export type TextStyles = typeof textStyles;
|
|
102
|
+
//# sourceMappingURL=typography.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../../src/dls/tokens/typography.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,UAAU;;;CAGb,CAAC;AAEX,eAAO,MAAM,QAAQ;;;;;;;;;;CAUX,CAAC;AAEX,eAAO,MAAM,UAAU;;;;;CAKb,CAAC;AAEX,eAAO,MAAM,UAAU;;;;;;CAMb,CAAC;AAEX,eAAO,MAAM,aAAa;;;;;;CAMhB,CAAC;AAGX,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiEb,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC;AAC3C,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC;AACvC,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC;AAC3C,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @crew-copilot/recommendation-ui
|
|
3
|
+
*
|
|
4
|
+
* A shared UI library for recommendation listing components
|
|
5
|
+
* that can be used across:
|
|
6
|
+
* - Web (crew-website)
|
|
7
|
+
* - Mobile App (crew-app via WebView or React Native)
|
|
8
|
+
* - Dashboard
|
|
9
|
+
*
|
|
10
|
+
* This library provides:
|
|
11
|
+
* 1. DLS (Design Language System) - tokens and primitives
|
|
12
|
+
* 2. Recommendation cards - Hotel, Flight, Cab, etc.
|
|
13
|
+
*/
|
|
14
|
+
export * from './dls';
|
|
15
|
+
export * from './recommendation';
|
|
16
|
+
export declare const VERSION = "0.0.1";
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,cAAc,OAAO,CAAC;AAGtB,cAAc,kBAAkB,CAAC;AAGjC,eAAO,MAAM,OAAO,UAAU,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { tokens } from "./dls/index.js";
|
|
2
|
+
import { C, C as C2 } from "./Card-C6fF0ZrH.js";
|
|
3
|
+
import { c, f, b, d, e, l, a, s, t } from "./typography-zz5GzgjI.js";
|
|
4
|
+
const VERSION = "0.0.1";
|
|
5
|
+
export {
|
|
6
|
+
C as Card,
|
|
7
|
+
C2 as RecommendationCard,
|
|
8
|
+
VERSION,
|
|
9
|
+
c as colors,
|
|
10
|
+
f as fontFamily,
|
|
11
|
+
b as fontSize,
|
|
12
|
+
d as fontWeight,
|
|
13
|
+
e as letterSpacing,
|
|
14
|
+
l as lineHeight,
|
|
15
|
+
a as semanticSpacing,
|
|
16
|
+
s as spacing,
|
|
17
|
+
t as textStyles,
|
|
18
|
+
tokens
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["/**\n * @crew-copilot/recommendation-ui\n * \n * A shared UI library for recommendation listing components\n * that can be used across:\n * - Web (crew-website)\n * - Mobile App (crew-app via WebView or React Native)\n * - Dashboard\n * \n * This library provides:\n * 1. DLS (Design Language System) - tokens and primitives\n * 2. Recommendation cards - Hotel, Flight, Cab, etc.\n */\n\n// Export DLS (Design Language System)\nexport * from './dls';\n\n// Export Recommendation components\nexport * from './recommendation';\n\n// Version info\nexport const VERSION = '0.0.1';\n\n"],"names":[],"mappings":";;;AAqBO,MAAM,UAAU;"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@crew-copilot/recommendation-ui",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "Shared UI library for recommendation listing components - DLS tokens and React components",
|
|
5
|
+
"private": false,
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public",
|
|
8
|
+
"registry": "https://registry.npmjs.org/"
|
|
9
|
+
},
|
|
10
|
+
"type": "module",
|
|
11
|
+
"main": "./dist/index.js",
|
|
12
|
+
"module": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"development": "./src/index.ts",
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": "./dist/index.js",
|
|
19
|
+
"default": "./dist/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./dls": {
|
|
22
|
+
"development": "./src/dls/index.ts",
|
|
23
|
+
"types": "./dist/dls/index.d.ts",
|
|
24
|
+
"import": "./dist/dls/index.js",
|
|
25
|
+
"default": "./dist/dls/index.js"
|
|
26
|
+
},
|
|
27
|
+
"./recommendation": {
|
|
28
|
+
"development": "./src/recommendation/index.ts",
|
|
29
|
+
"types": "./dist/recommendation/index.d.ts",
|
|
30
|
+
"import": "./dist/recommendation/index.js",
|
|
31
|
+
"default": "./dist/recommendation/index.js"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"dist",
|
|
36
|
+
"src"
|
|
37
|
+
],
|
|
38
|
+
"scripts": {
|
|
39
|
+
"dev": "nx vite:build --watch",
|
|
40
|
+
"build": "tsc && nx vite:build",
|
|
41
|
+
"clean": "rm -rf dist",
|
|
42
|
+
"type-check": "tsc --noEmit",
|
|
43
|
+
"lint": "eslint . --ext .ts,.tsx"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"react": ">=17.0.0",
|
|
47
|
+
"react-dom": ">=17.0.0"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@types/react": "^18.2.55",
|
|
51
|
+
"@types/react-dom": "^18.2.19",
|
|
52
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
53
|
+
"typescript": "~5.7.2",
|
|
54
|
+
"vite": "^6.3.1",
|
|
55
|
+
"vite-plugin-dts": "^4.5.0"
|
|
56
|
+
},
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"clsx": "^2.1.1"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseRecommendationItem, RecommendationCardProps } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Base Recommendation Card Component
|
|
4
|
+
*
|
|
5
|
+
* This is a generic card that can display any recommendation item.
|
|
6
|
+
* Specific card types (Hotel, Flight, Cab) will extend this.
|
|
7
|
+
*/
|
|
8
|
+
export declare const Card: {
|
|
9
|
+
<T extends BaseRecommendationItem>({ item, onSelect, onExpand, isSelected, isExpanded, }: RecommendationCardProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
export default Card;
|
|
13
|
+
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/recommendation/components/Card.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAEhF;;;;;GAKG;AACH,eAAO,MAAM,IAAI;KAAI,CAAC,SAAS,sBAAsB,yDAMlD,uBAAuB,CAAC,CAAC,CAAC;;CAsK5B,CAAC;AAIF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/recommendation/components/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/recommendation/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,SAAS,CAAC;AAGxB,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for recommendation listing components
|
|
3
|
+
*/
|
|
4
|
+
export interface ProductImage {
|
|
5
|
+
data: string;
|
|
6
|
+
url?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface BaseRecommendationItem {
|
|
9
|
+
id: string;
|
|
10
|
+
title: string;
|
|
11
|
+
subtitle?: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
price: string;
|
|
14
|
+
originalPrice?: string;
|
|
15
|
+
image?: ProductImage[];
|
|
16
|
+
image_signed_urls?: string[];
|
|
17
|
+
recommended?: boolean;
|
|
18
|
+
tags?: string[];
|
|
19
|
+
}
|
|
20
|
+
export interface HotelItem extends BaseRecommendationItem {
|
|
21
|
+
type: 'hotel';
|
|
22
|
+
rating?: string;
|
|
23
|
+
ratingCount?: string;
|
|
24
|
+
location?: string;
|
|
25
|
+
amenities?: string[];
|
|
26
|
+
checkIn?: string;
|
|
27
|
+
checkOut?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface FlightItem extends BaseRecommendationItem {
|
|
30
|
+
type: 'flight';
|
|
31
|
+
airlineName?: string;
|
|
32
|
+
economyType?: string;
|
|
33
|
+
date?: string;
|
|
34
|
+
takeoffTime?: string;
|
|
35
|
+
takeoffLocation?: string;
|
|
36
|
+
landingTime?: string;
|
|
37
|
+
landingLocation?: string;
|
|
38
|
+
duration?: string;
|
|
39
|
+
layoverText?: string;
|
|
40
|
+
isRoundTrip?: boolean;
|
|
41
|
+
}
|
|
42
|
+
export interface CabItem extends BaseRecommendationItem {
|
|
43
|
+
type: 'cab';
|
|
44
|
+
providerName?: string;
|
|
45
|
+
carType?: string;
|
|
46
|
+
carName?: string;
|
|
47
|
+
pickupLocation?: string;
|
|
48
|
+
dropLocation?: string;
|
|
49
|
+
estimatedTime?: string;
|
|
50
|
+
}
|
|
51
|
+
export type RecommendationItem = HotelItem | FlightItem | CabItem;
|
|
52
|
+
export interface RecommendationCardProps<T extends BaseRecommendationItem = BaseRecommendationItem> {
|
|
53
|
+
item: T;
|
|
54
|
+
onSelect?: (item: T) => void;
|
|
55
|
+
onExpand?: (item: T) => void;
|
|
56
|
+
isSelected?: boolean;
|
|
57
|
+
isExpanded?: boolean;
|
|
58
|
+
showVote?: boolean;
|
|
59
|
+
voteCount?: number;
|
|
60
|
+
onVote?: (itemId: string) => void;
|
|
61
|
+
}
|
|
62
|
+
export interface RecommendationListingProps {
|
|
63
|
+
items: RecommendationItem[];
|
|
64
|
+
type: 'hotel' | 'flight' | 'cab' | 'restaurant' | 'gifting';
|
|
65
|
+
onItemSelect?: (item: RecommendationItem) => void;
|
|
66
|
+
onItemExpand?: (item: RecommendationItem) => void;
|
|
67
|
+
selectedItemId?: string;
|
|
68
|
+
expandedItemId?: string;
|
|
69
|
+
showVoting?: boolean;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/recommendation/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,YAAY;IAC3B,IAAI,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