@simplysm/solid 13.0.69 → 13.0.71
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 +168 -195
- package/dist/components/data/calendar/Calendar.d.ts.map +1 -1
- package/dist/components/data/calendar/Calendar.js +15 -2
- package/dist/components/data/calendar/Calendar.js.map +2 -2
- package/dist/components/data/kanban/KanbanContext.js +2 -2
- package/dist/components/data/kanban/KanbanContext.js.map +1 -1
- package/dist/components/data/list/List.d.ts +8 -8
- package/dist/components/data/list/ListContext.d.ts +1 -1
- package/dist/components/data/list/ListItem.d.ts +15 -15
- package/dist/components/data/sheet/DataSheet.d.ts.map +1 -1
- package/dist/components/data/sheet/DataSheet.js +6 -4
- package/dist/components/data/sheet/DataSheet.js.map +2 -2
- package/dist/components/data/sheet/DataSheetConfigDialog.js +8 -8
- package/dist/components/data/sheet/DataSheetConfigDialog.js.map +1 -1
- package/dist/components/data/sheet/types.d.ts +4 -4
- package/dist/components/data/sheet/types.d.ts.map +1 -1
- package/dist/components/disclosure/Collapse.d.ts +4 -4
- package/dist/components/disclosure/Dialog.d.ts +24 -24
- package/dist/components/disclosure/Dialog.d.ts.map +1 -1
- package/dist/components/disclosure/Dialog.js +7 -2
- package/dist/components/disclosure/Dialog.js.map +2 -2
- package/dist/components/disclosure/DialogContext.d.ts +25 -25
- package/dist/components/disclosure/DialogContext.d.ts.map +1 -1
- package/dist/components/disclosure/DialogContext.js +1 -1
- package/dist/components/disclosure/DialogContext.js.map +1 -1
- package/dist/components/disclosure/DialogInstanceContext.d.ts +7 -7
- package/dist/components/disclosure/DialogInstanceContext.d.ts.map +1 -1
- package/dist/components/disclosure/DialogProvider.d.ts +3 -3
- package/dist/components/disclosure/Dropdown.d.ts +26 -24
- package/dist/components/disclosure/Dropdown.d.ts.map +1 -1
- package/dist/components/disclosure/Dropdown.js +24 -8
- package/dist/components/disclosure/Dropdown.js.map +2 -2
- package/dist/components/disclosure/Tabs.js +1 -1
- package/dist/components/disclosure/Tabs.js.map +1 -1
- package/dist/components/disclosure/dialogZIndex.d.ts +9 -7
- package/dist/components/disclosure/dialogZIndex.d.ts.map +1 -1
- package/dist/components/disclosure/dialogZIndex.js +4 -0
- package/dist/components/disclosure/dialogZIndex.js.map +1 -1
- package/dist/components/features/crud-detail/CrudDetail.d.ts.map +1 -1
- package/dist/components/features/crud-detail/CrudDetail.js +34 -22
- package/dist/components/features/crud-detail/CrudDetail.js.map +2 -2
- package/dist/components/features/crud-sheet/CrudSheet.d.ts.map +1 -1
- package/dist/components/features/crud-sheet/CrudSheet.js +48 -33
- package/dist/components/features/crud-sheet/CrudSheet.js.map +2 -2
- package/dist/components/features/crudRegistry.d.ts +16 -0
- package/dist/components/features/crudRegistry.d.ts.map +1 -0
- package/dist/components/features/crudRegistry.js +37 -0
- package/dist/components/features/crudRegistry.js.map +6 -0
- package/dist/components/features/data-select-button/DataSelectButton.d.ts +14 -14
- package/dist/components/features/data-select-button/DataSelectButton.d.ts.map +1 -1
- package/dist/components/features/data-select-button/DataSelectButton.js +27 -9
- package/dist/components/features/data-select-button/DataSelectButton.js.map +2 -2
- package/dist/components/features/permission-table/PermissionTable.d.ts +3 -3
- package/dist/components/features/permission-table/PermissionTable.d.ts.map +1 -1
- package/dist/components/features/permission-table/PermissionTable.js +74 -85
- package/dist/components/features/permission-table/PermissionTable.js.map +2 -2
- package/dist/components/features/shared-data/SharedDataSelect.d.ts +12 -12
- package/dist/components/features/shared-data/SharedDataSelect.d.ts.map +1 -1
- package/dist/components/features/shared-data/SharedDataSelect.js +10 -6
- package/dist/components/features/shared-data/SharedDataSelect.js.map +2 -2
- package/dist/components/features/shared-data/SharedDataSelectButton.d.ts +10 -10
- package/dist/components/features/shared-data/SharedDataSelectButton.d.ts.map +1 -1
- package/dist/components/features/shared-data/SharedDataSelectList.d.ts +23 -15
- package/dist/components/features/shared-data/SharedDataSelectList.d.ts.map +1 -1
- package/dist/components/features/shared-data/SharedDataSelectList.js +191 -65
- package/dist/components/features/shared-data/SharedDataSelectList.js.map +2 -2
- package/dist/components/features/shared-data/SharedDataSelectListContext.d.ts +15 -0
- package/dist/components/features/shared-data/SharedDataSelectListContext.d.ts.map +1 -0
- package/dist/components/features/shared-data/SharedDataSelectListContext.js +27 -0
- package/dist/components/features/shared-data/SharedDataSelectListContext.js.map +6 -0
- package/dist/components/feedback/Progress.d.ts +1 -1
- package/dist/components/feedback/Progress.d.ts.map +1 -1
- package/dist/components/feedback/busy/BusyContainer.d.ts +2 -2
- package/dist/components/feedback/busy/BusyContainer.d.ts.map +1 -1
- package/dist/components/feedback/busy/BusyContext.d.ts +11 -11
- package/dist/components/feedback/busy/BusyContext.d.ts.map +1 -1
- package/dist/components/feedback/busy/BusyContext.js +1 -1
- package/dist/components/feedback/busy/BusyContext.js.map +1 -1
- package/dist/components/feedback/busy/BusyProvider.d.ts +6 -6
- package/dist/components/feedback/busy/BusyProvider.d.ts.map +1 -1
- package/dist/components/feedback/notification/NotificationBanner.d.ts.map +1 -1
- package/dist/components/feedback/notification/NotificationBanner.js +7 -3
- package/dist/components/feedback/notification/NotificationBanner.js.map +2 -2
- package/dist/components/feedback/notification/NotificationBell.js +2 -2
- package/dist/components/feedback/notification/NotificationBell.js.map +1 -1
- package/dist/components/feedback/notification/NotificationContext.d.ts +22 -22
- package/dist/components/feedback/notification/NotificationContext.d.ts.map +1 -1
- package/dist/components/feedback/notification/NotificationContext.js +1 -1
- package/dist/components/feedback/notification/NotificationContext.js.map +1 -1
- package/dist/components/feedback/notification/NotificationProvider.d.ts +5 -5
- package/dist/components/feedback/notification/NotificationProvider.js +1 -1
- package/dist/components/feedback/notification/NotificationProvider.js.map +1 -1
- package/dist/components/feedback/print/PrintContext.js +1 -1
- package/dist/components/feedback/print/PrintContext.js.map +1 -1
- package/dist/components/form-control/DropdownTrigger.styles.d.ts +1 -1
- package/dist/components/form-control/DropdownTrigger.styles.d.ts.map +1 -1
- package/dist/components/form-control/ThemeToggle.d.ts +7 -7
- package/dist/components/form-control/ThemeToggle.d.ts.map +1 -1
- package/dist/components/form-control/ThemeToggle.js +3 -3
- package/dist/components/form-control/checkbox/Checkbox.js +1 -1
- package/dist/components/form-control/checkbox/CheckboxGroup.js +1 -1
- package/dist/components/form-control/checkbox/Radio.js +1 -1
- package/dist/components/form-control/checkbox/RadioGroup.js +1 -1
- package/dist/components/form-control/color-picker/ColorPicker.d.ts +12 -12
- package/dist/components/form-control/color-picker/ColorPicker.d.ts.map +1 -1
- package/dist/components/form-control/color-picker/ColorPicker.js +2 -2
- package/dist/components/form-control/combobox/Combobox.d.ts +22 -22
- package/dist/components/form-control/combobox/Combobox.d.ts.map +1 -1
- package/dist/components/form-control/combobox/Combobox.js +2 -2
- package/dist/components/form-control/combobox/ComboboxContext.d.ts +4 -4
- package/dist/components/form-control/combobox/ComboboxContext.d.ts.map +1 -1
- package/dist/components/form-control/combobox/ComboboxContext.js +1 -1
- package/dist/components/form-control/combobox/ComboboxContext.js.map +1 -1
- package/dist/components/form-control/combobox/ComboboxItem.d.ts +3 -3
- package/dist/components/form-control/combobox/ComboboxItem.d.ts.map +1 -1
- package/dist/components/form-control/date-range-picker/DateRangePicker.d.ts +14 -14
- package/dist/components/form-control/date-range-picker/DateRangePicker.d.ts.map +1 -1
- package/dist/components/form-control/date-range-picker/DateRangePicker.js +20 -9
- package/dist/components/form-control/date-range-picker/DateRangePicker.js.map +2 -2
- package/dist/components/form-control/editor/EditorToolbar.d.ts.map +1 -1
- package/dist/components/form-control/editor/EditorToolbar.js +65 -20
- package/dist/components/form-control/editor/EditorToolbar.js.map +2 -2
- package/dist/components/form-control/editor/RichTextEditor.d.ts +6 -6
- package/dist/components/form-control/editor/RichTextEditor.d.ts.map +1 -1
- package/dist/components/form-control/editor/RichTextEditor.js +1 -1
- package/dist/components/form-control/editor/editor.css +5 -5
- package/dist/components/form-control/field/DatePicker.d.ts +22 -22
- package/dist/components/form-control/field/DatePicker.d.ts.map +1 -1
- package/dist/components/form-control/field/DatePicker.js +4 -4
- package/dist/components/form-control/field/DatePicker.js.map +1 -1
- package/dist/components/form-control/field/DateTimePicker.d.ts +21 -21
- package/dist/components/form-control/field/DateTimePicker.d.ts.map +1 -1
- package/dist/components/form-control/field/DateTimePicker.js +4 -4
- package/dist/components/form-control/field/DateTimePicker.js.map +1 -1
- package/dist/components/form-control/field/FieldPlaceholder.d.ts +1 -1
- package/dist/components/form-control/field/FieldPlaceholder.d.ts.map +1 -1
- package/dist/components/form-control/field/NumberInput.d.ts +23 -23
- package/dist/components/form-control/field/NumberInput.d.ts.map +1 -1
- package/dist/components/form-control/field/NumberInput.js +4 -4
- package/dist/components/form-control/field/NumberInput.js.map +1 -1
- package/dist/components/form-control/field/TextInput.d.ts +25 -25
- package/dist/components/form-control/field/TextInput.d.ts.map +1 -1
- package/dist/components/form-control/field/TextInput.js +5 -5
- package/dist/components/form-control/field/TextInput.js.map +1 -1
- package/dist/components/form-control/field/Textarea.d.ts +19 -19
- package/dist/components/form-control/field/Textarea.d.ts.map +1 -1
- package/dist/components/form-control/field/Textarea.js +4 -4
- package/dist/components/form-control/field/Textarea.js.map +1 -1
- package/dist/components/form-control/field/TimePicker.d.ts +20 -20
- package/dist/components/form-control/field/TimePicker.d.ts.map +1 -1
- package/dist/components/form-control/field/TimePicker.js +4 -4
- package/dist/components/form-control/field/TimePicker.js.map +1 -1
- package/dist/components/form-control/numpad/Numpad.d.ts +11 -11
- package/dist/components/form-control/numpad/Numpad.d.ts.map +1 -1
- package/dist/components/form-control/select/Select.d.ts +26 -26
- package/dist/components/form-control/select/Select.d.ts.map +1 -1
- package/dist/components/form-control/select/Select.js +34 -23
- package/dist/components/form-control/select/Select.js.map +2 -2
- package/dist/components/form-control/select/SelectContext.d.ts +7 -7
- package/dist/components/form-control/select/SelectContext.d.ts.map +1 -1
- package/dist/components/form-control/select/SelectContext.js +1 -1
- package/dist/components/form-control/select/SelectContext.js.map +1 -1
- package/dist/components/form-control/select/SelectItem.d.ts +4 -4
- package/dist/components/form-control/select/SelectItem.d.ts.map +1 -1
- package/dist/components/form-control/state-preset/StatePreset.js +8 -8
- package/dist/components/form-control/state-preset/StatePreset.js.map +1 -1
- package/dist/components/layout/FormTable.js +4 -4
- package/dist/components/layout/sidebar/Sidebar.d.ts +5 -5
- package/dist/components/layout/sidebar/SidebarContainer.d.ts +11 -11
- package/dist/components/layout/sidebar/SidebarContainer.d.ts.map +1 -1
- package/dist/components/layout/sidebar/SidebarContainer.js +6 -1
- package/dist/components/layout/sidebar/SidebarContainer.js.map +2 -2
- package/dist/components/layout/sidebar/SidebarContext.d.ts +7 -7
- package/dist/components/layout/sidebar/SidebarContext.js +1 -1
- package/dist/components/layout/sidebar/SidebarContext.js.map +1 -1
- package/dist/components/layout/sidebar/SidebarMenu.d.ts +11 -11
- package/dist/components/layout/sidebar/SidebarUser.d.ts +14 -14
- package/dist/components/layout/topbar/Topbar.d.ts +6 -6
- package/dist/components/layout/topbar/Topbar.d.ts.map +1 -1
- package/dist/components/layout/topbar/Topbar.js +11 -6
- package/dist/components/layout/topbar/Topbar.js.map +2 -2
- package/dist/components/layout/topbar/TopbarContainer.d.ts +6 -6
- package/dist/components/layout/topbar/TopbarContext.js +2 -2
- package/dist/components/layout/topbar/TopbarContext.js.map +1 -1
- package/dist/components/layout/topbar/TopbarMenu.d.ts +11 -11
- package/dist/components/layout/topbar/TopbarMenu.d.ts.map +1 -1
- package/dist/components/layout/topbar/TopbarMenu.js +5 -1
- package/dist/components/layout/topbar/TopbarMenu.js.map +2 -2
- package/dist/components/layout/topbar/TopbarUser.d.ts +9 -9
- package/dist/directives/ripple.d.ts +5 -5
- package/dist/helpers/createAppStructure.d.ts.map +1 -1
- package/dist/helpers/createAppStructure.js +7 -3
- package/dist/helpers/createAppStructure.js.map +1 -1
- package/dist/helpers/createHmrSafeContext.d.ts +3 -0
- package/dist/helpers/createHmrSafeContext.d.ts.map +1 -0
- package/dist/helpers/createHmrSafeContext.js +10 -0
- package/dist/helpers/createHmrSafeContext.js.map +6 -0
- package/dist/helpers/createSlotComponent.d.ts +3 -3
- package/dist/helpers/mergeStyles.d.ts +8 -8
- package/dist/hooks/createControllableSignal.d.ts +10 -10
- package/dist/hooks/createControllableStore.d.ts +6 -6
- package/dist/hooks/createIMEHandler.d.ts +7 -7
- package/dist/hooks/createMountTransition.d.ts +4 -4
- package/dist/hooks/createSelectionGroup.d.ts.map +1 -1
- package/dist/hooks/createSelectionGroup.js +4 -3
- package/dist/hooks/createSelectionGroup.js.map +2 -2
- package/dist/hooks/createSlotSignal.d.ts +2 -2
- package/dist/hooks/useLocalStorage.d.ts +11 -11
- package/dist/hooks/useLogger.d.ts +1 -1
- package/dist/hooks/useLogger.d.ts.map +1 -1
- package/dist/hooks/useLogger.js +1 -1
- package/dist/hooks/useLogger.js.map +1 -1
- package/dist/hooks/useRouterLink.d.ts +10 -10
- package/dist/hooks/useRouterLink.d.ts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/providers/ClipboardProvider.d.ts +5 -5
- package/dist/providers/ConfigContext.d.ts +6 -6
- package/dist/providers/ConfigContext.js +2 -2
- package/dist/providers/ConfigContext.js.map +1 -1
- package/dist/providers/ErrorLoggerProvider.d.ts +3 -3
- package/dist/providers/LoggerContext.d.ts +13 -13
- package/dist/providers/PwaUpdateProvider.d.ts +4 -4
- package/dist/providers/PwaUpdateProvider.js +2 -2
- package/dist/providers/PwaUpdateProvider.js.map +1 -1
- package/dist/providers/ServiceClientContext.d.ts +8 -8
- package/dist/providers/ServiceClientContext.d.ts.map +1 -1
- package/dist/providers/ServiceClientContext.js +1 -1
- package/dist/providers/ServiceClientContext.js.map +1 -1
- package/dist/providers/ServiceClientProvider.d.ts +6 -6
- package/dist/providers/ServiceClientProvider.js +7 -7
- package/dist/providers/ServiceClientProvider.js.map +1 -1
- package/dist/providers/SyncStorageContext.d.ts +14 -14
- package/dist/providers/SystemProvider.d.ts.map +1 -1
- package/dist/providers/SystemProvider.js +21 -16
- package/dist/providers/SystemProvider.js.map +2 -2
- package/dist/providers/ThemeContext.d.ts +20 -20
- package/dist/providers/ThemeContext.d.ts.map +1 -1
- package/dist/providers/ThemeContext.js +1 -1
- package/dist/providers/ThemeContext.js.map +1 -1
- package/dist/providers/i18n/I18nContext.d.ts +44 -0
- package/dist/providers/i18n/I18nContext.d.ts.map +1 -0
- package/dist/providers/i18n/I18nContext.js +73 -0
- package/dist/providers/i18n/I18nContext.js.map +6 -0
- package/dist/providers/i18n/I18nContext.types.d.ts +28 -0
- package/dist/providers/i18n/I18nContext.types.d.ts.map +1 -0
- package/dist/providers/i18n/I18nContext.types.js +1 -0
- package/dist/providers/i18n/I18nContext.types.js.map +6 -0
- package/dist/providers/i18n/i18nUtils.d.ts +18 -0
- package/dist/providers/i18n/i18nUtils.d.ts.map +1 -0
- package/dist/providers/i18n/i18nUtils.js +25 -0
- package/dist/providers/i18n/i18nUtils.js.map +6 -0
- package/dist/providers/i18n/locales/en.d.ts +163 -0
- package/dist/providers/i18n/locales/en.d.ts.map +1 -0
- package/dist/providers/i18n/locales/en.js +165 -0
- package/dist/providers/i18n/locales/en.js.map +6 -0
- package/dist/providers/i18n/locales/ko.d.ts +163 -0
- package/dist/providers/i18n/locales/ko.d.ts.map +1 -0
- package/dist/providers/i18n/locales/ko.js +165 -0
- package/dist/providers/i18n/locales/ko.js.map +6 -0
- package/dist/providers/shared-data/SharedDataChangeEvent.d.ts +4 -4
- package/dist/providers/shared-data/SharedDataContext.d.ts +28 -28
- package/dist/providers/shared-data/SharedDataContext.d.ts.map +1 -1
- package/dist/providers/shared-data/SharedDataContext.js +1 -1
- package/dist/providers/shared-data/SharedDataContext.js.map +1 -1
- package/dist/providers/shared-data/SharedDataProvider.d.ts +9 -9
- package/dist/providers/shared-data/SharedDataProvider.js +4 -4
- package/dist/providers/shared-data/SharedDataProvider.js.map +1 -1
- package/package.json +9 -8
- package/src/components/data/calendar/Calendar.tsx +10 -4
- package/src/components/data/kanban/Kanban.tsx +14 -14
- package/src/components/data/kanban/KanbanContext.ts +3 -3
- package/src/components/data/list/List.tsx +10 -10
- package/src/components/data/list/ListContext.ts +1 -1
- package/src/components/data/list/ListItem.styles.ts +8 -8
- package/src/components/data/list/ListItem.tsx +15 -15
- package/src/components/data/sheet/DataSheet.styles.ts +22 -22
- package/src/components/data/sheet/DataSheet.tsx +52 -48
- package/src/components/data/sheet/DataSheetColumn.tsx +1 -1
- package/src/components/data/sheet/DataSheetConfigDialog.tsx +9 -9
- package/src/components/data/sheet/sheetUtils.ts +7 -7
- package/src/components/data/sheet/types.ts +16 -16
- package/src/components/disclosure/Collapse.tsx +11 -11
- package/src/components/disclosure/Dialog.tsx +60 -57
- package/src/components/disclosure/DialogContext.ts +26 -26
- package/src/components/disclosure/DialogInstanceContext.ts +7 -7
- package/src/components/disclosure/DialogProvider.tsx +5 -5
- package/src/components/disclosure/Dropdown.tsx +89 -75
- package/src/components/disclosure/Tabs.tsx +1 -1
- package/src/components/disclosure/dialogZIndex.ts +16 -11
- package/src/components/display/Echarts.tsx +4 -4
- package/src/components/features/address/AddressSearch.tsx +2 -2
- package/src/components/features/crud-detail/CrudDetail.tsx +34 -21
- package/src/components/features/crud-detail/CrudDetailAfter.tsx +1 -1
- package/src/components/features/crud-detail/CrudDetailBefore.tsx +1 -1
- package/src/components/features/crud-detail/CrudDetailTools.tsx +1 -1
- package/src/components/features/crud-sheet/CrudSheet.tsx +52 -40
- package/src/components/features/crud-sheet/CrudSheetColumn.tsx +1 -1
- package/src/components/features/crud-sheet/CrudSheetFilter.tsx +1 -1
- package/src/components/features/crud-sheet/CrudSheetHeader.tsx +1 -1
- package/src/components/features/crud-sheet/CrudSheetTools.tsx +1 -1
- package/src/components/features/crudRegistry.ts +60 -0
- package/src/components/features/data-select-button/DataSelectButton.tsx +34 -32
- package/src/components/features/permission-table/PermissionTable.tsx +70 -64
- package/src/components/features/shared-data/SharedDataSelect.tsx +24 -22
- package/src/components/features/shared-data/SharedDataSelectButton.tsx +10 -10
- package/src/components/features/shared-data/SharedDataSelectList.tsx +231 -59
- package/src/components/features/shared-data/SharedDataSelectListContext.ts +39 -0
- package/src/components/feedback/Progress.tsx +1 -1
- package/src/components/feedback/busy/BusyContainer.tsx +6 -6
- package/src/components/feedback/busy/BusyContext.ts +12 -12
- package/src/components/feedback/busy/BusyProvider.tsx +6 -6
- package/src/components/feedback/notification/NotificationBanner.tsx +3 -1
- package/src/components/feedback/notification/NotificationBell.tsx +4 -4
- package/src/components/feedback/notification/NotificationContext.ts +28 -28
- package/src/components/feedback/notification/NotificationProvider.tsx +9 -9
- package/src/components/feedback/print/PrintContext.ts +1 -1
- package/src/components/form-control/Button.tsx +1 -1
- package/src/components/form-control/DropdownTrigger.styles.ts +1 -1
- package/src/components/form-control/Invalid.tsx +5 -5
- package/src/components/form-control/ThemeToggle.tsx +10 -10
- package/src/components/form-control/checkbox/Checkbox.styles.ts +8 -8
- package/src/components/form-control/checkbox/Checkbox.tsx +2 -2
- package/src/components/form-control/checkbox/CheckboxGroup.tsx +1 -1
- package/src/components/form-control/checkbox/Radio.tsx +2 -2
- package/src/components/form-control/checkbox/RadioGroup.tsx +1 -1
- package/src/components/form-control/color-picker/ColorPicker.tsx +17 -17
- package/src/components/form-control/combobox/Combobox.tsx +55 -55
- package/src/components/form-control/combobox/ComboboxContext.ts +5 -5
- package/src/components/form-control/combobox/ComboboxItem.tsx +3 -3
- package/src/components/form-control/date-range-picker/DateRangePicker.tsx +40 -26
- package/src/components/form-control/editor/EditorToolbar.tsx +52 -50
- package/src/components/form-control/editor/RichTextEditor.tsx +16 -16
- package/src/components/form-control/editor/editor.css +5 -5
- package/src/components/form-control/field/DatePicker.tsx +39 -39
- package/src/components/form-control/field/DateTimePicker.tsx +38 -38
- package/src/components/form-control/field/Field.styles.ts +11 -11
- package/src/components/form-control/field/FieldPlaceholder.tsx +1 -1
- package/src/components/form-control/field/NumberInput.tsx +63 -63
- package/src/components/form-control/field/TextInput.tsx +48 -48
- package/src/components/form-control/field/Textarea.tsx +32 -32
- package/src/components/form-control/field/TimePicker.tsx +37 -37
- package/src/components/form-control/numpad/Numpad.tsx +26 -26
- package/src/components/form-control/select/Select.tsx +82 -86
- package/src/components/form-control/select/SelectContext.ts +8 -8
- package/src/components/form-control/select/SelectItem.tsx +5 -5
- package/src/components/form-control/state-preset/StatePreset.tsx +13 -13
- package/src/components/layout/FormTable.tsx +4 -4
- package/src/components/layout/sidebar/Sidebar.tsx +8 -8
- package/src/components/layout/sidebar/SidebarContainer.tsx +19 -17
- package/src/components/layout/sidebar/SidebarContext.ts +8 -8
- package/src/components/layout/sidebar/SidebarMenu.tsx +19 -19
- package/src/components/layout/sidebar/SidebarUser.tsx +14 -14
- package/src/components/layout/topbar/Topbar.tsx +15 -13
- package/src/components/layout/topbar/TopbarContainer.tsx +6 -6
- package/src/components/layout/topbar/TopbarContext.ts +2 -2
- package/src/components/layout/topbar/TopbarMenu.tsx +18 -16
- package/src/components/layout/topbar/TopbarUser.tsx +9 -9
- package/src/directives/ripple.ts +8 -8
- package/src/helpers/createAppStructure.ts +15 -8
- package/src/helpers/createHmrSafeContext.ts +8 -0
- package/src/helpers/createSlotComponent.ts +4 -4
- package/src/helpers/mergeStyles.ts +11 -11
- package/src/hooks/createControllableSignal.ts +11 -11
- package/src/hooks/createControllableStore.ts +8 -8
- package/src/hooks/createIMEHandler.ts +7 -7
- package/src/hooks/createMountTransition.ts +4 -4
- package/src/hooks/createSelectionGroup.tsx +5 -3
- package/src/hooks/createSlotSignal.ts +2 -2
- package/src/hooks/useLocalStorage.ts +13 -13
- package/src/hooks/useLogger.ts +2 -2
- package/src/hooks/useRouterLink.ts +15 -15
- package/src/index.ts +4 -3
- package/src/providers/ClipboardProvider.tsx +19 -19
- package/src/providers/ConfigContext.tsx +8 -8
- package/src/providers/ErrorLoggerProvider.tsx +3 -3
- package/src/providers/LoggerContext.tsx +13 -13
- package/src/providers/PwaUpdateProvider.tsx +6 -6
- package/src/providers/ServiceClientContext.ts +9 -9
- package/src/providers/ServiceClientProvider.tsx +15 -15
- package/src/providers/SyncStorageContext.tsx +15 -15
- package/src/providers/SystemProvider.tsx +15 -12
- package/src/providers/ThemeContext.tsx +26 -26
- package/src/providers/i18n/I18nContext.tsx +129 -0
- package/src/providers/i18n/I18nContext.types.ts +30 -0
- package/src/providers/i18n/i18nUtils.ts +38 -0
- package/src/providers/i18n/locales/en.ts +161 -0
- package/src/providers/i18n/locales/ko.ts +161 -0
- package/src/providers/shared-data/SharedDataChangeEvent.ts +4 -4
- package/src/providers/shared-data/SharedDataContext.ts +29 -29
- package/src/providers/shared-data/SharedDataProvider.tsx +21 -21
- package/src/styles/patterns.styles.ts +6 -6
- package/src/styles/tokens.styles.ts +5 -5
- package/tailwind.config.ts +1 -1
- package/tailwind.css +4 -4
- package/tests/components/data/List.spec.tsx +689 -0
- package/tests/components/data/Pagination.spec.tsx +336 -0
- package/tests/components/data/Table.spec.tsx +55 -0
- package/tests/components/data/kanban/Kanban.selection.spec.tsx +213 -0
- package/tests/components/data/sheet/DataSheet.spec.tsx +645 -0
- package/tests/components/disclosure/Collapse.spec.tsx +173 -0
- package/tests/components/disclosure/Dialog.spec.tsx +438 -0
- package/tests/components/disclosure/DialogProvider.spec.tsx +142 -0
- package/tests/components/disclosure/Dropdown.spec.tsx +333 -0
- package/tests/components/disclosure/Tabs.spec.tsx +220 -0
- package/tests/components/disclosure/dialogZIndex.spec.ts +45 -0
- package/tests/components/display/Alert.spec.tsx +47 -0
- package/tests/components/display/Barcode.spec.tsx +61 -0
- package/tests/components/display/Card.spec.tsx +41 -0
- package/tests/components/display/Link.spec.tsx +62 -0
- package/tests/components/display/Tag.spec.tsx +47 -0
- package/tests/components/features/address/AddressSearch.spec.tsx +45 -0
- package/tests/components/features/crud-detail/CrudDetail.spec.tsx +537 -0
- package/tests/components/features/crud-sheet/CrudSheet.spec.tsx +491 -0
- package/tests/components/features/crudRegistry.spec.ts +119 -0
- package/tests/components/features/data-select-button/DataSelectButton.spec.tsx +482 -0
- package/tests/components/features/permission-table/PermissionTable.spec.tsx +288 -0
- package/tests/components/features/shared-data/SharedDataSelectList.spec.tsx +448 -0
- package/tests/components/feedback/busy/BusyContainer.spec.tsx +80 -0
- package/tests/components/feedback/notification/LiveRegion.spec.tsx +52 -0
- package/tests/components/feedback/notification/NotificationBanner.spec.tsx +187 -0
- package/tests/components/feedback/notification/NotificationBell.spec.tsx +226 -0
- package/tests/components/feedback/notification/NotificationContext.spec.tsx +362 -0
- package/tests/components/feedback/print/Print.spec.tsx +45 -0
- package/tests/components/form-control/Button.spec.tsx +119 -0
- package/tests/components/form-control/Invalid.spec.tsx +131 -0
- package/tests/components/form-control/checkbox/Checkbox.spec.tsx +137 -0
- package/tests/components/form-control/checkbox/CheckboxGroup.spec.tsx +108 -0
- package/tests/components/form-control/checkbox/Radio.spec.tsx +138 -0
- package/tests/components/form-control/checkbox/RadioGroup.spec.tsx +108 -0
- package/tests/components/form-control/color-picker/ColorPicker.spec.tsx +94 -0
- package/tests/components/form-control/combobox/Combobox.spec.tsx +253 -0
- package/tests/components/form-control/combobox/ComboboxItem.spec.tsx +88 -0
- package/tests/components/form-control/date-range-picker/DateRangePicker.spec.tsx +208 -0
- package/tests/components/form-control/field/DatePicker.spec.tsx +381 -0
- package/tests/components/form-control/field/DateTimePicker.spec.tsx +383 -0
- package/tests/components/form-control/field/NumberInput.spec.tsx +371 -0
- package/tests/components/form-control/field/TextInput.spec.tsx +341 -0
- package/tests/components/form-control/field/Textarea.spec.tsx +224 -0
- package/tests/components/form-control/field/TimePicker.spec.tsx +315 -0
- package/tests/components/form-control/numpad/Numpad.spec.tsx +248 -0
- package/tests/components/form-control/select/Select.spec.tsx +676 -0
- package/tests/components/form-control/select/SelectItem.spec.tsx +174 -0
- package/tests/components/layout/FormGroup.spec.tsx +104 -0
- package/tests/components/layout/FormTable.spec.tsx +43 -0
- package/tests/components/layout/sidebar/Sidebar.spec.tsx +192 -0
- package/tests/components/layout/sidebar/SidebarContainer.spec.tsx +261 -0
- package/tests/components/layout/sidebar/SidebarMenu.spec.tsx +219 -0
- package/tests/components/layout/sidebar/SidebarUser.spec.tsx +133 -0
- package/tests/components/layout/topbar/TopbarActions.spec.tsx +77 -0
- package/tests/components/layout/topbar/TopbarContainer.spec.tsx +38 -0
- package/tests/components/layout/topbar/createTopbarActions.spec.tsx +66 -0
- package/tests/directives/ripple.spec.tsx +130 -0
- package/tests/helpers/createAppStructure.spec.tsx +843 -0
- package/tests/helpers/mergeStyles.spec.ts +172 -0
- package/tests/hooks/createControllableSignal.spec.ts +194 -0
- package/tests/hooks/createIMEHandler.spec.ts +80 -0
- package/tests/hooks/createMountTransition.spec.ts +86 -0
- package/tests/hooks/useLocalStorage.spec.tsx +223 -0
- package/tests/hooks/useLogger.spec.tsx +116 -0
- package/tests/hooks/usePrint.spec.tsx +134 -0
- package/tests/hooks/useRouterLink.spec.tsx +183 -0
- package/tests/hooks/useSyncConfig.spec.tsx +304 -0
- package/tests/providers/ClipboardProvider.spec.tsx +20 -0
- package/tests/providers/ConfigContext.spec.tsx +42 -0
- package/tests/providers/ErrorLoggerProvider.spec.tsx +73 -0
- package/tests/providers/LoggerContext.spec.tsx +76 -0
- package/tests/providers/PwaUpdateProvider.spec.tsx +22 -0
- package/tests/providers/ServiceClientContext.spec.tsx +88 -0
- package/tests/providers/SyncStorageContext.spec.tsx +77 -0
- package/tests/providers/i18n/I18nContext.spec.tsx +110 -0
- package/tests/providers/shared-data/SharedDataProvider.spec.tsx +401 -0
- package/tests/vitest-env.d.ts +1 -0
- package/dist/components/form-control/select-list/SelectList.d.ts +0 -54
- package/dist/components/form-control/select-list/SelectList.d.ts.map +0 -1
- package/dist/components/form-control/select-list/SelectList.js +0 -280
- package/dist/components/form-control/select-list/SelectList.js.map +0 -6
- package/dist/components/form-control/select-list/SelectListContext.d.ts +0 -13
- package/dist/components/form-control/select-list/SelectListContext.d.ts.map +0 -1
- package/dist/components/form-control/select-list/SelectListContext.js +0 -14
- package/dist/components/form-control/select-list/SelectListContext.js.map +0 -6
- package/docs/data-components.md +0 -782
- package/docs/disclosure.md +0 -254
- package/docs/display.md +0 -153
- package/docs/feedback.md +0 -238
- package/docs/form-controls.md +0 -1068
- package/docs/helpers.md +0 -54
- package/docs/hooks.md +0 -588
- package/docs/layout.md +0 -384
- package/docs/providers.md +0 -211
- package/docs/styling.md +0 -184
- package/src/components/form-control/select-list/SelectList.tsx +0 -385
- package/src/components/form-control/select-list/SelectListContext.ts +0 -23
package/docs/form-controls.md
DELETED
|
@@ -1,1068 +0,0 @@
|
|
|
1
|
-
# Form Controls
|
|
2
|
-
|
|
3
|
-
## Button
|
|
4
|
-
|
|
5
|
-
Interactive button component with built-in Material Design ripple effect.
|
|
6
|
-
|
|
7
|
-
```tsx
|
|
8
|
-
import { Button } from "@simplysm/solid";
|
|
9
|
-
|
|
10
|
-
<Button theme="primary" variant="solid">Confirm</Button>
|
|
11
|
-
<Button theme="danger" variant="outline" size="sm">Delete</Button>
|
|
12
|
-
<Button variant="ghost">Cancel</Button>
|
|
13
|
-
<Button disabled>Disabled</Button>
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
| Prop | Type | Default | Description |
|
|
17
|
-
|------|------|---------|-------------|
|
|
18
|
-
| `theme` | `"primary" \| "info" \| "success" \| "warning" \| "danger" \| "base"` | `"base"` | Color theme |
|
|
19
|
-
| `variant` | `"solid" \| "outline" \| "ghost"` | `"outline"` | Style variant |
|
|
20
|
-
| `size` | `"xs" \| "sm" \| "lg" \| "xl"` | - | Size |
|
|
21
|
-
| `inset` | `boolean` | - | Inset style (removes border/rounded corners) |
|
|
22
|
-
| `disabled` | `boolean` | - | Disabled state |
|
|
23
|
-
|
|
24
|
-
All standard HTML `<button>` element attributes can also be passed.
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## TextInput
|
|
29
|
-
|
|
30
|
-
Text input field with format mask and IME (Korean, etc.) composition support.
|
|
31
|
-
|
|
32
|
-
```tsx
|
|
33
|
-
import { TextInput } from "@simplysm/solid";
|
|
34
|
-
import { IconSearch } from "@tabler/icons-solidjs";
|
|
35
|
-
import { Icon } from "@simplysm/solid";
|
|
36
|
-
|
|
37
|
-
// Basic usage
|
|
38
|
-
<TextInput value={name()} onValueChange={setName} placeholder="Enter name" />
|
|
39
|
-
|
|
40
|
-
// Password
|
|
41
|
-
<TextInput type="password" />
|
|
42
|
-
|
|
43
|
-
// Format mask (e.g., phone number)
|
|
44
|
-
<TextInput format="XXX-XXXX-XXXX" value={phone()} onValueChange={setPhone} />
|
|
45
|
-
|
|
46
|
-
// With prefix
|
|
47
|
-
<TextInput value={query()} onValueChange={setQuery}>
|
|
48
|
-
<TextInput.Prefix><Icon icon={IconSearch} /></TextInput.Prefix>
|
|
49
|
-
</TextInput>
|
|
50
|
-
|
|
51
|
-
// With validation
|
|
52
|
-
<TextInput required minLength={3} value={name()} onValueChange={setName} />
|
|
53
|
-
<TextInput
|
|
54
|
-
validate={(v) => v.includes("@") ? undefined : "이메일 형식이 아닙니다"}
|
|
55
|
-
value={email()}
|
|
56
|
-
onValueChange={setEmail}
|
|
57
|
-
/>
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
| Prop | Type | Default | Description |
|
|
61
|
-
|------|------|---------|-------------|
|
|
62
|
-
| `value` | `string` | `""` | Input value |
|
|
63
|
-
| `onValueChange` | `(value: string) => void` | - | Value change callback |
|
|
64
|
-
| `type` | `"text" \| "password" \| "email"` | `"text"` | Input type |
|
|
65
|
-
| `format` | `string` | - | Input format (`X` represents character position, rest are separators) |
|
|
66
|
-
| `placeholder` | `string` | - | Placeholder |
|
|
67
|
-
| `title` | `string` | - | Tooltip title |
|
|
68
|
-
| `autocomplete` | `JSX.HTMLAutocomplete` | - | HTML autocomplete attribute |
|
|
69
|
-
| `disabled` | `boolean` | - | Disabled state |
|
|
70
|
-
| `readonly` | `boolean` | - | Read-only state |
|
|
71
|
-
| `size` | `"xs" \| "sm" \| "lg" \| "xl"` | - | Size |
|
|
72
|
-
| `inset` | `boolean` | - | Inset style |
|
|
73
|
-
| `class` | `string` | - | Additional CSS class |
|
|
74
|
-
| `style` | `JSX.CSSProperties` | - | Inline style |
|
|
75
|
-
| `required` | `boolean` | - | Required field (error: "필수 입력 항목입니다") |
|
|
76
|
-
| `minLength` | `number` | - | Minimum character length (error: "최소 N자 이상 입력하세요") |
|
|
77
|
-
| `maxLength` | `number` | - | Maximum character length (error: "최대 N자까지 입력 가능합니다") |
|
|
78
|
-
| `pattern` | `string` | - | Regex pattern string (error: "입력 형식이 올바르지 않습니다") |
|
|
79
|
-
| `validate` | `(value: string) => string \| undefined` | - | Custom validation function |
|
|
80
|
-
| `touchMode` | `boolean` | - | Show error only after field loses focus |
|
|
81
|
-
|
|
82
|
-
**Sub-components:**
|
|
83
|
-
- `TextInput.Prefix` -- Prefix element (icon, text, etc.) displayed before the input
|
|
84
|
-
|
|
85
|
-
---
|
|
86
|
-
|
|
87
|
-
## NumberInput
|
|
88
|
-
|
|
89
|
-
Number input field with thousand separators and minimum decimal places support.
|
|
90
|
-
|
|
91
|
-
```tsx
|
|
92
|
-
import { NumberInput } from "@simplysm/solid";
|
|
93
|
-
|
|
94
|
-
// Basic usage (thousand separators auto-applied)
|
|
95
|
-
<NumberInput value={amount()} onValueChange={setAmount} />
|
|
96
|
-
|
|
97
|
-
// Without thousand separators
|
|
98
|
-
<NumberInput value={num()} comma={false} />
|
|
99
|
-
|
|
100
|
-
// Minimum 2 decimal places
|
|
101
|
-
<NumberInput value={price()} minDigits={2} />
|
|
102
|
-
|
|
103
|
-
// With prefix
|
|
104
|
-
<NumberInput value={price()} onValueChange={setPrice}>
|
|
105
|
-
<NumberInput.Prefix>₩</NumberInput.Prefix>
|
|
106
|
-
</NumberInput>
|
|
107
|
-
|
|
108
|
-
// With validation
|
|
109
|
-
<NumberInput required min={0} max={100} value={score()} onValueChange={setScore} />
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
| Prop | Type | Default | Description |
|
|
113
|
-
|------|------|---------|-------------|
|
|
114
|
-
| `value` | `number` | - | Input value |
|
|
115
|
-
| `onValueChange` | `(value: number \| undefined) => void` | - | Value change callback |
|
|
116
|
-
| `comma` | `boolean` | `true` | Show thousand separators |
|
|
117
|
-
| `minDigits` | `number` | - | Minimum decimal places |
|
|
118
|
-
| `placeholder` | `string` | - | Placeholder |
|
|
119
|
-
| `title` | `string` | - | Tooltip title |
|
|
120
|
-
| `disabled` | `boolean` | - | Disabled state |
|
|
121
|
-
| `readonly` | `boolean` | - | Read-only state |
|
|
122
|
-
| `size` | `"xs" \| "sm" \| "lg" \| "xl"` | - | Size |
|
|
123
|
-
| `inset` | `boolean` | - | Inset style |
|
|
124
|
-
| `class` | `string` | - | Additional CSS class |
|
|
125
|
-
| `style` | `JSX.CSSProperties` | - | Inline style |
|
|
126
|
-
| `required` | `boolean` | - | Required field (error: "필수 입력 항목입니다") |
|
|
127
|
-
| `min` | `number` | - | Minimum value (error: "최솟값은 N입니다") |
|
|
128
|
-
| `max` | `number` | - | Maximum value (error: "최댓값은 N입니다") |
|
|
129
|
-
| `validate` | `(value: number \| undefined) => string \| undefined` | - | Custom validation function |
|
|
130
|
-
| `touchMode` | `boolean` | - | Show error only after field loses focus |
|
|
131
|
-
|
|
132
|
-
**Sub-components:**
|
|
133
|
-
- `NumberInput.Prefix` -- Prefix element (currency symbol, icon, etc.) displayed before the input
|
|
134
|
-
|
|
135
|
-
---
|
|
136
|
-
|
|
137
|
-
## DatePicker
|
|
138
|
-
|
|
139
|
-
Date input field supporting year, month, and date units. Values are handled using the `DateOnly` type.
|
|
140
|
-
|
|
141
|
-
```tsx
|
|
142
|
-
import { DatePicker } from "@simplysm/solid";
|
|
143
|
-
import { DateOnly } from "@simplysm/core-common";
|
|
144
|
-
|
|
145
|
-
// Date input
|
|
146
|
-
<DatePicker unit="date" value={date()} onValueChange={setDate} />
|
|
147
|
-
|
|
148
|
-
// Year-month input
|
|
149
|
-
<DatePicker unit="month" value={monthDate()} onValueChange={setMonthDate} />
|
|
150
|
-
|
|
151
|
-
// Year-only input
|
|
152
|
-
<DatePicker unit="year" value={yearDate()} onValueChange={setYearDate} />
|
|
153
|
-
|
|
154
|
-
// min/max constraints
|
|
155
|
-
<DatePicker
|
|
156
|
-
unit="date"
|
|
157
|
-
value={date()}
|
|
158
|
-
onValueChange={setDate}
|
|
159
|
-
min={new DateOnly(2025, 1, 1)}
|
|
160
|
-
max={new DateOnly(2025, 12, 31)}
|
|
161
|
-
/>
|
|
162
|
-
|
|
163
|
-
// With validation
|
|
164
|
-
<DatePicker required value={date()} onValueChange={setDate} />
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
| Prop | Type | Default | Description |
|
|
168
|
-
|------|------|---------|-------------|
|
|
169
|
-
| `value` | `DateOnly` | - | Input value |
|
|
170
|
-
| `onValueChange` | `(value: DateOnly \| undefined) => void` | - | Value change callback |
|
|
171
|
-
| `unit` | `"year" \| "month" \| "date"` | `"date"` | Date unit |
|
|
172
|
-
| `min` | `DateOnly` | - | Minimum date (error: "{min}보다 크거나 같아야 합니다") |
|
|
173
|
-
| `max` | `DateOnly` | - | Maximum date (error: "{max}보다 작거나 같아야 합니다") |
|
|
174
|
-
| `title` | `string` | - | Tooltip title |
|
|
175
|
-
| `disabled` | `boolean` | - | Disabled state |
|
|
176
|
-
| `readonly` | `boolean` | - | Read-only state |
|
|
177
|
-
| `size` | `"xs" \| "sm" \| "lg" \| "xl"` | - | Size |
|
|
178
|
-
| `inset` | `boolean` | - | Inset style |
|
|
179
|
-
| `class` | `string` | - | Additional CSS class |
|
|
180
|
-
| `style` | `JSX.CSSProperties` | - | Inline style |
|
|
181
|
-
| `required` | `boolean` | - | Required field (error: "필수 입력 항목입니다") |
|
|
182
|
-
| `validate` | `(value: DateOnly \| undefined) => string \| undefined` | - | Custom validation function |
|
|
183
|
-
| `touchMode` | `boolean` | - | Show error only after field loses focus |
|
|
184
|
-
|
|
185
|
-
---
|
|
186
|
-
|
|
187
|
-
## DateTimePicker
|
|
188
|
-
|
|
189
|
-
Date-time input field supporting minute and second units. Values are handled using the `DateTime` type.
|
|
190
|
-
|
|
191
|
-
```tsx
|
|
192
|
-
import { DateTimePicker } from "@simplysm/solid";
|
|
193
|
-
import { DateTime } from "@simplysm/core-common";
|
|
194
|
-
|
|
195
|
-
// Date-time input (minute precision)
|
|
196
|
-
<DateTimePicker unit="minute" value={dateTime()} onValueChange={setDateTime} />
|
|
197
|
-
|
|
198
|
-
// Date-time input (second precision)
|
|
199
|
-
<DateTimePicker unit="second" value={dateTime()} onValueChange={setDateTime} />
|
|
200
|
-
|
|
201
|
-
// min/max constraints
|
|
202
|
-
<DateTimePicker
|
|
203
|
-
unit="minute"
|
|
204
|
-
value={dateTime()}
|
|
205
|
-
onValueChange={setDateTime}
|
|
206
|
-
min={new DateTime(2025, 1, 1, 0, 0, 0)}
|
|
207
|
-
max={new DateTime(2025, 12, 31, 23, 59, 0)}
|
|
208
|
-
/>
|
|
209
|
-
|
|
210
|
-
// With validation
|
|
211
|
-
<DateTimePicker required value={dateTime()} onValueChange={setDateTime} />
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
| Prop | Type | Default | Description |
|
|
215
|
-
|------|------|---------|-------------|
|
|
216
|
-
| `value` | `DateTime` | - | Input value |
|
|
217
|
-
| `onValueChange` | `(value: DateTime \| undefined) => void` | - | Value change callback |
|
|
218
|
-
| `unit` | `"minute" \| "second"` | `"minute"` | Date-time unit |
|
|
219
|
-
| `min` | `DateTime` | - | Minimum date-time (error: "{min}보다 크거나 같아야 합니다") |
|
|
220
|
-
| `max` | `DateTime` | - | Maximum date-time (error: "{max}보다 작거나 같아야 합니다") |
|
|
221
|
-
| `title` | `string` | - | Tooltip title |
|
|
222
|
-
| `disabled` | `boolean` | - | Disabled state |
|
|
223
|
-
| `readonly` | `boolean` | - | Read-only state |
|
|
224
|
-
| `size` | `"xs" \| "sm" \| "lg" \| "xl"` | - | Size |
|
|
225
|
-
| `inset` | `boolean` | - | Inset style |
|
|
226
|
-
| `class` | `string` | - | Additional CSS class |
|
|
227
|
-
| `style` | `JSX.CSSProperties` | - | Inline style |
|
|
228
|
-
| `required` | `boolean` | - | Required field (error: "필수 입력 항목입니다") |
|
|
229
|
-
| `validate` | `(value: DateTime \| undefined) => string \| undefined` | - | Custom validation function |
|
|
230
|
-
| `touchMode` | `boolean` | - | Show error only after field loses focus |
|
|
231
|
-
|
|
232
|
-
---
|
|
233
|
-
|
|
234
|
-
## TimePicker
|
|
235
|
-
|
|
236
|
-
Time input field supporting minute and second units. Values are handled using the `Time` type.
|
|
237
|
-
|
|
238
|
-
```tsx
|
|
239
|
-
import { TimePicker } from "@simplysm/solid";
|
|
240
|
-
import { Time } from "@simplysm/core-common";
|
|
241
|
-
|
|
242
|
-
// Time input (minute precision)
|
|
243
|
-
<TimePicker unit="minute" value={time()} onValueChange={setTime} />
|
|
244
|
-
|
|
245
|
-
// Time input (second precision)
|
|
246
|
-
<TimePicker unit="second" value={time()} onValueChange={setTime} />
|
|
247
|
-
|
|
248
|
-
// min/max constraints
|
|
249
|
-
<TimePicker
|
|
250
|
-
unit="minute"
|
|
251
|
-
value={time()}
|
|
252
|
-
onValueChange={setTime}
|
|
253
|
-
min={new Time(9, 0, 0)}
|
|
254
|
-
max={new Time(18, 0, 0)}
|
|
255
|
-
/>
|
|
256
|
-
|
|
257
|
-
// With validation
|
|
258
|
-
<TimePicker required value={time()} onValueChange={setTime} />
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
| Prop | Type | Default | Description |
|
|
262
|
-
|------|------|---------|-------------|
|
|
263
|
-
| `value` | `Time` | - | Input value |
|
|
264
|
-
| `onValueChange` | `(value: Time \| undefined) => void` | - | Value change callback |
|
|
265
|
-
| `unit` | `"minute" \| "second"` | `"minute"` | Time unit |
|
|
266
|
-
| `min` | `Time` | - | Minimum time (error: "{min}보다 크거나 같아야 합니다") |
|
|
267
|
-
| `max` | `Time` | - | Maximum time (error: "{max}보다 작거나 같아야 합니다") |
|
|
268
|
-
| `title` | `string` | - | Tooltip title |
|
|
269
|
-
| `disabled` | `boolean` | - | Disabled state |
|
|
270
|
-
| `readonly` | `boolean` | - | Read-only state |
|
|
271
|
-
| `size` | `"xs" \| "sm" \| "lg" \| "xl"` | - | Size |
|
|
272
|
-
| `inset` | `boolean` | - | Inset style |
|
|
273
|
-
| `class` | `string` | - | Additional CSS class |
|
|
274
|
-
| `style` | `JSX.CSSProperties` | - | Inline style |
|
|
275
|
-
| `required` | `boolean` | - | Required field (error: "필수 입력 항목입니다") |
|
|
276
|
-
| `validate` | `(value: Time \| undefined) => string \| undefined` | - | Custom validation function |
|
|
277
|
-
| `touchMode` | `boolean` | - | Show error only after field loses focus |
|
|
278
|
-
|
|
279
|
-
---
|
|
280
|
-
|
|
281
|
-
## DateRangePicker
|
|
282
|
-
|
|
283
|
-
Component for inputting date ranges with period type selection (day/month/range). The from/to values are automatically adjusted when periodType changes.
|
|
284
|
-
|
|
285
|
-
```tsx
|
|
286
|
-
import { DateRangePicker, type DateRangePeriodType } from "@simplysm/solid";
|
|
287
|
-
import { createSignal } from "solid-js";
|
|
288
|
-
import { DateOnly } from "@simplysm/core-common";
|
|
289
|
-
|
|
290
|
-
const [periodType, setPeriodType] = createSignal<DateRangePeriodType>("range");
|
|
291
|
-
const [from, setFrom] = createSignal<DateOnly>();
|
|
292
|
-
const [to, setTo] = createSignal<DateOnly>();
|
|
293
|
-
|
|
294
|
-
<DateRangePicker
|
|
295
|
-
periodType={periodType()}
|
|
296
|
-
onPeriodTypeChange={setPeriodType}
|
|
297
|
-
from={from()}
|
|
298
|
-
onFromChange={setFrom}
|
|
299
|
-
to={to()}
|
|
300
|
-
onToChange={setTo}
|
|
301
|
-
/>
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
| Prop | Type | Default | Description |
|
|
305
|
-
|------|------|---------|-------------|
|
|
306
|
-
| `periodType` | `"day" \| "month" \| "range"` | `"range"` | Period type |
|
|
307
|
-
| `onPeriodTypeChange` | `(value: DateRangePeriodType) => void` | - | Period type change callback |
|
|
308
|
-
| `from` | `DateOnly` | - | Start date |
|
|
309
|
-
| `onFromChange` | `(value: DateOnly \| undefined) => void` | - | Start date change callback |
|
|
310
|
-
| `to` | `DateOnly` | - | End date |
|
|
311
|
-
| `onToChange` | `(value: DateOnly \| undefined) => void` | - | End date change callback |
|
|
312
|
-
| `required` | `boolean` | - | Required field |
|
|
313
|
-
| `disabled` | `boolean` | - | Disabled state |
|
|
314
|
-
| `size` | `"xs" \| "sm" \| "lg" \| "xl"` | - | Size |
|
|
315
|
-
| `class` | `string` | - | Additional CSS class |
|
|
316
|
-
| `style` | `JSX.CSSProperties` | - | Inline style |
|
|
317
|
-
|
|
318
|
-
---
|
|
319
|
-
|
|
320
|
-
## Textarea
|
|
321
|
-
|
|
322
|
-
Multi-line text input field. Height adjusts automatically based on content, with IME composition support.
|
|
323
|
-
|
|
324
|
-
```tsx
|
|
325
|
-
import { Textarea } from "@simplysm/solid";
|
|
326
|
-
|
|
327
|
-
<Textarea value={text()} onValueChange={setText} />
|
|
328
|
-
|
|
329
|
-
// Minimum 3 rows height
|
|
330
|
-
<Textarea minRows={3} value={text()} onValueChange={setText} />
|
|
331
|
-
|
|
332
|
-
// With validation
|
|
333
|
-
<Textarea required minLength={10} value={text()} onValueChange={setText} />
|
|
334
|
-
```
|
|
335
|
-
|
|
336
|
-
| Prop | Type | Default | Description |
|
|
337
|
-
|------|------|---------|-------------|
|
|
338
|
-
| `value` | `string` | `""` | Input value |
|
|
339
|
-
| `onValueChange` | `(value: string) => void` | - | Value change callback |
|
|
340
|
-
| `placeholder` | `string` | - | Placeholder |
|
|
341
|
-
| `title` | `string` | - | Tooltip title |
|
|
342
|
-
| `minRows` | `number` | `1` | Minimum number of rows |
|
|
343
|
-
| `disabled` | `boolean` | - | Disabled state |
|
|
344
|
-
| `readonly` | `boolean` | - | Read-only state |
|
|
345
|
-
| `size` | `"xs" \| "sm" \| "lg" \| "xl"` | - | Size |
|
|
346
|
-
| `inset` | `boolean` | - | Inset style |
|
|
347
|
-
| `class` | `string` | - | Additional CSS class |
|
|
348
|
-
| `style` | `JSX.CSSProperties` | - | Inline style |
|
|
349
|
-
| `required` | `boolean` | - | Required field (error: "필수 입력 항목입니다") |
|
|
350
|
-
| `minLength` | `number` | - | Minimum character length (error: "최소 N자 이상 입력하세요") |
|
|
351
|
-
| `maxLength` | `number` | - | Maximum character length (error: "최대 N자까지 입력 가능합니다") |
|
|
352
|
-
| `validate` | `(value: string) => string \| undefined` | - | Custom validation function |
|
|
353
|
-
| `touchMode` | `boolean` | - | Show error only after field loses focus |
|
|
354
|
-
|
|
355
|
-
---
|
|
356
|
-
|
|
357
|
-
## Select
|
|
358
|
-
|
|
359
|
-
Dropdown selection component. Supports both items prop approach and children (Compound Components) approach. Single and multiple selection supported.
|
|
360
|
-
|
|
361
|
-
```tsx
|
|
362
|
-
import { Select } from "@simplysm/solid";
|
|
363
|
-
|
|
364
|
-
// items approach (simple array)
|
|
365
|
-
<Select
|
|
366
|
-
items={["Apple", "Banana", "Strawberry"]}
|
|
367
|
-
value={fruit()}
|
|
368
|
-
onValueChange={setFruit}
|
|
369
|
-
placeholder="Select fruit"
|
|
370
|
-
/>
|
|
371
|
-
|
|
372
|
-
// children approach (Compound Components)
|
|
373
|
-
<Select value={fruit()} onValueChange={setFruit} renderValue={(v) => v.name}>
|
|
374
|
-
<Select.Item value={item1}>{item1.name}</Select.Item>
|
|
375
|
-
<Select.Item value={item2}>{item2.name}</Select.Item>
|
|
376
|
-
</Select>
|
|
377
|
-
|
|
378
|
-
// items approach + ItemTemplate for custom rendering
|
|
379
|
-
<Select items={users} value={selectedUser()} onValueChange={setSelectedUser}>
|
|
380
|
-
<Select.ItemTemplate>
|
|
381
|
-
{(user) => <>{user.name} ({user.email})</>}
|
|
382
|
-
</Select.ItemTemplate>
|
|
383
|
-
</Select>
|
|
384
|
-
|
|
385
|
-
// Multiple selection
|
|
386
|
-
<Select items={options} value={selected()} onValueChange={setSelected} multiple />
|
|
387
|
-
|
|
388
|
-
// Hierarchical items (children approach)
|
|
389
|
-
<Select value={item()} onValueChange={setItem} renderValue={(v) => v.name}>
|
|
390
|
-
<Select.Item value={parent}>
|
|
391
|
-
{parent.name}
|
|
392
|
-
<Select.Item.Children>
|
|
393
|
-
<Select.Item value={child1}>{child1.name}</Select.Item>
|
|
394
|
-
<Select.Item value={child2}>{child2.name}</Select.Item>
|
|
395
|
-
</Select.Item.Children>
|
|
396
|
-
</Select.Item>
|
|
397
|
-
</Select>
|
|
398
|
-
|
|
399
|
-
// With action buttons and header
|
|
400
|
-
<Select value={item()} onValueChange={setItem} renderValue={(v) => v.name}>
|
|
401
|
-
<Select.Header><div>Custom header</div></Select.Header>
|
|
402
|
-
<Select.Action onClick={handleAdd}>+</Select.Action>
|
|
403
|
-
<Select.Item value={item1}>{item1.name}</Select.Item>
|
|
404
|
-
</Select>
|
|
405
|
-
|
|
406
|
-
// With validation
|
|
407
|
-
<Select required value={selected()} onValueChange={setSelected} items={options} />
|
|
408
|
-
```
|
|
409
|
-
|
|
410
|
-
| Prop | Type | Default | Description |
|
|
411
|
-
|------|------|---------|-------------|
|
|
412
|
-
| `value` | `T \| T[]` | - | Selected value |
|
|
413
|
-
| `onValueChange` | `(value: T \| T[]) => void` | - | Value change callback |
|
|
414
|
-
| `items` | `T[]` | - | Items array (items approach) |
|
|
415
|
-
| `getChildren` | `(item: T, index: number, depth: number) => T[] \| undefined` | - | Tree structure children getter |
|
|
416
|
-
| `renderValue` | `(value: T) => JSX.Element` | - | Value rendering function (required for children approach) |
|
|
417
|
-
| `multiple` | `boolean` | `false` | Multiple selection |
|
|
418
|
-
| `multiDisplayDirection` | `"horizontal" \| "vertical"` | `"horizontal"` | Display direction for multiple selection |
|
|
419
|
-
| `hideSelectAll` | `boolean` | - | Hide select all button (multiple selection) |
|
|
420
|
-
| `placeholder` | `string` | - | Placeholder |
|
|
421
|
-
| `disabled` | `boolean` | - | Disabled state |
|
|
422
|
-
| `required` | `boolean` | - | Required field (error: "필수 입력 항목입니다") |
|
|
423
|
-
| `size` | `"xs" \| "sm" \| "lg" \| "xl"` | - | Size |
|
|
424
|
-
| `inset` | `boolean` | - | Inset style |
|
|
425
|
-
| `class` | `string` | - | Additional CSS class |
|
|
426
|
-
| `style` | `JSX.CSSProperties` | - | Inline style |
|
|
427
|
-
| `validate` | `(value: unknown) => string \| undefined` | - | Custom validation function |
|
|
428
|
-
| `touchMode` | `boolean` | - | Show error only after field loses focus |
|
|
429
|
-
|
|
430
|
-
**Sub-components:**
|
|
431
|
-
- `Select.Item` -- Selection item
|
|
432
|
-
- `Select.Item.Children` -- Nested child items container (for hierarchical selection)
|
|
433
|
-
- `Select.Action` -- Right-side action button
|
|
434
|
-
- `Select.Header` -- Dropdown top custom area
|
|
435
|
-
- `Select.ItemTemplate` -- Item rendering template for items approach
|
|
436
|
-
|
|
437
|
-
---
|
|
438
|
-
|
|
439
|
-
## SelectList
|
|
440
|
-
|
|
441
|
-
List-style single selection component with built-in search, pagination, and slot-based customization. Uses compound component pattern with `SelectList.Header`, `SelectList.Filter`, and `SelectList.ItemTemplate`.
|
|
442
|
-
|
|
443
|
-
```tsx
|
|
444
|
-
import { SelectList } from "@simplysm/solid";
|
|
445
|
-
|
|
446
|
-
// Basic usage with search
|
|
447
|
-
<SelectList
|
|
448
|
-
items={users()}
|
|
449
|
-
value={selectedUser()}
|
|
450
|
-
onValueChange={setSelectedUser}
|
|
451
|
-
getSearchText={(user) => user.name}
|
|
452
|
-
>
|
|
453
|
-
<SelectList.ItemTemplate>
|
|
454
|
-
{(user) => <>{user.name} ({user.email})</>}
|
|
455
|
-
</SelectList.ItemTemplate>
|
|
456
|
-
</SelectList>
|
|
457
|
-
|
|
458
|
-
// With pagination and header
|
|
459
|
-
<SelectList
|
|
460
|
-
items={items()}
|
|
461
|
-
value={selected()}
|
|
462
|
-
onValueChange={setSelected}
|
|
463
|
-
pageSize={20}
|
|
464
|
-
header="Select an item"
|
|
465
|
-
>
|
|
466
|
-
<SelectList.ItemTemplate>
|
|
467
|
-
{(item) => <>{item.name}</>}
|
|
468
|
-
</SelectList.ItemTemplate>
|
|
469
|
-
</SelectList>
|
|
470
|
-
|
|
471
|
-
// With custom header and filter slots
|
|
472
|
-
<SelectList
|
|
473
|
-
items={items()}
|
|
474
|
-
value={selected()}
|
|
475
|
-
onValueChange={setSelected}
|
|
476
|
-
>
|
|
477
|
-
<SelectList.Header>
|
|
478
|
-
<div class="flex items-center gap-1">Custom Header</div>
|
|
479
|
-
</SelectList.Header>
|
|
480
|
-
<SelectList.Filter>
|
|
481
|
-
<MyCustomFilter />
|
|
482
|
-
</SelectList.Filter>
|
|
483
|
-
<SelectList.ItemTemplate>
|
|
484
|
-
{(item) => <>{item.label}</>}
|
|
485
|
-
</SelectList.ItemTemplate>
|
|
486
|
-
</SelectList>
|
|
487
|
-
|
|
488
|
-
// With canChange guard
|
|
489
|
-
<SelectList
|
|
490
|
-
items={items()}
|
|
491
|
-
value={selected()}
|
|
492
|
-
onValueChange={setSelected}
|
|
493
|
-
canChange={async (item) => {
|
|
494
|
-
if (hasUnsavedChanges()) return confirm("Discard changes?");
|
|
495
|
-
return true;
|
|
496
|
-
}}
|
|
497
|
-
>
|
|
498
|
-
<SelectList.ItemTemplate>
|
|
499
|
-
{(item) => <>{item.name}</>}
|
|
500
|
-
</SelectList.ItemTemplate>
|
|
501
|
-
</SelectList>
|
|
502
|
-
```
|
|
503
|
-
|
|
504
|
-
| Prop | Type | Default | Description |
|
|
505
|
-
|------|------|---------|-------------|
|
|
506
|
-
| `items` | `T[]` | **(required)** | Item array |
|
|
507
|
-
| `value` | `T` | - | Selected value |
|
|
508
|
-
| `onValueChange` | `(value: T \| undefined) => void` | - | Value change callback |
|
|
509
|
-
| `required` | `boolean` | - | Required (hides "unspecified" item) |
|
|
510
|
-
| `disabled` | `boolean` | - | Disabled state |
|
|
511
|
-
| `getSearchText` | `(item: T) => string` | - | Search text extractor (auto-shows search input) |
|
|
512
|
-
| `getIsHidden` | `(item: T) => boolean` | - | Hidden item filter |
|
|
513
|
-
| `filterFn` | `(item: T, index: number) => boolean` | - | Custom filter function |
|
|
514
|
-
| `canChange` | `(item: T \| undefined) => boolean \| Promise<boolean>` | - | Change guard (return `false` to block) |
|
|
515
|
-
| `pageSize` | `number` | - | Page size (auto-shows pagination) |
|
|
516
|
-
| `header` | `string` | - | Header text |
|
|
517
|
-
| `class` | `string` | - | CSS class |
|
|
518
|
-
| `style` | `JSX.CSSProperties` | - | Inline style |
|
|
519
|
-
|
|
520
|
-
**Sub-components:**
|
|
521
|
-
- `SelectList.Header` -- Custom header slot (overrides `header` prop)
|
|
522
|
-
- `SelectList.Filter` -- Custom filter slot (overrides default search input)
|
|
523
|
-
- `SelectList.ItemTemplate` -- Item rendering template
|
|
524
|
-
|
|
525
|
-
---
|
|
526
|
-
|
|
527
|
-
## DataSelectButton
|
|
528
|
-
|
|
529
|
-
Modal-based selection button. Displays selected items inline and opens a dialog for selection. Supports single and multiple selection with key-based loading.
|
|
530
|
-
|
|
531
|
-
```tsx
|
|
532
|
-
import { DataSelectButton, type DataSelectModalResult } from "@simplysm/solid";
|
|
533
|
-
|
|
534
|
-
// Single selection
|
|
535
|
-
<DataSelectButton
|
|
536
|
-
value={selectedUserId()}
|
|
537
|
-
onValueChange={setSelectedUserId}
|
|
538
|
-
load={async (keys) => await api.getUsersByIds(keys)}
|
|
539
|
-
modal={() => <UserSelectModal />}
|
|
540
|
-
renderItem={(user) => <>{user.name}</>}
|
|
541
|
-
/>
|
|
542
|
-
|
|
543
|
-
// Multiple selection
|
|
544
|
-
<DataSelectButton
|
|
545
|
-
value={selectedIds()}
|
|
546
|
-
onValueChange={setSelectedIds}
|
|
547
|
-
multiple
|
|
548
|
-
load={async (keys) => await api.getItemsByIds(keys)}
|
|
549
|
-
modal={() => <ItemSelectModal />}
|
|
550
|
-
renderItem={(item) => <>{item.name}</>}
|
|
551
|
-
/>
|
|
552
|
-
```
|
|
553
|
-
|
|
554
|
-
The modal should return `DataSelectModalResult<TKey>` via `dialogInstance.close({ selectedKeys: [...] })`.
|
|
555
|
-
|
|
556
|
-
| Prop | Type | Default | Description |
|
|
557
|
-
|------|------|---------|-------------|
|
|
558
|
-
| `value` | `TKey \| TKey[]` | - | Selected key(s) |
|
|
559
|
-
| `onValueChange` | `(value: TKey \| TKey[] \| undefined) => void` | - | Value change callback |
|
|
560
|
-
| `load` | `(keys: TKey[]) => TItem[] \| Promise<TItem[]>` | **(required)** | Load items by keys |
|
|
561
|
-
| `modal` | `() => JSX.Element` | **(required)** | Selection modal factory |
|
|
562
|
-
| `renderItem` | `(item: TItem) => JSX.Element` | **(required)** | Item display renderer |
|
|
563
|
-
| `multiple` | `boolean` | - | Multiple selection mode |
|
|
564
|
-
| `required` | `boolean` | - | Required field |
|
|
565
|
-
| `disabled` | `boolean` | - | Disabled state |
|
|
566
|
-
| `size` | `"xs" \| "sm" \| "lg" \| "xl"` | - | Size |
|
|
567
|
-
| `inset` | `boolean` | - | Inset style |
|
|
568
|
-
| `validate` | `(value: unknown) => string \| undefined` | - | Custom validation function |
|
|
569
|
-
| `touchMode` | `boolean` | - | Show error only after focus loss |
|
|
570
|
-
| `dialogOptions` | `DialogShowOptions` | - | Dialog options for modal |
|
|
571
|
-
|
|
572
|
-
**DataSelectModalResult:**
|
|
573
|
-
|
|
574
|
-
```typescript
|
|
575
|
-
interface DataSelectModalResult<TKey> {
|
|
576
|
-
selectedKeys: TKey[];
|
|
577
|
-
}
|
|
578
|
-
```
|
|
579
|
-
|
|
580
|
-
---
|
|
581
|
-
|
|
582
|
-
## SharedData Wrappers
|
|
583
|
-
|
|
584
|
-
Convenience wrappers that connect `SharedDataAccessor` (from `useSharedData()`) to `Select`, `DataSelectButton`, and `SelectList` components. They auto-wire `items`, tree structure (`getChildren`), search, and hidden filtering from the shared data definition.
|
|
585
|
-
|
|
586
|
-
### SharedDataSelect
|
|
587
|
-
|
|
588
|
-
Wraps `Select` with `SharedDataAccessor`. Optionally adds search modal and edit modal action buttons.
|
|
589
|
-
|
|
590
|
-
```tsx
|
|
591
|
-
import { SharedDataSelect } from "@simplysm/solid";
|
|
592
|
-
|
|
593
|
-
const sharedData = useSharedData<MySharedData>();
|
|
594
|
-
|
|
595
|
-
<SharedDataSelect data={sharedData.departments} value={deptId()} onValueChange={setDeptId}>
|
|
596
|
-
{(dept) => <>{dept.name}</>}
|
|
597
|
-
</SharedDataSelect>
|
|
598
|
-
|
|
599
|
-
// With search modal and edit modal
|
|
600
|
-
<SharedDataSelect
|
|
601
|
-
data={sharedData.users}
|
|
602
|
-
value={userId()}
|
|
603
|
-
onValueChange={setUserId}
|
|
604
|
-
modal={() => <UserSearchModal />}
|
|
605
|
-
editModal={() => <UserEditModal />}
|
|
606
|
-
>
|
|
607
|
-
{(user) => <>{user.name}</>}
|
|
608
|
-
</SharedDataSelect>
|
|
609
|
-
```
|
|
610
|
-
|
|
611
|
-
| Prop | Type | Default | Description |
|
|
612
|
-
|------|------|---------|-------------|
|
|
613
|
-
| `data` | `SharedDataAccessor<TItem>` | **(required)** | Shared data accessor |
|
|
614
|
-
| `value` | `unknown` | - | Selected value |
|
|
615
|
-
| `onValueChange` | `(value: unknown) => void` | - | Value change callback |
|
|
616
|
-
| `multiple` | `boolean` | - | Multiple selection |
|
|
617
|
-
| `required` | `boolean` | - | Required field |
|
|
618
|
-
| `disabled` | `boolean` | - | Disabled state |
|
|
619
|
-
| `size` | `"xs" \| "sm" \| "lg" \| "xl"` | - | Size |
|
|
620
|
-
| `inset` | `boolean` | - | Inset style |
|
|
621
|
-
| `filterFn` | `(item: TItem, index: number) => boolean` | - | Item filter function |
|
|
622
|
-
| `modal` | `() => JSX.Element` | - | Search modal factory (adds search icon action) |
|
|
623
|
-
| `editModal` | `() => JSX.Element` | - | Edit modal factory (adds edit icon action) |
|
|
624
|
-
| `children` | `(item: TItem, index: number, depth: number) => JSX.Element` | **(required)** | Item render function |
|
|
625
|
-
|
|
626
|
-
### SharedDataSelectButton
|
|
627
|
-
|
|
628
|
-
Wraps `DataSelectButton` with `SharedDataAccessor`. Auto-wires `load` from shared data items.
|
|
629
|
-
|
|
630
|
-
```tsx
|
|
631
|
-
import { SharedDataSelectButton } from "@simplysm/solid";
|
|
632
|
-
|
|
633
|
-
const sharedData = useSharedData<MySharedData>();
|
|
634
|
-
|
|
635
|
-
<SharedDataSelectButton
|
|
636
|
-
data={sharedData.users}
|
|
637
|
-
value={userId()}
|
|
638
|
-
onValueChange={setUserId}
|
|
639
|
-
modal={() => <UserSelectModal />}
|
|
640
|
-
>
|
|
641
|
-
{(user) => <>{user.name}</>}
|
|
642
|
-
</SharedDataSelectButton>
|
|
643
|
-
```
|
|
644
|
-
|
|
645
|
-
| Prop | Type | Default | Description |
|
|
646
|
-
|------|------|---------|-------------|
|
|
647
|
-
| `data` | `SharedDataAccessor<TItem>` | **(required)** | Shared data accessor |
|
|
648
|
-
| `value` | `TKey \| TKey[]` | - | Selected key(s) |
|
|
649
|
-
| `onValueChange` | `(value: TKey \| TKey[] \| undefined) => void` | - | Value change callback |
|
|
650
|
-
| `multiple` | `boolean` | - | Multiple selection |
|
|
651
|
-
| `required` | `boolean` | - | Required field |
|
|
652
|
-
| `disabled` | `boolean` | - | Disabled state |
|
|
653
|
-
| `size` | `"xs" \| "sm" \| "lg" \| "xl"` | - | Size |
|
|
654
|
-
| `inset` | `boolean` | - | Inset style |
|
|
655
|
-
| `modal` | `() => JSX.Element` | **(required)** | Selection modal factory |
|
|
656
|
-
| `children` | `(item: TItem) => JSX.Element` | **(required)** | Item render function |
|
|
657
|
-
|
|
658
|
-
### SharedDataSelectList
|
|
659
|
-
|
|
660
|
-
Wraps `SelectList` with `SharedDataAccessor`. Optionally adds a management modal link in header.
|
|
661
|
-
|
|
662
|
-
```tsx
|
|
663
|
-
import { SharedDataSelectList } from "@simplysm/solid";
|
|
664
|
-
|
|
665
|
-
const sharedData = useSharedData<MySharedData>();
|
|
666
|
-
|
|
667
|
-
<SharedDataSelectList
|
|
668
|
-
data={sharedData.categories}
|
|
669
|
-
value={selectedCategory()}
|
|
670
|
-
onValueChange={setSelectedCategory}
|
|
671
|
-
header="Category"
|
|
672
|
-
modal={() => <CategoryManageModal />}
|
|
673
|
-
>
|
|
674
|
-
<SelectList.ItemTemplate>
|
|
675
|
-
{(cat) => <>{cat.name}</>}
|
|
676
|
-
</SelectList.ItemTemplate>
|
|
677
|
-
</SharedDataSelectList>
|
|
678
|
-
```
|
|
679
|
-
|
|
680
|
-
| Prop | Type | Default | Description |
|
|
681
|
-
|------|------|---------|-------------|
|
|
682
|
-
| `data` | `SharedDataAccessor<TItem>` | **(required)** | Shared data accessor |
|
|
683
|
-
| `value` | `TItem` | - | Selected value |
|
|
684
|
-
| `onValueChange` | `(value: TItem \| undefined) => void` | - | Value change callback |
|
|
685
|
-
| `required` | `boolean` | - | Required field |
|
|
686
|
-
| `disabled` | `boolean` | - | Disabled state |
|
|
687
|
-
| `filterFn` | `(item: TItem, index: number) => boolean` | - | Item filter function |
|
|
688
|
-
| `canChange` | `(item: TItem \| undefined) => boolean \| Promise<boolean>` | - | Change guard |
|
|
689
|
-
| `pageSize` | `number` | - | Page size (auto-shows pagination) |
|
|
690
|
-
| `header` | `string` | - | Header text |
|
|
691
|
-
| `modal` | `() => JSX.Element` | - | Management modal factory (adds link icon in header) |
|
|
692
|
-
| `children` | `JSX.Element` | **(required)** | Sub-component children (e.g., `SelectList.ItemTemplate`) |
|
|
693
|
-
|
|
694
|
-
---
|
|
695
|
-
|
|
696
|
-
## Combobox
|
|
697
|
-
|
|
698
|
-
Autocomplete component with async search and item selection support. Debouncing is built-in.
|
|
699
|
-
|
|
700
|
-
```tsx
|
|
701
|
-
import { Combobox } from "@simplysm/solid";
|
|
702
|
-
|
|
703
|
-
<Combobox
|
|
704
|
-
loadItems={async (query) => {
|
|
705
|
-
const response = await fetch(`/api/search?q=${query}`);
|
|
706
|
-
return response.json();
|
|
707
|
-
}}
|
|
708
|
-
renderValue={(item) => item.name}
|
|
709
|
-
value={selected()}
|
|
710
|
-
onValueChange={setSelected}
|
|
711
|
-
placeholder="Search..."
|
|
712
|
-
>
|
|
713
|
-
<Combobox.ItemTemplate>
|
|
714
|
-
{(item) => <>{item.name}</>}
|
|
715
|
-
</Combobox.ItemTemplate>
|
|
716
|
-
</Combobox>
|
|
717
|
-
|
|
718
|
-
// With validation
|
|
719
|
-
<Combobox required loadItems={loadItems} renderValue={(v) => v.name} value={selected()} onValueChange={setSelected} />
|
|
720
|
-
```
|
|
721
|
-
|
|
722
|
-
| Prop | Type | Default | Description |
|
|
723
|
-
|------|------|---------|-------------|
|
|
724
|
-
| `value` | `T` | - | Selected value |
|
|
725
|
-
| `onValueChange` | `(value: T) => void` | - | Value change callback |
|
|
726
|
-
| `loadItems` | `(query: string) => Promise<T[]>` | **(required)** | Item loading function |
|
|
727
|
-
| `renderValue` | `(value: T) => JSX.Element` | **(required)** | Value rendering function |
|
|
728
|
-
| `debounceMs` | `number` | `300` | Debounce delay (ms) |
|
|
729
|
-
| `allowCustomValue` | `boolean` | - | Allow custom values |
|
|
730
|
-
| `parseCustomValue` | `(text: string) => T` | - | Custom value parsing function |
|
|
731
|
-
| `placeholder` | `string` | - | Placeholder |
|
|
732
|
-
| `disabled` | `boolean` | - | Disabled state |
|
|
733
|
-
| `size` | `"xs" \| "sm" \| "lg" \| "xl"` | - | Size |
|
|
734
|
-
| `inset` | `boolean` | - | Inset style |
|
|
735
|
-
| `class` | `string` | - | Additional CSS class |
|
|
736
|
-
| `style` | `JSX.CSSProperties` | - | Inline style |
|
|
737
|
-
| `required` | `boolean` | - | Required field (error: "필수 입력 항목입니다") |
|
|
738
|
-
| `validate` | `(value: T \| undefined) => string \| undefined` | - | Custom validation function |
|
|
739
|
-
| `touchMode` | `boolean` | - | Show error only after field loses focus |
|
|
740
|
-
|
|
741
|
-
**Sub-components:**
|
|
742
|
-
- `Combobox.Item` -- Selection item
|
|
743
|
-
- `Combobox.ItemTemplate` -- Item rendering template
|
|
744
|
-
|
|
745
|
-
---
|
|
746
|
-
|
|
747
|
-
## Checkbox / Radio
|
|
748
|
-
|
|
749
|
-
Checkbox and radio button components. Always uses primary color.
|
|
750
|
-
|
|
751
|
-
```tsx
|
|
752
|
-
import { Checkbox, Radio } from "@simplysm/solid";
|
|
753
|
-
|
|
754
|
-
<Checkbox value={checked()} onValueChange={setChecked}>I agree</Checkbox>
|
|
755
|
-
|
|
756
|
-
<Radio value={option() === "a"} onValueChange={() => setOption("a")}>Option A</Radio>
|
|
757
|
-
<Radio value={option() === "b"} onValueChange={() => setOption("b")}>Option B</Radio>
|
|
758
|
-
|
|
759
|
-
// With validation
|
|
760
|
-
<Checkbox required value={agreed()} onValueChange={setAgreed}>I agree to the terms</Checkbox>
|
|
761
|
-
```
|
|
762
|
-
|
|
763
|
-
| Prop | Type | Default | Description |
|
|
764
|
-
|------|------|---------|-------------|
|
|
765
|
-
| `value` | `boolean` | `false` | Checked state |
|
|
766
|
-
| `onValueChange` | `(value: boolean) => void` | - | Value change callback |
|
|
767
|
-
| `size` | `"xs" \| "sm" \| "lg" \| "xl"` | - | Size |
|
|
768
|
-
| `disabled` | `boolean` | - | Disabled state |
|
|
769
|
-
| `inset` | `boolean` | - | Inset style |
|
|
770
|
-
| `inline` | `boolean` | - | Inline style |
|
|
771
|
-
| `class` | `string` | - | Additional CSS class |
|
|
772
|
-
| `style` | `JSX.CSSProperties` | - | Inline style object |
|
|
773
|
-
| `required` | `boolean` | - | Required field (error: "필수 선택 항목입니다") |
|
|
774
|
-
| `validate` | `(value: boolean) => string \| undefined` | - | Custom validation function |
|
|
775
|
-
| `touchMode` | `boolean` | - | Show error only after field loses focus |
|
|
776
|
-
|
|
777
|
-
---
|
|
778
|
-
|
|
779
|
-
## CheckboxGroup / RadioGroup
|
|
780
|
-
|
|
781
|
-
Group components for managing multiple/single selection across items.
|
|
782
|
-
|
|
783
|
-
```tsx
|
|
784
|
-
import { CheckboxGroup, RadioGroup } from "@simplysm/solid";
|
|
785
|
-
|
|
786
|
-
// Multiple selection
|
|
787
|
-
<CheckboxGroup value={selectedColors()} onValueChange={setSelectedColors}>
|
|
788
|
-
<CheckboxGroup.Item value="red">Red</CheckboxGroup.Item>
|
|
789
|
-
<CheckboxGroup.Item value="green">Green</CheckboxGroup.Item>
|
|
790
|
-
<CheckboxGroup.Item value="blue">Blue</CheckboxGroup.Item>
|
|
791
|
-
</CheckboxGroup>
|
|
792
|
-
|
|
793
|
-
// Single selection
|
|
794
|
-
<RadioGroup value={size()} onValueChange={setSize}>
|
|
795
|
-
<RadioGroup.Item value="sm">Small</RadioGroup.Item>
|
|
796
|
-
<RadioGroup.Item value="md">Medium</RadioGroup.Item>
|
|
797
|
-
<RadioGroup.Item value="lg">Large</RadioGroup.Item>
|
|
798
|
-
</RadioGroup>
|
|
799
|
-
|
|
800
|
-
// With validation
|
|
801
|
-
<CheckboxGroup required value={selected()} onValueChange={setSelected}>
|
|
802
|
-
<CheckboxGroup.Item value="a">Option A</CheckboxGroup.Item>
|
|
803
|
-
</CheckboxGroup>
|
|
804
|
-
```
|
|
805
|
-
|
|
806
|
-
**CheckboxGroup Props:**
|
|
807
|
-
|
|
808
|
-
| Prop | Type | Default | Description |
|
|
809
|
-
|------|------|---------|-------------|
|
|
810
|
-
| `value` | `T[]` | `[]` | Selected values array |
|
|
811
|
-
| `onValueChange` | `(value: T[]) => void` | - | Value change callback |
|
|
812
|
-
| `size` | `"xs" \| "sm" \| "lg" \| "xl"` | - | Size |
|
|
813
|
-
| `disabled` | `boolean` | - | Disable all items |
|
|
814
|
-
| `inline` | `boolean` | - | Inline style |
|
|
815
|
-
| `inset` | `boolean` | - | Inset style |
|
|
816
|
-
| `required` | `boolean` | - | Required field (error: "항목을 선택해 주세요") |
|
|
817
|
-
| `validate` | `(value: T[]) => string \| undefined` | - | Custom validation function |
|
|
818
|
-
| `touchMode` | `boolean` | - | Show error only after field loses focus |
|
|
819
|
-
|
|
820
|
-
**RadioGroup Props:**
|
|
821
|
-
|
|
822
|
-
| Prop | Type | Default | Description |
|
|
823
|
-
|------|------|---------|-------------|
|
|
824
|
-
| `value` | `T` | - | Selected value |
|
|
825
|
-
| `onValueChange` | `(value: T) => void` | - | Value change callback |
|
|
826
|
-
| `size` | `"xs" \| "sm" \| "lg" \| "xl"` | - | Size |
|
|
827
|
-
| `disabled` | `boolean` | - | Disable all items |
|
|
828
|
-
| `inline` | `boolean` | - | Inline style |
|
|
829
|
-
| `inset` | `boolean` | - | Inset style |
|
|
830
|
-
| `required` | `boolean` | - | Required field (error: "항목을 선택해 주세요") |
|
|
831
|
-
| `validate` | `(value: T \| undefined) => string \| undefined` | - | Custom validation function |
|
|
832
|
-
| `touchMode` | `boolean` | - | Show error only after field loses focus |
|
|
833
|
-
|
|
834
|
-
---
|
|
835
|
-
|
|
836
|
-
## ColorPicker
|
|
837
|
-
|
|
838
|
-
Color selection component.
|
|
839
|
-
|
|
840
|
-
```tsx
|
|
841
|
-
import { ColorPicker } from "@simplysm/solid";
|
|
842
|
-
|
|
843
|
-
<ColorPicker value={color()} onValueChange={setColor} />
|
|
844
|
-
<ColorPicker value={color()} size="sm" disabled />
|
|
845
|
-
|
|
846
|
-
// With validation
|
|
847
|
-
<ColorPicker required value={color()} onValueChange={setColor} />
|
|
848
|
-
```
|
|
849
|
-
|
|
850
|
-
| Prop | Type | Default | Description |
|
|
851
|
-
|------|------|---------|-------------|
|
|
852
|
-
| `value` | `string` | `"#000000"` | Color value (#RRGGBB format) |
|
|
853
|
-
| `onValueChange` | `(value: string) => void` | - | Value change callback |
|
|
854
|
-
| `title` | `string` | - | Tooltip title |
|
|
855
|
-
| `size` | `"sm" \| "lg"` | - | Size |
|
|
856
|
-
| `disabled` | `boolean` | - | Disabled state |
|
|
857
|
-
| `required` | `boolean` | - | Required field (error: "필수 입력 항목입니다") |
|
|
858
|
-
| `validate` | `(value: string \| undefined) => string \| undefined` | - | Custom validation function |
|
|
859
|
-
| `touchMode` | `boolean` | - | Show error only after field loses focus |
|
|
860
|
-
|
|
861
|
-
---
|
|
862
|
-
|
|
863
|
-
## ThemeToggle
|
|
864
|
-
|
|
865
|
-
Dark/light/system theme cycle toggle button. Must be used inside `ThemeProvider`.
|
|
866
|
-
|
|
867
|
-
```tsx
|
|
868
|
-
import { ThemeToggle } from "@simplysm/solid";
|
|
869
|
-
|
|
870
|
-
<ThemeToggle />
|
|
871
|
-
<ThemeToggle size="sm" />
|
|
872
|
-
<ThemeToggle size="lg" />
|
|
873
|
-
```
|
|
874
|
-
|
|
875
|
-
Clicking cycles through `light -> system -> dark -> light`, displaying an icon matching the current mode.
|
|
876
|
-
|
|
877
|
-
| Prop | Type | Default | Description |
|
|
878
|
-
|------|------|---------|-------------|
|
|
879
|
-
| `size` | `"sm" \| "lg"` | - | Button size |
|
|
880
|
-
|
|
881
|
-
---
|
|
882
|
-
|
|
883
|
-
## RichTextEditor
|
|
884
|
-
|
|
885
|
-
Tiptap-based rich text editor. Supports text formatting (bold, italic, strikethrough), alignment, colors, highlights, tables, and image insertion.
|
|
886
|
-
|
|
887
|
-
```tsx
|
|
888
|
-
import { RichTextEditor } from "@simplysm/solid";
|
|
889
|
-
|
|
890
|
-
<RichTextEditor value={html()} onValueChange={setHtml} />
|
|
891
|
-
```
|
|
892
|
-
|
|
893
|
-
| Prop | Type | Default | Description |
|
|
894
|
-
|------|------|---------|-------------|
|
|
895
|
-
| `value` | `string` | - | HTML string value |
|
|
896
|
-
| `onValueChange` | `(value: string) => void` | - | Value change callback |
|
|
897
|
-
| `disabled` | `boolean` | - | Disabled state |
|
|
898
|
-
| `size` | `"xs" \| "sm" \| "lg" \| "xl"` | - | Size |
|
|
899
|
-
|
|
900
|
-
---
|
|
901
|
-
|
|
902
|
-
## Invalid
|
|
903
|
-
|
|
904
|
-
Wrapper component for form validation using native browser `setCustomValidity` API. Renders as a Fragment (no wrapper element). Manages both native form validity and visual error indicators.
|
|
905
|
-
|
|
906
|
-
```tsx
|
|
907
|
-
import { Invalid, TextInput } from "@simplysm/solid";
|
|
908
|
-
import { createSignal } from "solid-js";
|
|
909
|
-
|
|
910
|
-
const [value, setValue] = createSignal("");
|
|
911
|
-
const [error, setError] = createSignal("");
|
|
912
|
-
|
|
913
|
-
const handleChange = (val: string) => {
|
|
914
|
-
setValue(val);
|
|
915
|
-
setError(val.length < 3 ? "Must be at least 3 characters" : "");
|
|
916
|
-
};
|
|
917
|
-
|
|
918
|
-
// variant="dot" — injects a red dot inside the first child element (default)
|
|
919
|
-
<Invalid message={error()}>
|
|
920
|
-
<TextInput value={value()} onValueChange={handleChange} />
|
|
921
|
-
</Invalid>
|
|
922
|
-
|
|
923
|
-
// variant="border" — adds danger border class to the first child element
|
|
924
|
-
<Invalid variant="border" message={error()}>
|
|
925
|
-
<div class="border rounded-lg p-2">Content</div>
|
|
926
|
-
</Invalid>
|
|
927
|
-
|
|
928
|
-
// touchMode — show visual feedback only after the field loses focus
|
|
929
|
-
<Invalid variant="border" message={error()} touchMode>
|
|
930
|
-
<TextInput value={value()} onValueChange={handleChange} />
|
|
931
|
-
</Invalid>
|
|
932
|
-
```
|
|
933
|
-
|
|
934
|
-
| Prop | Type | Default | Description |
|
|
935
|
-
|------|------|---------|-------------|
|
|
936
|
-
| `message` | `string` | - | Validation error message (non-empty = invalid state) |
|
|
937
|
-
| `variant` | `"border" \| "dot"` | `"dot"` | Visual indicator style |
|
|
938
|
-
| `touchMode` | `boolean` | - | Show visual indicator only after the target element loses focus |
|
|
939
|
-
|
|
940
|
-
**Key features:**
|
|
941
|
-
- Renders as a Fragment — does not add a wrapper DOM element
|
|
942
|
-
- Uses native `setCustomValidity` for browser form validation integration (always set, regardless of `touchMode`)
|
|
943
|
-
- `variant="dot"`: injects a small red dot (`position: absolute`) inside the first child element
|
|
944
|
-
- `variant="border"`: adds `border-danger-500` CSS class to the first child element
|
|
945
|
-
- `touchMode`: visual display is deferred until the target element fires a `focusout` event
|
|
946
|
-
- Works with any form field component or custom element
|
|
947
|
-
|
|
948
|
-
> Most form controls (`TextInput`, `NumberInput`, `Textarea`, `Select`, etc.) use `Invalid` internally and expose `validate` / `touchMode` props directly. Direct use of `Invalid` is for custom validation scenarios.
|
|
949
|
-
|
|
950
|
-
---
|
|
951
|
-
|
|
952
|
-
## Form Validation
|
|
953
|
-
|
|
954
|
-
All form controls integrate with native browser form validation via the `setCustomValidity` API. Use `form.reportValidity()` to trigger validation and show error messages.
|
|
955
|
-
|
|
956
|
-
```tsx
|
|
957
|
-
import { Button, TextInput, NumberInput } from "@simplysm/solid";
|
|
958
|
-
|
|
959
|
-
<form onSubmit={(e) => {
|
|
960
|
-
e.preventDefault();
|
|
961
|
-
if (e.currentTarget.reportValidity()) {
|
|
962
|
-
// All fields are valid — proceed with submit
|
|
963
|
-
}
|
|
964
|
-
}}>
|
|
965
|
-
<TextInput required placeholder="이름" value={name()} onValueChange={setName} />
|
|
966
|
-
<TextInput required minLength={3} placeholder="최소 3자" value={nick()} onValueChange={setNick} />
|
|
967
|
-
<TextInput
|
|
968
|
-
validate={(v) => v.includes("@") ? undefined : "이메일 형식이 아닙니다"}
|
|
969
|
-
placeholder="이메일"
|
|
970
|
-
value={email()}
|
|
971
|
-
onValueChange={setEmail}
|
|
972
|
-
/>
|
|
973
|
-
<NumberInput required min={0} max={100} value={score()} onValueChange={setScore} />
|
|
974
|
-
<Button type="submit">Submit</Button>
|
|
975
|
-
</form>
|
|
976
|
-
```
|
|
977
|
-
|
|
978
|
-
**`validate` prop type:**
|
|
979
|
-
|
|
980
|
-
```typescript
|
|
981
|
-
validate?: (value: T) => string | undefined
|
|
982
|
-
// T is the component's value type (string, number, boolean, DateOnly, etc.)
|
|
983
|
-
// Return a string for an error message, or undefined when valid
|
|
984
|
-
```
|
|
985
|
-
|
|
986
|
-
**Built-in error messages (Korean):**
|
|
987
|
-
|
|
988
|
-
| Condition | Message |
|
|
989
|
-
|-----------|---------|
|
|
990
|
-
| `required` empty (text/number/date) | "필수 입력 항목입니다" |
|
|
991
|
-
| `required` unchecked (Checkbox/Radio) | "필수 선택 항목입니다" |
|
|
992
|
-
| `required` empty (CheckboxGroup/RadioGroup) | "항목을 선택해 주세요" |
|
|
993
|
-
| `minLength` not met | "최소 N자 이상 입력하세요" |
|
|
994
|
-
| `maxLength` exceeded | "최대 N자까지 입력 가능합니다" |
|
|
995
|
-
| `pattern` mismatch | "입력 형식이 올바르지 않습니다" |
|
|
996
|
-
| `min` underflow (NumberInput) | "최솟값은 N입니다" |
|
|
997
|
-
| `max` overflow (NumberInput) | "최댓값은 N입니다" |
|
|
998
|
-
| `min` underflow (DatePicker/DateTimePicker/TimePicker) | "{min}보다 크거나 같아야 합니다" |
|
|
999
|
-
| `max` overflow (DatePicker/DateTimePicker/TimePicker) | "{max}보다 작거나 같아야 합니다" |
|
|
1000
|
-
|
|
1001
|
-
**`touchMode` behavior:**
|
|
1002
|
-
|
|
1003
|
-
When `touchMode` is set, the visual error indicator (red dot or border) is shown only after the user has interacted with the field (i.e., after `focusout`). The native `setCustomValidity` is always set immediately, so `form.reportValidity()` works correctly regardless of `touchMode`.
|
|
1004
|
-
|
|
1005
|
-
```tsx
|
|
1006
|
-
// Error indicator appears only after the user leaves the field
|
|
1007
|
-
<TextInput required touchMode value={name()} onValueChange={setName} />
|
|
1008
|
-
```
|
|
1009
|
-
|
|
1010
|
-
---
|
|
1011
|
-
|
|
1012
|
-
## Numpad
|
|
1013
|
-
|
|
1014
|
-
Numeric keypad component. Used in environments requiring touch-based number input.
|
|
1015
|
-
|
|
1016
|
-
```tsx
|
|
1017
|
-
import { Numpad } from "@simplysm/solid";
|
|
1018
|
-
|
|
1019
|
-
<Numpad value={amount()} onValueChange={setAmount} />
|
|
1020
|
-
|
|
1021
|
-
// With ENT/minus buttons
|
|
1022
|
-
<Numpad
|
|
1023
|
-
value={amount()}
|
|
1024
|
-
onValueChange={setAmount}
|
|
1025
|
-
useEnterButton
|
|
1026
|
-
useMinusButton
|
|
1027
|
-
onEnterButtonClick={handleSubmit}
|
|
1028
|
-
/>
|
|
1029
|
-
```
|
|
1030
|
-
|
|
1031
|
-
| Prop | Type | Default | Description |
|
|
1032
|
-
|------|------|---------|-------------|
|
|
1033
|
-
| `value` | `number` | - | Input value |
|
|
1034
|
-
| `onValueChange` | `(value: number \| undefined) => void` | - | Value change callback |
|
|
1035
|
-
| `placeholder` | `string` | - | Placeholder |
|
|
1036
|
-
| `required` | `boolean` | - | Required field |
|
|
1037
|
-
| `inputDisabled` | `boolean` | - | Disable direct text field input |
|
|
1038
|
-
| `useEnterButton` | `boolean` | - | Show ENT button |
|
|
1039
|
-
| `useMinusButton` | `boolean` | - | Show minus button |
|
|
1040
|
-
| `onEnterButtonClick` | `() => void` | - | ENT click callback |
|
|
1041
|
-
| `size` | `"xs" \| "sm" \| "lg" \| "xl"` | - | Size |
|
|
1042
|
-
| `class` | `string` | - | Additional CSS class |
|
|
1043
|
-
| `style` | `JSX.CSSProperties` | - | Inline style |
|
|
1044
|
-
|
|
1045
|
-
---
|
|
1046
|
-
|
|
1047
|
-
## StatePreset
|
|
1048
|
-
|
|
1049
|
-
Component for saving/loading screen state (search conditions, etc.) as presets. Persisted via `useSyncConfig` (defaults to localStorage, can be configured to sync externally).
|
|
1050
|
-
|
|
1051
|
-
```tsx
|
|
1052
|
-
import { StatePreset } from "@simplysm/solid";
|
|
1053
|
-
|
|
1054
|
-
<StatePreset
|
|
1055
|
-
presetKey="user-search"
|
|
1056
|
-
value={searchState()}
|
|
1057
|
-
onValueChange={setSearchState}
|
|
1058
|
-
/>
|
|
1059
|
-
```
|
|
1060
|
-
|
|
1061
|
-
| Prop | Type | Default | Description |
|
|
1062
|
-
|------|------|---------|-------------|
|
|
1063
|
-
| `presetKey` | `string` | **(required)** | Preset storage key |
|
|
1064
|
-
| `value` | `T` | **(required)** | Current state value |
|
|
1065
|
-
| `onValueChange` | `(value: T) => void` | **(required)** | State restore callback |
|
|
1066
|
-
| `size` | `"xs" \| "sm" \| "lg" \| "xl"` | - | Size |
|
|
1067
|
-
| `class` | `string` | - | Additional CSS class |
|
|
1068
|
-
| `style` | `JSX.CSSProperties` | - | Inline style |
|