@smilodon/core 1.3.5 → 1.3.6

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 +85 -8
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -310,13 +310,53 @@ See the [full CSS variables reference](https://github.com/navidrezadoost/smilodo
310
310
  - Input container (gap, padding, height, borders, focus states)
311
311
  - Input field (width, padding, font, colors)
312
312
  - Arrow/icon (size, color, hover states, position)
313
- - Separator line (width, height, gradient)
314
- - Selection badges (padding, colors, remove button)
313
+ - **Separator line** (width, height, gradient, position)
314
+ - **Selection badges** (padding, colors, **remove/delete button**)
315
315
  - Dropdown (margins, max-height, borders, shadows)
316
316
  - Options (font size, line height, borders, transitions)
317
317
  - Load more button (padding, borders, colors, hover states)
318
318
  - Loading/empty states (padding, colors, backgrounds, spinner)
319
319
 
320
+ #### Highlighted Customization Features
321
+
322
+ **Separator Line Between Input and Arrow**
323
+ The vertical separator line that appears between the input area and the dropdown arrow is fully customizable:
324
+
325
+ ```css
326
+ enhanced-select {
327
+ /* Customize the separator line */
328
+ --select-separator-width: 2px; /* Line thickness */
329
+ --select-separator-height: 80%; /* Line height */
330
+ --select-separator-position: 40px; /* Distance from right edge */
331
+ --select-separator-gradient: linear-gradient(
332
+ to bottom,
333
+ transparent 0%,
334
+ #3b82f6 20%,
335
+ #3b82f6 80%,
336
+ transparent 100%
337
+ );
338
+ }
339
+ ```
340
+
341
+ **Badge Remove/Delete Button (Multi-Select)**
342
+ The × button that removes selected items in multi-select mode is fully customizable:
343
+
344
+ ```css
345
+ enhanced-select {
346
+ /* Customize badge appearance */
347
+ --select-badge-bg: #10b981; /* Badge background */
348
+ --select-badge-color: white; /* Badge text color */
349
+ --select-badge-padding: 6px 10px; /* Badge spacing */
350
+
351
+ /* Customize the × (remove/delete) button */
352
+ --select-badge-remove-size: 18px; /* Button size */
353
+ --select-badge-remove-bg: rgba(255, 255, 255, 0.3); /* Button background */
354
+ --select-badge-remove-color: white; /* × symbol color */
355
+ --select-badge-remove-font-size: 18px; /* × symbol size */
356
+ --select-badge-remove-hover-bg: rgba(255, 255, 255, 0.6); /* Hover state */
357
+ }
358
+ ```
359
+
320
360
  #### Real-World Customization Examples
321
361
 
322
362
  **Example 1: Bootstrap-style Select**
@@ -379,7 +419,7 @@ enhanced-select {
379
419
 
380
420
  #### Framework-Specific Examples
381
421
 
382
- **React**
422
+ **React - Customizing Separator & Badge Remove Button**
383
423
  ```jsx
384
424
  import { Select } from '@smilodon/react';
385
425
 
@@ -387,32 +427,69 @@ function App() {
387
427
  return (
388
428
  <Select
389
429
  items={items}
390
- className="dark-mode"
430
+ multiple
391
431
  style={{
392
432
  '--select-option-hover-bg': '#2563eb',
393
433
  '--select-option-padding': '12px 16px',
394
- '--select-badge-bg': '#3b82f6'
434
+ '--select-badge-bg': '#3b82f6',
435
+ '--select-badge-remove-bg': 'rgba(255, 255, 255, 0.4)',
436
+ '--select-badge-remove-hover-bg': 'rgba(255, 255, 255, 0.7)',
437
+ '--select-separator-gradient': 'linear-gradient(to bottom, transparent 0%, #3b82f6 20%, #3b82f6 80%, transparent 100%)'
395
438
  }}
396
439
  />
397
440
  );
398
441
  }
399
442
  ```
400
443
 
401
- **Vue**
444
+ **Vue - Complete Customization**
402
445
  ```vue
403
446
  <template>
404
447
  <Select
405
448
  :items="items"
406
- class="dark-mode"
449
+ multiple
407
450
  :style="{
408
451
  '--select-option-hover-bg': '#2563eb',
409
452
  '--select-option-padding': '12px 16px',
410
- '--select-badge-bg': '#3b82f6'
453
+ '--select-badge-bg': '#3b82f6',
454
+ '--select-badge-remove-size': '20px',
455
+ '--select-badge-remove-bg': 'rgba(255, 255, 255, 0.4)',
456
+ '--select-separator-width': '2px',
457
+ '--select-separator-height': '70%'
411
458
  }"
412
459
  />
413
460
  </template>
414
461
  ```
415
462
 
463
+ **Svelte - Themed Components**
464
+ ```svelte
465
+ <script>
466
+ import { Select } from '@smilodon/svelte';
467
+ </script>
468
+
469
+ <Select
470
+ items={items}
471
+ multiple
472
+ style="
473
+ --select-badge-bg: #10b981;
474
+ --select-badge-remove-bg: rgba(255, 255, 255, 0.3);
475
+ --select-badge-remove-hover-bg: rgba(255, 255, 255, 0.6);
476
+ --select-separator-gradient: linear-gradient(to bottom, transparent, #10b981, transparent);
477
+ "
478
+ />
479
+ ```
480
+
481
+ **Vanilla JS - Dynamic Styling**
482
+ ```javascript
483
+ const select = document.querySelector('enhanced-select');
484
+
485
+ // Apply custom separator and badge styles
486
+ select.style.setProperty('--select-separator-width', '2px');
487
+ select.style.setProperty('--select-separator-gradient', 'linear-gradient(to bottom, transparent, #ff6b6b, transparent)');
488
+ select.style.setProperty('--select-badge-bg', '#ff6b6b');
489
+ select.style.setProperty('--select-badge-remove-size', '18px');
490
+ select.style.setProperty('--select-badge-remove-bg', 'rgba(255, 255, 255, 0.3)');
491
+ ```
492
+
416
493
  ### Server-Side Rendering (SSR)
417
494
 
418
495
  Smilodon gracefully handles SSR environments:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smilodon/core",
3
- "version": "1.3.5",
3
+ "version": "1.3.6",
4
4
  "description": "High-performance native select component with extreme-scale virtualization - React, Vue, Svelte, Vanilla JS",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",