solid-tom-ui 1.0.10 → 1.0.14

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.
Files changed (120) hide show
  1. package/README.md +246 -246
  2. package/dist/README.md +246 -246
  3. package/dist/components/avatar/avatar.js.map +1 -1
  4. package/dist/components/badge/badge.js.map +1 -1
  5. package/dist/components/breadcrumb/breadcrumb.js.map +1 -1
  6. package/dist/components/button/button.js.map +1 -1
  7. package/dist/components/carousel/carousel.js.map +1 -1
  8. package/dist/components/chat-bubble/chatBubble.js.map +1 -1
  9. package/dist/components/checkbox/checkbox.js.map +1 -1
  10. package/dist/components/collapse/collapse.js.map +1 -1
  11. package/dist/components/context-menu/context-menu.js.map +1 -1
  12. package/dist/components/context-menu/context-menu.store.js.map +1 -1
  13. package/dist/components/divider/divider.js.map +1 -1
  14. package/dist/components/dropdown/dropdown.js.map +1 -1
  15. package/dist/components/dropdown/dropdown.store.js.map +1 -1
  16. package/dist/components/float-button/float-button.js.map +1 -1
  17. package/dist/components/hover-3d-image/hover-3d-image.js.map +1 -1
  18. package/dist/components/image-preview/image-preview.js.map +1 -1
  19. package/dist/components/input/input.js.map +1 -1
  20. package/dist/components/input/input.utils.js.map +1 -1
  21. package/dist/components/input/variants/input-color.js.map +1 -1
  22. package/dist/components/input/variants/input-date.js.map +1 -1
  23. package/dist/components/input/variants/input-number.d.ts.map +1 -1
  24. package/dist/components/input/variants/input-number.js +1 -1
  25. package/dist/components/input/variants/input-number.js.map +1 -1
  26. package/dist/components/input/variants/input-otp.js.map +1 -1
  27. package/dist/components/input/variants/input-password.js.map +1 -1
  28. package/dist/components/input/variants/input-radio.js.map +1 -1
  29. package/dist/components/input/variants/input-range.js.map +1 -1
  30. package/dist/components/input/variants/input-text.d.ts.map +1 -1
  31. package/dist/components/input/variants/input-text.js +1 -1
  32. package/dist/components/input/variants/input-text.js.map +1 -1
  33. package/dist/components/input/variants/input-textarea.js.map +1 -1
  34. package/dist/components/loading/loading.js.map +1 -1
  35. package/dist/components/mansory/mansory.js.map +1 -1
  36. package/dist/components/menu/menu.js.map +1 -1
  37. package/dist/components/menu/menu.types.d.ts +2 -3
  38. package/dist/components/menu/menu.types.d.ts.map +1 -1
  39. package/dist/components/modal/modal.js.map +1 -1
  40. package/dist/components/modal/modalContext.js.map +1 -1
  41. package/dist/components/pagination/pagination.js.map +1 -1
  42. package/dist/components/progress-bar/progress-bar.js.map +1 -1
  43. package/dist/components/qr-code/qr-code.js.map +1 -1
  44. package/dist/components/select/select.js.map +1 -1
  45. package/dist/components/select-zone/select-zone.js.map +1 -1
  46. package/dist/components/skeleton/skeleton.js.map +1 -1
  47. package/dist/components/slider/slider.js.map +1 -1
  48. package/dist/components/splitter/splitter.js.map +1 -1
  49. package/dist/components/steps/steps.js.map +1 -1
  50. package/dist/components/swap/swap.js.map +1 -1
  51. package/dist/components/switch/switch.js.map +1 -1
  52. package/dist/components/tab/tab.js.map +1 -1
  53. package/dist/components/table/table.js.map +1 -1
  54. package/dist/components/timeline/timeline.js.map +1 -1
  55. package/dist/components/toast/icons/ErrorIcon.js.map +1 -1
  56. package/dist/components/toast/icons/IconCircle.js.map +1 -1
  57. package/dist/components/toast/icons/InfoIcon.js.map +1 -1
  58. package/dist/components/toast/icons/LoaderIcon.js.map +1 -1
  59. package/dist/components/toast/icons/SuccessIcon.js.map +1 -1
  60. package/dist/components/toast/icons/WarningIcon.js.map +1 -1
  61. package/dist/components/toast/toast.js.map +1 -1
  62. package/dist/components/toast/toast.store.js.map +1 -1
  63. package/dist/components/tooltip/tooltip.js.map +1 -1
  64. package/dist/components/tour/tour.js.map +1 -1
  65. package/dist/components/upload/upload.js.map +1 -1
  66. package/dist/components/z-index/z-index.context.js.map +1 -1
  67. package/dist/components/z-index/z-index.js.map +1 -1
  68. package/dist/components/z-index/z-index.store.js.map +1 -1
  69. package/dist/components/z-index/z-index.types.js.map +1 -1
  70. package/dist/package.json +1 -1
  71. package/dist/skill/avatar.skill.md.txt +255 -255
  72. package/dist/skill/badge.skill.md.txt +223 -223
  73. package/dist/skill/breadcrumb.skill.md.txt +177 -177
  74. package/dist/skill/button.skill.md.txt +198 -198
  75. package/dist/skill/carousel.skill.md.txt +406 -406
  76. package/dist/skill/chat-bubble.skill.md.txt +342 -342
  77. package/dist/skill/checkbox.skill.md.txt +326 -326
  78. package/dist/skill/code-preview.skill.md.txt +240 -240
  79. package/dist/skill/collapse.skill.md.txt +329 -329
  80. package/dist/skill/context-menu.skill.md.txt +233 -233
  81. package/dist/skill/diff.skill.md.txt +244 -244
  82. package/dist/skill/divider.skill.md.txt +151 -151
  83. package/dist/skill/doc.skill.md.txt +191 -191
  84. package/dist/skill/drawer.skill.md.txt +157 -157
  85. package/dist/skill/dropdown.skill.md.txt +198 -198
  86. package/dist/skill/float-button.skill.md.txt +315 -315
  87. package/dist/skill/hover-3d-image.skill.md.txt +120 -120
  88. package/dist/skill/iframe.skill.md.txt +114 -114
  89. package/dist/skill/image-preview.skill.md.txt +162 -162
  90. package/dist/skill/indicator.skill.md.txt +60 -60
  91. package/dist/skill/input.skill.md.txt +489 -489
  92. package/dist/skill/loading.skill.md.txt +127 -127
  93. package/dist/skill/menu.skill.md.txt +476 -476
  94. package/dist/skill/modal.skill.md.txt +359 -359
  95. package/dist/skill/pagination.skill.md.txt +405 -405
  96. package/dist/skill/progress-bar.skill.md.txt +207 -207
  97. package/dist/skill/qr-code.skill.md.txt +136 -136
  98. package/dist/skill/rating.skill.md.txt +167 -167
  99. package/dist/skill/select-zone.skill.md.txt +93 -93
  100. package/dist/skill/select.skill.md.txt +663 -663
  101. package/dist/skill/skeleton.skill.md.txt +192 -192
  102. package/dist/skill/slider.skill.md.txt +404 -404
  103. package/dist/skill/splitter.skill.md.txt +411 -411
  104. package/dist/skill/steps.skill.md.txt +264 -264
  105. package/dist/skill/swap.skill.md.txt +139 -139
  106. package/dist/skill/switch.skill.md.txt +191 -191
  107. package/dist/skill/tab.skill.md.txt +484 -484
  108. package/dist/skill/table.example.header.md.txt +666 -666
  109. package/dist/skill/table.skill.md.txt +1407 -1407
  110. package/dist/skill/text-rotate.skill.md.txt +186 -186
  111. package/dist/skill/timeline.skill.md.txt +247 -247
  112. package/dist/skill/toast.skill.md.txt +531 -531
  113. package/dist/skill/tooltip.skill.md.txt +222 -222
  114. package/dist/skill/tour.skill.md.txt +156 -156
  115. package/dist/skill/upload.skill.md.txt +358 -358
  116. package/dist/utils/cn.js.map +1 -1
  117. package/dist/utils/element-tracker.js.map +1 -1
  118. package/dist/utils/helper.js.map +1 -1
  119. package/dist/utils/hoc.js.map +1 -1
  120. package/package.json +132 -133
@@ -1,127 +1,127 @@
1
- ## COMPONENT IDENTITY
2
- - **Import**: `import { Loading, Spinner } from 'solid-tom-ui';`
3
- - **Exports**: `Loading` (main), `Spinner` (sub-component)
4
- - **Framework**: SolidJS
5
- - **Purpose**: Flexible loading indicator with 11 animation variants and 5 size options; supports DaisyUI semantic colors and any valid CSS color value
6
-
7
- ## Props — `Loading`
8
-
9
- | Prop | Type | Default | Description |
10
- |-----------|-----------------------------------|-------------|--------------------------------------------------|
11
- | `variant` | `DaisyVariant \| SvgVariant` | `'spinner'` | Animation style (see variants below) |
12
- | `size` | `'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl'` | `'sm'` | Size of the indicator |
13
- | `color` | `BaseColorProps \| string` | — | Color: semantic token or any CSS color value |
14
- | `class` | `string` | — | Additional CSS classes |
15
-
16
- ### Variant Groups
17
-
18
- **DaisyUI-based** (rendered as `<div>` with DaisyUI classes):
19
- - `spinner` — rotating arc (default DaisyUI spinner)
20
- - `spinner-2` — CSS border-based spinner (custom, not from DaisyUI)
21
- - `dots` — three bouncing dots
22
- - `ring` — spinning ring outline
23
- - `ball` — bouncing ball
24
- - `bars` — animated vertical bars
25
- - `infinity` — infinity symbol animation
26
-
27
- **SVG-based** (rendered as inline SVG):
28
- - `spinner-3` — 12-dot clock-style spinner with SVG `<animate>`
29
- - `spinner-4` — Lucide `Loader` icon with `animate-spin`
30
- - `spinner-5` — 12-line spoke spinner using `animateTransform` (discrete steps)
31
- - `spinner-6` — gradient arc circle with `animate-spin`
32
-
33
- ## Props — `Spinner`
34
-
35
- | Prop | Type | Default | Description |
36
- |---------|----------|-------------|---------------------------------|
37
- | `color` | `string` | `'#6E56CF'` | Stroke color (any CSS color) |
38
- | `class` | `string` | — | Defaults to `size-3 animate-spin` |
39
-
40
- `Spinner` does **not** accept `variant` or `size`. It always renders a small gradient arc SVG. Use `class` to override size.
41
-
42
- ## Color System
43
-
44
- The `color` prop on `Loading` accepts:
45
-
46
- 1. **`BaseColorProps` tokens**: `'primary'`, `'secondary'`, `'accent'`, `'neutral'`, `'info'`, `'success'`, `'warning'`, `'error'`
47
- — automatically resolved to the corresponding DaisyUI CSS variable (e.g., `var(--color-primary)`)
48
-
49
- 2. **Any CSS color value**: hex (`#ff0000`), rgb, hsl, named colors, etc.
50
- — passed directly as `color` style
51
-
52
- For DaisyUI variants, color is applied via the CSS `color` property, which drives `currentColor` in DaisyUI's masking/border logic.
53
-
54
- ## Usage Examples
55
-
56
- ### Basic usage
57
- ```tsx
58
- import { Loading } from 'solid-tom-ui';
59
-
60
- // Default: spinner, sm size
61
- <Loading />
62
-
63
- // Dots indicator, large
64
- <Loading variant="dots" size="lg" />
65
-
66
- // SVG spinner with primary color
67
- <Loading variant="spinner-3" size="md" color="primary" />
68
-
69
- // Custom hex color
70
- <Loading variant="ring" size="xl" color="#ff6b6b" />
71
- ```
72
-
73
- ### All variants at a glance
74
- ```tsx
75
- const variants = ['spinner','spinner-2','spinner-3','spinner-4','spinner-5','spinner-6','dots','ring','ball','bars','infinity'];
76
-
77
- <For each={variants}>
78
- {(v) => <Loading variant={v} size="md" />}
79
- </For>
80
- ```
81
-
82
- ### Inline `Spinner` inside a button
83
- ```tsx
84
- import { Spinner } from 'solid-tom-ui';
85
-
86
- <button disabled={loading()}>
87
- <Show when={loading()}>
88
- <Spinner class="size-4" color="white" />
89
- </Show>
90
- Submit
91
- </button>
92
- ```
93
-
94
- ### Full-page overlay
95
- ```tsx
96
- <Show when={isLoading()}>
97
- <div class="fixed inset-0 flex items-center justify-center bg-black/30 z-50">
98
- <Loading variant="infinity" size="xl" color="primary" />
99
- </div>
100
- </Show>
101
- ```
102
-
103
- ## Size Reference
104
-
105
- | Size | DaisyUI variants | SVG variants (spinner-3/4/5/6) |
106
- |------|-----------------|-------------------------------|
107
- | `xs` | DaisyUI `loading-xs` | 1rem × 1rem |
108
- | `sm` | DaisyUI `loading-sm` | 1.25rem × 1.25rem |
109
- | `md` | DaisyUI `loading-md` | 1.5rem × 1.5rem |
110
- | `lg` | DaisyUI `loading-lg` | 2rem × 2rem |
111
- | `xl` | DaisyUI `loading-xl` | 2.5rem × 2.5rem |
112
-
113
- ## Class Slots
114
-
115
- Both `Loading` and `Spinner` are single-element components — `class` appends to the root element. No named sub-element slots.
116
-
117
- > **CSS encoding**: internal CSS classes use short encoded names (e.g. `ld01`, `ld02`) per project convention.
118
-
119
- > **Unique IDs**: `Spinner` uses `createUniqueId()` from `solid-js` for the SVG `linearGradient` `id` — safe when multiple `Spinner` instances are on the same page.
120
-
121
- ## Implementation Notes
122
-
123
- - `spinner-2` is a **custom CSS border-spinner**, not a standard DaisyUI variant. It uses `border-top-color: currentColor` + `animation: sui-spin`.
124
- - SVG variants (`spinner-3` through `spinner-6`) use `svg_size_map` to apply size via `.loading-svg-*` CSS classes instead of DaisyUI's `loading-*` size utilities.
125
- - `spinner-4` wraps the Lucide `Loader` icon — its visual style matches Lucide's stroke-based icon set.
126
- - `Spinner` uses a `createUniqueId()` for the SVG `linearGradient` id to avoid conflicts when multiple instances are on the page.
127
- - Both components support `class` override; this is appended via `cn()` (clsx + tailwind-merge), so Tailwind conflicts are resolved correctly.
1
+ ## COMPONENT IDENTITY
2
+ - **Import**: `import { Loading, Spinner } from 'solid-tom-ui';`
3
+ - **Exports**: `Loading` (main), `Spinner` (sub-component)
4
+ - **Framework**: SolidJS
5
+ - **Purpose**: Flexible loading indicator with 11 animation variants and 5 size options; supports DaisyUI semantic colors and any valid CSS color value
6
+
7
+ ## Props — `Loading`
8
+
9
+ | Prop | Type | Default | Description |
10
+ |-----------|-----------------------------------|-------------|--------------------------------------------------|
11
+ | `variant` | `DaisyVariant \| SvgVariant` | `'spinner'` | Animation style (see variants below) |
12
+ | `size` | `'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl'` | `'sm'` | Size of the indicator |
13
+ | `color` | `BaseColorProps \| string` | — | Color: semantic token or any CSS color value |
14
+ | `class` | `string` | — | Additional CSS classes |
15
+
16
+ ### Variant Groups
17
+
18
+ **DaisyUI-based** (rendered as `<div>` with DaisyUI classes):
19
+ - `spinner` — rotating arc (default DaisyUI spinner)
20
+ - `spinner-2` — CSS border-based spinner (custom, not from DaisyUI)
21
+ - `dots` — three bouncing dots
22
+ - `ring` — spinning ring outline
23
+ - `ball` — bouncing ball
24
+ - `bars` — animated vertical bars
25
+ - `infinity` — infinity symbol animation
26
+
27
+ **SVG-based** (rendered as inline SVG):
28
+ - `spinner-3` — 12-dot clock-style spinner with SVG `<animate>`
29
+ - `spinner-4` — Lucide `Loader` icon with `animate-spin`
30
+ - `spinner-5` — 12-line spoke spinner using `animateTransform` (discrete steps)
31
+ - `spinner-6` — gradient arc circle with `animate-spin`
32
+
33
+ ## Props — `Spinner`
34
+
35
+ | Prop | Type | Default | Description |
36
+ |---------|----------|-------------|---------------------------------|
37
+ | `color` | `string` | `'#6E56CF'` | Stroke color (any CSS color) |
38
+ | `class` | `string` | — | Defaults to `size-3 animate-spin` |
39
+
40
+ `Spinner` does **not** accept `variant` or `size`. It always renders a small gradient arc SVG. Use `class` to override size.
41
+
42
+ ## Color System
43
+
44
+ The `color` prop on `Loading` accepts:
45
+
46
+ 1. **`BaseColorProps` tokens**: `'primary'`, `'secondary'`, `'accent'`, `'neutral'`, `'info'`, `'success'`, `'warning'`, `'error'`
47
+ — automatically resolved to the corresponding DaisyUI CSS variable (e.g., `var(--color-primary)`)
48
+
49
+ 2. **Any CSS color value**: hex (`#ff0000`), rgb, hsl, named colors, etc.
50
+ — passed directly as `color` style
51
+
52
+ For DaisyUI variants, color is applied via the CSS `color` property, which drives `currentColor` in DaisyUI's masking/border logic.
53
+
54
+ ## Usage Examples
55
+
56
+ ### Basic usage
57
+ ```tsx
58
+ import { Loading } from 'solid-tom-ui';
59
+
60
+ // Default: spinner, sm size
61
+ <Loading />
62
+
63
+ // Dots indicator, large
64
+ <Loading variant="dots" size="lg" />
65
+
66
+ // SVG spinner with primary color
67
+ <Loading variant="spinner-3" size="md" color="primary" />
68
+
69
+ // Custom hex color
70
+ <Loading variant="ring" size="xl" color="#ff6b6b" />
71
+ ```
72
+
73
+ ### All variants at a glance
74
+ ```tsx
75
+ const variants = ['spinner','spinner-2','spinner-3','spinner-4','spinner-5','spinner-6','dots','ring','ball','bars','infinity'];
76
+
77
+ <For each={variants}>
78
+ {(v) => <Loading variant={v} size="md" />}
79
+ </For>
80
+ ```
81
+
82
+ ### Inline `Spinner` inside a button
83
+ ```tsx
84
+ import { Spinner } from 'solid-tom-ui';
85
+
86
+ <button disabled={loading()}>
87
+ <Show when={loading()}>
88
+ <Spinner class="size-4" color="white" />
89
+ </Show>
90
+ Submit
91
+ </button>
92
+ ```
93
+
94
+ ### Full-page overlay
95
+ ```tsx
96
+ <Show when={isLoading()}>
97
+ <div class="fixed inset-0 flex items-center justify-center bg-black/30 z-50">
98
+ <Loading variant="infinity" size="xl" color="primary" />
99
+ </div>
100
+ </Show>
101
+ ```
102
+
103
+ ## Size Reference
104
+
105
+ | Size | DaisyUI variants | SVG variants (spinner-3/4/5/6) |
106
+ |------|-----------------|-------------------------------|
107
+ | `xs` | DaisyUI `loading-xs` | 1rem × 1rem |
108
+ | `sm` | DaisyUI `loading-sm` | 1.25rem × 1.25rem |
109
+ | `md` | DaisyUI `loading-md` | 1.5rem × 1.5rem |
110
+ | `lg` | DaisyUI `loading-lg` | 2rem × 2rem |
111
+ | `xl` | DaisyUI `loading-xl` | 2.5rem × 2.5rem |
112
+
113
+ ## Class Slots
114
+
115
+ Both `Loading` and `Spinner` are single-element components — `class` appends to the root element. No named sub-element slots.
116
+
117
+ > **CSS encoding**: internal CSS classes use short encoded names (e.g. `ld01`, `ld02`) per project convention.
118
+
119
+ > **Unique IDs**: `Spinner` uses `createUniqueId()` from `solid-js` for the SVG `linearGradient` `id` — safe when multiple `Spinner` instances are on the same page.
120
+
121
+ ## Implementation Notes
122
+
123
+ - `spinner-2` is a **custom CSS border-spinner**, not a standard DaisyUI variant. It uses `border-top-color: currentColor` + `animation: sui-spin`.
124
+ - SVG variants (`spinner-3` through `spinner-6`) use `svg_size_map` to apply size via `.loading-svg-*` CSS classes instead of DaisyUI's `loading-*` size utilities.
125
+ - `spinner-4` wraps the Lucide `Loader` icon — its visual style matches Lucide's stroke-based icon set.
126
+ - `Spinner` uses a `createUniqueId()` for the SVG `linearGradient` id to avoid conflicts when multiple instances are on the page.
127
+ - Both components support `class` override; this is appended via `cn()` (clsx + tailwind-merge), so Tailwind conflicts are resolved correctly.