@smilodon/solid 1.9.1 → 1.9.3

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 (2) hide show
  1. package/README.md +19 -0
  2. package/package.json +18 -3
package/README.md CHANGED
@@ -67,6 +67,25 @@ function App() {
67
67
  render(() => <App />, document.getElementById('app')!)
68
68
  ```
69
69
 
70
+ ## Clear control visibility
71
+
72
+ With `clearable`, an empty field reserves no space for the clear action. The button and its input/arrow spacing appear only when a selected value or enabled search query can be cleared, then disappear after both targets are empty. This behavior covers single and multi-select as well as LTR and RTL layouts.
73
+
74
+ ```tsx
75
+ <Select
76
+ items={items}
77
+ value={value()}
78
+ onChange={setValue}
79
+ searchable
80
+ clearable
81
+ clearSelectionOnClear
82
+ clearSearchOnClear
83
+ onClear={(detail) => console.log(detail)}
84
+ />
85
+ ```
86
+
87
+ To keep a disabled clear action visible while empty, pass `config={{ clearControl: { hideWhenEmpty: false } }}`. Style through `::part(clear-button)`, `::part(clear-icon)`, and `--select-clear-*`; avoid permanent input padding.
88
+
70
89
  ## Controlled and uncontrolled modes
71
90
 
72
91
  ### Controlled
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smilodon/solid",
3
- "version": "1.9.1",
3
+ "version": "1.9.3",
4
4
  "description": "SolidJS adapter for @smilodon/core",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -22,7 +22,7 @@
22
22
  "build": "vite build && tsc --declaration --emitDeclarationOnly --outDir dist/types"
23
23
  },
24
24
  "peerDependencies": {
25
- "@smilodon/core": "^1.9.1",
25
+ "@smilodon/core": "^1.9.3",
26
26
  "solid-js": "^1.9.0"
27
27
  },
28
28
  "devDependencies": {
@@ -30,5 +30,20 @@
30
30
  "typescript": "^5.6.2",
31
31
  "vite": "^5.4.21",
32
32
  "vite-plugin-solid": "^2.11.8"
33
+ },
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "git+https://github.com/navidrezadoost/smilodon.git",
37
+ "directory": "packages/solid"
38
+ },
39
+ "bugs": {
40
+ "url": "https://github.com/navidrezadoost/smilodon/issues"
41
+ },
42
+ "homepage": "https://github.com/navidrezadoost/smilodon#readme",
43
+ "author": "Navid Rezadoost <navidrezadoost07@gmail.com>",
44
+ "license": "MIT",
45
+ "publishConfig": {
46
+ "access": "public",
47
+ "registry": "https://registry.npmjs.org/"
33
48
  }
34
- }
49
+ }