@ed.yakovich/example-component-library-equipment-summary 1.0.2 → 1.0.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.
Files changed (46) hide show
  1. package/dist/component/index.js +105 -4
  2. package/dist/main.js +1 -1
  3. package/package.json +5 -4
  4. package/dist/index-0d8e0844-BJzWsYCM.js +0 -7403
  5. package/dist/index-C-4hHKdi.js +0 -29193
  6. package/dist/index-b30029d4-B5hFbw-Y.js +0 -12
  7. package/dist/index-e6818ded-r_t6ryaW.js +0 -57
  8. package/dist/index.esm-322571ff-D1REhsOg.js +0 -41
  9. package/dist/prism-accordion.entry-BX-iEByA.js +0 -51
  10. package/dist/prism-avatar_2.entry-B9brnhdm.js +0 -68
  11. package/dist/prism-badge.entry-C_czUPzs.js +0 -58
  12. package/dist/prism-banner.entry-CRnDNpek.js +0 -82
  13. package/dist/prism-breadcrumb.entry-DTAascgy.js +0 -33
  14. package/dist/prism-button_2.entry-CD_OVoHK.js +0 -110
  15. package/dist/prism-card.entry-NA7gaFn-.js +0 -119
  16. package/dist/prism-carousel.entry-Dfd7ptar.js +0 -3111
  17. package/dist/prism-checkbox-group.entry-Dhq-3FpV.js +0 -62
  18. package/dist/prism-checkbox.entry-C3ksNIYW.js +0 -99
  19. package/dist/prism-data-table.entry-DWrhFcGy.js +0 -10475
  20. package/dist/prism-datepicker.entry-CrqvZxgz.js +0 -249
  21. package/dist/prism-form.entry-CHxUVCoq.js +0 -42
  22. package/dist/prism-grid.entry-Ckq2d5bR.js +0 -28
  23. package/dist/prism-header.entry-pL5IeXBV.js +0 -202
  24. package/dist/prism-hero.entry-KHjcpu3z.js +0 -23
  25. package/dist/prism-icon_2.entry-3GIqCEGw.js +0 -118
  26. package/dist/prism-image.entry-Ci-gCjol.js +0 -38
  27. package/dist/prism-input-file.entry-DMzSpPkO.js +0 -119
  28. package/dist/prism-input-otp.entry-DDphouyO.js +0 -63
  29. package/dist/prism-input-text.entry-DObwVtEd.js +0 -228
  30. package/dist/prism-input-textarea.entry-DerlDw-B.js +0 -140
  31. package/dist/prism-layout.entry-BvalK_M7.js +0 -20
  32. package/dist/prism-lineitem.entry-Dqt3fL6f.js +0 -44
  33. package/dist/prism-menu.entry-DZs88a-5.js +0 -231
  34. package/dist/prism-modal.entry-Dtqle8Jl.js +0 -94
  35. package/dist/prism-pagination.entry-okvY_nla.js +0 -60
  36. package/dist/prism-popover.entry-C0vAlRm5.js +0 -1013
  37. package/dist/prism-popper.entry-BzpQ2aT1.js +0 -959
  38. package/dist/prism-progress.entry-DbWQpzaS.js +0 -79
  39. package/dist/prism-radio-group.entry-D-4VY6t5.js +0 -66
  40. package/dist/prism-radio.entry-BAZkDl8b.js +0 -101
  41. package/dist/prism-select.entry-CCy9sWuL.js +0 -230
  42. package/dist/prism-switch.entry-Bj7Ywn1d.js +0 -95
  43. package/dist/prism-tab.entry-DeILjrB-.js +0 -20
  44. package/dist/prism-tabs.entry-B9Tlkmh2.js +0 -70
  45. package/dist/prism-tooltip.entry-DvhZeXxl.js +0 -52
  46. package/dist/prism-typeahead.entry-DRQBaxC2.js +0 -1234
@@ -1,6 +1,107 @@
1
- import "react/jsx-runtime";
2
- import { E as t } from "../index-C-4hHKdi.js";
3
- import "./context/index.js";
1
+ import { jsx as e, jsxs as o } from "react/jsx-runtime";
2
+ import { useEquipmentSummaryContext as $ } from "./context/index.js";
3
+ import { createContext as w, useContext as A } from "react";
4
+ const S = w({}), z = () => A(S), H = (a) => {
5
+ const { isHidden: s, componentId: t = "", icon: c = "" } = a, d = z(), r = d == null ? void 0 : d.isHidden, m = (d == null ? void 0 : d.icon) || "", i = () => ({
6
+ isHiddenVal: r || s,
7
+ iconVal: m || c
8
+ }), { isHiddenVal: p, iconVal: n } = i();
9
+ return p ? null : /* @__PURE__ */ e("span", { "data-component-id": `Icon--${t}`, children: /* @__PURE__ */ e("i", { className: `fas ${n}` }) });
10
+ }, j = w({}), I = () => A(j), E = (a) => {
11
+ const { children: s, isHidden: t, componentId: c = "", label: d = "", description: r = "", labelSecondary: m = "", onClick: i, collapsed: p = !1 } = a, n = I(), v = n == null ? void 0 : n.isHidden, h = (n == null ? void 0 : n.label) || "", V = (n == null ? void 0 : n.description) || "", f = (n == null ? void 0 : n.labelSecondary) || "", x = (n == null ? void 0 : n.onClick) || "", y = n == null ? void 0 : n.collapsed, N = () => ({
12
+ isHiddenVal: v || t,
13
+ labelVal: h || d,
14
+ descriptionVal: V || r,
15
+ labelSecondaryVal: f || m,
16
+ onClickVal: x || i,
17
+ collapsedVal: !!(y || p)
18
+ }), { isHiddenVal: k, labelVal: b, descriptionVal: C, labelSecondaryVal: l, onClickVal: u, collapsedVal: g } = N();
19
+ return k ? null : /* @__PURE__ */ e(
20
+ "div",
21
+ {
22
+ "data-component-id": `Accordion-Parent--${c}`,
23
+ className: "@container/accordion",
24
+ children: /* @__PURE__ */ o(
25
+ "details",
26
+ {
27
+ ...!g && open,
28
+ "data-component-id": "Accordion",
29
+ className: "rounded-lg border-solid border-3 border-blue-500",
30
+ children: [
31
+ /* @__PURE__ */ o("summary", { onClick: u, "data-component-id": "Accordion--trigger", className: "cursor-pointer p-6", children: [
32
+ /* @__PURE__ */ o("div", { className: "flex justify-between", children: [
33
+ /* @__PURE__ */ e("div", { className: "text-xl font-bold", children: b }),
34
+ l && /* @__PURE__ */ e("div", { className: "text-sm", children: l })
35
+ ] }),
36
+ /* @__PURE__ */ e("div", { className: "text-xs", children: C })
37
+ ] }),
38
+ /* @__PURE__ */ e("div", { "data-component-id": "Accordion--drawer", className: "p-6 border-t-3 border-blue-500 border-solid", children: s }),
39
+ /* @__PURE__ */ e("style", { children: ` :root { interpolate-size: allow-keywords; }
40
+ [data-component-id="Accordion"] { overflow: hidden; }
41
+ [data-component-id="Accordion--trigger"] { list-style: none; }
42
+ [data-component-id="Accordion--trigger"]::-webkit-details-marker { display: none; }
43
+ @supports (block-size: auto) {
44
+ [data-component-id="Accordion"]::details-content { block-size: 0; transition: block-size ease-in-out 0.35s, content-visibility ease-in-out 0.35s; transition-behavior: allow-discrete; }
45
+ [data-component-id="Accordion"][open]::details-content { block-size: auto; }
46
+ } ` })
47
+ ]
48
+ }
49
+ )
50
+ }
51
+ );
52
+ }, F = (a) => {
53
+ const {
54
+ isHidden: s,
55
+ componentId: t = "",
56
+ heading: c = "",
57
+ description: d = "",
58
+ isLoading: r = !1,
59
+ equipmentList: m = []
60
+ } = a, i = $(), p = i == null ? void 0 : i.isHidden, n = (i == null ? void 0 : i.heading) || "", v = (i == null ? void 0 : i.description) || "", h = (i == null ? void 0 : i.equipmentList) || [], V = (i == null ? void 0 : i.isLoading) || "", f = () => ({
61
+ isHiddenVal: p || s,
62
+ headingVal: n || c,
63
+ descriptionVal: v || d,
64
+ isLoadingVal: V || r,
65
+ equipmentListVal: h.length > 0 ? h : m
66
+ }), { isHiddenVal: x, headingVal: y, descriptionVal: N, isLoadingVal: k, equipmentListVal: b } = f(), C = (l) => {
67
+ switch (l) {
68
+ case "return":
69
+ return "bg-[#bd0000]";
70
+ case "keep":
71
+ return "bg-[#00ad48]";
72
+ default:
73
+ return "bg-[#cc7700]";
74
+ }
75
+ };
76
+ return x ? null : /* @__PURE__ */ e(
77
+ "div",
78
+ {
79
+ "data-component-id": `EquipmentSummary--${t}`,
80
+ className: "border-3 border-blue-500 border-solid rounded-lg p-2 @container/equipmentsummary",
81
+ children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
82
+ E,
83
+ {
84
+ label: y,
85
+ description: N,
86
+ collapsed: !1,
87
+ children: /* @__PURE__ */ e("div", { children: k ? /* @__PURE__ */ e("div", { className: "w-full mx-auto text-center", children: /* @__PURE__ */ e(H, { icon: "fa-spinner fa-pulse fa-lg" }) }) : /* @__PURE__ */ e("div", { children: b.length > 0 && /* @__PURE__ */ e("ul", { className: "space-y-4", children: b.map(({ icon: l, title: u, description: g, actionType: q }, L) => /* @__PURE__ */ o("li", { children: [
88
+ /* @__PURE__ */ o("div", { className: "@xs/equipmentsummary:flex @xs/equipmentsummary:justify-between", children: [
89
+ /* @__PURE__ */ o("div", { className: "flex gap-2", children: [
90
+ l && /* @__PURE__ */ e(H, { icon: l }),
91
+ u && /* @__PURE__ */ e("span", { children: u })
92
+ ] }),
93
+ q && /* @__PURE__ */ e("div", { className: "ml-8 mb-2 @xs/equipmentsummary:ml-0 @xs/equipmentsummary:mb-0", children: /* @__PURE__ */ o("div", { className: "flex gap-1 items-center", children: [
94
+ /* @__PURE__ */ e("div", { className: `w-[12px] h-[12px] rounded-full ${C(q)}` }),
95
+ /* @__PURE__ */ e("div", { children: q })
96
+ ] }) })
97
+ ] }),
98
+ g && /* @__PURE__ */ e("p", { className: "ml-8 text-xs", children: /* @__PURE__ */ e("em", { children: g }) })
99
+ ] }, `${u}-${L}`)) }) }) })
100
+ }
101
+ ) })
102
+ }
103
+ );
104
+ };
4
105
  export {
5
- t as EquipmentSummary
106
+ F as EquipmentSummary
6
107
  };
package/dist/main.js CHANGED
@@ -1,4 +1,4 @@
1
- import { E as e } from "./index-C-4hHKdi.js";
1
+ import { EquipmentSummary as e } from "./component/index.js";
2
2
  import { EquipmentSummaryContextProvider as t } from "./component/context/index.js";
3
3
  export {
4
4
  e as EquipmentSummary,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@ed.yakovich/example-component-library-equipment-summary",
3
3
  "author": "Ed Yakovich",
4
4
  "private": false,
5
- "version": "1.0.2",
5
+ "version": "1.0.4",
6
6
  "type": "module",
7
7
  "exports": {
8
8
  ".": {
@@ -24,8 +24,7 @@
24
24
  },
25
25
  "peerDependencies": {
26
26
  "react": "^18.0.0 || ^19.0.0",
27
- "react-dom": "^18.0.0 || ^19.0.0",
28
- "@prism-ui/react": "^7.30.2"
27
+ "react-dom": "^18.0.0 || ^19.0.0"
29
28
  },
30
29
  "devDependencies": {
31
30
  "@types/node": "^22.5.4",
@@ -44,6 +43,8 @@
44
43
  "typescript": "^5.6.2",
45
44
  "vite": "^5.4.4",
46
45
  "vite-plugin-dts": "^4.2.1",
47
- "vite-plugin-lib-inject-css": "^2.1.1"
46
+ "vite-plugin-lib-inject-css": "^2.1.1",
47
+ "@ed.yakovich/example-component-library-icon": "^1.0.3",
48
+ "@ed.yakovich/example-component-library-accordion": "^1.0.3"
48
49
  }
49
50
  }