@simplysm/solid 13.0.98 → 13.0.99

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.
@@ -1,61 +1,70 @@
1
1
  # Disclosure Components
2
2
 
3
- Source: `src/components/disclosure/**/*.tsx`
3
+ Source: `src/components/disclosure/**`
4
4
 
5
- ## Collapse
5
+ ## `Collapse`
6
6
 
7
- Animated expand/collapse container using margin-top transition.
7
+ Animated collapsible container using CSS margin-top transition.
8
8
 
9
- ```ts
10
- interface CollapseProps extends JSX.HTMLAttributes<HTMLDivElement> {
11
- open?: boolean; // default: false
9
+ ```typescript
10
+ export interface CollapseProps extends JSX.HTMLAttributes<HTMLDivElement> {
11
+ open?: boolean;
12
12
  }
13
13
  ```
14
14
 
15
- - Uses `ResizeObserver` to track content height.
16
- - Disables transition on initial render to prevent flicker.
17
- - Sets `visibility: hidden` when closed to prevent focusable element access.
15
+ | Prop | Type | Description |
16
+ |------|------|-------------|
17
+ | `open` | `boolean` | Whether content is visible. Default: `false` |
18
+
19
+ ---
18
20
 
19
- ## Dropdown
21
+ ## `Dropdown`
20
22
 
21
- Positioned popup with trigger element. Uses Portal for rendering.
23
+ Popup dropdown component with trigger/content slot pattern. Supports auto-positioning, keyboard navigation, and context menu mode.
22
24
 
23
- ```ts
24
- interface DropdownProps {
25
- position?: { x: number; y: number }; // absolute position (for context menus)
25
+ ```typescript
26
+ export interface DropdownProps {
27
+ position?: { x: number; y: number };
26
28
  open?: boolean;
27
29
  onOpenChange?: (open: boolean) => void;
28
- maxHeight?: number; // default: 300
30
+ maxHeight?: number;
29
31
  disabled?: boolean;
30
- keyboardNav?: boolean; // arrow key navigation
32
+ keyboardNav?: boolean;
31
33
  class?: string;
32
34
  style?: JSX.CSSProperties;
33
35
  children: JSX.Element;
34
36
  }
35
37
  ```
36
38
 
37
- - Auto-positions above or below trigger based on available viewport space.
38
- - Closes on outside click, Escape key, scroll, and resize.
39
- - `keyboardNav`: ArrowDown/Up navigates between tabbable items in popup.
39
+ | Prop | Type | Description |
40
+ |------|------|-------------|
41
+ | `position` | `{ x: number; y: number }` | Absolute position for context menu mode |
42
+ | `open` | `boolean` | Popup open state |
43
+ | `onOpenChange` | `(open: boolean) => void` | Open state change callback |
44
+ | `maxHeight` | `number` | Popup max height in px. Default: `300` |
45
+ | `disabled` | `boolean` | Disable trigger click |
46
+ | `keyboardNav` | `boolean` | Enable ArrowUp/ArrowDown keyboard navigation |
40
47
 
41
48
  ### Sub-components
42
49
 
43
- - **`Dropdown.Trigger`** -- Click target that toggles the dropdown. Slot component.
44
- - **`Dropdown.Content`** -- Popup content. Slot component.
50
+ - **`Dropdown.Trigger`** -- Trigger element slot (click toggles popup)
51
+ - **`Dropdown.Content`** -- Popup content slot
45
52
 
46
- ## Dialog
53
+ ---
47
54
 
48
- Modal or floating dialog with drag, resize, z-index management, and animation.
55
+ ## `Dialog`
49
56
 
50
- ```ts
51
- interface DialogProps {
57
+ Modal/float dialog with dragging, 8-directional resizing, automatic z-index management, and slot-based header/action areas.
58
+
59
+ ```typescript
60
+ export interface DialogProps {
52
61
  open?: boolean;
53
62
  onOpenChange?: (open: boolean) => void;
54
- withCloseButton?: boolean; // default: true
55
- closeOnInteractOutside?: boolean; // default: false (uses DialogDefaults)
56
- closeOnEscape?: boolean; // default: true (uses DialogDefaults)
57
- resizable?: boolean; // default: false
58
- draggable?: boolean; // default: true
63
+ withCloseButton?: boolean;
64
+ closeOnInteractOutside?: boolean;
65
+ closeOnEscape?: boolean;
66
+ resizable?: boolean;
67
+ draggable?: boolean;
59
68
  mode?: "float" | "fill";
60
69
  width?: number;
61
70
  height?: number;
@@ -63,51 +72,64 @@ interface DialogProps {
63
72
  minHeight?: number;
64
73
  position?: "bottom-right" | "top-right";
65
74
  headerStyle?: JSX.CSSProperties | string;
66
- beforeClose?: () => boolean; // return false to prevent close
75
+ beforeClose?: () => boolean;
67
76
  onCloseComplete?: () => void;
68
77
  class?: string;
69
78
  }
70
79
  ```
71
80
 
72
- - `mode="float"`: no backdrop, pointer-events pass through.
73
- - `mode="fill"`: full-screen dialog.
74
- - 8-direction resize handles when `resizable=true`.
75
- - Automatic z-index stacking across multiple open dialogs.
81
+ | Prop | Type | Description |
82
+ |------|------|-------------|
83
+ | `open` | `boolean` | Dialog open state |
84
+ | `onOpenChange` | `(open: boolean) => void` | Open state change callback |
85
+ | `withCloseButton` | `boolean` | Show close button. Default: `true` |
86
+ | `closeOnInteractOutside` | `boolean` | Close on backdrop click. Default: `false` |
87
+ | `closeOnEscape` | `boolean` | Close on ESC key. Default: `true` |
88
+ | `resizable` | `boolean` | Enable 8-directional resizing. Default: `false` |
89
+ | `draggable` | `boolean` | Enable header dragging. Default: `true` |
90
+ | `mode` | `"float" \| "fill"` | Display mode |
91
+ | `width` / `height` | `number` | Initial dimensions in px |
92
+ | `minWidth` / `minHeight` | `number` | Minimum dimensions in px |
93
+ | `position` | `"bottom-right" \| "top-right"` | Absolute position mode |
94
+ | `beforeClose` | `() => boolean` | Close guard (return `false` to cancel) |
95
+ | `onCloseComplete` | `() => void` | Callback after close animation completes |
76
96
 
77
97
  ### Sub-components
78
98
 
79
- - **`Dialog.Header`** -- Dialog title bar. Enables drag when `draggable=true`.
80
- - **`Dialog.Action`** -- Action buttons rendered in the header next to the close button.
99
+ - **`Dialog.Header`** -- Header slot (enables dragging)
100
+ - **`Dialog.Action`** -- Action slot in header area (before close button)
81
101
 
82
- ## DialogProvider
102
+ ### `DialogProvider`
83
103
 
84
- Programmatic dialog provider. Enables `useDialog().show()` to open dialogs as Promises.
104
+ Provider for programmatic dialog management via `useDialog().show()`.
85
105
 
86
- ```ts
87
- interface DialogProviderProps extends DialogDefaults {}
106
+ ```typescript
107
+ export interface DialogProviderProps extends DialogDefaults {}
88
108
 
89
- interface DialogDefaults {
109
+ export interface DialogDefaults {
90
110
  closeOnEscape?: boolean;
91
111
  closeOnInteractOutside?: boolean;
92
112
  }
93
113
  ```
94
114
 
95
- ### useDialog()
96
-
97
- Hook to open dialogs programmatically.
115
+ ### `useDialog`
98
116
 
99
- ```ts
100
- function useDialog(): DialogContextValue;
117
+ ```typescript
118
+ export function useDialog(): DialogContextValue;
101
119
 
102
- interface DialogContextValue {
120
+ export interface DialogContextValue {
103
121
  show<P extends Record<string, any>>(
104
122
  component: Component<P>,
105
123
  props: Omit<P, "close">,
106
124
  options?: DialogShowOptions,
107
125
  ): Promise<ExtractCloseResult<P> | undefined>;
108
126
  }
127
+ ```
128
+
129
+ ### `DialogShowOptions`
109
130
 
110
- interface DialogShowOptions {
131
+ ```typescript
132
+ export interface DialogShowOptions {
111
133
  header?: JSX.Element;
112
134
  withCloseButton?: boolean;
113
135
  closeOnInteractOutside?: boolean;
@@ -125,21 +147,17 @@ interface DialogShowOptions {
125
147
  }
126
148
  ```
127
149
 
128
- The dialog component receives a `close` prop. Call `close(result)` to resolve the Promise.
150
+ ### `DialogDefaultsContext`
129
151
 
130
- ### DialogDefaultsContext
152
+ Context for setting default dialog options across the app.
131
153
 
132
- Context providing default dialog configuration. Used by `Dialog` when per-instance props are not set.
154
+ ---
133
155
 
134
- ```ts
135
- const DialogDefaultsContext: Context<Accessor<DialogDefaults>>;
136
- ```
137
-
138
- ## Tabs
156
+ ## `Tabs`
139
157
 
140
- Tab bar with value-based selection.
158
+ Tab bar component with underline indicator and keyboard support.
141
159
 
142
- ```ts
160
+ ```typescript
143
161
  interface TabsProps {
144
162
  value?: string;
145
163
  onValueChange?: (value: string) => void;
@@ -150,11 +168,17 @@ interface TabsProps {
150
168
  }
151
169
  ```
152
170
 
171
+ | Prop | Type | Description |
172
+ |------|------|-------------|
173
+ | `value` | `string` | Currently selected tab value |
174
+ | `onValueChange` | `(value: string) => void` | Tab change callback |
175
+ | `size` | `ComponentSize` | Tab size |
176
+
153
177
  ### Sub-components
154
178
 
155
- - **`Tabs.Tab`** -- Individual tab button.
179
+ - **`Tabs.Tab`** -- Individual tab button
156
180
 
157
- ```ts
181
+ ```typescript
158
182
  interface TabsTabProps {
159
183
  value: string;
160
184
  disabled?: boolean;
package/docs/display.md CHANGED
@@ -1,94 +1,137 @@
1
1
  # Display Components
2
2
 
3
- Source: `src/components/display/**/*.tsx`
3
+ Source: `src/components/display/**`
4
4
 
5
- ## Barcode
5
+ ## `Barcode`
6
6
 
7
- SVG barcode renderer powered by bwip-js.
7
+ SVG barcode renderer using bwip-js. Supports 100+ barcode formats.
8
8
 
9
- ```ts
10
- interface BarcodeProps extends JSX.HTMLAttributes<HTMLDivElement> {
9
+ ```typescript
10
+ export interface BarcodeProps extends JSX.HTMLAttributes<HTMLDivElement> {
11
11
  type: BarcodeType;
12
12
  value?: string;
13
13
  }
14
14
  ```
15
15
 
16
- ### BarcodeType
16
+ | Prop | Type | Description |
17
+ |------|------|-------------|
18
+ | `type` | `BarcodeType` | Barcode format (e.g., `"qrcode"`, `"code128"`, `"ean13"`) |
19
+ | `value` | `string` | Data to encode |
17
20
 
18
- Union type of all supported barcode formats. Common values include: `"qrcode"`, `"code128"`, `"ean13"`, `"datamatrix"`, `"pdf417"`, `"azteccode"`, `"code39"`, `"upca"`, `"isbn"`.
21
+ ### `BarcodeType`
19
22
 
20
- Full list exported from `src/components/display/Barcode.types.ts` with 100+ formats.
23
+ Union of 100+ barcode format strings including `"qrcode"`, `"code128"`, `"ean13"`, `"datamatrix"`, `"pdf417"`, `"azteccode"`, etc.
21
24
 
22
- ## Card
25
+ ---
23
26
 
24
- Elevated container with shadow and fade-in animation.
27
+ ## `Card`
25
28
 
26
- ```ts
27
- interface CardProps extends JSX.HTMLAttributes<HTMLDivElement> {}
29
+ Surface container with shadow, hover effects, and fade-in animation.
30
+
31
+ ```typescript
32
+ export interface CardProps extends JSX.HTMLAttributes<HTMLDivElement> {}
28
33
  ```
29
34
 
30
- Applies surface background, rounded corners, shadow with hover/focus-within elevation.
35
+ ---
31
36
 
32
- ## Echarts
37
+ ## `Echarts`
33
38
 
34
- Apache ECharts wrapper with reactive option updates and resize handling.
39
+ Apache ECharts wrapper with auto-resize and loading state support.
35
40
 
36
- ```ts
37
- interface EchartsProps extends JSX.HTMLAttributes<HTMLDivElement> {
41
+ ```typescript
42
+ export interface EchartsProps extends JSX.HTMLAttributes<HTMLDivElement> {
38
43
  option: echarts.EChartsOption;
39
- busy?: boolean; // shows/hides loading indicator
44
+ busy?: boolean;
40
45
  }
41
46
  ```
42
47
 
43
- - Uses SVG renderer.
44
- - Automatically resizes with container via `ResizeObserver`.
48
+ | Prop | Type | Description |
49
+ |------|------|-------------|
50
+ | `option` | `echarts.EChartsOption` | ECharts configuration object |
51
+ | `busy` | `boolean` | Show loading overlay |
52
+
53
+ ---
45
54
 
46
- ## Icon
55
+ ## `Icon`
47
56
 
48
- Tabler icon wrapper using `Dynamic` rendering.
57
+ Wrapper for Tabler Icons with consistent sizing and vertical alignment.
49
58
 
50
- ```ts
51
- interface IconProps extends Omit<TablerIconProps, "size"> {
59
+ ```typescript
60
+ export interface IconProps extends Omit<TablerIconProps, "size"> {
52
61
  icon: Component<TablerIconProps>;
53
- size?: string | number; // default: "1.25em"
62
+ size?: string | number;
54
63
  }
55
64
  ```
56
65
 
57
- Adds `inline` display and vertical alignment.
66
+ | Prop | Type | Description |
67
+ |------|------|-------------|
68
+ | `icon` | `Component<TablerIconProps>` | Tabler icon component |
69
+ | `size` | `string \| number` | Icon size. Default: `"1.25em"` |
58
70
 
59
- ## Tag
71
+ ---
60
72
 
61
- Themed inline tag/badge with solid background.
73
+ ## `Tag`
62
74
 
63
- ```ts
64
- type TagTheme = SemanticTheme;
75
+ Inline badge/tag with semantic theme colors.
65
76
 
66
- interface TagProps extends JSX.HTMLAttributes<HTMLSpanElement> {
67
- theme?: TagTheme; // default: "base"
77
+ ```typescript
78
+ export interface TagProps extends JSX.HTMLAttributes<HTMLSpanElement> {
79
+ theme?: TagTheme;
68
80
  }
69
81
  ```
70
82
 
71
- ## Link
83
+ | Prop | Type | Description |
84
+ |------|------|-------------|
85
+ | `theme` | `SemanticTheme` | Color theme. Default: `"base"` |
72
86
 
73
- Themed anchor link with hover underline.
87
+ ### `TagTheme`
88
+
89
+ ```typescript
90
+ export type TagTheme = SemanticTheme;
91
+ ```
74
92
 
75
- ```ts
76
- type LinkTheme = SemanticTheme;
93
+ ---
77
94
 
78
- interface LinkProps extends JSX.AnchorHTMLAttributes<HTMLAnchorElement> {
79
- theme?: LinkTheme; // default: "primary"
95
+ ## `Link`
96
+
97
+ Styled anchor element with theme colors and disabled state.
98
+
99
+ ```typescript
100
+ export interface LinkProps extends JSX.AnchorHTMLAttributes<HTMLAnchorElement> {
101
+ theme?: LinkTheme;
80
102
  disabled?: boolean;
81
103
  }
82
104
  ```
83
105
 
84
- ## Alert
106
+ | Prop | Type | Description |
107
+ |------|------|-------------|
108
+ | `theme` | `SemanticTheme` | Color theme. Default: `"primary"` |
109
+ | `disabled` | `boolean` | Disabled state |
110
+
111
+ ### `LinkTheme`
112
+
113
+ ```typescript
114
+ export type LinkTheme = SemanticTheme;
115
+ ```
116
+
117
+ ---
85
118
 
86
- Themed alert/callout box with light background.
119
+ ## `Alert`
87
120
 
88
- ```ts
89
- type AlertTheme = SemanticTheme;
121
+ Block-level alert container with semantic theme background.
90
122
 
91
- interface AlertProps extends JSX.HTMLAttributes<HTMLDivElement> {
92
- theme?: AlertTheme; // default: "base"
123
+ ```typescript
124
+ export interface AlertProps extends JSX.HTMLAttributes<HTMLDivElement> {
125
+ theme?: AlertTheme;
93
126
  }
94
127
  ```
128
+
129
+ | Prop | Type | Description |
130
+ |------|------|-------------|
131
+ | `theme` | `SemanticTheme` | Color theme. Default: `"base"` |
132
+
133
+ ### `AlertTheme`
134
+
135
+ ```typescript
136
+ export type AlertTheme = SemanticTheme;
137
+ ```