@nice2dev/ui-mobile 1.1.6 → 1.1.9

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/dist/index.d.ts CHANGED
@@ -678,18 +678,24 @@ export declare const NiceDrawingToolbar: default_2.ForwardRefExoticComponent<Nic
678
678
  * Drawing toolbar props
679
679
  */
680
680
  export declare interface NiceDrawingToolbarProps extends HTMLAttributes<HTMLDivElement> {
681
- /** Current tool */
682
- tool: DrawingTool;
681
+ /** Current tool (controlled). Omit it to let the toolbar keep its own. */
682
+ tool?: DrawingTool;
683
+ /** Initial tool when uncontrolled. Defaults to `'pen'`. */
684
+ defaultTool?: DrawingTool;
683
685
  /** Tool change handler */
684
- onToolChange: (tool: DrawingTool) => void;
685
- /** Current color */
686
- color: string;
686
+ onToolChange?: (tool: DrawingTool) => void;
687
+ /** Current color (controlled). Omit it to let the toolbar keep its own. */
688
+ color?: string;
689
+ /** Initial color when uncontrolled. Defaults to the first preset color. */
690
+ defaultColor?: string;
687
691
  /** Color change handler */
688
- onColorChange: (color: string) => void;
689
- /** Current stroke width */
690
- strokeWidth: number;
692
+ onColorChange?: (color: string) => void;
693
+ /** Current stroke width (controlled). Omit it to let the toolbar keep its own. */
694
+ strokeWidth?: number;
695
+ /** Initial stroke width when uncontrolled. Defaults to 4. */
696
+ defaultStrokeWidth?: number;
691
697
  /** Stroke width change handler */
692
- onStrokeWidthChange: (width: number) => void;
698
+ onStrokeWidthChange?: (width: number) => void;
693
699
  /** Undo handler */
694
700
  onUndo?: () => void;
695
701
  /** Redo handler */
@@ -991,7 +997,7 @@ export declare interface NiceMobileActionSheetProps extends Omit<NiceMobileModal
991
997
  * // With events
992
998
  * <NiceMobileCalendar
993
999
  * events={[
994
- * { id: '1', title: 'Meeting', date: new Date(), color: 'var(--color-accent, #6366f1)' }
1000
+ * { id: '1', title: 'Meeting', date: new Date(), color: 'var(--nice-color-accent, #6366f1)' }
995
1001
  * ]}
996
1002
  * renderDay={(cell) => (
997
1003
  * <CustomDayCell cell={cell} />
@@ -1828,7 +1834,7 @@ export declare interface NiceTouchButtonProps extends ButtonHTMLAttributes<HTMLB
1828
1834
  *
1829
1835
  * // With presets
1830
1836
  * <NiceTouchColorPicker
1831
- * presetColors={['var(--nice-danger, #ff0000)', 'var(--nice-success, #00ff00)', 'var(--nice-primary, #0000ff)']}
1837
+ * presetColors={['#ff0000', '#00ff00', '#0000ff']}
1832
1838
  * showInput
1833
1839
  * showPreview
1834
1840
  * />
@@ -2288,7 +2294,7 @@ export declare interface NiceTouchSubmitProps extends HTMLAttributes<HTMLButtonE
2288
2294
  * id: 'delete',
2289
2295
  * label: 'Delete',
2290
2296
  * icon: '🗑️',
2291
- * color: 'var(--color-error, #ef4444)',
2297
+ * color: 'var(--nice-color-error, #ef4444)',
2292
2298
  * onAction: (row) => handleDelete(row.id)
2293
2299
  * }
2294
2300
  * ]}