@uva-glass/component-library 3.32.1 → 3.33.1
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.
|
@@ -10,5 +10,7 @@ export interface ExpandableInfoPanelProps {
|
|
|
10
10
|
expandLabel?: string;
|
|
11
11
|
/** Content to be displayed inside the expandable panel. */
|
|
12
12
|
content: ReactNode | string;
|
|
13
|
+
/** Optional state. */
|
|
14
|
+
defaultOpen?: boolean;
|
|
13
15
|
}
|
|
14
|
-
export declare const ExpandableInfoPanel: ({ triggerLabel, mainHeader, collapseLabel, expandLabel, content, }: ExpandableInfoPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const ExpandableInfoPanel: ({ triggerLabel, mainHeader, collapseLabel, expandLabel, content, defaultOpen, }: ExpandableInfoPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as n, jsx as p } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { c as
|
|
2
|
+
import { useState as f, useId as x } from "react";
|
|
3
|
+
import { c as b } from "../../clsx-OuTLNxxd.js";
|
|
4
4
|
import { Icon as r } from "../Icon/Icon.js";
|
|
5
5
|
import '../../assets/ExpandableInfoPanel.css';const a = {
|
|
6
6
|
"expandable-info-panel_wrapper": "_expandable-info-panel_wrapper_v55q8_1",
|
|
@@ -8,28 +8,29 @@ import '../../assets/ExpandableInfoPanel.css';const a = {
|
|
|
8
8
|
"expandable-info-panel_trigger": "_expandable-info-panel_trigger_v55q8_16",
|
|
9
9
|
"expandable-info-panel_trigger--active": "_expandable-info-panel_trigger--active_v55q8_44",
|
|
10
10
|
"expandable-info-panel_content-wrapper": "_expandable-info-panel_content-wrapper_v55q8_66"
|
|
11
|
-
},
|
|
11
|
+
}, q = ({
|
|
12
12
|
triggerLabel: l,
|
|
13
13
|
mainHeader: o,
|
|
14
14
|
collapseLabel: t = "",
|
|
15
15
|
expandLabel: d = "",
|
|
16
|
-
content: _
|
|
16
|
+
content: _,
|
|
17
|
+
defaultOpen: c = !1
|
|
17
18
|
}) => {
|
|
18
|
-
const [e,
|
|
19
|
+
const [e, s] = f(c), i = x();
|
|
19
20
|
return /* @__PURE__ */ n("div", { className: a["expandable-info-panel_wrapper"], children: [
|
|
20
21
|
/* @__PURE__ */ n("div", { className: a["expandable-info-panel_header"], children: [
|
|
21
22
|
o,
|
|
22
23
|
/* @__PURE__ */ n(
|
|
23
24
|
"button",
|
|
24
25
|
{
|
|
25
|
-
className:
|
|
26
|
+
className: b(a["expandable-info-panel_trigger"], {
|
|
26
27
|
[a["expandable-info-panel_trigger--active"]]: e
|
|
27
28
|
}),
|
|
28
29
|
type: "button",
|
|
29
30
|
"aria-expanded": e,
|
|
30
31
|
"aria-controls": i,
|
|
31
32
|
"aria-label": `${l} - ${e ? t : d}`,
|
|
32
|
-
onClick: () =>
|
|
33
|
+
onClick: () => s(!e),
|
|
33
34
|
children: [
|
|
34
35
|
/* @__PURE__ */ p(r, { name: e ? "SquareInfoSolid" : "SquareInfo", size: 24 }),
|
|
35
36
|
l,
|
|
@@ -45,6 +46,6 @@ import '../../assets/ExpandableInfoPanel.css';const a = {
|
|
|
45
46
|
] });
|
|
46
47
|
};
|
|
47
48
|
export {
|
|
48
|
-
|
|
49
|
+
q as ExpandableInfoPanel
|
|
49
50
|
};
|
|
50
51
|
//# sourceMappingURL=ExpandableInfoPanel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpandableInfoPanel.js","sources":["../../../src/components/ExpandableInfoPanel/ExpandableInfoPanel.tsx"],"sourcesContent":["import { useState, type ReactNode } from 'react';\r\nimport { clsx } from 'clsx';\r\nimport { useId } from 'react';\r\n\r\nimport styles from './ExpandableInfoPanel.module.css';\r\n\r\nimport { Icon } from 'components/Icon';\r\n\r\nexport interface ExpandableInfoPanelProps {\r\n /** Label for the trigger button that toggles the expandable panel. */\r\n triggerLabel: string;\r\n /** Main header displayed inline left of the trigger button. */\r\n mainHeader?: ReactNode | string;\r\n /** Aria-label for the button when the panel is collapsed. */\r\n collapseLabel?: string;\r\n /** Aria-label for the button when the panel is expanded. */\r\n expandLabel?: string;\r\n /** Content to be displayed inside the expandable panel. */\r\n content: ReactNode | string;\r\n}\r\n\r\nexport const ExpandableInfoPanel = ({\r\n triggerLabel,\r\n mainHeader,\r\n collapseLabel = '',\r\n expandLabel = '',\r\n content,\r\n}: ExpandableInfoPanelProps) => {\r\n const [active, setActive] = useState(
|
|
1
|
+
{"version":3,"file":"ExpandableInfoPanel.js","sources":["../../../src/components/ExpandableInfoPanel/ExpandableInfoPanel.tsx"],"sourcesContent":["import { useState, type ReactNode } from 'react';\r\nimport { clsx } from 'clsx';\r\nimport { useId } from 'react';\r\n\r\nimport styles from './ExpandableInfoPanel.module.css';\r\n\r\nimport { Icon } from 'components/Icon';\r\n\r\nexport interface ExpandableInfoPanelProps {\r\n /** Label for the trigger button that toggles the expandable panel. */\r\n triggerLabel: string;\r\n /** Main header displayed inline left of the trigger button. */\r\n mainHeader?: ReactNode | string;\r\n /** Aria-label for the button when the panel is collapsed. */\r\n collapseLabel?: string;\r\n /** Aria-label for the button when the panel is expanded. */\r\n expandLabel?: string;\r\n /** Content to be displayed inside the expandable panel. */\r\n content: ReactNode | string;\r\n /** Optional state. */\r\n defaultOpen?: boolean;\r\n}\r\n\r\nexport const ExpandableInfoPanel = ({\r\n triggerLabel,\r\n mainHeader,\r\n collapseLabel = '',\r\n expandLabel = '',\r\n content,\r\n defaultOpen = false,\r\n}: ExpandableInfoPanelProps) => {\r\n const [active, setActive] = useState(defaultOpen);\r\n const contentId = useId();\r\n\r\n return (\r\n <div className={styles['expandable-info-panel_wrapper']}>\r\n <div className={styles['expandable-info-panel_header']}>\r\n {mainHeader}\r\n <button\r\n className={clsx(styles['expandable-info-panel_trigger'], {\r\n [styles['expandable-info-panel_trigger--active']]: active,\r\n })}\r\n type=\"button\"\r\n aria-expanded={active}\r\n aria-controls={contentId}\r\n aria-label={`${triggerLabel} - ${active ? collapseLabel : expandLabel}`}\r\n onClick={() => setActive(!active)}\r\n >\r\n <Icon name={active ? 'SquareInfoSolid' : 'SquareInfo'} size={24} />\r\n {triggerLabel}\r\n <Icon name={active ? 'CheveronUp' : 'CheveronDown'} size={16} />\r\n </button>\r\n </div>\r\n {active && (\r\n <div id={contentId} className={styles['expandable-info-panel_content-wrapper']}>\r\n <Icon name=\"SquareInfo\" size={24} />\r\n <div>{content}</div>\r\n </div>\r\n )}\r\n </div>\r\n );\r\n};\r\n"],"names":["ExpandableInfoPanel","triggerLabel","mainHeader","collapseLabel","expandLabel","content","defaultOpen","active","setActive","useState","contentId","useId","jsxs","styles","clsx","jsx","Icon"],"mappings":";;;;;;;;;;GAuBaA,IAAsB,CAAC;AAAA,EAClC,cAAAC;AAAA,EACA,YAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,aAAAC,IAAc;AAAA,EACd,SAAAC;AAAA,EACA,aAAAC,IAAc;AAChB,MAAgC;AAC9B,QAAM,CAACC,GAAQC,CAAS,IAAIC,EAASH,CAAW,GAC1CI,IAAYC,EAAA;AAElB,SACE,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAO,+BAA+B,GACpD,UAAA;AAAA,IAAA,gBAAAD,EAAC,OAAA,EAAI,WAAWC,EAAO,8BAA8B,GAClD,UAAA;AAAA,MAAAX;AAAA,MACD,gBAAAU;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAWE,EAAKD,EAAO,+BAA+B,GAAG;AAAA,YACvD,CAACA,EAAO,uCAAuC,CAAC,GAAGN;AAAA,UAAA,CACpD;AAAA,UACD,MAAK;AAAA,UACL,iBAAeA;AAAA,UACf,iBAAeG;AAAA,UACf,cAAY,GAAGT,CAAY,MAAMM,IAASJ,IAAgBC,CAAW;AAAA,UACrE,SAAS,MAAMI,EAAU,CAACD,CAAM;AAAA,UAEhC,UAAA;AAAA,YAAA,gBAAAQ,EAACC,KAAK,MAAMT,IAAS,oBAAoB,cAAc,MAAM,IAAI;AAAA,YAChEN;AAAA,8BACAe,GAAA,EAAK,MAAMT,IAAS,eAAe,gBAAgB,MAAM,GAAA,CAAI;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAChE,GACF;AAAA,IACCA,uBACE,OAAA,EAAI,IAAIG,GAAW,WAAWG,EAAO,uCAAuC,GAC3E,UAAA;AAAA,MAAA,gBAAAE,EAACC,GAAA,EAAK,MAAK,cAAa,MAAM,IAAI;AAAA,MAClC,gBAAAD,EAAC,SAAK,UAAAV,EAAA,CAAQ;AAAA,IAAA,EAAA,CAChB;AAAA,EAAA,GAEJ;AAEJ;"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@uva-glass/component-library",
|
|
3
3
|
"author": "Team Glass - Frontend vrienden",
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "3.
|
|
5
|
+
"version": "3.33.1",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
@@ -66,15 +66,15 @@
|
|
|
66
66
|
"@uva-glass/eslint-config": "^1.3.11",
|
|
67
67
|
"@uva-glass/stylelint-config": "^1.2.3",
|
|
68
68
|
"@vitejs/plugin-react": "^4.6.0",
|
|
69
|
-
"babel-jest": "^30.0.
|
|
69
|
+
"babel-jest": "^30.0.4",
|
|
70
70
|
"babel-plugin-transform-vite-meta-env": "^1.0.3",
|
|
71
71
|
"clsx": "^2.1.1",
|
|
72
72
|
"eslint-plugin-react-hooks": "^6.0.0",
|
|
73
73
|
"glob": "^11.0.3",
|
|
74
74
|
"husky": "^9.1.7",
|
|
75
75
|
"identity-obj-proxy": "^3.0.0",
|
|
76
|
-
"jest": "^30.0.
|
|
77
|
-
"jest-environment-jsdom": "^30.0.
|
|
76
|
+
"jest": "^30.0.4",
|
|
77
|
+
"jest-environment-jsdom": "^30.0.4",
|
|
78
78
|
"jest-junit": "^16.0.0",
|
|
79
79
|
"jsdom": "^26.1.0",
|
|
80
80
|
"npm-run-all2": "^8.0.4",
|
|
@@ -83,14 +83,14 @@
|
|
|
83
83
|
"react-router": "^7.6.3",
|
|
84
84
|
"semantic-release": "^24.2.6",
|
|
85
85
|
"storybook": "^9.0.14",
|
|
86
|
-
"style-dictionary": "^5.0.
|
|
87
|
-
"stylelint": "^16.21.
|
|
86
|
+
"style-dictionary": "^5.0.1",
|
|
87
|
+
"stylelint": "^16.21.1",
|
|
88
88
|
"stylelint-config-recommended": "^16.0.0",
|
|
89
89
|
"stylelint-config-standard": "^38.0.0",
|
|
90
90
|
"stylelint-order": "^7.0.0",
|
|
91
91
|
"ts-node": "^10.9.2",
|
|
92
92
|
"typescript": "^5.8.3",
|
|
93
|
-
"vite": "^7.0.
|
|
93
|
+
"vite": "^7.0.3",
|
|
94
94
|
"vite-plugin-dts": "^4.5.4",
|
|
95
95
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
96
96
|
"vite-plugin-static-copy": "^3.1.0",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"vite-tsconfig-paths": "^5.1.4"
|
|
99
99
|
},
|
|
100
100
|
"dependencies": {
|
|
101
|
-
"@babel/preset-env": "^7.
|
|
101
|
+
"@babel/preset-env": "^7.28.0",
|
|
102
102
|
"@babel/preset-react": "^7.27.1",
|
|
103
103
|
"@babel/preset-typescript": "^7.27.1",
|
|
104
104
|
"@lexical/link": "^0.32.1",
|
|
@@ -108,8 +108,8 @@
|
|
|
108
108
|
"lexical": "^0.32.1"
|
|
109
109
|
},
|
|
110
110
|
"optionalDependencies": {
|
|
111
|
-
"@ast-grep/napi-linux-x64-gnu": "0.38.
|
|
112
|
-
"@rollup/rollup-linux-x64-gnu": "^4.44.
|
|
111
|
+
"@ast-grep/napi-linux-x64-gnu": "0.38.7",
|
|
112
|
+
"@rollup/rollup-linux-x64-gnu": "^4.44.2",
|
|
113
113
|
"@rspack/binding-darwin-arm64": "1.4.1",
|
|
114
114
|
"@rspack/binding-linux-x64-gnu": "1.4.1"
|
|
115
115
|
}
|