@paroicms/react-ui 0.4.3 → 0.5.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.
Files changed (130) hide show
  1. package/dist/Accordion.d.ts +10 -0
  2. package/dist/{PuAccordion.jsx → Accordion.js} +5 -8
  3. package/dist/Alert.d.ts +10 -0
  4. package/dist/Alert.js +7 -0
  5. package/dist/Badge.d.ts +8 -0
  6. package/dist/Badge.js +6 -0
  7. package/dist/Breadcrumb.d.ts +14 -0
  8. package/dist/Breadcrumb.js +10 -0
  9. package/dist/Button.d.ts +36 -0
  10. package/dist/Button.js +74 -0
  11. package/dist/Card.d.ts +10 -0
  12. package/dist/Card.js +7 -0
  13. package/dist/Checkbox.d.ts +9 -0
  14. package/dist/Checkbox.js +12 -0
  15. package/dist/Chip.d.ts +8 -0
  16. package/dist/Chip.js +7 -0
  17. package/dist/Column.d.ts +14 -0
  18. package/dist/Column.js +7 -0
  19. package/dist/DataTable.d.ts +30 -0
  20. package/dist/DataTable.js +26 -0
  21. package/dist/DateInput.d.ts +9 -0
  22. package/dist/DateInput.js +7 -0
  23. package/dist/Dialog.d.ts +13 -0
  24. package/dist/Dialog.js +55 -0
  25. package/dist/Inplace.d.ts +12 -0
  26. package/dist/Inplace.js +16 -0
  27. package/dist/InputNumber.d.ts +10 -0
  28. package/dist/InputNumber.js +19 -0
  29. package/dist/InputText.d.ts +14 -0
  30. package/dist/InputText.js +11 -0
  31. package/dist/MenuItem.d.ts +8 -0
  32. package/dist/MenuItem.js +18 -0
  33. package/dist/MultiSelect.d.ts +17 -0
  34. package/dist/MultiSelect.js +50 -0
  35. package/dist/Panel.d.ts +11 -0
  36. package/dist/Panel.js +9 -0
  37. package/dist/PasswordInput.d.ts +8 -0
  38. package/dist/PasswordInput.js +10 -0
  39. package/dist/PopupMenu.d.ts +20 -0
  40. package/dist/{PuPopupMenu.jsx → PopupMenu.js} +45 -36
  41. package/dist/RadioButton.d.ts +9 -0
  42. package/dist/RadioButton.js +12 -0
  43. package/dist/Select.d.ts +18 -0
  44. package/dist/Select.js +11 -0
  45. package/dist/SideMenu.d.ts +5 -0
  46. package/dist/SideMenu.js +13 -0
  47. package/dist/SortableList.d.ts +19 -0
  48. package/dist/SortableList.js +27 -0
  49. package/dist/Spinner.d.ts +2 -0
  50. package/dist/Spinner.js +5 -0
  51. package/dist/SplitButton.d.ts +24 -0
  52. package/dist/SplitButton.js +42 -0
  53. package/dist/Switch.d.ts +9 -0
  54. package/dist/Switch.js +12 -0
  55. package/dist/Tabs.d.ts +22 -0
  56. package/dist/Tabs.js +21 -0
  57. package/dist/Textarea.d.ts +8 -0
  58. package/dist/Textarea.js +7 -0
  59. package/dist/ToggleButton.d.ts +11 -0
  60. package/dist/ToggleButton.js +6 -0
  61. package/dist/ToggleGroup.d.ts +15 -0
  62. package/dist/ToggleGroup.js +6 -0
  63. package/dist/Tooltip.d.ts +10 -0
  64. package/dist/Tooltip.js +50 -0
  65. package/dist/Tree.d.ts +22 -0
  66. package/dist/Tree.js +43 -0
  67. package/dist/alert-stack.d.ts +18 -0
  68. package/dist/alert-stack.js +72 -0
  69. package/dist/index.d.ts +36 -10
  70. package/dist/index.js +45 -10
  71. package/dist/paroi-ui-lib-types.d.ts +4 -4
  72. package/dist/react-ui-provider.d.ts +15 -0
  73. package/dist/react-ui-provider.js +22 -0
  74. package/package.json +18 -4
  75. package/styles/Accordion.css +46 -0
  76. package/styles/Alert.css +76 -0
  77. package/styles/Badge.css +59 -0
  78. package/styles/Breadcrumb.css +57 -0
  79. package/styles/Button.css +167 -0
  80. package/styles/Card.css +28 -0
  81. package/styles/Checkbox.css +61 -0
  82. package/styles/Chip.css +35 -0
  83. package/styles/DataTable.css +176 -0
  84. package/styles/DateInput.css +59 -0
  85. package/styles/Dialog.css +77 -0
  86. package/styles/Inplace.css +44 -0
  87. package/styles/InputNumber.css +60 -0
  88. package/styles/InputText.css +99 -0
  89. package/styles/MenuItem.css +169 -0
  90. package/styles/MultiSelect.css +158 -0
  91. package/styles/Panel.css +40 -0
  92. package/styles/PasswordInput.css +80 -0
  93. package/styles/PopupMenu.css +37 -0
  94. package/styles/RadioButton.css +60 -0
  95. package/styles/Select.css +72 -0
  96. package/styles/SideMenu.css +7 -0
  97. package/styles/SortableList.css +32 -0
  98. package/styles/Spinner.css +30 -0
  99. package/styles/SplitButton.css +143 -0
  100. package/styles/Switch.css +60 -0
  101. package/styles/Tabs.css +94 -0
  102. package/styles/Textarea.css +66 -0
  103. package/styles/ToggleButton.css +36 -0
  104. package/styles/ToggleGroup.css +55 -0
  105. package/styles/Tooltip.css +34 -0
  106. package/styles/Tree.css +161 -0
  107. package/styles/theme/base.css +40 -0
  108. package/styles/theme/common.css +410 -0
  109. package/styles/theme/index.css +15 -0
  110. package/styles/theme/margins.css +119 -0
  111. package/styles/theme/reset.css +119 -0
  112. package/styles/theme/tokens.css +226 -0
  113. package/dist/PuAccordion.d.ts +0 -9
  114. package/dist/PuButton.d.ts +0 -14
  115. package/dist/PuButton.jsx +0 -15
  116. package/dist/PuCheckbox.d.ts +0 -8
  117. package/dist/PuCheckbox.jsx +0 -13
  118. package/dist/PuInput.d.ts +0 -10
  119. package/dist/PuInput.jsx +0 -13
  120. package/dist/PuMenuItem.d.ts +0 -7
  121. package/dist/PuMenuItem.jsx +0 -33
  122. package/dist/PuPopupMenu.d.ts +0 -14
  123. package/dist/PuSelect.d.ts +0 -17
  124. package/dist/PuSelect.jsx +0 -24
  125. package/dist/PuSideMenu.d.ts +0 -4
  126. package/dist/PuSideMenu.jsx +0 -15
  127. package/dist/PuSpinner.d.ts +0 -1
  128. package/dist/PuSpinner.jsx +0 -3
  129. package/dist/svg-icons.d.ts +0 -5
  130. package/dist/svg-icons.jsx +0 -30
@@ -0,0 +1,226 @@
1
+ /* ========================================
2
+ ParoiCMS Design System - Tokens
3
+ Design variables for Admin-UI
4
+ Coworking-inspired palette
5
+ ======================================== */
6
+
7
+ @import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");
8
+
9
+ :root {
10
+ /* ========================================
11
+ Color Palette
12
+ ======================================== */
13
+
14
+ /* Primary: Soft Teal/Green - Main action color */
15
+ --color-primary: #0d9488;
16
+ --color-primary-dark: #0f766e;
17
+ --color-primary-hover: #14b8a6;
18
+ --color-primary-light: #ccfbf1;
19
+ --color-primary-subtle: #f0fdfa;
20
+
21
+ /* Accent: Warm Coral - Secondary action color */
22
+ --color-accent: #f97316;
23
+ --color-accent-dark: #ea580c;
24
+ --color-accent-light: #ffedd5;
25
+
26
+ /* Warning: Amber */
27
+ --color-yellow: #f59e0b;
28
+ --color-yellow-dark: #d97706;
29
+ --color-yellow-light: #fef3c7;
30
+
31
+ /* Danger: Rose Red for destructive actions */
32
+ --color-danger: #e11d48;
33
+ --color-danger-dark: #be123c;
34
+ --color-danger-light2: #c67a8b;
35
+ --color-danger-light: #ffe4e6;
36
+
37
+ /* Success: Emerald for confirmation */
38
+ --color-success: #10b981;
39
+ --color-success-dark: #059669;
40
+ --color-success-light: #d1fae5;
41
+
42
+ /* Info: Blue for informational messages */
43
+ --color-info: #3b82f6;
44
+ --color-info-dark: #2563eb;
45
+ --color-info-light: #dbeafe;
46
+
47
+ /* ========================================
48
+ Text Colors
49
+ ======================================== */
50
+ --color-text: #1e293b;
51
+ --color-text-light: #64748b;
52
+ --color-text-muted: #475569;
53
+ --color-text-inverse: #ffffff;
54
+
55
+ /* ========================================
56
+ Background Colors
57
+ Warm sunny palette - like morning light
58
+ ======================================== */
59
+ --color-bg: #ffffff;
60
+ /* --color-bg-app: #f7f5e8; */
61
+ /* --color-bg-app: #fbffdf; */
62
+ --color-bg-app: #fff;
63
+ /* #ffffe0 */
64
+ --color-bg-section: #f6f3eb;
65
+ /* Lighter warm */
66
+ --color-bg-subtle: #f2f1ec;
67
+ /* Very light warmth */
68
+ --color-bg-elevated: #ffffff;
69
+
70
+ /* Sidebar specific */
71
+ --color-bg-sidebar: #1e293b;
72
+ --color-bg-sidebar-hover: #334155;
73
+ --color-text-sidebar: #e2e8f0;
74
+ --color-text-sidebar-muted: #94a3b8;
75
+ --color-bg-muted: #fafafa;
76
+
77
+ /* Sidebar hover colors - light green tints */
78
+ --color-hover-sidebar-dark: #40a59d;
79
+ /* Emerald green with transparency for dark bg */
80
+ --color-hover-sidebar-light: #d1fae5;
81
+ /* Light emerald green for light bg */
82
+
83
+ /* ========================================
84
+ Border Colors
85
+ ======================================== */
86
+ --color-border: #d6dce3;
87
+ --color-border-focus: var(--color-primary);
88
+ --color-border-light: #eceff1;
89
+
90
+ /* ========================================
91
+ Layout Dimensions
92
+ ======================================== */
93
+
94
+ /* Secondary sidebar (parts navigation) */
95
+ --sidebar-secondary-width: 220px;
96
+
97
+ /* Navbar/Topbar */
98
+ --navbar-height: 58px;
99
+ --navbar-height-mobile: 76px;
100
+
101
+ /* Control bar (document/part header) */
102
+ --control-bar-height: 65px;
103
+
104
+ /* Content */
105
+ --doc-content-max-width: 1200px;
106
+ /* Max width for document content area */
107
+ --content-max-width: 960px;
108
+ --content-padding: 1.5rem;
109
+ --content-padding-mobile: 1rem;
110
+
111
+ /* ========================================
112
+ Spacing Scale
113
+ ======================================== */
114
+ --space-0: 0;
115
+ --space-1: 0.25rem;
116
+ /* 4px */
117
+ --space-2: 0.5rem;
118
+ /* 8px */
119
+ --space-3: 0.75rem;
120
+ /* 12px */
121
+ --space-4: 1rem;
122
+ /* 16px */
123
+ --space-5: 1.25rem;
124
+ /* 20px */
125
+ --space-6: 1.5rem;
126
+ /* 24px */
127
+ --space-8: 2rem;
128
+ /* 32px */
129
+ --space-10: 2.5rem;
130
+ /* 40px */
131
+ --space-12: 3rem;
132
+ /* 48px */
133
+
134
+ /* ========================================
135
+ Typography
136
+ ======================================== */
137
+
138
+ /* Font Families */
139
+ --font-sans:
140
+ "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
141
+ --font-mono: ui-monospace, "SF Mono", Monaco, "Cascadia Code", monospace;
142
+
143
+ /* Font Sizes */
144
+ --text-xs: 0.75rem;
145
+ /* 12px */
146
+ --text-sm: 0.875rem;
147
+ /* 14px */
148
+ --text-base: 1rem;
149
+ /* 16px */
150
+ --text-md: 1.0625rem;
151
+ /* 17px */
152
+ --text-lg: 1.125rem;
153
+ /* 18px */
154
+ --text-xl: 1.25rem;
155
+ /* 20px */
156
+ --text-2xl: 1.5rem;
157
+ /* 24px */
158
+ --text-3xl: 1.875rem;
159
+ /* 30px */
160
+
161
+ /* Line Heights */
162
+ --leading-tight: 1.25;
163
+ --leading-snug: 1.375;
164
+ --leading-normal: 1.5;
165
+ --leading-relaxed: 1.625;
166
+
167
+ /* Font Weights */
168
+ --font-normal: 400;
169
+ --font-medium: 500;
170
+ --font-semibold: 600;
171
+ --font-bold: 700;
172
+
173
+ /* ========================================
174
+ Border Radius
175
+ ======================================== */
176
+ --radius-sm: 4px;
177
+ --radius: 6px;
178
+ --radius-md: 8px;
179
+ --radius-lg: 10px;
180
+ --radius-xl: 12px;
181
+ --radius-full: 9999px;
182
+
183
+ /* ========================================
184
+ Shadows
185
+ ======================================== */
186
+ --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
187
+ --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
188
+ --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
189
+ --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
190
+ --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
191
+
192
+ /* ========================================
193
+ Transitions
194
+ ======================================== */
195
+ --transition-fast: 0.1s ease;
196
+ --transition: 0.15s ease;
197
+ --transition-slow: 0.25s ease;
198
+
199
+ /* ========================================
200
+ Z-Index Scale
201
+ ======================================== */
202
+ --z-dropdown: 100;
203
+ --z-sticky: 200;
204
+ --z-fixed: 300;
205
+ --z-modal-backdrop: 400;
206
+ --z-modal: 500;
207
+ --z-popover: 600;
208
+ --z-tooltip: 700;
209
+ }
210
+
211
+ /* ========================================
212
+ Dark Mode (for sidebar)
213
+ ======================================== */
214
+ .dark {
215
+ --color-text: #e2e8f0;
216
+ --color-text-light: #94a3b8;
217
+ --color-text-muted: #cbd5e1;
218
+
219
+ --color-bg: #1e293b;
220
+ --color-bg-section: #334155;
221
+ --color-bg-subtle: #475569;
222
+ --color-bg-elevated: #334155;
223
+
224
+ --color-border: #475569;
225
+ --color-border-light: #334155;
226
+ }
@@ -1,9 +0,0 @@
1
- import { type ReactNode } from "react";
2
- import type { PuMenuOption } from "./paroi-ui-lib-types.js";
3
- export interface PuAccordionProps {
4
- children: ReactNode;
5
- header: PuMenuOption;
6
- /** Initial value */
7
- expanded?: boolean;
8
- }
9
- export declare function PuAccordion({ children, header, expanded }: PuAccordionProps): import("react").JSX.Element;
@@ -1,14 +0,0 @@
1
- import { type MouseEvent, type ReactNode } from "react";
2
- export interface PuButtonProps {
3
- children: ReactNode;
4
- className?: string;
5
- disabled?: boolean;
6
- outlined?: boolean;
7
- severity?: "primary" | "secondary" | "success" | "info" | "warning" | "danger";
8
- onClick?: (e: MouseEvent<HTMLButtonElement>) => void;
9
- "aria-label"?: string;
10
- "aria-controls"?: string;
11
- "aria-haspopup"?: boolean;
12
- type?: "button" | "submit" | "reset";
13
- }
14
- export declare const PuButton: import("react").ForwardRefExoticComponent<PuButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
package/dist/PuButton.jsx DELETED
@@ -1,15 +0,0 @@
1
- import { forwardRef } from "react";
2
- export const PuButton = forwardRef(({ children, className, disabled, outlined, severity = "primary", onClick, type = "button", ...rest }, ref) => {
3
- const classes = [
4
- "PuButton",
5
- outlined ? "outlined" : "",
6
- severity ? severity : "",
7
- className || "",
8
- disabled ? "disabled" : "",
9
- ]
10
- .filter(Boolean)
11
- .join(" ");
12
- return (<button ref={ref} className={classes} disabled={disabled} onClick={onClick} type={type} {...rest}>
13
- {children}
14
- </button>);
15
- });
@@ -1,8 +0,0 @@
1
- import type { InputHTMLAttributes } from "react";
2
- export interface PuCheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "onChange" | "type"> {
3
- checked: boolean;
4
- onChange: (checked: boolean) => void;
5
- label?: string;
6
- className?: string;
7
- }
8
- export declare function PuCheckbox({ checked, onChange, label, className, ...rest }: PuCheckboxProps): import("react").JSX.Element;
@@ -1,13 +0,0 @@
1
- export function PuCheckbox({ checked, onChange, label, className = "", ...rest }) {
2
- const handleChange = (e) => {
3
- onChange(e.target.checked);
4
- };
5
- const checkboxClasses = ["PuCheckbox", className].filter(Boolean).join(" ");
6
- return (<div className={checkboxClasses}>
7
- <label className="PuCheckbox-container">
8
- <input className="PuCheckbox-input" type="checkbox" checked={checked} onChange={handleChange} {...rest}/>
9
- <span className="PuCheckbox-checkmark"/>
10
- {label && <span className="PuCheckbox-label">{label}</span>}
11
- </label>
12
- </div>);
13
- }
package/dist/PuInput.d.ts DELETED
@@ -1,10 +0,0 @@
1
- import type { InputHTMLAttributes } from "react";
2
- export interface PuInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "onChange"> {
3
- value: string;
4
- onChange: (value: string) => void;
5
- label?: string;
6
- error?: string;
7
- className?: string;
8
- fullWidth?: boolean;
9
- }
10
- export declare function PuInput({ value, onChange, label, error, className, fullWidth, ...rest }: PuInputProps): import("react").JSX.Element;
package/dist/PuInput.jsx DELETED
@@ -1,13 +0,0 @@
1
- export function PuInput({ value, onChange, label, error, className = "", fullWidth = false, ...rest }) {
2
- const handleChange = (e) => {
3
- onChange(e.target.value);
4
- };
5
- const inputClasses = ["PuInput", error ? "error" : "", fullWidth ? "fullWidth" : "", className]
6
- .filter(Boolean)
7
- .join(" ");
8
- return (<div className={inputClasses}>
9
- {label && <label className="PuInput-label">{label}</label>}
10
- <input className="PuInput-field" value={value} onChange={handleChange} {...rest}/>
11
- {error && <div className="PuInput-error">{error}</div>}
12
- </div>);
13
- }
@@ -1,7 +0,0 @@
1
- import type { PuMenuOption } from "./paroi-ui-lib-types.js";
2
- export interface PuMenuItemProps {
3
- item: PuMenuOption;
4
- expanded?: boolean;
5
- onToggle?: (expanded: boolean) => void;
6
- }
7
- export declare function PuMenuItem({ item, expanded, onToggle }: PuMenuItemProps): import("react").JSX.Element;
@@ -1,33 +0,0 @@
1
- import { PuPopupMenu } from "./PuPopupMenu.jsx";
2
- import { SubMenuIconBottom, SubMenuIconLeft } from "./svg-icons.jsx";
3
- export function PuMenuItem({ item, expanded, onToggle }) {
4
- let { key: id, label, icon, url, command, popupMenu, className, style, active, disabled } = item;
5
- if (disabled) {
6
- url = undefined;
7
- command = undefined;
8
- }
9
- const itemClassNames = [
10
- "PuMenuItem",
11
- className || "",
12
- active ? "active" : "",
13
- disabled ? "disabled" : "",
14
- ]
15
- .filter(Boolean)
16
- .join(" ");
17
- return (<div className={itemClassNames} style={style} key={id}>
18
- {expanded !== undefined && onToggle ? (<button className="PuMenuItem-left toggle" onClick={() => onToggle(!expanded)} type="button">
19
- {expanded ? <SubMenuIconBottom /> : <SubMenuIconLeft />}
20
- </button>) : icon ? (<div className="PuMenuItem-left icon">{icon}</div>) : undefined}
21
- {url ? (<a className="PuMenuItem-label" href={url} onClick={url && command
22
- ? (ev) => {
23
- ev.preventDefault();
24
- command?.();
25
- }
26
- : undefined}>
27
- {label}
28
- </a>) : command ? (<button className="PuMenuItem-label" onClick={command} type="button">
29
- {label}
30
- </button>) : (<span className="PuMenuItem-label">{label}</span>)}
31
- {popupMenu && <PuPopupMenu className="PuMenuItem-popup" items={popupMenu}/>}
32
- </div>);
33
- }
@@ -1,14 +0,0 @@
1
- import { type MouseEvent } from "react";
2
- import type { PuMenuNode } from "./paroi-ui-lib-types.js";
3
- export interface PuPopupMenuProps {
4
- items: PuMenuNode[];
5
- className?: string;
6
- id?: string;
7
- autoPosition?: boolean;
8
- }
9
- export interface PopupMenuRef {
10
- toggle: (event: MouseEvent) => void;
11
- show: (event: MouseEvent) => void;
12
- hide: () => void;
13
- }
14
- export declare const PuPopupMenu: import("react").ForwardRefExoticComponent<PuPopupMenuProps & import("react").RefAttributes<PopupMenuRef>>;
@@ -1,17 +0,0 @@
1
- import type { SelectHTMLAttributes } from "react";
2
- export interface PuSelectOption {
3
- value: string;
4
- label: string;
5
- disabled?: boolean;
6
- }
7
- export interface PuSelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, "onChange"> {
8
- value: string;
9
- onChange: (value: string) => void;
10
- options: PuSelectOption[];
11
- label?: string;
12
- error?: string;
13
- className?: string;
14
- fullWidth?: boolean;
15
- placeholder?: string;
16
- }
17
- export declare function PuSelect({ value, onChange, options, label, error, className, fullWidth, placeholder, ...rest }: PuSelectProps): import("react").JSX.Element;
package/dist/PuSelect.jsx DELETED
@@ -1,24 +0,0 @@
1
- import { ChevronDownIcon } from "./svg-icons.jsx";
2
- export function PuSelect({ value, onChange, options, label, error, className = "", fullWidth = false, placeholder, ...rest }) {
3
- const handleChange = (e) => {
4
- onChange(e.target.value);
5
- };
6
- const selectClasses = ["PuSelect", error ? "error" : "", fullWidth ? "fullWidth" : "", className]
7
- .filter(Boolean)
8
- .join(" ");
9
- return (<div className={selectClasses}>
10
- {label && <label className="PuSelect-label">{label}</label>}
11
- <div className="PuSelect-wrapper">
12
- <select className="PuSelect-field" value={value} onChange={handleChange} {...rest}>
13
- {placeholder && (<option value="" disabled>
14
- {placeholder}
15
- </option>)}
16
- {options.map((option) => (<option key={option.value} value={option.value} disabled={option.disabled}>
17
- {option.label}
18
- </option>))}
19
- </select>
20
- <ChevronDownIcon />
21
- </div>
22
- {error && <div className="PuSelect-error">{error}</div>}
23
- </div>);
24
- }
@@ -1,4 +0,0 @@
1
- import type { PuMenuNode } from "./paroi-ui-lib-types.js";
2
- export declare function PuSideMenu({ menu }: {
3
- menu: PuMenuNode[];
4
- }): import("react").JSX.Element;
@@ -1,15 +0,0 @@
1
- import { PuAccordion } from "./PuAccordion.jsx";
2
- import { PuMenuItem } from "./PuMenuItem.jsx";
3
- export function PuSideMenu({ menu }) {
4
- return (<>
5
- {menu.map((child) => (<PuAccordionOrMenuItem item={child} key={child.key}/>))}
6
- </>);
7
- }
8
- function PuAccordionOrMenuItem({ item }) {
9
- if (item.subMenu) {
10
- return (<PuAccordion header={item} expanded={item.expanded}>
11
- {item.subMenu.map((child) => (<PuAccordionOrMenuItem item={child} key={child.key}/>))}
12
- </PuAccordion>);
13
- }
14
- return <PuMenuItem item={item}/>;
15
- }
@@ -1 +0,0 @@
1
- export declare function PuSpinner(): import("react").JSX.Element;
@@ -1,3 +0,0 @@
1
- export function PuSpinner() {
2
- return <div className="PuSpinner"/>;
3
- }
@@ -1,5 +0,0 @@
1
- export declare function PopupMenuBtnSvg(): import("react").JSX.Element;
2
- export declare function SubMenuIconLeft(): import("react").JSX.Element;
3
- export declare function SubMenuIconBottom(): import("react").JSX.Element;
4
- export declare function ChevronDownIcon(): import("react").JSX.Element;
5
- export declare function SubMenuIcon(): import("react").JSX.Element;
@@ -1,30 +0,0 @@
1
- export function PopupMenuBtnSvg() {
2
- return (<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
3
- <title>⇓</title>
4
- <path fill="currentColor" d="M12.146 7.146a.5.5 0 0 1 .708.708l-4.5 4.5a.5.5 0 0 1-.708 0l-4.5-4.5a.5.5 0 1 1 .708-.708L8 11.293zm0-4a.5.5 0 0 1 .708.708l-4.5 4.5a.5.5 0 0 1-.708 0l-4.5-4.5a.5.5 0 1 1 .708-.708L8 7.293z"/>
5
- </svg>);
6
- }
7
- export function SubMenuIconLeft() {
8
- return (<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg" className="submenu-icon">
9
- <title>→</title>
10
- <path d="M4.38708 13C4.28408 13.0005 4.18203 12.9804 4.08691 12.9409C3.99178 12.9014 3.9055 12.8433 3.83313 12.7701C3.68634 12.6231 3.60388 12.4238 3.60388 12.2161C3.60388 12.0084 3.68634 11.8091 3.83313 11.6622L8.50507 6.99022L3.83313 2.31827C3.69467 2.16968 3.61928 1.97313 3.62287 1.77005C3.62645 1.56698 3.70872 1.37322 3.85234 1.22959C3.99596 1.08597 4.18972 1.00371 4.3928 1.00012C4.59588 0.996539 4.79242 1.07192 4.94102 1.21039L10.1669 6.43628C10.3137 6.58325 10.3962 6.78249 10.3962 6.99022C10.3962 7.19795 10.3137 7.39718 10.1669 7.54416L4.94102 12.7701C4.86865 12.8433 4.78237 12.9014 4.68724 12.9409C4.59212 12.9804 4.49007 13.0005 4.38708 13Z" fill="currentColor"/>
11
- </svg>);
12
- }
13
- export function SubMenuIconBottom() {
14
- return (<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg" className="submenu-icon">
15
- <title>↓</title>
16
- <path d="M7.01744 10.398C6.91269 10.3985 6.8089 10.378 6.71215 10.3379C6.61541 10.2977 6.52766 10.2386 6.45405 10.1641L1.13907 4.84913C1.03306 4.69404 0.985221 4.5065 1.00399 4.31958C1.02276 4.13266 1.10693 3.95838 1.24166 3.82747C1.37639 3.69655 1.55301 3.61742 1.74039 3.60402C1.92777 3.59062 2.11386 3.64382 2.26584 3.75424L7.01744 8.47394L11.769 3.75424C11.9189 3.65709 12.097 3.61306 12.2748 3.62921C12.4527 3.64535 12.6199 3.72073 12.7498 3.84328C12.8797 3.96582 12.9647 4.12842 12.9912 4.30502C13.0177 4.48162 12.9841 4.662 12.8958 4.81724L7.58083 10.1322C7.50996 10.2125 7.42344 10.2775 7.32656 10.3232C7.22968 10.3689 7.12449 10.3944 7.01744 10.398Z" fill="currentColor"/>
17
- </svg>);
18
- }
19
- export function ChevronDownIcon() {
20
- return (<svg className="PuSelect-icon" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
21
- <title>DOWN</title>
22
- <path d="M7.01744 10.398C6.91269 10.3985 6.8089 10.378 6.71215 10.3379C6.61541 10.2977 6.52766 10.2386 6.45405 10.1641L1.13907 4.84913C1.03306 4.69404 0.985221 4.5065 1.00399 4.31958C1.02276 4.13266 1.10693 3.95838 1.24166 3.82747C1.37639 3.69655 1.55301 3.61742 1.74039 3.60402C1.92777 3.59062 2.11386 3.64382 2.26584 3.75424L7.01744 8.47394L11.769 3.75424C11.9189 3.65709 12.097 3.61306 12.2748 3.62921C12.4527 3.64535 12.6199 3.72073 12.7498 3.84328C12.8797 3.96582 12.9647 4.12842 12.9912 4.30502C13.0177 4.48162 12.9841 4.662 12.8958 4.81724L7.58083 10.1322C7.50996 10.2125 7.42344 10.2775 7.32656 10.3232C7.22968 10.3689 7.12449 10.3944 7.01744 10.398Z" fill="currentColor"/>
23
- </svg>);
24
- }
25
- export function SubMenuIcon() {
26
- return (<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
27
- <title>...</title>
28
- <path d="M4.38708 13C4.28408 13.0005 4.18203 12.9804 4.08691 12.9409C3.99178 12.9014 3.9055 12.8433 3.83313 12.7701C3.68634 12.6231 3.60388 12.4238 3.60388 12.2161C3.60388 12.0084 3.68634 11.8091 3.83313 11.6622L8.50507 6.99022L3.83313 2.31827C3.69467 2.16968 3.61928 1.97313 3.62287 1.77005C3.62645 1.56698 3.70872 1.37322 3.85234 1.22959C3.99596 1.08597 4.18972 1.00371 4.3928 1.00012C4.59588 0.996539 4.79242 1.07192 4.94102 1.21039L10.1669 6.43628C10.3137 6.58325 10.3962 6.78249 10.3962 6.99022C10.3962 7.19795 10.3137 7.39718 10.1669 7.54416L4.94102 12.7701C4.86865 12.8433 4.78237 12.9014 4.68724 12.9409C4.59212 12.9804 4.49007 13.0005 4.38708 13Z" fill="currentColor"/>
29
- </svg>);
30
- }