@simplysm/solid
v13.0.68
Published
심플리즘 패키지 - SolidJS 라이브러리
Readme
@simplysm/solid
A SolidJS UI component library for enterprise back-office applications such as ERP and MES. Provides components for data-intensive forms, tables, and sidebar layouts with Tailwind CSS styling, dark mode, and responsive design.
Installation
pnpm add @simplysm/solidPeer Dependencies:
solid-js^1.9tailwindcss^3.4
Optional Peer Dependencies:
echarts^6.0 -- Required for Echarts chart components
Configuration
Tailwind CSS
@simplysm/solid provides a Tailwind CSS preset. Register it as a preset in your app's tailwind.config.ts to automatically apply custom themes including semantic colors, field sizes, and z-index values.
// tailwind.config.ts
import simplysmPreset from "@simplysm/solid/tailwind.config";
export default {
darkMode: "class",
presets: [simplysmPreset],
content: [
"./src/**/*.{ts,tsx}",
...simplysmPreset.content,
],
};Provider Setup
Use SystemProvider to wrap your app. It provides all infrastructure providers (config, theme, logger, notification, service client, etc.).
For programmatic dialogs and printing, add DialogProvider and/or PrintProvider separately. Place them below your own Providers if your dialog/print content needs access to them.
import { SystemProvider, DialogProvider, PrintProvider } from "@simplysm/solid";
function App() {
return (
<SystemProvider clientName="my-app">
{/* Your Providers can go here */}
<DialogProvider>
<PrintProvider>
<AppRoot />
</PrintProvider>
</DialogProvider>
</SystemProvider>
);
}Why separate?
DialogProviderandPrintProviderrender user-provided components (viadialog.show(factory)/print.toPrinter(factory)). By placing them below your Providers, the factory content can access your contexts (e.g., auth, data stores).SystemProviderprovides infrastructure that doesn't render user components.
| Provider | Required | Must be inside | Description |
|----------|----------|----------------|-------------|
| SystemProvider | Yes | (root) | Infrastructure: config, theme, logger, notification, busy, service client, shared data |
| DialogProvider | If using useDialog() | SystemProvider | Programmatic dialog management |
| PrintProvider | If using usePrint() | SystemProvider | Printing and PDF generation |
import { SystemProvider, DialogProvider, PrintProvider, useServiceClient, useSyncStorage, useLogger, useSharedData } from "@simplysm/solid";
import { onMount } from "solid-js";
function AppRoot() {
const serviceClient = useServiceClient();
onMount(async () => {
await serviceClient.connect("main", { port: 3000 });
useSyncStorage()!.configure((origin) => myStorageAdapter);
useLogger().configure((origin) => myLogAdapter);
useSharedData().configure((origin) => definitions);
});
}| Prop | Type | Default | Description |
|------|------|---------|-------------|
| clientName | string | (required) | Client identifier (used as storage key prefix) |
| busyVariant | BusyVariant | "spinner" | Busy overlay display variant ("spinner" or "bar") |
StorageAdapter interface:
interface StorageAdapter {
getItem(key: string): string | null | Promise<string | null>;
setItem(key: string, value: string): void | Promise<unknown>;
removeItem(key: string): void | Promise<void>;
}LogAdapter interface:
interface LogAdapter {
write(severity: "error" | "warn" | "info" | "log", ...data: any[]): Promise<void> | void;
}Base CSS
Import the base CSS in your entry point:
// entry point (e.g., index.tsx)
import "@simplysm/solid/tailwind.css";Components
Form Controls
Button- Interactive button with Material Design ripple effectTextInput- Text input with format mask and IME composition supportNumberInput- Number input with thousand separators and decimal placesDatePicker- Date input supporting year, month, and date units (DateOnlytype)DateTimePicker- Date-time input supporting minute and second units (DateTimetype)TimePicker- Time input supporting minute and second units (Timetype)DateRangePicker- Date range input with period type selection (day/month/range)Textarea- Multi-line text input with auto-height and IME supportSelect- Dropdown selection with single/multiple, hierarchical items, and compound componentsSelectList- List-style single selection with search, pagination, and slot customizationDataSelectButton- Modal-based selection button with key-based loadingSharedDataSelect- SharedData-connected Select wrapperSharedDataSelectButton- SharedData-connected DataSelectButton wrapperSharedDataSelectList- SharedData-connected SelectList wrapperCombobox- Autocomplete with async search and debouncingCheckbox/Radio- Checkbox and radio buttonCheckboxGroup/RadioGroup- Group components for multiple/single selectionColorPicker- Color selection componentThemeToggle- Dark/light/system theme cycle toggleRichTextEditor- Tiptap-based rich text editor with formatting, tables, imagesInvalid- Wrapper component for form validation using native browser validationNumpad- Numeric keypad for touch-based inputStatePreset- Save/load screen state as presets
Data
Table- Basic HTML table wrapper with consistent stylingDataSheet- Advanced data table with sorting, pagination, selection, tree expansion, column resize, drag reorderList- Tree-view list with keyboard navigationPagination- Page navigation componentCalendar- Calendar-style data displayPermissionTable- Hierarchical permission management table with cascading checksCrudSheet- CRUD data sheet with search, inline/modal editing, Excel import/export, and select modeCrudDetail- CRUD detail form with load, save, delete, and topbar action integrationKanban- Kanban board with drag-and-drop, lane collapse, multi-select
Layout
Sidebar- Sidebar navigation with responsive mobile overlayTopbar- Top navigation bar with menus, user dropdown, and actions slotFormGroup- Form fields layout with labels (vertical/inline)FormTable- Table-based form layout
Display
Card- Container with shadow effectTag- Inline tag/badge componentLink- Inline text linkAlert- Block-level alert/notice componentIcon- Tabler Icons wrapper (scales with surrounding text)Progress- Progress indicatorBarcode- Barcode/QR code rendering (100+ barcode types)Echarts- Apache ECharts chart wrapper
Disclosure
Tabs- Tab navigation componentCollapse- Content collapse/expand animationDropdown- Positioned dropdown popupDialog- Modal dialog with drag, resize, floating mode, and programmaticuseDialog
Feedback
Notification- Notification system with banner and bell (useNotification)Busy- Busy overlay with spinner/bar variants (useBusy)Print- Browser printing and PDF generation (usePrint)
Hooks
useTheme- Dark/light/system theme state accessuseLocalStorage- Local-only persistent storage (never syncs)useSyncConfig- Syncable config storage (cross-device sync support)useLogger- Logging with optional remote adapteruseConfig- App-wide configuration accessuseNotification- Notification system accessuseBusy- Busy overlay controlusePrint- Printing and PDF generationuseServiceClient- WebSocket RPC client accessuseSharedData- Shared server-side data accessuseDialog- Programmatic dialog openinguseDialogInstance- Access dialog instance for closing from inside dialog contentcreateControllableSignal- Controlled/Uncontrolled signal patterncreateControllableStore- Controlled/Uncontrolled store pattern (for objects/arrays)createMountTransition- Mount/unmount CSS animation hookcreateIMEHandler- IME composition delay handlercreateSlotSignal- Slot registration signal for compound componentscreateTopbarActions- Register actions in nearest Topbar.Container scopeuseTopbarActionsAccessor- Direct access to topbar actions accessoruseRouterLink- Navigation with Ctrl/Shift+click support
Providers
SystemProvider- Infrastructure provider (config, theme, logger, notification, busy, service client, shared data)DialogProvider- Programmatic dialog provider (useDialog)PrintProvider- Printing and PDF generation provider (usePrint)
Styling
- Semantic Colors - primary, info, success, warning, danger, base
- Custom Sizes - Field height classes (h-field, h-field-xs, h-field-sm, h-field-lg, h-field-xl)
- z-index Layers - Sidebar, dropdown, modal z-index values
- Dark Mode - Class-based dark mode with auto-toggle
- Styling Patterns - clsx + twMerge usage patterns
- Exported Style Tokens - TypeScript style constants (ComponentSize, SemanticTheme, themeTokens, fieldSurface, etc.)
Helpers & Directives
mergeStyles- Merge inline style strings and CSSProperties objectsripple- Material Design ripple effect directivecreateAppStructure- Declarative app structure (routing, menus, permissions)
Demo
Check out real-world usage examples of all components in the solid-demo package:
pnpm dev
# http://localhost:40081 (port may vary)License
Apache-2.0
