@iit/precision-ui 0.8.22 → 0.8.23

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,65 +1,66 @@
1
1
  import S from "./index.es42.js";
2
- import e from "./index.es23.js";
3
- import I from "./index.es24.js";
4
- import P from "./index.es29.js";
5
- import R from "./index.es38.js";
6
- import _ from "./index.es32.js";
7
- import k from "./index.es33.js";
8
- import x from "./index.es34.js";
2
+ import I from "./index.es23.js";
3
+ import P from "./index.es24.js";
4
+ import R from "./index.es29.js";
5
+ import _ from "./index.es38.js";
6
+ import k from "./index.es32.js";
7
+ import x from "./index.es33.js";
8
+ import y from "./index.es34.js";
9
9
  import t from "react";
10
- const y = {
11
- Advantage: e,
12
- Advantage2: I,
13
- Rate: x,
14
- Product: k,
15
- FeaturedCard: P,
16
- Plate: _
10
+ const e = {
11
+ Advantage: I,
12
+ Advantage2: P,
13
+ Rate: y,
14
+ Product: x,
15
+ FeaturedCard: R,
16
+ Plate: k
17
17
  }, F = ({
18
- title: r,
19
- sectionId: o,
18
+ title: o,
19
+ sectionId: r,
20
20
  desc: a,
21
21
  items: m,
22
22
  component: n = "Advantage",
23
- withoutTopPadding: f = !1,
24
- withTopMargin: i = !1,
25
- withBottomMargin: d = !1,
23
+ withoutTopPadding: p = !1,
24
+ withTopMargin: d = !1,
25
+ withBottomMargin: f = !1,
26
26
  withoutBottomPadding: c = !1,
27
- variant: p,
27
+ variant: i,
28
28
  corners: s,
29
29
  columns: l,
30
30
  hideControlsOnDesktop: u,
31
31
  withoutCarousel: C,
32
32
  footnote: g,
33
- onButtonClick: v
33
+ onButtonClick: v,
34
+ externalComponentMap: A = {}
34
35
  }) => {
35
- const A = y[n] || e;
36
+ const E = { ...e, ...A }[n] || e.Advantage;
36
37
  return /* @__PURE__ */ t.createElement(
37
38
  S,
38
39
  {
39
- title: r,
40
- sectionId: o,
40
+ title: o,
41
+ sectionId: r,
41
42
  desc: a,
42
- variant: p,
43
+ variant: i,
43
44
  corners: s,
44
- withoutTopPadding: f,
45
- withTopMargin: i,
46
- withBottomMargin: d,
45
+ withoutTopPadding: p,
46
+ withTopMargin: d,
47
+ withBottomMargin: f,
47
48
  withoutBottomPadding: c
48
49
  },
49
50
  /* @__PURE__ */ t.createElement(
50
- R,
51
+ _,
51
52
  {
52
53
  items: m,
53
54
  columns: l,
54
55
  hideControlsOnDesktop: u,
55
56
  withoutCarousel: C,
56
- renderItem: (E, G) => /* @__PURE__ */ t.createElement(A, { key: G, ...E, onButtonClick: v }),
57
+ renderItem: (G, M) => /* @__PURE__ */ t.createElement(E, { key: M, ...G, onButtonClick: v }),
57
58
  footnote: g
58
59
  }
59
60
  )
60
61
  );
61
- }, D = F;
62
+ }, J = F;
62
63
  export {
63
- D as default
64
+ J as default
64
65
  };
65
66
  //# sourceMappingURL=index.es43.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es43.js","sources":["../src/sections/CardsGridSection.tsx"],"sourcesContent":["import Section, { SectionProps } from './Section'\r\n\r\nimport Advantage from '@/components/cards/Advantage'\r\nimport Advantage2 from '@/components/cards/Advantage2'\r\nimport FeaturedCard from '@/components/cards/FeaturedCard'\r\nimport GridIterator from '@/components/GridIterator'\r\nimport Plate from '@/components/cards/Plate'\r\nimport Product from '@/components/cards/Product'\r\nimport Rate from '@/components/cards/Rate'\r\nimport React from 'react'\r\n\r\n// Map component names to actual components\r\nconst componentMap: { [key: string]: React.ElementType } = {\r\n Advantage,\r\n Advantage2,\r\n Rate,\r\n Product,\r\n FeaturedCard,\r\n Plate,\r\n}\r\n\r\nexport interface CardsGridSectionProps<T> {\r\n title: string\r\n sectionId?: string\r\n desc?: string\r\n items: T[]\r\n component?: string\r\n withoutTopPadding?: boolean\r\n withoutBottomPadding?: boolean\r\n withTopMargin?: boolean\r\n withBottomMargin?: boolean\r\n variant?: SectionProps['variant']\r\n corners?: SectionProps['corners']\r\n columns?: number\r\n hideControlsOnDesktop?: boolean\r\n withoutCarousel?: boolean\r\n footnote?: string\r\n onButtonClick?: ({\r\n uniqId,\r\n title,\r\n }: {\r\n uniqId?: string\r\n title?: string\r\n }) => void\r\n}\r\n\r\nconst CardsGridSection = <T,>({\r\n title,\r\n sectionId,\r\n desc,\r\n items,\r\n component = 'Advantage',\r\n withoutTopPadding = false,\r\n withTopMargin = false,\r\n withBottomMargin = false,\r\n withoutBottomPadding = false,\r\n variant,\r\n corners,\r\n columns,\r\n hideControlsOnDesktop,\r\n withoutCarousel,\r\n footnote,\r\n onButtonClick,\r\n}: CardsGridSectionProps<T>) => {\r\n const Component = componentMap[component] || Advantage\r\n\r\n return (\r\n <Section\r\n title={title}\r\n sectionId={sectionId}\r\n desc={desc}\r\n variant={variant}\r\n corners={corners}\r\n withoutTopPadding={withoutTopPadding}\r\n withTopMargin={withTopMargin}\r\n withBottomMargin={withBottomMargin}\r\n withoutBottomPadding={withoutBottomPadding}\r\n >\r\n <GridIterator\r\n items={items}\r\n columns={columns}\r\n hideControlsOnDesktop={hideControlsOnDesktop}\r\n withoutCarousel={withoutCarousel}\r\n renderItem={(item, index) => (\r\n <Component key={index} {...item} onButtonClick={onButtonClick} />\r\n )}\r\n footnote={footnote}\r\n />\r\n </Section>\r\n )\r\n}\r\n\r\nexport default CardsGridSection\r\n"],"names":["componentMap","Advantage","Advantage2","Rate","Product","FeaturedCard","Plate","CardsGridSection","title","sectionId","desc","items","component","withoutTopPadding","withTopMargin","withBottomMargin","withoutBottomPadding","variant","corners","columns","hideControlsOnDesktop","withoutCarousel","footnote","onButtonClick","Component","React","Section","GridIterator","item","index","CardsGridSection$1"],"mappings":";;;;;;;;;AAYA,MAAMA,IAAqD;AAAA,EACzD,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,cAAAC;AAAA,EACA,OAAAC;AACF,GA2BMC,IAAmB,CAAK;AAAA,EAC5B,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,mBAAAC,IAAoB;AAAA,EACpB,eAAAC,IAAgB;AAAA,EAChB,kBAAAC,IAAmB;AAAA,EACnB,sBAAAC,IAAuB;AAAA,EACvB,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,eAAAC;AACF,MAAgC;AACxB,QAAAC,IAAYxB,EAAaY,CAAS,KAAKX;AAG3C,SAAAwB,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAAlB;AAAA,MACA,WAAAC;AAAA,MACA,MAAAC;AAAA,MACA,SAAAO;AAAA,MACA,SAAAC;AAAA,MACA,mBAAAL;AAAA,MACA,eAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,sBAAAC;AAAA,IAAA;AAAA,IAEAS,gBAAAA,EAAA;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,OAAAhB;AAAA,QACA,SAAAQ;AAAA,QACA,uBAAAC;AAAA,QACA,iBAAAC;AAAA,QACA,YAAY,CAACO,GAAMC,MACjBJ,gBAAAA,EAAA,cAACD,KAAU,KAAKK,GAAQ,GAAGD,GAAM,eAAAL,EAA8B,CAAA;AAAA,QAEjE,UAAAD;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN,GAEAQ,IAAevB;"}
1
+ {"version":3,"file":"index.es43.js","sources":["../src/sections/CardsGridSection.tsx"],"sourcesContent":["import Section, { SectionProps } from './Section'\r\n\r\nimport Advantage from '@/components/cards/Advantage'\r\nimport Advantage2 from '@/components/cards/Advantage2'\r\nimport FeaturedCard from '@/components/cards/FeaturedCard'\r\nimport GridIterator from '@/components/GridIterator'\r\nimport Plate from '@/components/cards/Plate'\r\nimport Product from '@/components/cards/Product'\r\nimport Rate from '@/components/cards/Rate'\r\nimport React from 'react'\r\n\r\nconst defaultComponentMap: { [key: string]: React.ElementType } = {\r\n Advantage,\r\n Advantage2,\r\n Rate,\r\n Product,\r\n FeaturedCard,\r\n Plate,\r\n}\r\n\r\nexport interface CardsGridSectionProps<T> {\r\n title: string\r\n sectionId?: string\r\n desc?: string\r\n items: T[]\r\n component?: string\r\n withoutTopPadding?: boolean\r\n withoutBottomPadding?: boolean\r\n withTopMargin?: boolean\r\n withBottomMargin?: boolean\r\n variant?: SectionProps['variant']\r\n corners?: SectionProps['corners']\r\n columns?: number\r\n hideControlsOnDesktop?: boolean\r\n withoutCarousel?: boolean\r\n footnote?: string\r\n onButtonClick?: ({\r\n uniqId,\r\n title,\r\n }: {\r\n uniqId?: string\r\n title?: string\r\n }) => void\r\n externalComponentMap?: { [key: string]: React.ElementType }\r\n}\r\n\r\nconst CardsGridSection = <T,>({\r\n title,\r\n sectionId,\r\n desc,\r\n items,\r\n component = 'Advantage',\r\n withoutTopPadding = false,\r\n withTopMargin = false,\r\n withBottomMargin = false,\r\n withoutBottomPadding = false,\r\n variant,\r\n corners,\r\n columns,\r\n hideControlsOnDesktop,\r\n withoutCarousel,\r\n footnote,\r\n onButtonClick,\r\n externalComponentMap = {},\r\n}: CardsGridSectionProps<T>) => {\r\n const componentMap = { ...defaultComponentMap, ...externalComponentMap }\r\n const Component = componentMap[component] || defaultComponentMap.Advantage\r\n\r\n return (\r\n <Section\r\n title={title}\r\n sectionId={sectionId}\r\n desc={desc}\r\n variant={variant}\r\n corners={corners}\r\n withoutTopPadding={withoutTopPadding}\r\n withTopMargin={withTopMargin}\r\n withBottomMargin={withBottomMargin}\r\n withoutBottomPadding={withoutBottomPadding}\r\n >\r\n <GridIterator\r\n items={items}\r\n columns={columns}\r\n hideControlsOnDesktop={hideControlsOnDesktop}\r\n withoutCarousel={withoutCarousel}\r\n renderItem={(item, index) => (\r\n <Component key={index} {...item} onButtonClick={onButtonClick} />\r\n )}\r\n footnote={footnote}\r\n />\r\n </Section>\r\n )\r\n}\r\n\r\nexport default CardsGridSection\r\n"],"names":["defaultComponentMap","Advantage","Advantage2","Rate","Product","FeaturedCard","Plate","CardsGridSection","title","sectionId","desc","items","component","withoutTopPadding","withTopMargin","withBottomMargin","withoutBottomPadding","variant","corners","columns","hideControlsOnDesktop","withoutCarousel","footnote","onButtonClick","externalComponentMap","Component","React","Section","GridIterator","item","index","CardsGridSection$1"],"mappings":";;;;;;;;;AAWA,MAAMA,IAA4D;AAAA,EAChE,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,cAAAC;AAAA,EACA,OAAAC;AACF,GA4BMC,IAAmB,CAAK;AAAA,EAC5B,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,mBAAAC,IAAoB;AAAA,EACpB,eAAAC,IAAgB;AAAA,EAChB,kBAAAC,IAAmB;AAAA,EACnB,sBAAAC,IAAuB;AAAA,EACvB,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,eAAAC;AAAA,EACA,sBAAAC,IAAuB,CAAC;AAC1B,MAAgC;AAE9B,QAAMC,IADe,EAAE,GAAGzB,GAAqB,GAAGwB,EAAqB,EACxCZ,CAAS,KAAKZ,EAAoB;AAG/D,SAAA0B,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAAnB;AAAA,MACA,WAAAC;AAAA,MACA,MAAAC;AAAA,MACA,SAAAO;AAAA,MACA,SAAAC;AAAA,MACA,mBAAAL;AAAA,MACA,eAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,sBAAAC;AAAA,IAAA;AAAA,IAEAU,gBAAAA,EAAA;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,OAAAjB;AAAA,QACA,SAAAQ;AAAA,QACA,uBAAAC;AAAA,QACA,iBAAAC;AAAA,QACA,YAAY,CAACQ,GAAMC,MACjBJ,gBAAAA,EAAA,cAACD,KAAU,KAAKK,GAAQ,GAAGD,GAAM,eAAAN,EAA8B,CAAA;AAAA,QAEjE,UAAAD;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN,GAEAS,IAAexB;"}
@@ -1,4 +1,5 @@
1
1
  import { SectionProps } from './Section';
2
+ import { default as React } from 'react';
2
3
 
3
4
  export interface CardsGridSectionProps<T> {
4
5
  title: string;
@@ -20,7 +21,10 @@ export interface CardsGridSectionProps<T> {
20
21
  uniqId?: string;
21
22
  title?: string;
22
23
  }) => void;
24
+ externalComponentMap?: {
25
+ [key: string]: React.ElementType;
26
+ };
23
27
  }
24
- declare const CardsGridSection: <T>({ title, sectionId, desc, items, component, withoutTopPadding, withTopMargin, withBottomMargin, withoutBottomPadding, variant, corners, columns, hideControlsOnDesktop, withoutCarousel, footnote, onButtonClick, }: CardsGridSectionProps<T>) => import("react/jsx-dev-runtime").JSX.Element;
28
+ declare const CardsGridSection: <T>({ title, sectionId, desc, items, component, withoutTopPadding, withTopMargin, withBottomMargin, withoutBottomPadding, variant, corners, columns, hideControlsOnDesktop, withoutCarousel, footnote, onButtonClick, externalComponentMap, }: CardsGridSectionProps<T>) => import("react/jsx-dev-runtime").JSX.Element;
25
29
  export default CardsGridSection;
26
30
  //# sourceMappingURL=CardsGridSection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CardsGridSection.d.ts","sourceRoot":"","sources":["../../src/sections/CardsGridSection.tsx"],"names":[],"mappings":"AAAA,OAAgB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAqBjD,MAAM,WAAW,qBAAqB,CAAC,CAAC;IACtC,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,CAAC,EAAE,CAAA;IACV,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B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AC,EAAE,YAAY,CAAC,SAAS,CAAC,CAAA;IACjC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,CAAC,EACf,MAAM,EACN,KAAK,GACN,EAAE;QACD,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,KAAK,IAAI,CAAA;IACV,oBAAoB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,WAAW,CAAA;KAAE,CAAA;CAC5D;AAED,QAAA,MAAM,gBAAgB,iPAkBnB,sBAAsB,CAAC,CAAC,gDA4B1B,CAAA;AAED,eAAe,gBAAgB,CAAA"}
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "type": "git",
14
14
  "url": "git+https://github.com/wowxoxo/precision-ui.git"
15
15
  },
16
- "version": "0.8.22",
16
+ "version": "0.8.23",
17
17
  "type": "module",
18
18
  "module": "./dist/index.es.js",
19
19
  "types": "./dist/index.d.ts",