@hortiview/shared-components 0.0.4529 → 0.0.4540

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 (30) hide show
  1. package/dist/{ListAreaService-BPp_O2BH.js → ListAreaService-CFOmATRF.js} +17 -16
  2. package/dist/SearchBar-CY2zfu6B.js +3232 -0
  3. package/dist/assets/main.css +22 -0
  4. package/dist/component-D1YrRAXe.js +673 -0
  5. package/dist/components/BaseView/BaseView.d.ts +5 -1
  6. package/dist/components/BaseView/BaseView.js +300 -44
  7. package/dist/components/BaseView/BaseView.test.js +1 -1
  8. package/dist/components/BasicHeading/BasicHeading.js +27 -26
  9. package/dist/components/BasicHeading/BasicHeading.test.js +333 -32
  10. package/dist/components/BlockView/BlockView.js +17 -17
  11. package/dist/components/EmptyView/EmptyView.js +247 -8
  12. package/dist/components/HashTabView/HashTabView.js +1845 -59
  13. package/dist/components/Iconify/Iconify.js +1 -1
  14. package/dist/components/ListArea/ListArea.js +5326 -755
  15. package/dist/components/ListArea/ListArea.test.js +2 -2
  16. package/dist/components/ListArea/ListAreaService.js +5 -4
  17. package/dist/components/SearchBar/SearchBar.js +3 -31
  18. package/dist/components/SearchBar/SearchBar.test.js +1 -1
  19. package/dist/hooks/useBreakpoint.js +2 -2
  20. package/dist/index.es-BD4kFWFx.js +673 -0
  21. package/dist/index.es-CUWXKh7P.js +106 -0
  22. package/dist/index.es-Cv6meSAn.js +1067 -0
  23. package/dist/index.es-DYsXox--.js +151 -0
  24. package/dist/index.es-WZ1mqvGz.js +1769 -0
  25. package/dist/index.es-mBp_Btvi.js +45 -0
  26. package/dist/main.d.ts +1 -0
  27. package/dist/main.js +23 -22
  28. package/dist/tslib.es6-BOWp4lfV.js +72 -0
  29. package/dist/{useBreakpoint-DyAmuka7.js → useBreakpoint-DROHPVxO.js} +2 -2
  30. package/package.json +1 -1
@@ -1,10 +1,249 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { Hero as i, HeroContent as n, Icon as h } from "@element/react-components";
3
- const c = ({
4
- title: e = "",
5
- subtitle: r = "",
6
- icon: t = "dashbord"
7
- }) => /* @__PURE__ */ o(i, { style: { width: "100%", height: "25vh" }, children: /* @__PURE__ */ o(n, { logo: /* @__PURE__ */ o(h, { iconSize: "large", icon: t }), overline: "", subtitle: r, title: e }) });
1
+ import { jsx as k } from "react/jsx-runtime";
2
+ import { P as e, c as P, _ as C } from "../../index.es-WZ1mqvGz.js";
3
+ import l, { forwardRef as H, useRef as T, useImperativeHandle as O, useMemo as p } from "react";
4
+ import { G as E } from "../../index.es-DYsXox--.js";
5
+ import { d as N } from "../../index.es-BD4kFWFx.js";
6
+ import { I as x } from "../../index.es-Cv6meSAn.js";
7
+ const $ = {
8
+ /**
9
+ * Aligns the Hero contents.
10
+ *
11
+ * Defaults to **'centered'**.
12
+ */
13
+ alignment: e.oneOf(["center-bottom", "center-top", "centered", "left-bottom", "left-center", "left-top", "right-bottom", "right-center", "right-top"]),
14
+ /**
15
+ * Content to be rendered inside the Hero.
16
+ *
17
+ * Defaults to **null**.
18
+ */
19
+ children: e.node,
20
+ /**
21
+ * The css class name to be passed through to the component markup.
22
+ *
23
+ * Defaults to **undefined**.
24
+ */
25
+ className: e.string,
26
+ /**
27
+ * Image Url for Hero background image
28
+ *
29
+ * Defaults to **null**.
30
+ */
31
+ imageUrl: e.string,
32
+ /**
33
+ * Adds an overlay over the Hero. Use `overlayProps` to send props to the Hero Overlay component. See Hero Overlay for prop details.
34
+ *
35
+ * Defaults to **false**.
36
+ */
37
+ overlay: e.bool,
38
+ /**
39
+ * Props sent to Hero Overlay. See Hero Overlay for prop details.
40
+ *
41
+ * Defaults to **{}**.
42
+ */
43
+ overlayProps: e.object,
44
+ /**
45
+ * Override the default background color. Can only be used if background image is omitted.
46
+ *
47
+ * Defaults to **empty string**.
48
+ */
49
+ themeColor: e.oneOf(["", "surface", "primary", "secondary"])
50
+ }, I = {
51
+ alignment: "centered",
52
+ children: null,
53
+ className: void 0,
54
+ imageUrl: null,
55
+ overlay: !1,
56
+ overlayProps: {},
57
+ themeColor: ""
58
+ }, j = {
59
+ /**
60
+ * Content to be rendered inside the Hero Content. Will take precedence over props.
61
+ *
62
+ * Defaults to **null**.
63
+ */
64
+ children: e.node,
65
+ /**
66
+ * The css class name to be passed through to the component markup.
67
+ *
68
+ * Defaults to **undefined**.
69
+ */
70
+ className: e.string,
71
+ /**
72
+ * Button to be rendered inside the Hero Content.
73
+ *
74
+ * Defaults to **null**.
75
+ */
76
+ heroBtn: e.node,
77
+ /**
78
+ * Logo to be rendered inside the Hero Content.
79
+ *
80
+ * Defaults to **null**.
81
+ */
82
+ logo: e.node,
83
+ /**
84
+ * Overline text for the Hero Content. Cannot be used with children.
85
+ *
86
+ * Defaults to **'Overline'**.
87
+ */
88
+ overline: e.string,
89
+ /**
90
+ * Adds a padding style to the Hero. Must be a valid CSS padding declaration. i.e. 38px 30px
91
+ *
92
+ * Defaults to **null**.
93
+ */
94
+ padding: e.string,
95
+ /**
96
+ * Passthrough style object.
97
+ *
98
+ * Defaults to **null**.
99
+ */
100
+ style: e.object,
101
+ /**
102
+ * Subtitle text for the Hero Content. Cannot be used with children.
103
+ *
104
+ * Defaults to **'Subtitle'**.
105
+ */
106
+ subtitle: e.string,
107
+ /**
108
+ * Set the color of the text. Make sure to check for accessibility compliance.
109
+ *
110
+ * Defaults to **'on-unknown-black-active'**.
111
+ */
112
+ textColor: e.oneOf(["on-unknown-black-active", "on-unknown-white-active", "primary", "secondary", "on-primary", "on-secondary"]),
113
+ /**
114
+ * Title text for the Hero Content. Cannot be used with children.
115
+ *
116
+ * Defaults to **'Title'**.
117
+ */
118
+ title: e.string
119
+ }, B = {
120
+ children: null,
121
+ className: void 0,
122
+ heroBtn: null,
123
+ logo: null,
124
+ overline: "Overline",
125
+ padding: null,
126
+ style: null,
127
+ subtitle: "Subtitle",
128
+ textColor: "on-unknown-black-active",
129
+ title: "Title"
130
+ }, D = {
131
+ /**
132
+ * Content to be rendered inside the Hero Overlay. Useful for angles or other non semantic elements displayed in the Hero.
133
+ *
134
+ * Defaults to **null**.
135
+ */
136
+ children: e.node,
137
+ /**
138
+ * The css class name to be passed through to the component markup.
139
+ *
140
+ * Defaults to **undefined**.
141
+ */
142
+ className: e.string,
143
+ /**
144
+ * Overlay theme color.
145
+ *
146
+ * Defaults to **'dark'**.
147
+ */
148
+ overlayThemeColor: e.oneOf(["dark", "light", "surface", "linear-gradient-white-to-bottom", "linear-gradient-white-to-top", "linear-gradient-black-to-bottom", "linear-gradient-black-to-top", "linear-gradient-primary-dark-to-bottom", "linear-gradient-primary-dark-to-top", "linear-gradient-primary-darker-to-bottom", "linear-gradient-primary-darker-to-top", "linear-gradient-primary-to-bottom", "linear-gradient-primary-to-top", "linear-gradient-secondary-dark-to-bottom", "linear-gradient-secondary-dark-to-top", "linear-gradient-secondary-darker-to-bottom", "linear-gradient-secondary-darker-to-top", "linear-gradient-secondary-to-bottom", "linear-gradient-secondary-to-top"]),
149
+ /**
150
+ * Position of the Overlay. Use `overlayThemeColor` to change the theme color. If set to leading or trailing be sure to set `alignment` on Hero accordingly to have Hero Content over the overlay.
151
+ *
152
+ * Defaults to **'full'**.
153
+ */
154
+ position: e.oneOf(["full", "leading", "trailing"])
155
+ }, R = {
156
+ children: null,
157
+ className: void 0,
158
+ overlayThemeColor: "dark",
159
+ position: "full"
160
+ }, f = /* @__PURE__ */ H((s, i) => {
161
+ const {
162
+ children: r,
163
+ className: c,
164
+ position: o,
165
+ overlayThemeColor: t,
166
+ ...n
167
+ } = s, a = T();
168
+ O(i, () => a.current, []);
169
+ const m = p(() => o !== "none" && P("lmnt", "lmnt-hero-overlay ", !t.includes("gradient") && t !== "surface" && `lmnt-hero-overlay__${t}`, t.includes("gradient") && t !== "surface" && `lmnt-theme--bg-${t}`, t === "surface" && "lmnt-theme-surface-bg", `lmnt-hero-overlay__${o}`, c), [t, o, c]);
170
+ return /* @__PURE__ */ l.createElement("div", C({
171
+ className: m
172
+ }, n), r && r);
173
+ });
174
+ f.displayName = "HeroOverlay";
175
+ f.propTypes = D;
176
+ f.defaultProps = R;
177
+ const h = /* @__PURE__ */ H((s, i) => {
178
+ const {
179
+ alignment: r,
180
+ children: c,
181
+ className: o,
182
+ imageUrl: t,
183
+ style: n,
184
+ themeColor: a,
185
+ overlay: m,
186
+ overlayProps: y,
187
+ ...g
188
+ } = s, d = T();
189
+ O(i, () => d.current, []);
190
+ const b = p(() => P("lmnt lmnt-hero", a && `lmnt-theme-${a}-bg`, `lmnt-hero__align-${r}`, o), [r, o, a]), u = p(() => t ? {
191
+ ...n,
192
+ backgroundImage: `url(${t})`
193
+ } : n, [t, n]);
194
+ return /* @__PURE__ */ l.createElement("div", C({
195
+ ref: d,
196
+ className: b,
197
+ style: u
198
+ }, g), m && /* @__PURE__ */ l.createElement(f, y), c);
199
+ });
200
+ h.displayName = "Hero";
201
+ h.propTypes = $;
202
+ h.defaultProps = I;
203
+ const v = /* @__PURE__ */ H((s, i) => {
204
+ const {
205
+ children: r,
206
+ className: c,
207
+ heroBtn: o,
208
+ logo: t,
209
+ overline: n,
210
+ padding: a,
211
+ title: m,
212
+ style: y,
213
+ subtitle: g,
214
+ textColor: d,
215
+ ...b
216
+ } = s, u = T(), _ = p(() => P("lmnt lmnt-hero-content", `lmnt-theme-${d}`, c), [c, d]);
217
+ O(i, () => u.current, []);
218
+ const w = p(() => ({
219
+ ...y,
220
+ padding: a
221
+ }), [a, y]);
222
+ return /* @__PURE__ */ l.createElement("div", C({
223
+ ref: u,
224
+ className: _
225
+ }, b, {
226
+ style: w
227
+ }), r || /* @__PURE__ */ l.createElement(E, {
228
+ gap: "dense",
229
+ direction: "vertical",
230
+ secondaryAlign: "center"
231
+ }, t && t, n && /* @__PURE__ */ l.createElement(N, {
232
+ type: "overline"
233
+ }, n), m && /* @__PURE__ */ l.createElement(N, {
234
+ type: "display2"
235
+ }, m), g && /* @__PURE__ */ l.createElement(N, {
236
+ type: "display6"
237
+ }, g), o && o));
238
+ });
239
+ v.displayName = "HeroContent";
240
+ v.propTypes = j;
241
+ v.defaultProps = B;
242
+ const V = ({
243
+ title: s = "",
244
+ subtitle: i = "",
245
+ icon: r = "dashbord"
246
+ }) => /* @__PURE__ */ k(h, { style: { width: "100%", height: "25vh" }, children: /* @__PURE__ */ k(v, { logo: /* @__PURE__ */ k(x, { iconSize: "large", icon: r }), overline: "", subtitle: i, title: s }) });
8
247
  export {
9
- c as EmptyView
248
+ V as EmptyView
10
249
  };