highsoft-ui 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.
- package/README.md +83 -8
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/Button/index.js +36 -35
- package/dist/components/Container/index.js +1 -1
- package/dist/components/GPTInput/index.d.ts +7 -0
- package/dist/components/GPTInput/index.js +60 -29
- package/dist/components/Header/index.d.ts +24 -2
- package/dist/components/Header/index.js +151 -52
- package/dist/components/Logo/index.d.ts +1 -0
- package/dist/components/Logo/index.js +16 -10
- package/dist/components/Notification/index.d.ts +3 -1
- package/dist/components/Notification/index.js +56 -6
- package/dist/components/PrefPanel/index.d.ts +6 -0
- package/dist/components/PrefPanel/index.js +2999 -0
- package/dist/extends-hS2Bh-Yp.js +12 -0
- package/dist/highsoft-ui.css +1 -1
- package/dist/index-CMegByeX.js +85 -0
- package/dist/index-CWDYlYn8.js +19129 -0
- package/dist/main.js +4 -4
- package/dist/php.js +5062 -24186
- package/dist/utils.d.ts +1 -0
- package/dist/utils.js +15 -0
- package/package.json +7 -4
- package/dist/index-B_g_yGPq.js +0 -57
package/README.md
CHANGED
|
@@ -1,32 +1,108 @@
|
|
|
1
1
|
# Highsoft UI
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Development
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npm i
|
|
7
|
+
npm run dev
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
This will run the test application located in `src` that uses the component library located in `lib`.
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
1. Install the package:
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
npm i highsoft-ui
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
2. Load the the css somehow:
|
|
21
|
+
|
|
22
|
+
```scss
|
|
23
|
+
@import 'highsoft-ui/css';
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
3. Use the components:
|
|
27
|
+
|
|
28
|
+
```js
|
|
29
|
+
import { Button } from 'highsoft-ui';
|
|
30
|
+
// ...
|
|
31
|
+
<Button variant="brand" size={300}>Hello</Button>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### PHP
|
|
35
|
+
|
|
36
|
+
How to use components that need hydration (running client-side react) in PHP.
|
|
37
|
+
This mostly applies to the wordpress block gang.
|
|
4
38
|
|
|
5
39
|
1. Build script
|
|
40
|
+
|
|
41
|
+
`ui.ts`:
|
|
6
42
|
```js
|
|
7
|
-
import { Header
|
|
43
|
+
import { Header } from 'highsoft-ui';
|
|
8
44
|
import { render } from 'highsoft-ui/php';
|
|
9
45
|
|
|
10
46
|
render('react.php', {
|
|
11
47
|
header: <Header />,
|
|
12
|
-
|
|
48
|
+
some_other_component: <Header
|
|
49
|
+
subItems={[
|
|
50
|
+
{
|
|
51
|
+
title: "Core",
|
|
52
|
+
url: "https://www.highcharts.com/products/highcharts/",
|
|
53
|
+
icon: <CoreIcon />,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
title: "Stock",
|
|
57
|
+
url: "https://www.highcharts.com/products/stock/",
|
|
58
|
+
icon: <StockIcon />,
|
|
59
|
+
},
|
|
60
|
+
]}
|
|
61
|
+
/>
|
|
13
62
|
});
|
|
14
63
|
```
|
|
15
64
|
|
|
65
|
+
Run it with `tsx`:
|
|
66
|
+
```sh
|
|
67
|
+
npx tsx ui.ts
|
|
68
|
+
```
|
|
69
|
+
|
|
16
70
|
2. PHP template
|
|
71
|
+
|
|
17
72
|
```php
|
|
18
|
-
|
|
73
|
+
include_once 'react.php';
|
|
19
74
|
// ...
|
|
20
|
-
|
|
75
|
+
hsui_header();
|
|
76
|
+
?>
|
|
77
|
+
|
|
78
|
+
<div>
|
|
79
|
+
<h2>Wordpress <3</h2>
|
|
80
|
+
<?php hsui_some_other_component(); ?>
|
|
81
|
+
</div>
|
|
21
82
|
```
|
|
22
83
|
|
|
23
|
-
3. Client bundle
|
|
84
|
+
3. Client JS bundle
|
|
85
|
+
|
|
24
86
|
```js
|
|
25
87
|
import { Header } from 'highsoft-ui';
|
|
26
88
|
import { hydrate } from 'highsoft-ui/php';
|
|
27
89
|
|
|
28
90
|
hydrate({
|
|
29
|
-
|
|
91
|
+
header: <Header />,
|
|
92
|
+
some_other_component: <Header
|
|
93
|
+
subItems={[
|
|
94
|
+
{
|
|
95
|
+
title: "Core",
|
|
96
|
+
url: "https://www.highcharts.com/products/highcharts/",
|
|
97
|
+
icon: <CoreIcon />,
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
title: "Stock",
|
|
101
|
+
url: "https://www.highcharts.com/products/stock/",
|
|
102
|
+
icon: <StockIcon />,
|
|
103
|
+
},
|
|
104
|
+
]}
|
|
105
|
+
/>
|
|
30
106
|
});
|
|
31
107
|
```
|
|
32
108
|
|
|
@@ -69,7 +145,6 @@ hydrate({
|
|
|
69
145
|
- Turns off all rules that are unnecessary or might conflict with Prettier.
|
|
70
146
|
- this config only turns rules off
|
|
71
147
|
|
|
72
|
-
|
|
73
148
|
### Husky
|
|
74
149
|
|
|
75
150
|
- Automatically lint your commit messages, code, and run tests upon committing or pushing.
|
|
@@ -8,4 +8,4 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
8
8
|
as?: ElementType;
|
|
9
9
|
[prop: string]: any;
|
|
10
10
|
}
|
|
11
|
-
export declare
|
|
11
|
+
export declare const Button: import('react').ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,45 +1,46 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { c } from "
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"size-
|
|
16
|
-
"size-
|
|
17
|
-
"size-
|
|
18
|
-
"size-
|
|
19
|
-
"size-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
2
|
+
import { forwardRef as c } from "react";
|
|
3
|
+
import { c as i } from "../../clsx-OuTLNxxd.js";
|
|
4
|
+
const d = "_button_ej6jd_17", u = "_content_ej6jd_33", z = "_neutral_ej6jd_40", l = "_white_ej6jd_57", p = "_transparent_ej6jd_76", b = "_plain_ej6jd_98", m = "_brand_ej6jd_123", f = "_success_ej6jd_140", h = "_attention_ej6jd_155", w = "_danger_ej6jd_170", t = {
|
|
5
|
+
button: d,
|
|
6
|
+
content: u,
|
|
7
|
+
neutral: z,
|
|
8
|
+
white: l,
|
|
9
|
+
transparent: p,
|
|
10
|
+
plain: b,
|
|
11
|
+
brand: m,
|
|
12
|
+
success: f,
|
|
13
|
+
attention: h,
|
|
14
|
+
danger: w,
|
|
15
|
+
"size-50": "_size-50_ej6jd_266",
|
|
16
|
+
"size-100": "_size-100_ej6jd_282",
|
|
17
|
+
"size-200": "_size-200_ej6jd_299",
|
|
18
|
+
"size-300": "_size-300_ej6jd_316",
|
|
19
|
+
"size-400": "_size-400_ej6jd_333",
|
|
20
|
+
"size-500": "_size-500_ej6jd_350"
|
|
21
|
+
}, y = c(
|
|
22
|
+
({
|
|
23
|
+
children: n,
|
|
24
|
+
variant: s = "neutral",
|
|
25
|
+
size: _ = 200,
|
|
26
|
+
as: j = "button",
|
|
27
|
+
className: o,
|
|
28
|
+
...a
|
|
29
|
+
}, r) => /* @__PURE__ */ e(
|
|
30
|
+
j,
|
|
31
31
|
{
|
|
32
|
-
className:
|
|
32
|
+
className: i(
|
|
33
33
|
o,
|
|
34
34
|
t.button,
|
|
35
|
-
t[
|
|
36
|
-
t[`size-${
|
|
35
|
+
t[s],
|
|
36
|
+
t[`size-${_}`]
|
|
37
37
|
),
|
|
38
|
+
ref: r,
|
|
38
39
|
...a,
|
|
39
40
|
children: /* @__PURE__ */ e("span", { className: t.content, children: n })
|
|
40
41
|
}
|
|
41
|
-
)
|
|
42
|
-
|
|
42
|
+
)
|
|
43
|
+
);
|
|
43
44
|
export {
|
|
44
|
-
|
|
45
|
+
y as Button
|
|
45
46
|
};
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
interface GPTButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
variant?: "primary" | "secondary";
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export default function GPTButton({ variant, className, children, ...props }: GPTButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
1
7
|
export declare function GPTInput({ autoFocus, onSubmit, }: {
|
|
2
8
|
autoFocus?: boolean;
|
|
3
9
|
onSubmit: (prompt: string) => void;
|
|
4
10
|
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -1,57 +1,88 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import
|
|
1
|
+
import { jsx as n, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as x, useState as h, useLayoutEffect as g } from "react";
|
|
3
|
+
import { c as _ } from "../../clsx-OuTLNxxd.js";
|
|
4
|
+
import v from "../icons/Bubble.js";
|
|
5
5
|
import b from "../icons/Plane.js";
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
const C = "_inputContainer_1v7xg_17", S = "_bottomFade_1v7xg_20", K = "_inputWrap_1v7xg_23", P = "_textarea_1v7xg_26", N = "_button_1v7xg_92", W = "_primary_1v7xg_127", k = "_secondary_1v7xg_136", D = "_disclaimer_1v7xg_142", r = {
|
|
7
|
+
inputContainer: C,
|
|
8
|
+
bottomFade: S,
|
|
9
|
+
inputWrap: K,
|
|
10
|
+
textarea: P,
|
|
11
|
+
button: N,
|
|
12
|
+
primary: W,
|
|
13
|
+
secondary: k,
|
|
14
|
+
disclaimer: D
|
|
10
15
|
};
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
function F({
|
|
17
|
+
variant: a = "primary",
|
|
18
|
+
className: s,
|
|
19
|
+
children: e,
|
|
20
|
+
...o
|
|
14
21
|
}) {
|
|
15
|
-
|
|
16
|
-
|
|
22
|
+
return /* @__PURE__ */ n(
|
|
23
|
+
"button",
|
|
24
|
+
{
|
|
25
|
+
className: _(r.button, r[a], s),
|
|
26
|
+
...o,
|
|
27
|
+
children: /* @__PURE__ */ n("span", { children: e })
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
function I({
|
|
32
|
+
autoFocus: a,
|
|
33
|
+
onSubmit: s
|
|
34
|
+
}) {
|
|
35
|
+
const e = x(null), [o, i] = h(""), c = o.trim(), u = !!c;
|
|
36
|
+
g(() => {
|
|
17
37
|
var t;
|
|
18
|
-
|
|
19
|
-
}, [
|
|
20
|
-
const
|
|
38
|
+
a && ((t = e.current) == null || t.focus());
|
|
39
|
+
}, [a]);
|
|
40
|
+
const p = () => {
|
|
21
41
|
const t = e.current;
|
|
22
42
|
t && (t.style.height = "64px", t.style.height = `${t.scrollHeight + 4}px`);
|
|
43
|
+
}, d = (t) => {
|
|
44
|
+
i(t.target.value), p();
|
|
23
45
|
}, m = (t) => {
|
|
24
|
-
|
|
25
|
-
}, l = (t) => {
|
|
26
|
-
t.preventDefault(), u(c), s(""), requestAnimationFrame(i);
|
|
46
|
+
t.preventDefault(), s(c), i(""), requestAnimationFrame(p);
|
|
27
47
|
}, f = (t) => {
|
|
28
|
-
t.key === "Enter" && !t.shiftKey && !t.ctrlKey && !t.metaKey &&
|
|
29
|
-
},
|
|
48
|
+
t.key === "Enter" && !t.shiftKey && !t.ctrlKey && !t.metaKey && m(t);
|
|
49
|
+
}, y = () => {
|
|
30
50
|
var t;
|
|
31
51
|
(t = e.current) == null || t.focus();
|
|
32
52
|
};
|
|
33
|
-
return /* @__PURE__ */
|
|
53
|
+
return /* @__PURE__ */ l(
|
|
34
54
|
"form",
|
|
35
55
|
{
|
|
36
|
-
className:
|
|
56
|
+
className: _(r.inputWrap, { [r.active]: u }),
|
|
37
57
|
onKeyDown: f,
|
|
38
|
-
onSubmit:
|
|
58
|
+
onSubmit: m,
|
|
39
59
|
children: [
|
|
40
|
-
/* @__PURE__ */ n(
|
|
60
|
+
/* @__PURE__ */ n(v, {}),
|
|
41
61
|
/* @__PURE__ */ n(
|
|
42
62
|
"textarea",
|
|
43
63
|
{
|
|
44
|
-
className:
|
|
64
|
+
className: r.textarea,
|
|
45
65
|
ref: e,
|
|
46
66
|
value: o,
|
|
47
|
-
onChange:
|
|
67
|
+
onChange: d
|
|
48
68
|
}
|
|
49
69
|
),
|
|
50
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ l(
|
|
71
|
+
F,
|
|
72
|
+
{
|
|
73
|
+
variant: u ? "primary" : "secondary",
|
|
74
|
+
onClick: y,
|
|
75
|
+
children: [
|
|
76
|
+
/* @__PURE__ */ n(b, {}),
|
|
77
|
+
/* @__PURE__ */ n("span", { className: "sr-only", children: "Send message" })
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
)
|
|
51
81
|
]
|
|
52
82
|
}
|
|
53
83
|
);
|
|
54
84
|
}
|
|
55
85
|
export {
|
|
56
|
-
|
|
86
|
+
I as GPTInput,
|
|
87
|
+
F as default
|
|
57
88
|
};
|
|
@@ -1,4 +1,26 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
|
|
1
|
+
import { ElementType, ReactNode } from 'react';
|
|
2
|
+
import { NotificationVariant } from '../Notification';
|
|
3
|
+
export interface SubHeaderItem {
|
|
4
|
+
title: string;
|
|
5
|
+
url: string;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
tag?: ReactNode;
|
|
8
|
+
tagVariant?: "success" | "brand";
|
|
9
|
+
link?: ElementType;
|
|
10
|
+
}
|
|
11
|
+
export declare function SubHeader({ items }: {
|
|
12
|
+
items: Array<SubHeaderItem>;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function Header({ subItems, children, notifications: initialNotifications, // TODO: Fetch these from the internets
|
|
15
|
+
link: Link, }: {
|
|
16
|
+
subItems?: Array<SubHeaderItem>;
|
|
3
17
|
children?: ReactNode;
|
|
18
|
+
notifications?: Array<{
|
|
19
|
+
id?: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
variant?: NotificationVariant;
|
|
23
|
+
closable?: boolean;
|
|
24
|
+
}>;
|
|
25
|
+
link?: ElementType;
|
|
4
26
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { useState as b, useEffect as x } from "react";
|
|
3
|
+
import { J as S } from "../../index-CMegByeX.js";
|
|
4
|
+
import { _ as u } from "../../extends-hS2Bh-Yp.js";
|
|
5
|
+
import { c as w } from "../../clsx-OuTLNxxd.js";
|
|
6
|
+
import { Button as d } from "../Button/index.js";
|
|
7
|
+
import { Container as _ } from "../Container/index.js";
|
|
8
|
+
import { ThemedLogo as C } from "../Logo/index.js";
|
|
9
|
+
import { Notification as M } from "../Notification/index.js";
|
|
10
|
+
import { PrefPanel as N } from "../PrefPanel/index.js";
|
|
11
|
+
import { useMediaQuery as T } from "../../utils.js";
|
|
12
|
+
var L = function(r) {
|
|
13
|
+
return /* @__PURE__ */ t("svg", u({
|
|
9
14
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10
15
|
width: 24,
|
|
11
16
|
height: 24,
|
|
@@ -17,11 +22,11 @@ var w = function(r) {
|
|
|
17
22
|
strokeLinecap: "round",
|
|
18
23
|
strokeLinejoin: "round",
|
|
19
24
|
strokeWidth: 2,
|
|
20
|
-
d: "
|
|
25
|
+
d: "M3 12h12M3 6h18M3 18h18"
|
|
21
26
|
})
|
|
22
27
|
}));
|
|
23
|
-
},
|
|
24
|
-
return /* @__PURE__ */ t("svg",
|
|
28
|
+
}, j = function(r) {
|
|
29
|
+
return /* @__PURE__ */ t("svg", u({
|
|
25
30
|
xmlns: "http://www.w3.org/2000/svg",
|
|
26
31
|
width: 24,
|
|
27
32
|
height: 24,
|
|
@@ -33,11 +38,11 @@ var w = function(r) {
|
|
|
33
38
|
strokeLinecap: "round",
|
|
34
39
|
strokeLinejoin: "round",
|
|
35
40
|
strokeWidth: 2,
|
|
36
|
-
d: "
|
|
41
|
+
d: "m21 21-4.35-4.35M19 11c0 4.4183-3.5817 8-8 8s-8-3.5817-8-8 3.5817-8 8-8 8 3.5817 8 8"
|
|
37
42
|
})
|
|
38
43
|
}));
|
|
39
|
-
},
|
|
40
|
-
return /* @__PURE__ */ t("svg",
|
|
44
|
+
}, B = function(r) {
|
|
45
|
+
return /* @__PURE__ */ t("svg", u({
|
|
41
46
|
xmlns: "http://www.w3.org/2000/svg",
|
|
42
47
|
width: 24,
|
|
43
48
|
height: 24,
|
|
@@ -52,8 +57,8 @@ var w = function(r) {
|
|
|
52
57
|
d: "M4.5 22v-5m0-10V2M2 4.5h5m-5 15h5M13 3l-1.7342 4.5089c-.282.7332-.423 1.0998-.6423 1.4082a3 3 0 0 1-.7064.7064c-.3084.2193-.675.3603-1.4082.6423L4 12l4.5089 1.7342c.7332.282 1.0998.423 1.4082.6423.2733.1943.5121.4331.7064.7064.2193.3084.3603.675.6423 1.4082L13 21l1.7342-4.5089c.282-.7332.423-1.0998.6423-1.4082a3 3 0 0 1 .7064-.7064c.3084-.2193.675-.3603 1.4082-.6423L22 12l-4.5089-1.7342c-.7332-.282-1.0998-.423-1.4082-.6423a3 3 0 0 1-.7064-.7064c-.2193-.3084-.3603-.675-.6423-1.4082z"
|
|
53
58
|
})
|
|
54
59
|
}));
|
|
55
|
-
},
|
|
56
|
-
return /* @__PURE__ */ t("svg",
|
|
60
|
+
}, J = function(r) {
|
|
61
|
+
return /* @__PURE__ */ t("svg", u({
|
|
57
62
|
xmlns: "http://www.w3.org/2000/svg",
|
|
58
63
|
width: 24,
|
|
59
64
|
height: 24,
|
|
@@ -68,8 +73,8 @@ var w = function(r) {
|
|
|
68
73
|
d: "m7 15 3-3-3-3m6 6h4m-9.2 6h8.4c1.6802 0 2.5202 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 18.7202 21 17.8802 21 16.2V7.8c0-1.6802 0-2.5202-.327-3.162a3 3 0 0 0-1.311-1.311C18.7202 3 17.8802 3 16.2 3H7.8c-1.6802 0-2.5202 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.2798 3 6.1198 3 7.8v8.4c0 1.6802 0 2.5202.327 3.162a3 3 0 0 0 1.311 1.311C5.2798 21 6.1198 21 7.8 21"
|
|
69
74
|
})
|
|
70
75
|
}));
|
|
71
|
-
},
|
|
72
|
-
return /* @__PURE__ */ t("svg",
|
|
76
|
+
}, P = function(r) {
|
|
77
|
+
return /* @__PURE__ */ t("svg", u({
|
|
73
78
|
xmlns: "http://www.w3.org/2000/svg",
|
|
74
79
|
width: 24,
|
|
75
80
|
height: 24,
|
|
@@ -85,12 +90,23 @@ var w = function(r) {
|
|
|
85
90
|
})
|
|
86
91
|
}));
|
|
87
92
|
};
|
|
88
|
-
const
|
|
89
|
-
header:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
93
|
+
const W = "_header_ggk0t_17", y = "_outer_ggk0t_28", H = "_main_ggk0t_37", O = "_container_ggk0t_41", q = "_links_ggk0t_47", z = "_buttons_ggk0t_48", G = "_menu_ggk0t_53", U = "_logo_ggk0t_57", V = "_sub_ggk0t_69", $ = "_subContainer_ggk0t_73", D = "_selected_ggk0t_95", E = "_subTag_ggk0t_107", Q = "_gpt_ggk0t_140", e = {
|
|
94
|
+
header: W,
|
|
95
|
+
outer: y,
|
|
96
|
+
main: H,
|
|
97
|
+
container: O,
|
|
98
|
+
links: q,
|
|
99
|
+
buttons: z,
|
|
100
|
+
menu: G,
|
|
101
|
+
logo: U,
|
|
102
|
+
sub: V,
|
|
103
|
+
subContainer: $,
|
|
104
|
+
selected: D,
|
|
105
|
+
subTag: E,
|
|
106
|
+
"subTag-success": "_subTag-success_ggk0t_112",
|
|
107
|
+
"subTag-brand": "_subTag-brand_ggk0t_116",
|
|
108
|
+
gpt: Q
|
|
109
|
+
}, R = [
|
|
94
110
|
{
|
|
95
111
|
title: "Products",
|
|
96
112
|
url: "https://highcharts.com/products/"
|
|
@@ -116,43 +132,126 @@ const k = "_header_40fgp_17", x = "_container_40fgp_29", L = "_logo_40fgp_41", _
|
|
|
116
132
|
url: "https://www.highcharts.com/blog/"
|
|
117
133
|
}
|
|
118
134
|
];
|
|
119
|
-
function
|
|
120
|
-
|
|
121
|
-
{
|
|
122
|
-
|
|
123
|
-
|
|
135
|
+
function A({ items: n }) {
|
|
136
|
+
return /* @__PURE__ */ t("div", { className: w(e.sub, e.outer), children: /* @__PURE__ */ t(_, { className: e.subContainer, as: "ul", children: n.map(
|
|
137
|
+
({ title: r, url: h, icon: c, tag: m, tagVariant: l = "success", link: g = "a" }, p) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ a(g, { href: h, children: [
|
|
138
|
+
c,
|
|
139
|
+
/* @__PURE__ */ a("span", { children: [
|
|
140
|
+
r,
|
|
141
|
+
m && /* @__PURE__ */ t(
|
|
142
|
+
"span",
|
|
143
|
+
{
|
|
144
|
+
className: w(
|
|
145
|
+
e.subTag,
|
|
146
|
+
e[`subTag-${l}`]
|
|
147
|
+
),
|
|
148
|
+
children: m
|
|
149
|
+
}
|
|
150
|
+
)
|
|
151
|
+
] })
|
|
152
|
+
] }) }, p)
|
|
153
|
+
) }) });
|
|
154
|
+
}
|
|
155
|
+
function ot({
|
|
156
|
+
subItems: n,
|
|
157
|
+
children: r,
|
|
158
|
+
notifications: h = [],
|
|
159
|
+
// TODO: Fetch these from the internets
|
|
160
|
+
link: c = "a"
|
|
161
|
+
}) {
|
|
162
|
+
const m = T("(min-width: 850px) and (max-width: 999 px)"), [l, g] = b([]);
|
|
163
|
+
x(() => {
|
|
164
|
+
if (h.length) {
|
|
165
|
+
const o = localStorage.getItem("notifications");
|
|
166
|
+
if (o) {
|
|
167
|
+
const i = JSON.parse(o);
|
|
168
|
+
g(
|
|
169
|
+
h.filter(
|
|
170
|
+
(s) => !s.id || !i.closed.includes(s.id)
|
|
171
|
+
)
|
|
172
|
+
);
|
|
173
|
+
} else
|
|
174
|
+
g(h);
|
|
124
175
|
}
|
|
125
|
-
];
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
176
|
+
}, [h]);
|
|
177
|
+
const p = (o) => {
|
|
178
|
+
g(l.filter((s) => !s.id || s.id !== o));
|
|
179
|
+
const i = localStorage.getItem("notifications");
|
|
180
|
+
if (i) {
|
|
181
|
+
const s = JSON.parse(i);
|
|
182
|
+
s.closed.includes(o) || (s.closed.push(o), localStorage.setItem("notifications", JSON.stringify(s)));
|
|
183
|
+
} else
|
|
184
|
+
localStorage.setItem(
|
|
185
|
+
"notifications",
|
|
186
|
+
JSON.stringify({
|
|
187
|
+
closed: [o]
|
|
188
|
+
})
|
|
189
|
+
);
|
|
190
|
+
};
|
|
191
|
+
return /* @__PURE__ */ t(S, { children: /* @__PURE__ */ a("header", { className: e.header, children: [
|
|
192
|
+
l == null ? void 0 : l.map(
|
|
193
|
+
({ id: o, title: i, description: s, variant: f, closable: k }, v) => /* @__PURE__ */ t(
|
|
194
|
+
M,
|
|
195
|
+
{
|
|
196
|
+
description: s,
|
|
197
|
+
variant: f,
|
|
198
|
+
closable: k,
|
|
199
|
+
onClose: () => p(o),
|
|
200
|
+
children: i
|
|
201
|
+
},
|
|
202
|
+
v
|
|
203
|
+
)
|
|
204
|
+
),
|
|
205
|
+
/* @__PURE__ */ t("div", { className: w(e.main, e.outer), children: /* @__PURE__ */ a(_, { as: "nav", className: e.container, children: [
|
|
206
|
+
/* @__PURE__ */ t(c, { className: e.logo, href: "https://www.highcharts.com/", children: /* @__PURE__ */ t(C, { showText: !m }) }),
|
|
207
|
+
/* @__PURE__ */ t("div", { className: e.links, children: R.map(({ title: o, url: i }, s) => /* @__PURE__ */ t(d, { variant: "plain", size: 300, as: c, href: i, children: o }, s)) }),
|
|
208
|
+
/* @__PURE__ */ a("div", { className: e.buttons, children: [
|
|
209
|
+
/* @__PURE__ */ a(
|
|
210
|
+
d,
|
|
134
211
|
{
|
|
135
212
|
variant: "transparent",
|
|
136
|
-
as:
|
|
213
|
+
as: c,
|
|
137
214
|
href: "https://www.highcharts.com/chat/gpt/",
|
|
138
215
|
children: [
|
|
139
|
-
/* @__PURE__ */ t("span", { className:
|
|
140
|
-
/* @__PURE__ */ t(
|
|
216
|
+
/* @__PURE__ */ t("span", { className: e.gpt, children: "Highcharts GPT" }),
|
|
217
|
+
/* @__PURE__ */ t(B, {})
|
|
141
218
|
]
|
|
142
219
|
}
|
|
143
220
|
),
|
|
144
|
-
/* @__PURE__ */ t(
|
|
145
|
-
/* @__PURE__ */ t(
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
|
|
148
|
-
/* @__PURE__ */ t(
|
|
149
|
-
|
|
150
|
-
|
|
221
|
+
/* @__PURE__ */ t(d, { variant: "transparent", children: /* @__PURE__ */ t(j, {}) }),
|
|
222
|
+
/* @__PURE__ */ t(N, {}),
|
|
223
|
+
/* @__PURE__ */ a(d, { variant: "transparent", className: e.menu, children: [
|
|
224
|
+
"Menu",
|
|
225
|
+
/* @__PURE__ */ t(L, {})
|
|
226
|
+
] }),
|
|
227
|
+
/* @__PURE__ */ t(
|
|
228
|
+
d,
|
|
229
|
+
{
|
|
230
|
+
variant: "brand",
|
|
231
|
+
as: c,
|
|
232
|
+
href: "https://shop.highcharts.com/account",
|
|
233
|
+
children: /* @__PURE__ */ t(P, {})
|
|
234
|
+
}
|
|
235
|
+
),
|
|
236
|
+
/* @__PURE__ */ a(
|
|
237
|
+
d,
|
|
238
|
+
{
|
|
239
|
+
variant: "success",
|
|
240
|
+
as: c,
|
|
241
|
+
href: "https://www.highcharts.com/download/",
|
|
242
|
+
children: [
|
|
243
|
+
/* @__PURE__ */ t(J, {}),
|
|
244
|
+
"Get started"
|
|
245
|
+
]
|
|
246
|
+
}
|
|
247
|
+
)
|
|
151
248
|
] })
|
|
152
|
-
] }),
|
|
153
|
-
|
|
154
|
-
|
|
249
|
+
] }) }),
|
|
250
|
+
!!(n != null && n.length) && /* @__PURE__ */ t(A, { items: n }),
|
|
251
|
+
r
|
|
252
|
+
] }) });
|
|
155
253
|
}
|
|
156
254
|
export {
|
|
157
|
-
|
|
255
|
+
ot as Header,
|
|
256
|
+
A as SubHeader
|
|
158
257
|
};
|
|
@@ -6,3 +6,4 @@ export interface LogoProps extends SVGProps<SVGSVGElement> {
|
|
|
6
6
|
withLink?: boolean;
|
|
7
7
|
}
|
|
8
8
|
export declare function Logo({ title, light, showText, withLink, ...props }: LogoProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function ThemedLogo(props: LogoProps): import("react/jsx-runtime").JSX.Element;
|