@janrankenhohn/react-thumbnail-list 0.5.2 → 0.5.4

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/dist/index.cjs.js CHANGED
@@ -29,10 +29,10 @@ const useThumbnailListItemContext = () => {
29
29
  return context;
30
30
  };
31
31
 
32
- /**
33
- * Creates a ellipies text with webkit css styles
34
- * @param props lineClamp: lines till ellipses
35
- * @returns component
32
+ /**
33
+ * Creates a ellipies text with webkit css styles
34
+ * @param props lineClamp: lines till ellipses
35
+ * @returns component
36
36
  */
37
37
  function EllipsisContainer(props) {
38
38
  const EllipsisContainer = material.styled('div')(p => ({
@@ -140,6 +140,7 @@ var ThumbnailListItem$1 = /*#__PURE__*/React__default["default"].memo(ThumbnailL
140
140
  const RatioWrapper = material.styled('div')(() => ({
141
141
  // Assuming a 16:9 aspect ratio
142
142
  paddingTop: '27.75%',
143
+ // 9 / 16 = 0.5625
143
144
  position: 'relative',
144
145
  width: '100%',
145
146
  '& > *': {
@@ -205,11 +206,11 @@ ThumbnailListMainContent.defaultProps = {
205
206
  }
206
207
  };
207
208
 
208
- /**
209
- * Generic method that sorts an array of items based on an item key
210
- * @param values The array that should be sorted
211
- * @param orderType The key of the entity that the array should be sorted by
212
- * @returns A new reference of the ordered array
209
+ /**
210
+ * Generic method that sorts an array of items based on an item key
211
+ * @param values The array that should be sorted
212
+ * @param orderType The key of the entity that the array should be sorted by
213
+ * @returns A new reference of the ordered array
213
214
  */
214
215
  function orderByArray(values, orderType) {
215
216
  return [...values].sort((a, b) => {
@@ -272,11 +273,11 @@ const useTagFilteredThumbnailListItems = _ref => {
272
273
  };
273
274
  };
274
275
 
275
- /**
276
- * Filters a list of event by a search term
277
- * @param allEvents event list that will be formatted
278
- * @param initialSearchTerm
279
- * @returns
276
+ /**
277
+ * Filters a list of event by a search term
278
+ * @param allEvents event list that will be formatted
279
+ * @param initialSearchTerm
280
+ * @returns
280
281
  */
281
282
  const useFilteredThumbnailListItems = function (allItems) {
282
283
  let initialSearchTerm = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
@@ -426,15 +427,15 @@ ThumbnailListFilterTags.defaultProps = {
426
427
  muiCollapseBreakpoint: 'md'
427
428
  };
428
429
 
429
- /**
430
- * Displays a generic MUI select dropdown.
431
- * Optinal collapses to a sort icon at a certain breakpoint
432
- * @param props.label Select Label
433
- * @param props.width * Width of the input field
434
- * @param props.collapseBreakPoint * MUI breakpoint after that the select will collapse to the sort icon
435
- * @param props.onChangeCallback * Callback function that gets triggered once a item is selected
436
- * @param props.items * Array of items (name-value-pairs) that will be the select options
437
- * @returns Drowpdown Input Component
430
+ /**
431
+ * Displays a generic MUI select dropdown.
432
+ * Optinal collapses to a sort icon at a certain breakpoint
433
+ * @param props.label Select Label
434
+ * @param props.width * Width of the input field
435
+ * @param props.collapseBreakPoint * MUI breakpoint after that the select will collapse to the sort icon
436
+ * @param props.onChangeCallback * Callback function that gets triggered once a item is selected
437
+ * @param props.items * Array of items (name-value-pairs) that will be the select options
438
+ * @returns Drowpdown Input Component
438
439
  */
439
440
  function DropdownInput(props) {
440
441
  var _props$defaultValue, _props$collapseBreakp;
@@ -564,11 +565,11 @@ ThumbnailListHeader.SearchField = ThumbnailListSearchField$1;
564
565
  ThumbnailListHeader.FilterTags = ThumbnailListFilterTags;
565
566
  ThumbnailListHeader.Sort = ThumbnailListHeaderSort;
566
567
 
567
- /**
568
- * Main Component: Renders all sub components
569
- * Includes ThumbnailList Provider for context data
570
- * @param props react children, items
571
- * @returns component
568
+ /**
569
+ * Main Component: Renders all sub components
570
+ * Includes ThumbnailList Provider for context data
571
+ * @param props react children, items
572
+ * @returns component
572
573
  */
573
574
  function ThumbnailList(props) {
574
575
  const combinedConfig = {
package/dist/index.esm.js CHANGED
@@ -17,10 +17,10 @@ const useThumbnailListItemContext = () => {
17
17
  return context;
18
18
  };
19
19
 
20
- /**
21
- * Creates a ellipies text with webkit css styles
22
- * @param props lineClamp: lines till ellipses
23
- * @returns component
20
+ /**
21
+ * Creates a ellipies text with webkit css styles
22
+ * @param props lineClamp: lines till ellipses
23
+ * @returns component
24
24
  */
25
25
  function EllipsisContainer(props) {
26
26
  const EllipsisContainer = styled('div')(p => ({
@@ -128,6 +128,7 @@ var ThumbnailListItem$1 = /*#__PURE__*/React.memo(ThumbnailListItem);
128
128
  const RatioWrapper = styled('div')(() => ({
129
129
  // Assuming a 16:9 aspect ratio
130
130
  paddingTop: '27.75%',
131
+ // 9 / 16 = 0.5625
131
132
  position: 'relative',
132
133
  width: '100%',
133
134
  '& > *': {
@@ -193,11 +194,11 @@ ThumbnailListMainContent.defaultProps = {
193
194
  }
194
195
  };
195
196
 
196
- /**
197
- * Generic method that sorts an array of items based on an item key
198
- * @param values The array that should be sorted
199
- * @param orderType The key of the entity that the array should be sorted by
200
- * @returns A new reference of the ordered array
197
+ /**
198
+ * Generic method that sorts an array of items based on an item key
199
+ * @param values The array that should be sorted
200
+ * @param orderType The key of the entity that the array should be sorted by
201
+ * @returns A new reference of the ordered array
201
202
  */
202
203
  function orderByArray(values, orderType) {
203
204
  return [...values].sort((a, b) => {
@@ -260,11 +261,11 @@ const useTagFilteredThumbnailListItems = _ref => {
260
261
  };
261
262
  };
262
263
 
263
- /**
264
- * Filters a list of event by a search term
265
- * @param allEvents event list that will be formatted
266
- * @param initialSearchTerm
267
- * @returns
264
+ /**
265
+ * Filters a list of event by a search term
266
+ * @param allEvents event list that will be formatted
267
+ * @param initialSearchTerm
268
+ * @returns
268
269
  */
269
270
  const useFilteredThumbnailListItems = function (allItems) {
270
271
  let initialSearchTerm = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
@@ -414,15 +415,15 @@ ThumbnailListFilterTags.defaultProps = {
414
415
  muiCollapseBreakpoint: 'md'
415
416
  };
416
417
 
417
- /**
418
- * Displays a generic MUI select dropdown.
419
- * Optinal collapses to a sort icon at a certain breakpoint
420
- * @param props.label Select Label
421
- * @param props.width * Width of the input field
422
- * @param props.collapseBreakPoint * MUI breakpoint after that the select will collapse to the sort icon
423
- * @param props.onChangeCallback * Callback function that gets triggered once a item is selected
424
- * @param props.items * Array of items (name-value-pairs) that will be the select options
425
- * @returns Drowpdown Input Component
418
+ /**
419
+ * Displays a generic MUI select dropdown.
420
+ * Optinal collapses to a sort icon at a certain breakpoint
421
+ * @param props.label Select Label
422
+ * @param props.width * Width of the input field
423
+ * @param props.collapseBreakPoint * MUI breakpoint after that the select will collapse to the sort icon
424
+ * @param props.onChangeCallback * Callback function that gets triggered once a item is selected
425
+ * @param props.items * Array of items (name-value-pairs) that will be the select options
426
+ * @returns Drowpdown Input Component
426
427
  */
427
428
  function DropdownInput(props) {
428
429
  var _props$defaultValue, _props$collapseBreakp;
@@ -552,11 +553,11 @@ ThumbnailListHeader.SearchField = ThumbnailListSearchField$1;
552
553
  ThumbnailListHeader.FilterTags = ThumbnailListFilterTags;
553
554
  ThumbnailListHeader.Sort = ThumbnailListHeaderSort;
554
555
 
555
- /**
556
- * Main Component: Renders all sub components
557
- * Includes ThumbnailList Provider for context data
558
- * @param props react children, items
559
- * @returns component
556
+ /**
557
+ * Main Component: Renders all sub components
558
+ * Includes ThumbnailList Provider for context data
559
+ * @param props react children, items
560
+ * @returns component
560
561
  */
561
562
  function ThumbnailList(props) {
562
563
  const combinedConfig = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@janrankenhohn/react-thumbnail-list",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "files": [
@@ -13,7 +13,7 @@
13
13
  "scripts": {
14
14
  "build": "rollup -c",
15
15
  "build-watch": "rollup -c -w",
16
- "start-playground": "cd playground && npm run start",
16
+ "play": "cd playground && npm run dev",
17
17
  "i-all": "npm i && cd playground && npm i",
18
18
  "dev": "npm-run-all --parallel build-watch start-playground",
19
19
  "start": "react-scripts start",
@@ -77,7 +77,9 @@
77
77
  "lodash.debounce": "^4.0.8",
78
78
  "react": "^18.0.0",
79
79
  "react-dom": "^18.0.0",
80
- "react-scripts": "5.0.1",
81
80
  "web-vitals": "^2.1.4"
81
+ },
82
+ "overrides": {
83
+ "typescript": "^5.3.2"
82
84
  }
83
85
  }