@inversestudio/neptune-components 1.0.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/README.md +2 -0
- package/components/data-display/AppPreview.jsx +150 -0
- package/components/data-display/DataTable.jsx +65 -0
- package/components/data-display/FileTree.jsx +123 -0
- package/components/data-display/KpiCard.jsx +57 -0
- package/components/data-display/VersionRow.jsx +103 -0
- package/components/feedback/Avatar.jsx +28 -0
- package/components/feedback/Badge.jsx +32 -0
- package/components/feedback/ChatMessage.jsx +42 -0
- package/components/feedback/StatusDot.jsx +55 -0
- package/components/feedback/StatusIndicator.jsx +40 -0
- package/components/inputs/Button.jsx +48 -0
- package/components/inputs/Checkbox.jsx +90 -0
- package/components/inputs/FilterBar.jsx +64 -0
- package/components/inputs/IconButton.jsx +43 -0
- package/components/inputs/IconToggle.jsx +44 -0
- package/components/inputs/NaiaChatInput.jsx +173 -0
- package/components/inputs/NaiaSendButton.jsx +36 -0
- package/components/inputs/PillSelect.jsx +175 -0
- package/components/inputs/PropertyField.jsx +58 -0
- package/components/inputs/SuggestionPill.jsx +28 -0
- package/components/inputs/TextInput.jsx +96 -0
- package/components/inputs/Toggle.jsx +73 -0
- package/components/layout/AppHeader.jsx +56 -0
- package/components/layout/BottomBar.jsx +81 -0
- package/components/layout/Card.jsx +57 -0
- package/components/layout/Panel.jsx +26 -0
- package/components/layout/Toolbar.jsx +89 -0
- package/components/navigation/Breadcrumb.jsx +43 -0
- package/components/navigation/Dropdown.jsx +104 -0
- package/components/navigation/SidebarNav.jsx +82 -0
- package/components/navigation/SidebarTabs.jsx +99 -0
- package/components/navigation/TabBar.jsx +61 -0
- package/components/overlays/Modal.jsx +101 -0
- package/components/shared/index.jsx +112 -0
- package/index.css +3 -0
- package/index.js +50 -0
- package/neptune-components.css +1771 -0
- package/package.json +45 -0
- package/registry.json +1215 -0
- package/tokens/neptune-design-tokens.css +730 -0
- package/tokens/neptune-design-tokens.json +191 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared utilities and components for the Neptune design system
|
|
3
|
+
* Exports commonly used components, helpers, and wrappers
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Token helper function for CSS variable references
|
|
8
|
+
* @param {string} token - The token name (e.g., 'npt-color-primary-vivid')
|
|
9
|
+
* @returns {string} CSS variable reference string (e.g., 'var(--npt-color-primary-vivid)')
|
|
10
|
+
*/
|
|
11
|
+
export const t = (token) => `var(--${token})`;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Neptune logo component with customizable size and color
|
|
15
|
+
* @param {Object} props - Component props
|
|
16
|
+
* @param {number} [props.size=24] - Size in pixels
|
|
17
|
+
* @param {string} [props.color='var(--npt-accent-primary-vivid)'] - SVG stroke color
|
|
18
|
+
* @returns {JSX.Element} SVG Neptune logo
|
|
19
|
+
*/
|
|
20
|
+
export function NeptuneLogo({ size = 24, color = "var(--npt-accent-primary-vivid)" }) {
|
|
21
|
+
return (
|
|
22
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} viewBox="0 0 940.69 440.52" style={{ display: "block", flexShrink: 0 }}>
|
|
23
|
+
<path style={{ fill: color, strokeWidth: 0 }} d="M940.7,220.26l-233.04.12-116.47,201.66-112.7-195.19c-.49-.93-3.81-6.28-3.81-6.28,0,0-3.31,5.33-3.77,6.23-.02.01-.02.02-.03.03l-59.07,102.23-.77,1.33c-19.04,32.91-46.35,60.45-79.1,79.75s-70.92,30.38-111.68,30.38C98.62,440.52,0,341.9,0,220.26S98.62,0,220.26,0C301.79,0,372.98,44.3,411.06,110.14v-.02l59.84,103.57h.01c.62,1,3.79,6.86,3.79,6.86,0,0,3.09-5.71,3.74-6.79.01-.01.01-.02.02-.02l112.73-195.27h233l116.51,201.79Z"/>
|
|
24
|
+
</svg>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Naia logo component with customizable size and color
|
|
30
|
+
* @param {Object} props - Component props
|
|
31
|
+
* @param {number} [props.size=16] - Size in pixels
|
|
32
|
+
* @param {string} [props.color='#B995FF'] - SVG stroke color
|
|
33
|
+
* @returns {JSX.Element} SVG Naia logo
|
|
34
|
+
*/
|
|
35
|
+
export function NaiaLogo({ size = 16, color = "var(--npt-accent-primary-vivid)" }) {
|
|
36
|
+
return (
|
|
37
|
+
<svg width={size} height={size} viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" style={{ display: "block", flexShrink: 0 }}>
|
|
38
|
+
<path d="M0 0V16H3.69231L8 8.61539L12.3077 16H16V0H12.3077L8 7.38462L3.69231 0H0Z" fill={color}/>
|
|
39
|
+
</svg>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Section title component for displaying section headers
|
|
45
|
+
* Uses design tokens for consistent typography and spacing
|
|
46
|
+
* @param {Object} props - Component props
|
|
47
|
+
* @param {string} props.children - Title text content
|
|
48
|
+
* @param {string} [props.className] - Additional CSS classes
|
|
49
|
+
* @returns {JSX.Element} Styled section title
|
|
50
|
+
*/
|
|
51
|
+
export function SectionTitle({ children, className = "" }) {
|
|
52
|
+
return (
|
|
53
|
+
<h2
|
|
54
|
+
className={`section-title ${className}`}
|
|
55
|
+
style={{
|
|
56
|
+
fontSize: t("npt-font-size-lg"),
|
|
57
|
+
fontWeight: t("npt-font-weight-semibold"),
|
|
58
|
+
color: t("npt-text-primary"),
|
|
59
|
+
marginBottom: t("npt-spacing-md"),
|
|
60
|
+
marginTop: 0,
|
|
61
|
+
}}
|
|
62
|
+
>
|
|
63
|
+
{children}
|
|
64
|
+
</h2>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Card wrapper component for containing content with consistent styling
|
|
70
|
+
* Provides padding, border, and background using design tokens
|
|
71
|
+
* @param {Object} props - Component props
|
|
72
|
+
* @param {React.ReactNode} props.children - Card content
|
|
73
|
+
* @param {string} [props.className] - Additional CSS classes
|
|
74
|
+
* @returns {JSX.Element} Styled card container
|
|
75
|
+
*/
|
|
76
|
+
export function Card({ children, className = "" }) {
|
|
77
|
+
return (
|
|
78
|
+
<div
|
|
79
|
+
className={`card ${className}`}
|
|
80
|
+
style={{
|
|
81
|
+
padding: t("npt-spacing-lg"),
|
|
82
|
+
backgroundColor: t("npt-bg-surface-primary"),
|
|
83
|
+
border: `1px solid ${t("npt-border-subtle")}`,
|
|
84
|
+
borderRadius: t("npt-radius-md"),
|
|
85
|
+
}}
|
|
86
|
+
>
|
|
87
|
+
{children}
|
|
88
|
+
</div>
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Divider component for visual separation of content
|
|
94
|
+
* A simple horizontal line using design tokens for styling
|
|
95
|
+
* @param {Object} props - Component props
|
|
96
|
+
* @param {string} [props.className] - Additional CSS classes
|
|
97
|
+
* @returns {JSX.Element} Styled divider line
|
|
98
|
+
*/
|
|
99
|
+
export function Divider({ className = "" }) {
|
|
100
|
+
return (
|
|
101
|
+
<hr
|
|
102
|
+
className={`divider ${className}`}
|
|
103
|
+
style={{
|
|
104
|
+
borderTop: `1px solid ${t("npt-border-subtle")}`,
|
|
105
|
+
borderLeft: "none",
|
|
106
|
+
borderRight: "none",
|
|
107
|
+
borderBottom: "none",
|
|
108
|
+
margin: `${t("npt-spacing-md")} 0`,
|
|
109
|
+
}}
|
|
110
|
+
/>
|
|
111
|
+
);
|
|
112
|
+
}
|
package/index.css
ADDED
package/index.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Auto-generated by build-package.js — do not edit manually.
|
|
2
|
+
// Regenerate with: node scripts/build-package.js
|
|
3
|
+
|
|
4
|
+
// === Shared Utilities ===
|
|
5
|
+
export { t, NeptuneLogo, NaiaLogo, SectionTitle, Divider } from './components/shared/index.jsx';
|
|
6
|
+
|
|
7
|
+
// === Inputs ===
|
|
8
|
+
export { default as Button } from './components/inputs/Button.jsx';
|
|
9
|
+
export { default as IconButton } from './components/inputs/IconButton.jsx';
|
|
10
|
+
export { default as IconToggle } from './components/inputs/IconToggle.jsx';
|
|
11
|
+
export { default as TextInput } from './components/inputs/TextInput.jsx';
|
|
12
|
+
export { default as Toggle } from './components/inputs/Toggle.jsx';
|
|
13
|
+
export { default as Checkbox } from './components/inputs/Checkbox.jsx';
|
|
14
|
+
export { default as PillSelect } from './components/inputs/PillSelect.jsx';
|
|
15
|
+
export { default as NaiaSendButton } from './components/inputs/NaiaSendButton.jsx';
|
|
16
|
+
export { default as SuggestionPill } from './components/inputs/SuggestionPill.jsx';
|
|
17
|
+
export { default as NaiaChatInput } from './components/inputs/NaiaChatInput.jsx';
|
|
18
|
+
export { default as FilterBar } from './components/inputs/FilterBar.jsx';
|
|
19
|
+
export { default as PropertyField } from './components/inputs/PropertyField.jsx';
|
|
20
|
+
|
|
21
|
+
// === Navigation ===
|
|
22
|
+
export { default as TabBar } from './components/navigation/TabBar.jsx';
|
|
23
|
+
export { default as SidebarNav } from './components/navigation/SidebarNav.jsx';
|
|
24
|
+
export { default as SidebarTabs } from './components/navigation/SidebarTabs.jsx';
|
|
25
|
+
export { default as Dropdown } from './components/navigation/Dropdown.jsx';
|
|
26
|
+
export { default as Breadcrumb } from './components/navigation/Breadcrumb.jsx';
|
|
27
|
+
|
|
28
|
+
// === Layout ===
|
|
29
|
+
export { default as AppHeader } from './components/layout/AppHeader.jsx';
|
|
30
|
+
export { default as Toolbar } from './components/layout/Toolbar.jsx';
|
|
31
|
+
export { default as BottomBar } from './components/layout/BottomBar.jsx';
|
|
32
|
+
export { default as Panel } from './components/layout/Panel.jsx';
|
|
33
|
+
export { default as Card } from './components/layout/Card.jsx';
|
|
34
|
+
|
|
35
|
+
// === Feedback ===
|
|
36
|
+
export { default as Badge } from './components/feedback/Badge.jsx';
|
|
37
|
+
export { default as StatusDot } from './components/feedback/StatusDot.jsx';
|
|
38
|
+
export { default as StatusIndicator } from './components/feedback/StatusIndicator.jsx';
|
|
39
|
+
export { default as ChatMessage } from './components/feedback/ChatMessage.jsx';
|
|
40
|
+
export { default as Avatar } from './components/feedback/Avatar.jsx';
|
|
41
|
+
|
|
42
|
+
// === Data-display ===
|
|
43
|
+
export { default as DataTable } from './components/data-display/DataTable.jsx';
|
|
44
|
+
export { default as FileTree } from './components/data-display/FileTree.jsx';
|
|
45
|
+
export { default as KpiCard } from './components/data-display/KpiCard.jsx';
|
|
46
|
+
export { default as VersionRow } from './components/data-display/VersionRow.jsx';
|
|
47
|
+
export { default as AppPreview } from './components/data-display/AppPreview.jsx';
|
|
48
|
+
|
|
49
|
+
// === Overlays ===
|
|
50
|
+
export { default as Modal } from './components/overlays/Modal.jsx';
|