@websolutespa/bom-mixer-llm 1.8.3 → 1.8.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @websolutespa/bom-mixer-llm
2
2
 
3
+ ## 1.8.5
4
+
5
+ ### Patch Changes
6
+
7
+ - Modified: Product hasPrice
8
+
9
+ ## 1.8.4
10
+
11
+ ### Patch Changes
12
+
13
+ - Modified: Product Card & Product Card Group style
14
+
3
15
  ## 1.8.3
4
16
 
5
17
  ### Patch Changes
@@ -2363,6 +2363,9 @@ llm-embed {
2363
2363
  font-size: clamp(var(--llm-typography-label1-font-size-min) * 1px, var(--llm-typography-label1-font-size-min) * 1px + (100vw - 375px) / 1545 * (var(--llm-typography-label1-font-size-max) - var(--llm-typography-label1-font-size-min)), var(--llm-typography-label1-font-size-max) * 1px);
2364
2364
  font-weight: 700;
2365
2365
  }
2366
+ .llm .llm__product-grow {
2367
+ flex-grow: 1;
2368
+ }
2366
2369
  .llm .llm__product-title {
2367
2370
  line-height: 1;
2368
2371
  font-family: var(--llm-font-primary);
@@ -2371,7 +2374,11 @@ llm-embed {
2371
2374
  letter-spacing: var(--llm-typography-body4-letter-spacing);
2372
2375
  font-size: clamp(var(--llm-typography-body4-font-size-min) * 1px, var(--llm-typography-body4-font-size-min) * 1px + (100vw - 375px) / 1545 * (var(--llm-typography-body4-font-size-max) - var(--llm-typography-body4-font-size-min)), var(--llm-typography-body4-font-size-max) * 1px);
2373
2376
  font-weight: 100;
2374
- flex-grow: 1;
2377
+ overflow: hidden;
2378
+ text-overflow: ellipsis;
2379
+ display: -webkit-box;
2380
+ -webkit-line-clamp: 2;
2381
+ -webkit-box-orient: vertical;
2375
2382
  }
2376
2383
  .llm .llm__product-title:hover {
2377
2384
  text-decoration: underline;
@@ -2384,7 +2391,11 @@ llm-embed {
2384
2391
  letter-spacing: var(--llm-typography-body5-letter-spacing);
2385
2392
  font-size: clamp(var(--llm-typography-body5-font-size-min) * 1px, var(--llm-typography-body5-font-size-min) * 1px + (100vw - 375px) / 1545 * (var(--llm-typography-body5-font-size-max) - var(--llm-typography-body5-font-size-min)), var(--llm-typography-body5-font-size-max) * 1px);
2386
2393
  font-weight: 100;
2387
- flex-grow: 1;
2394
+ overflow: hidden;
2395
+ text-overflow: ellipsis;
2396
+ display: -webkit-box;
2397
+ -webkit-line-clamp: 2;
2398
+ -webkit-box-orient: vertical;
2388
2399
  }
2389
2400
  .llm .llm__product-prices {
2390
2401
  display: flex;
@@ -2443,7 +2454,8 @@ llm-embed {
2443
2454
 
2444
2455
  .llm .llm__products {
2445
2456
  width: 100%;
2446
- margin: 3rem 0;
2457
+ max-width: 1440px;
2458
+ margin: 3rem auto;
2447
2459
  }
2448
2460
  .llm .llm__product {
2449
2461
  height: 100%;
package/dist/cjs/index.js CHANGED
@@ -17,6 +17,7 @@ var react$1 = require('swiper/react');
17
17
  var swiper = require('swiper');
18
18
  var reactDom = require('react-dom');
19
19
  var marked = require('marked');
20
+ var transliteration = require('transliteration');
20
21
 
21
22
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
22
23
 
@@ -157,8 +158,8 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
157
158
  };
158
159
 
159
160
  var font = {
160
- primary: "Aeonik",
161
- secondary: "Capraia"
161
+ primary: "Aeonik, Arial, Helvetica, sans-serif",
162
+ secondary: "Capraia, Georgia, serif"
162
163
  };
163
164
  var typography = {
164
165
  display1: {
@@ -4858,8 +4859,10 @@ const Product = props => {
4858
4859
  }
4859
4860
  const price = asNumber(props.price);
4860
4861
  const fullPrice = asNumber(props.fullPrice) || price;
4862
+ const hasPrice = props.price != null;
4861
4863
  const availability = asNumber(props.availability);
4862
4864
  const hasAvailability = props.availability != null;
4865
+ const labelKey = props.label ? `-${transliteration.slugify(props.label)}` : '';
4863
4866
  return jsxRuntime.jsxs(ProductWrapper, Object.assign({}, props, {
4864
4867
  children: [props.media.type === 'image' && props.url && jsxRuntime.jsxs("a", {
4865
4868
  className: "llm__product-media",
@@ -4875,6 +4878,10 @@ const Product = props => {
4875
4878
  })
4876
4879
  }), props.label && jsxRuntime.jsx("div", {
4877
4880
  className: "llm__product-label",
4881
+ style: {
4882
+ background: `var(--llm-product-label${labelKey}-background, var(--llm-product-label-background))`,
4883
+ color: `var(--llm-product-label${labelKey}-foreground, var(--llm-product-label-foreground))`
4884
+ },
4878
4885
  children: props.label
4879
4886
  })]
4880
4887
  }), props.media.type === 'image' && !props.url && jsxRuntime.jsxs("div", {
@@ -4894,25 +4901,28 @@ const Product = props => {
4894
4901
  children: [props.sku && jsxRuntime.jsx("div", {
4895
4902
  className: "llm__product-sku",
4896
4903
  children: props.sku
4897
- }), props.title && props.url && jsxRuntime.jsx("a", {
4898
- className: "llm__product-title",
4899
- href: props.url,
4900
- target: "_blank",
4901
- rel: "noreferrer",
4902
- dangerouslySetInnerHTML: {
4903
- __html: props.title
4904
- }
4905
- }), props.title && !props.url && jsxRuntime.jsx("div", {
4906
- className: "llm__product-title",
4907
- dangerouslySetInnerHTML: {
4908
- __html: props.title
4909
- }
4910
- }), props.abstract && jsxRuntime.jsx("div", {
4911
- className: "llm__product-abstract",
4912
- dangerouslySetInnerHTML: {
4913
- __html: props.abstract
4914
- }
4915
- }), price && fullPrice && jsxRuntime.jsxs("div", {
4904
+ }), jsxRuntime.jsxs("div", {
4905
+ className: "llm__product-grow",
4906
+ children: [props.title && props.url && jsxRuntime.jsx("a", {
4907
+ className: "llm__product-title",
4908
+ href: props.url,
4909
+ target: "_blank",
4910
+ rel: "noreferrer",
4911
+ dangerouslySetInnerHTML: {
4912
+ __html: props.title
4913
+ }
4914
+ }), props.title && !props.url && jsxRuntime.jsx("div", {
4915
+ className: "llm__product-title",
4916
+ dangerouslySetInnerHTML: {
4917
+ __html: props.title
4918
+ }
4919
+ }), props.abstract && jsxRuntime.jsx("div", {
4920
+ className: "llm__product-abstract",
4921
+ dangerouslySetInnerHTML: {
4922
+ __html: props.abstract
4923
+ }
4924
+ })]
4925
+ }), hasPrice && jsxRuntime.jsxs("div", {
4916
4926
  className: "llm__product-prices",
4917
4927
  children: [jsxRuntime.jsx("div", {
4918
4928
  className: "llm__product-price",
@@ -4921,10 +4931,7 @@ const Product = props => {
4921
4931
  className: "llm__product-fullprice",
4922
4932
  children: currency(fullPrice)
4923
4933
  })]
4924
- }), hasAvailability && (availability ? availability > 100 ? jsxRuntime.jsx("div", {
4925
- className: "llm__product-available",
4926
- children: label('llm.available')
4927
- }) : jsxRuntime.jsx("div", {
4934
+ }), hasAvailability && (availability ? jsxRuntime.jsx("div", {
4928
4935
  className: "llm__product-available",
4929
4936
  children: label('llm.availability', {
4930
4937
  availability: availability
@@ -4975,7 +4982,6 @@ const ProductGroup = props => {
4975
4982
  sm: 6,
4976
4983
  md: 4,
4977
4984
  lg: 3,
4978
- xl: 2,
4979
4985
  children: jsxRuntime.jsx(Product, Object.assign({}, item))
4980
4986
  }, i))
4981
4987
  })