@cfx-dev/ui-components 4.5.4 → 4.5.7

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.
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+
3
+ declare function WhiteLogo(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
4
+ declare const _default: React.MemoExoticComponent<typeof WhiteLogo>;
5
+ export default _default;
@@ -0,0 +1,24 @@
1
+ import { jsx as L } from "react/jsx-runtime";
2
+ import t from "react";
3
+ function e(o) {
4
+ return /* @__PURE__ */ L(
5
+ "svg",
6
+ {
7
+ viewBox: "0 0 30 30",
8
+ fill: "none",
9
+ xmlns: "http://www.w3.org/2000/svg",
10
+ ...o,
11
+ children: /* @__PURE__ */ L(
12
+ "path",
13
+ {
14
+ d: "M9.919 15.243L11.299 11.106L11.308 11.082L11.506 10.488L12.853 6.441C12.94 6.177 13.186 6 13.465 6H16.297L16.702 7.221L17.011 8.151L14.656 10.506V10.494L14.644 10.518L9.916 15.246L9.919 15.243ZM8.221 20.334L7 24H10.636L13.201 15.354L8.221 20.334ZM17.86 10.698L15.433 13.125L18.646 24H22.285L17.86 10.698Z",
15
+ fill: "#F1F1E4"
16
+ }
17
+ )
18
+ }
19
+ );
20
+ }
21
+ const l = t.memo(e);
22
+ export {
23
+ l as default
24
+ };
@@ -4,3 +4,4 @@ export { default as Logo } from './Logo';
4
4
  export { default as LockupLandscape } from './LockupLandscape';
5
5
  export { default as LockupPortrait } from './LockupPortrait';
6
6
  export { default as Wordmark } from './Wordmark';
7
+ export { default as WhiteLogo } from './WhiteLogo';
@@ -4,11 +4,13 @@ import { default as p } from "./Logo.js";
4
4
  import { default as m } from "./LockupLandscape.js";
5
5
  import { default as u } from "./LockupPortrait.js";
6
6
  import { default as x } from "./Wordmark.js";
7
+ import { default as c } from "./WhiteLogo.js";
7
8
  export {
8
9
  r as CompositeLogo,
9
10
  e as Icon,
10
11
  m as LockupLandscape,
11
12
  u as LockupPortrait,
12
13
  p as Logo,
14
+ c as WhiteLogo,
13
15
  x as Wordmark
14
16
  };
@@ -2,12 +2,12 @@ import { C as o } from "../../index-BgyFvlVL.js";
2
2
  import { C as r } from "../../index-BCMIaGt2.js";
3
3
  import { D as m } from "../../index-DwfZyjnS.js";
4
4
  import { E as a } from "../../index-CndZSWbO.js";
5
- import { F as s } from "../../index-D7JPdg13.js";
5
+ import { F as s } from "../../index-B_NGoq0d.js";
6
6
  import { G as t } from "../../index-zDYfHjPd.js";
7
7
  import { P as f } from "../../index-kbBuAY0m.js";
8
8
  import { Q as p } from "../../index-Cy4ZbWBL.js";
9
9
  import { R as i } from "../../index-BFDtbr-9.js";
10
- import { R as e } from "../../index-Jh-MtE10.js";
10
+ import { R as e } from "../../index-Cn_D8a9-.js";
11
11
  import { R } from "../../index-DmiGJpGO.js";
12
12
  import { T as x } from "../../index-Bj7QGXdt.js";
13
13
  import { V as C } from "../../index-DXAZagKA.js";
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+
3
+ declare function WhiteLogo(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
4
+ declare const _default: React.MemoExoticComponent<typeof WhiteLogo>;
5
+ export default _default;
@@ -0,0 +1,40 @@
1
+ import { jsxs as o, jsx as L } from "react/jsx-runtime";
2
+ import l from "react";
3
+ function e(t) {
4
+ return /* @__PURE__ */ o(
5
+ "svg",
6
+ {
7
+ viewBox: "0 0 30 30",
8
+ fill: "none",
9
+ xmlns: "http://www.w3.org/2000/svg",
10
+ ...t,
11
+ children: [
12
+ /* @__PURE__ */ L(
13
+ "path",
14
+ {
15
+ d: "M18.3867 17.7033L18.1967 17.6833L18.5167 16.06L18.7533 14.8667L18.7767 14.7533L18.7833 14.7267L18.6267 14.7033L18.4667 14.68L18.1333 14.63L17.9 14.5967L15.67 14.2667L15.6433 14.3967L15.53 14.9333L15.5167 15L15.4533 15.3L15.4367 15.3867L15.0467 17.57H12.9667L13.0833 15.9833L13.1467 15.1367V15.0867L13.1533 15.0367L13.1733 14.7733L13.18 14.6933L13.4 11.6767V9.46L13.4167 9.04L13.43 8.71667L13.4433 8.47L13.4633 7.99L13.48 7.62333L13.49 7.37333L13.55 5.16L11.2433 5.08667L10.2933 5.05333L10.3033 5.29333L10.2767 5.75333V8.13333L10.2567 8.41L10.2233 8.77667V12.29L10.1367 12.48L10.1433 12.6567L10.0933 13.4533L10.06 13.9933L10 14.2633V14.7533L10.0067 14.9933V24.9967H20.3033V24.35L20.7633 17.5933L19.0867 17.7033H18.3867ZM12.8467 22L13.01 21.19V20.62L12.8467 20.24H17.8733L17.82 21.0233L17.8733 22H12.8467Z",
16
+ fill: "#F1F1E4"
17
+ }
18
+ ),
19
+ /* @__PURE__ */ L(
20
+ "path",
21
+ {
22
+ d: "M10.25 5.81L10.2767 5.78333L10.25 5.75667V5.81Z",
23
+ fill: "#F1F1E4"
24
+ }
25
+ ),
26
+ /* @__PURE__ */ L(
27
+ "path",
28
+ {
29
+ d: "M18.2 5L17.8733 5.94L17.78 6.22L17.4567 7.16L17.3633 7.43667L17.24 7.79L16.9567 8.62333L16.5767 9.94333L16.3733 10.9033L18.0167 11.15L19.62 11.3867L19.98 9.97L20.6233 6.69333L20.69 6.36L20.74 6.09333L20.84 5.59L20.96 5H18.2Z",
30
+ fill: "#F1F1E4"
31
+ }
32
+ )
33
+ ]
34
+ }
35
+ );
36
+ }
37
+ const r = l.memo(e);
38
+ export {
39
+ r as default
40
+ };
@@ -4,3 +4,4 @@ export { default as Logo } from './Logo';
4
4
  export { default as LockupLandscape } from './LockupLandscape';
5
5
  export { default as LockupPortrait } from './LockupPortrait';
6
6
  export { default as Wordmark } from './Wordmark';
7
+ export { default as WhiteLogo } from './WhiteLogo';
@@ -4,11 +4,13 @@ import { default as p } from "./Logo.js";
4
4
  import { default as m } from "./LockupLandscape.js";
5
5
  import { default as u } from "./LockupPortrait.js";
6
6
  import { default as x } from "./Wordmark.js";
7
+ import { default as c } from "./WhiteLogo.js";
7
8
  export {
8
9
  r as CompositeLogo,
9
10
  e as Icon,
10
11
  m as LockupLandscape,
11
12
  u as LockupPortrait,
12
13
  p as Logo,
14
+ c as WhiteLogo,
13
15
  x as Wordmark
14
16
  };
@@ -12,11 +12,23 @@ export interface TabularItem {
12
12
  ariaControls?: string;
13
13
  hasNotification?: boolean;
14
14
  }
15
+ export interface TabularItemComponentProps {
16
+ disabled?: boolean;
17
+ type: HTMLButtonElement['type'];
18
+ role: HTMLButtonElement['role'];
19
+ className?: string;
20
+ onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
21
+ 'aria-label'?: string;
22
+ 'aria-controls'?: string;
23
+ 'data-text'?: React.ReactNode;
24
+ 'aria-selected'?: boolean;
25
+ }
15
26
  export interface TabularProps {
16
27
  items: TabularItem[];
17
28
  activeItem?: string;
18
29
  onActivate?: (id: string) => void;
19
30
  itemClassName?: string;
31
+ ItemComponent?: React.ElementType<TabularItemComponentProps>;
20
32
  className?: string;
21
33
  ariaLabel?: string;
22
34
  tabIndex?: number;
@@ -32,17 +44,6 @@ export declare namespace Tabular {
32
44
  export interface TabularRootProps extends React.PropsWithChildren, Pick<TabularProps, 'className' | 'ariaLabel' | 'tabIndex' | 'theme' | 'role' | 'size'> {
33
45
  style?: React.CSSProperties;
34
46
  }
35
- export interface TabularItemComponentProps {
36
- disabled?: boolean;
37
- type: HTMLButtonElement['type'];
38
- role: HTMLButtonElement['role'];
39
- className?: string;
40
- onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
41
- 'aria-label'?: string;
42
- 'aria-controls'?: string;
43
- 'data-text'?: React.ReactNode;
44
- 'aria-selected'?: boolean;
45
- }
46
47
  export interface TabularItemProps extends TabularItem {
47
48
  active: boolean;
48
49
  onClick: (id: string) => void;
@@ -1,12 +1,12 @@
1
- import { jsx as m, jsxs as N } from "react/jsx-runtime";
2
- import d, { createElement as p } from "react";
3
- import { Dot as C } from "../Dot/Dot.js";
4
- import { clsx as n } from "../../utils/clsx.js";
5
- import { ui as v } from "../../utils/ui/ui.js";
6
- const k = "cfxui__Tabular__reset__b1dbc", R = "cfxui__Tabular__item__98cc3", I = "cfxui__Tabular__root__0ff05", y = "cfxui__Tabular__active__1ae95", j = "cfxui__Tabular__hasNotification__c372f", A = "cfxui__Tabular__content__3a95a", e = {
7
- reset: k,
1
+ import { jsx as b, jsxs as N } from "react/jsx-runtime";
2
+ import x, { createElement as C } from "react";
3
+ import { Dot as v } from "../Dot/Dot.js";
4
+ import { clsx as d } from "../../utils/clsx.js";
5
+ import { ui as k } from "../../utils/ui/ui.js";
6
+ const R = "cfxui__Tabular__reset__b1dbc", I = "cfxui__Tabular__item__98cc3", y = "cfxui__Tabular__root__0ff05", j = "cfxui__Tabular__active__1ae95", A = "cfxui__Tabular__hasNotification__c372f", L = "cfxui__Tabular__content__3a95a", a = {
7
+ reset: R,
8
8
  "tabular-size-initial-large": "cfxui__Tabular__tabular-size-initial-large__9451f",
9
- item: R,
9
+ item: I,
10
10
  "tabular-size-initial-small": "cfxui__Tabular__tabular-size-initial-small__4dad8",
11
11
  "tabular-size-small-large": "cfxui__Tabular__tabular-size-small-large__1390c",
12
12
  "tabular-size-small-small": "cfxui__Tabular__tabular-size-small-small__cc6e3",
@@ -20,105 +20,110 @@ const k = "cfxui__Tabular__reset__b1dbc", R = "cfxui__Tabular__item__98cc3", I =
20
20
  "tabular-size-large-small": "cfxui__Tabular__tabular-size-large-small__193f0",
21
21
  "tabular-size-xlarge-large": "cfxui__Tabular__tabular-size-xlarge-large__e1e19",
22
22
  "tabular-size-xlarge-small": "cfxui__Tabular__tabular-size-xlarge-small__9c3b6",
23
- root: I,
23
+ root: y,
24
24
  "theme-dark": "cfxui__Tabular__theme-dark__80b8c",
25
25
  "theme-light": "cfxui__Tabular__theme-light__c05b9",
26
- active: y,
27
- hasNotification: j,
28
- content: A
26
+ active: j,
27
+ hasNotification: A,
28
+ content: L
29
29
  };
30
- function o(b) {
30
+ function n(f) {
31
31
  const {
32
32
  items: s,
33
- activeItem: t,
34
- onActivate: l,
35
- itemClassName: i,
33
+ activeItem: i,
34
+ onActivate: e,
35
+ itemClassName: r,
36
36
  size: u = "medium",
37
+ className: c,
38
+ ItemComponent: m,
37
39
  ..._
38
- } = b, c = d.useCallback((a) => {
39
- l && l(a);
40
- }, [l]), r = n(
41
- e.root,
42
- _.className
40
+ } = f, l = x.useCallback((t) => {
41
+ e && e(t);
42
+ }, [e]), o = d(
43
+ a.root,
44
+ c
43
45
  );
44
- return /* @__PURE__ */ m(o.Root, { ..._, className: r, children: s.map((a) => /* @__PURE__ */ p(
45
- o.Item,
46
+ return /* @__PURE__ */ b(n.Root, { ..._, className: o, children: s.map((t) => /* @__PURE__ */ C(
47
+ n.Item,
46
48
  {
47
- ...a,
48
- className: i,
49
- key: a.id,
50
- active: a.id === t,
51
- onClick: c,
49
+ ...t,
50
+ Component: m,
51
+ className: r,
52
+ key: t.id,
53
+ active: t.id === i,
54
+ onClick: l,
52
55
  size: u
53
56
  }
54
57
  )) });
55
58
  }
56
- o.Root = function(s) {
59
+ n.Root = function(s) {
57
60
  const {
58
- children: t,
59
- className: l,
60
- ariaLabel: i,
61
+ children: i,
62
+ className: e,
63
+ ariaLabel: r,
61
64
  tabIndex: u,
62
- theme: _ = "dark",
63
- role: c = "tablist",
64
- style: r
65
- } = s, a = n(e.root, e[`theme-${_}`], l);
66
- return /* @__PURE__ */ m(
65
+ theme: c = "dark",
66
+ role: m = "tablist",
67
+ style: _
68
+ } = s, l = d(a.root, a[`theme-${c}`], e);
69
+ return /* @__PURE__ */ b(
67
70
  "div",
68
71
  {
69
- role: c,
70
- "aria-label": i,
72
+ role: m,
73
+ "aria-label": r,
71
74
  tabIndex: u,
72
- className: a,
73
- style: r,
74
- children: t
75
+ className: l,
76
+ style: _,
77
+ children: i
75
78
  }
76
79
  );
77
80
  };
78
- o.Item = function(s) {
81
+ n.Item = function(s) {
79
82
  const {
80
- id: t,
81
- label: l,
82
- onClick: i,
83
+ id: i,
84
+ label: e,
85
+ onClick: r,
83
86
  ariaLabel: u,
84
- ariaControls: _,
85
- className: c,
86
- active: r = !1,
87
- disabled: a = !1,
88
- hasNotification: f = !1,
89
- size: x,
90
- Component: z
91
- } = s, g = d.useCallback(() => {
92
- a || i(t);
93
- }, [a, i, t]), T = n(
94
- e.reset,
95
- e.item,
96
- c,
97
- v.getResponsiveFlatClassnames("tabular-size", x).map((h) => e[h]),
87
+ ariaControls: c,
88
+ className: m,
89
+ active: _ = !1,
90
+ disabled: l = !1,
91
+ hasNotification: o = !1,
92
+ size: t,
93
+ Component: z,
94
+ ...g
95
+ } = s, T = x.useCallback(() => {
96
+ l || r(i);
97
+ }, [l, r, i]), h = d(
98
+ a.reset,
99
+ a.item,
100
+ m,
101
+ k.getResponsiveFlatClassnames("tabular-size", t).map((p) => a[p]),
98
102
  {
99
- [e.active]: r,
100
- [e.hasNotification]: f
103
+ [a.active]: _,
104
+ [a.hasNotification]: o
101
105
  }
102
106
  );
103
- return /* @__PURE__ */ m(
107
+ return /* @__PURE__ */ b(
104
108
  z || "button",
105
109
  {
106
- disabled: a,
110
+ disabled: l,
107
111
  type: "button",
108
112
  role: "tab",
109
- className: T,
110
- onClick: g,
113
+ className: h,
114
+ onClick: T,
111
115
  "aria-label": u,
112
- "aria-controls": _,
113
- "data-text": l,
114
- "aria-selected": r,
115
- children: /* @__PURE__ */ N("span", { className: e.content, children: [
116
- l,
117
- f && /* @__PURE__ */ m(C, { color: "green", className: e.notification })
116
+ "aria-controls": c,
117
+ "data-text": e,
118
+ "aria-selected": _,
119
+ ...g,
120
+ children: /* @__PURE__ */ N("span", { className: a.content, children: [
121
+ e,
122
+ o && /* @__PURE__ */ b(v, { color: "green", className: a.notification })
118
123
  ] })
119
124
  }
120
125
  );
121
126
  };
122
127
  export {
123
- o as Tabular
128
+ n as Tabular
124
129
  };
@@ -4,6 +4,7 @@ import t from "./components/Logos/fivem/Logo.js";
4
4
  import m from "./components/Logos/fivem/LockupLandscape.js";
5
5
  import e from "./components/Logos/fivem/LockupPortrait.js";
6
6
  import p from "./components/Logos/fivem/Wordmark.js";
7
+ import i from "./components/Logos/fivem/WhiteLogo.js";
7
8
  const u = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8
9
  __proto__: null,
9
10
  CompositeLogo: o,
@@ -11,6 +12,7 @@ const u = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11
12
  LockupLandscape: m,
12
13
  LockupPortrait: e,
13
14
  Logo: t,
15
+ WhiteLogo: i,
14
16
  Wordmark: p
15
17
  }, Symbol.toStringTag, { value: "Module" }));
16
18
  export {
@@ -4,6 +4,7 @@ import t from "./components/Logos/redm/Logo.js";
4
4
  import m from "./components/Logos/redm/LockupLandscape.js";
5
5
  import e from "./components/Logos/redm/LockupPortrait.js";
6
6
  import p from "./components/Logos/redm/Wordmark.js";
7
+ import i from "./components/Logos/redm/WhiteLogo.js";
7
8
  const l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8
9
  __proto__: null,
9
10
  CompositeLogo: o,
@@ -11,6 +12,7 @@ const l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11
12
  LockupLandscape: m,
12
13
  LockupPortrait: e,
13
14
  Logo: t,
15
+ WhiteLogo: i,
14
16
  Wordmark: p
15
17
  }, Symbol.toStringTag, { value: "Module" }));
16
18
  export {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cfx-dev/ui-components",
3
3
  "private": false,
4
- "version": "4.5.4",
4
+ "version": "4.5.7",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "main": "dist/main.js",