@versini/ui-header 1.2.1 → 1.3.0

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.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { SpacingProps } from '@versini/ui-private/dist/utilities';
2
+ import { SpacingTypes } from '@versini/ui-spacing-types';
3
3
 
4
4
  declare const HEADER_CLASSNAME = "av-header";
5
5
 
@@ -29,7 +29,7 @@ type HeaderProps = {
29
29
  * Whether or not to render the Header component with sticky behavior.
30
30
  */
31
31
  sticky?: boolean;
32
- } & SpacingProps;
32
+ } & SpacingTypes.Props;
33
33
 
34
34
  declare const Header: ({ children, className, raw, spacing, mode, noColors, sticky, }: HeaderProps) => react_jsx_runtime.JSX.Element;
35
35
 
package/dist/index.js CHANGED
@@ -1,50 +1,64 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import o from "clsx";
3
3
  /*!
4
- @versini/ui-header v1.2.1
4
+ @versini/ui-header v1.3.0
5
5
  © 2024 gizmette.com
6
6
  */
7
7
  try {
8
8
  window.__VERSINI_UI_HEADER__ || (window.__VERSINI_UI_HEADER__ = {
9
- version: "1.2.1",
10
- buildTime: "12/18/2024 01:22 PM EST",
9
+ version: "1.3.0",
10
+ buildTime: "12/24/2024 06:47 PM EST",
11
11
  homepage: "https://github.com/aversini/ui-components",
12
12
  license: "MIT"
13
13
  });
14
14
  } catch {
15
15
  }
16
- const t = "av-header", n = (e) => {
17
- let d = "";
18
- if (typeof e == "number" || typeof e == "string")
19
- d = "m-" + e;
16
+ const m = "av-header";
17
+ /*!
18
+ @versini/ui-spacing v1.0.0
19
+ © 2024 gizmette.com
20
+ */
21
+ try {
22
+ window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
23
+ version: "1.0.0",
24
+ buildTime: "12/24/2024 06:47 PM EST",
25
+ homepage: "https://github.com/aversini/ui-components",
26
+ license: "MIT"
27
+ });
28
+ } catch {
29
+ }
30
+ const b = (r) => {
31
+ let t = "";
32
+ if (typeof r == "number" || typeof r == "string")
33
+ t = "m-" + r;
20
34
  else {
21
- const r = [];
22
- (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), d = r.join(" ");
35
+ const e = [];
36
+ (r == null ? void 0 : r.t) !== void 0 && e.push(`mt-${r.t}`), (r == null ? void 0 : r.r) !== void 0 && e.push(`mr-${r.r}`), (r == null ? void 0 : r.b) !== void 0 && e.push(`mb-${r.b}`), (r == null ? void 0 : r.l) !== void 0 && e.push(`ml-${r.l}`), t = e.join(" ");
23
37
  }
24
- return d;
38
+ return t;
25
39
  }, h = ({
26
- children: e,
27
- className: d,
28
- raw: r = !1,
29
- spacing: l,
30
- mode: a = "system",
31
- noColors: s = !1,
40
+ children: r,
41
+ className: t,
42
+ raw: e = !1,
43
+ spacing: a,
44
+ mode: s = "system",
45
+ noColors: d = !1,
32
46
  sticky: c = !1
33
47
  }) => {
34
- const b = o(t, n(l), {
35
- "border-border-accent bg-surface-dark": a === "dark" && !r && !s,
36
- "border-border-medium bg-surface-light": a === "light" && !r && !s,
37
- "border-border-accent bg-surface-dark dark:border-border-medium dark:bg-surface-light": a === "alt-system" && !r && !s,
38
- "border-border-medium bg-surface-light dark:border-border-accent dark:bg-surface-dark": a === "system" && !r && !s,
39
- "border-b-4": !r,
40
- "border-transparent": !r && s,
48
+ const l = o(m, b(a), {
49
+ "border-border-accent bg-surface-dark": s === "dark" && !e && !d,
50
+ "border-border-medium bg-surface-light": s === "light" && !e && !d,
51
+ "border-border-accent bg-surface-dark dark:border-border-medium dark:bg-surface-light": s === "alt-system" && !e && !d,
52
+ "border-border-medium bg-surface-light dark:border-border-accent dark:bg-surface-dark": s === "system" && !e && !d,
53
+ "border-b-4": !e,
54
+ "border-transparent": !e && d,
41
55
  "sticky top-0 z-50": c
42
- }), m = o(d, {
43
- "mt-0 flex w-full flex-col p-2 md:mx-auto md:max-w-4xl": !r
56
+ }), n = o(t, {
57
+ "mt-0 flex w-full flex-col p-2 md:mx-auto md:max-w-4xl": !e
44
58
  });
45
- return /* @__PURE__ */ i("header", { className: b, children: /* @__PURE__ */ i("div", { className: m, children: e }) });
59
+ return /* @__PURE__ */ i("header", { className: l, children: /* @__PURE__ */ i("div", { className: n, children: r }) });
46
60
  };
47
61
  export {
48
- t as HEADER_CLASSNAME,
62
+ m as HEADER_CLASSNAME,
49
63
  h as Header
50
64
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/ui-header",
3
- "version": "1.2.1",
3
+ "version": "1.3.0",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -39,12 +39,14 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@tailwindcss/typography": "0.5.15",
42
- "@versini/ui-private": "1.5.1",
42
+ "@versini/ui-private": "1.6.0",
43
+ "@versini/ui-spacing": "1.0.0",
44
+ "@versini/ui-spacing-types": "1.0.0",
43
45
  "clsx": "2.1.1",
44
46
  "tailwindcss": "3.4.17"
45
47
  },
46
48
  "sideEffects": [
47
49
  "**/*.css"
48
50
  ],
49
- "gitHead": "123c2555b25210da73697c4fdd3b6a5f67a3b993"
51
+ "gitHead": "cb948414a675c01f3328ed6470ccf4b58f73534f"
50
52
  }