@trafilea/afrodita-components 4.0.0-beta.0 → 4.0.1-beta.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.
@@ -1,4 +1,3 @@
1
- import { ThemeProvider, ThemeVariables, useTheme, useThemeAssets } from 'src/core/theme/Theme';
2
1
  import { Icon } from './icons';
3
2
  import { Card } from './shared/card';
4
3
  import { ButtonPrimary, ButtonSecondary, ButtonSecondaryOutline } from './cta';
@@ -46,4 +45,4 @@ import { Pagination } from './pagination/Pagination';
46
45
  import Text from './text/Text';
47
46
  import { SearchBar } from './search-bar';
48
47
  import ProductGalleryMobile from './mobile/gallery/ProductGalleryMobile';
49
- export { ThemeProvider, ThemeVariables, useTheme, useThemeAssets, Icon, Card, ButtonPrimary, ButtonSecondary, ButtonSecondaryOutline, SimpleDropdown, SizeSelector, SizeFitGuide, TextButton, DiscountTag, PriceLabel, SingleColorPicker, MultiColorPicker, ProductGallery, Rating, FitPredictor, ProgressBar, IconButton, Tooltip, Accordion, Checkbox, RadioGroupInput, Bundle, CategoryTag, SeasonOfferTag, Timer, Input, PaymentMethod, OfferBanner, Totals, DeliveryDetails, ScrollToTop, OrderBar, SizeTable, SimpleOrderItem, Review, SliderNavigation, DropdownListIcons, Image, AmazonButton, PaypalButton, CrossSell, Collection, StarList, Drawer, Spinner, FilteringTags, FilteringDropdown, Pagination, Text, SearchBar, ProductGalleryMobile, };
48
+ export { Icon, Card, ButtonPrimary, ButtonSecondary, ButtonSecondaryOutline, SimpleDropdown, SizeSelector, SizeFitGuide, TextButton, DiscountTag, PriceLabel, SingleColorPicker, MultiColorPicker, ProductGallery, Rating, FitPredictor, ProgressBar, IconButton, Tooltip, Accordion, Checkbox, RadioGroupInput, Bundle, CategoryTag, SeasonOfferTag, Timer, Input, PaymentMethod, OfferBanner, Totals, DeliveryDetails, ScrollToTop, OrderBar, SizeTable, SimpleOrderItem, Review, SliderNavigation, DropdownListIcons, Image, AmazonButton, PaypalButton, CrossSell, Collection, StarList, Drawer, Spinner, FilteringTags, FilteringDropdown, Pagination, Text, SearchBar, ProductGalleryMobile, };
@@ -1,4 +1,5 @@
1
1
  export * from './components';
2
+ export * from './core/theme/Theme';
2
3
  export * from './types/enums';
3
4
  export * from './types/types';
4
5
  export * from './hooks';
package/build/index.d.ts CHANGED
@@ -1,10 +1,9 @@
1
1
  /// <reference types="react" />
2
- import { ThemeBreakpoints } from 'src/core/theme/Theme';
3
- export { ThemeProvider, ThemeVariables, useTheme, useThemeAssets } from 'src/core/theme/Theme';
4
- import React, { ReactNode, FC, AriaAttributes, CSSProperties, AnchorHTMLAttributes, LabelHTMLAttributes, RefObject } from 'react';
2
+ import React, { ReactNode, FC, AriaAttributes, CSSProperties, AnchorHTMLAttributes, LabelHTMLAttributes, ElementType, RefObject } from 'react';
5
3
  import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
6
4
  import * as _emotion_react_types_jsx_namespace from '@emotion/react/types/jsx-namespace';
7
5
  import { SearchBarOptionItem as SearchBarOptionItem$1 } from 'src/types/types';
6
+ import { ThemeBreakpoints as ThemeBreakpoints$1 } from 'src/core/theme/Theme';
8
7
 
9
8
  declare enum CardSectionType {
10
9
  Header = 0,
@@ -1083,9 +1082,390 @@ interface ProductGalleryMobileProps {
1083
1082
  }
1084
1083
  declare const ProductGalleryMobile: ({ images, selectedValue, DiscountTagElement, BestSellerTagElement, productImageDataTestId, slideDotsDataTestId, }: ProductGalleryMobileProps) => JSX.Element;
1085
1084
 
1085
+ declare const ThemeProvider: FC<{
1086
+ theme: Theme;
1087
+ children: ReactNode;
1088
+ }>;
1089
+ declare const useTheme: () => Theme;
1090
+ declare const ThemeVariables: FC<{
1091
+ theme: any;
1092
+ Container?: ElementType;
1093
+ }>;
1094
+ declare const AssetsProvider: FC<{
1095
+ assets: ThemeAssets;
1096
+ }>;
1097
+ declare const useThemeAssets: () => ThemeAssets;
1098
+ declare type Theme = {
1099
+ name: string;
1100
+ fontSizes: number[];
1101
+ fontWeights: number[];
1102
+ lineHeights: number[];
1103
+ mediaQueries: ThemeBreakpoints;
1104
+ colors: ThemeColors;
1105
+ component: ThemeComponent;
1106
+ typography: ThemeTypography;
1107
+ fonts: ThemeFonts;
1108
+ assets: ThemeAssets;
1109
+ };
1110
+ declare type ThemeBreakpoints = {
1111
+ mobile: number;
1112
+ desktop: number;
1113
+ };
1114
+ declare type ThemeBasicPallete = {
1115
+ color: string;
1116
+ contrast: string;
1117
+ };
1118
+ declare type ThemeColorPallete = ThemeBasicPallete & {
1119
+ soft: ThemeBasicPallete;
1120
+ };
1121
+ declare type ThemeColorPrimaryPallete = ThemeColorPallete & {
1122
+ 20: ThemeColorPallete;
1123
+ 40: ThemeColorPallete;
1124
+ 60: ThemeColorPallete;
1125
+ 80: ThemeColorPallete;
1126
+ };
1127
+ declare type ThemeColors = {
1128
+ pallete: {
1129
+ primary: ThemeColorPrimaryPallete;
1130
+ secondary: ThemeColorPrimaryPallete;
1131
+ } & Partial<Record<string, ThemeColorPallete>>;
1132
+ shades: {
1133
+ black: ThemeBasicPallete;
1134
+ white: ThemeBasicPallete;
1135
+ 5: ThemeBasicPallete;
1136
+ 10: ThemeBasicPallete;
1137
+ 50: ThemeBasicPallete;
1138
+ 100: ThemeBasicPallete;
1139
+ 150: ThemeBasicPallete;
1140
+ 200: ThemeBasicPallete;
1141
+ 250: ThemeBasicPallete;
1142
+ 300: ThemeBasicPallete;
1143
+ 350: ThemeBasicPallete;
1144
+ 400: ThemeBasicPallete;
1145
+ 450: ThemeBasicPallete;
1146
+ 500: ThemeBasicPallete;
1147
+ 550: ThemeBasicPallete;
1148
+ 600: ThemeBasicPallete;
1149
+ 650: ThemeBasicPallete;
1150
+ 700: ThemeBasicPallete;
1151
+ 750: ThemeBasicPallete;
1152
+ 800: ThemeBasicPallete;
1153
+ 850: ThemeBasicPallete;
1154
+ 900: ThemeBasicPallete;
1155
+ 950: ThemeBasicPallete;
1156
+ 990: ThemeBasicPallete;
1157
+ };
1158
+ semantic: {
1159
+ positive: ThemeBasicPallete;
1160
+ urgent: ThemeBasicPallete;
1161
+ attention: ThemeBasicPallete;
1162
+ informative: ThemeBasicPallete;
1163
+ };
1164
+ border: {
1165
+ color: string;
1166
+ disabled: string;
1167
+ highlight: string;
1168
+ };
1169
+ background: {
1170
+ color: string;
1171
+ disabled: string;
1172
+ };
1173
+ text: {
1174
+ color: string;
1175
+ disabled: string;
1176
+ };
1177
+ };
1178
+ declare type ThemeComponent = {
1179
+ button: {
1180
+ border: string;
1181
+ borderRadius: string;
1182
+ fontWeight: number;
1183
+ size: {
1184
+ small: {
1185
+ fontSize: string;
1186
+ padding: string;
1187
+ };
1188
+ medium: {
1189
+ fontSize: string;
1190
+ padding: string;
1191
+ };
1192
+ large: {
1193
+ fontSize: string;
1194
+ padding: string;
1195
+ };
1196
+ };
1197
+ primary: {
1198
+ active: {
1199
+ backgroundColor: string;
1200
+ color: string;
1201
+ };
1202
+ hover: {
1203
+ backgroundColor: string;
1204
+ color: string;
1205
+ };
1206
+ };
1207
+ secondary: {
1208
+ active: {
1209
+ backgroundColor: string;
1210
+ color: string;
1211
+ };
1212
+ hover: {
1213
+ backgroundColor: string;
1214
+ color: string;
1215
+ };
1216
+ };
1217
+ };
1218
+ input: {
1219
+ background: string;
1220
+ color: string;
1221
+ placeholderColor: string;
1222
+ borderRadius: string;
1223
+ fontSize: string;
1224
+ fontWeight: number;
1225
+ padding: string;
1226
+ lineHeight: string;
1227
+ border: string;
1228
+ boxShadow: string;
1229
+ };
1230
+ inputCustom: {
1231
+ button: {
1232
+ borderRadius: string;
1233
+ };
1234
+ input: {
1235
+ borderRadius: string;
1236
+ };
1237
+ };
1238
+ selector: {
1239
+ size: {
1240
+ small: {
1241
+ padding: string;
1242
+ borderRadius: string;
1243
+ };
1244
+ medium: {
1245
+ padding: string;
1246
+ borderRadius: string;
1247
+ };
1248
+ };
1249
+ default: {
1250
+ fontWeight: number;
1251
+ border: string;
1252
+ background: string;
1253
+ color: string;
1254
+ };
1255
+ hover: {
1256
+ fontWeight: number;
1257
+ background: string;
1258
+ border: string;
1259
+ color: string;
1260
+ };
1261
+ disabled: {
1262
+ border: string;
1263
+ };
1264
+ fontSize: string;
1265
+ };
1266
+ rating: {
1267
+ fontWeight: number;
1268
+ size: {
1269
+ xsmall: {
1270
+ fontSize: string;
1271
+ lineHeight: string;
1272
+ };
1273
+ small: {
1274
+ fontSize: string;
1275
+ lineHeight: string;
1276
+ };
1277
+ medium: {
1278
+ fontSize: string;
1279
+ lineHeight: string;
1280
+ };
1281
+ large: {
1282
+ fontSize: string;
1283
+ lineHeight: string;
1284
+ };
1285
+ };
1286
+ };
1287
+ card: {
1288
+ borderRadius: string;
1289
+ };
1290
+ radio: {
1291
+ borderColor: string;
1292
+ background: string;
1293
+ size: {
1294
+ small: {
1295
+ borderWidth: string;
1296
+ margin: string;
1297
+ height: string;
1298
+ active: {
1299
+ borderWidth: string;
1300
+ };
1301
+ };
1302
+ medium: {
1303
+ borderWidth: string;
1304
+ margin: string;
1305
+ height: string;
1306
+ active: {
1307
+ borderWidth: string;
1308
+ };
1309
+ };
1310
+ large: {
1311
+ borderWidth: string;
1312
+ margin: string;
1313
+ height: string;
1314
+ active: {
1315
+ borderWidth: string;
1316
+ };
1317
+ };
1318
+ };
1319
+ };
1320
+ label: {
1321
+ fontSize: {
1322
+ small: string;
1323
+ medium: string;
1324
+ large: string;
1325
+ };
1326
+ lineHeight: {
1327
+ small: string;
1328
+ medium: string;
1329
+ large: string;
1330
+ };
1331
+ };
1332
+ checkbox: {
1333
+ background: string;
1334
+ borderColor: string;
1335
+ active: {
1336
+ background: string;
1337
+ };
1338
+ size: {
1339
+ large: {
1340
+ width: string;
1341
+ height: string;
1342
+ borderRadius: string;
1343
+ borderWidth: string;
1344
+ margin: string;
1345
+ icon: {
1346
+ width: string;
1347
+ height: string;
1348
+ };
1349
+ };
1350
+ medium: {
1351
+ width: string;
1352
+ height: string;
1353
+ borderRadius: string;
1354
+ borderWidth: string;
1355
+ margin: string;
1356
+ icon: {
1357
+ width: string;
1358
+ height: string;
1359
+ };
1360
+ };
1361
+ small: {
1362
+ width: string;
1363
+ height: string;
1364
+ borderRadius: string;
1365
+ borderWidth: string;
1366
+ margin: string;
1367
+ icon: {
1368
+ width: string;
1369
+ height: string;
1370
+ };
1371
+ };
1372
+ };
1373
+ };
1374
+ accordion: {
1375
+ variant: {
1376
+ box: {
1377
+ container: {
1378
+ border: string;
1379
+ borderColor: string;
1380
+ borderRadius: string;
1381
+ padding: string;
1382
+ };
1383
+ summary: {
1384
+ fontWeight: number;
1385
+ fontSize: string;
1386
+ lineHeight: string;
1387
+ color: string;
1388
+ };
1389
+ details: {
1390
+ margin: string;
1391
+ };
1392
+ icon: {
1393
+ width: number;
1394
+ height: number;
1395
+ color: string;
1396
+ };
1397
+ };
1398
+ simple: {
1399
+ container: {
1400
+ borderTop: string;
1401
+ borderBottom: string;
1402
+ borderColor: string;
1403
+ borderRadius: string;
1404
+ padding: string;
1405
+ };
1406
+ summary: {
1407
+ fontWeight: number;
1408
+ fontSize: string;
1409
+ lineHeight: string;
1410
+ color: string;
1411
+ };
1412
+ details: {
1413
+ margin: string;
1414
+ };
1415
+ icon: {
1416
+ width: number;
1417
+ height: number;
1418
+ color: string;
1419
+ };
1420
+ };
1421
+ };
1422
+ };
1423
+ dropdown: {
1424
+ borderRadius: string;
1425
+ fontSize: string;
1426
+ fontWeight: number;
1427
+ lineHeight: string;
1428
+ padding: string;
1429
+ color: string;
1430
+ fill: string;
1431
+ options: {
1432
+ borderColor: string;
1433
+ color: string;
1434
+ };
1435
+ };
1436
+ };
1437
+ declare type ThemeTypography = {
1438
+ config: {
1439
+ weight: {
1440
+ heavy: number;
1441
+ bold: number;
1442
+ demi: number;
1443
+ regular: number;
1444
+ };
1445
+ };
1446
+ variants: Record<string, CSSProperties>;
1447
+ };
1448
+ declare type ThemeFonts = {
1449
+ url: string;
1450
+ config: Array<{
1451
+ src: string;
1452
+ family: string;
1453
+ weight?: number | string;
1454
+ style?: string;
1455
+ stretch?: string;
1456
+ }>;
1457
+ };
1458
+ declare type ThemeAssets = {
1459
+ images: {
1460
+ favicon: string;
1461
+ logo: string;
1462
+ };
1463
+ [key: string]: any;
1464
+ };
1465
+
1086
1466
  declare const useOnClickOutside: <T extends HTMLElement = HTMLElement>(ref: RefObject<T>, handler: (event: Event) => void) => void;
1087
1467
 
1088
- declare const useWindowDimensions: (breakpoints: ThemeBreakpoints) => {
1468
+ declare const useWindowDimensions: (breakpoints: ThemeBreakpoints$1) => {
1089
1469
  isMobile: boolean;
1090
1470
  windowDimensions: {
1091
1471
  width: number;
@@ -1093,4 +1473,4 @@ declare const useWindowDimensions: (breakpoints: ThemeBreakpoints) => {
1093
1473
  };
1094
1474
  };
1095
1475
 
1096
- export { Accordion, AmazonButton, Bundle, ButtonPrimary, ButtonSecondary, ButtonSecondaryOutline, ButtonType, CTAProps, _default as Card, CardSectionType, CategoryTag, Checkbox, Collection, Color, ColorPickerOption, ComponentPosition, ComponentSize, index_d as CrossSell, DeliveryDetails, DiscountTag, Drawer, DropdownListIcons, DropdownListIconsItem, DropdownListIconsSubItem, DropdownOption, Filter, FilterChange, FilteringDropdown, Tags as FilteringTags, FitPredictor, Icon, IconButton, IconProps, IconWithOpacityProps, Image, ImageType, Input, InputValidationType, MultiColorPicker, OfferBanner, OrderBar, Pagination, Pattern, PaymentMethod, PaypalButton, PriceLabel, ProductGallery, ProductGalleryMobile, ProgressBar, RadioGroupInput, RadioGroupOption, Rating, Review, ScrollToTop, SearchBar, SearchBarOptionItem, SeasonOfferTag, SimpleDropdown, SimpleOrderItem, SingleColorPicker, SizeFitGuide, SizeOption, SizeSelector, SizeTable, SliderNavigation, Spinner, StarList, Text, TextButton, Timer, Tooltip, Totals, WithTestId, useOnClickOutside, useWindowDimensions };
1476
+ export { Accordion, AmazonButton, AssetsProvider, Bundle, ButtonPrimary, ButtonSecondary, ButtonSecondaryOutline, ButtonType, CTAProps, _default as Card, CardSectionType, CategoryTag, Checkbox, Collection, Color, ColorPickerOption, ComponentPosition, ComponentSize, index_d as CrossSell, DeliveryDetails, DiscountTag, Drawer, DropdownListIcons, DropdownListIconsItem, DropdownListIconsSubItem, DropdownOption, Filter, FilterChange, FilteringDropdown, Tags as FilteringTags, FitPredictor, Icon, IconButton, IconProps, IconWithOpacityProps, Image, ImageType, Input, InputValidationType, MultiColorPicker, OfferBanner, OrderBar, Pagination, Pattern, PaymentMethod, PaypalButton, PriceLabel, ProductGallery, ProductGalleryMobile, ProgressBar, RadioGroupInput, RadioGroupOption, Rating, Review, ScrollToTop, SearchBar, SearchBarOptionItem, SeasonOfferTag, SimpleDropdown, SimpleOrderItem, SingleColorPicker, SizeFitGuide, SizeOption, SizeSelector, SizeTable, SliderNavigation, Spinner, StarList, Text, TextButton, Theme, ThemeAssets, ThemeBasicPallete, ThemeBreakpoints, ThemeColorPallete, ThemeColors, ThemeComponent, ThemeFonts, ThemeProvider, ThemeTypography, ThemeVariables, Timer, Tooltip, Totals, WithTestId, useOnClickOutside, useTheme, useThemeAssets, useWindowDimensions };