@dvcol/neo-svelte 0.1.4 → 0.1.5

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/CHANGELOG.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.1.5](https://github.com/dvcol/neo-svelte/compare/v0.1.4...v0.1.5) (2025-01-10)
6
+
7
+
8
+ ### Features
9
+
10
+ * **input:** adds basic select support ([f0a7973](https://github.com/dvcol/neo-svelte/commit/f0a797395a67017a437e9f32229d0ccc578b47a4))
11
+ * **input:** adds range prefix & suffix ([1c6ab9c](https://github.com/dvcol/neo-svelte/commit/1c6ab9c731a9964dc921e6f11f77a0c45a7bfaf7))
12
+ * **input:** adds range slider drag support ([f9c6275](https://github.com/dvcol/neo-svelte/commit/f9c6275ff0bf3cb717de94cbe75190237ca143be))
13
+ * **input:** adds styling to labels ([7823b84](https://github.com/dvcol/neo-svelte/commit/7823b845e58762e51dae6eba36cc42f73b3349f2))
14
+ * **input:** range switch to variable value ([41e491d](https://github.com/dvcol/neo-svelte/commit/41e491dd10ef6992c3e1b679edf4846c037f9e4c))
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **input:** adjust range spacing ([d68bd8f](https://github.com/dvcol/neo-svelte/commit/d68bd8f2d7ebfd3c27b1d8f87aa15748eebd98be))
20
+
5
21
  ### [0.1.4](https://github.com/dvcol/neo-svelte/compare/v0.1.3...v0.1.4) (2024-12-31)
6
22
 
7
23
 
package/README.md CHANGED
@@ -1,5 +1,52 @@
1
- # neo-svelte
2
- Neomorphic ui library for svelte 5
1
+ <h1 align="center">Welcome to <i>Neo Svelte</i></h1>
2
+ <h3 align="center">A neo-morphic ui library for svelte 5</h3>
3
+
4
+ <p>
5
+ <img src="https://img.shields.io/badge/pnpm-%3E%3D8.0.0-blue.svg" />
6
+ <img src="https://img.shields.io/badge/node-%3E%3D20.0.0-blue.svg" />
7
+ <a href="https://github.com/dvcol/neo-svelte#readme" target="_blank">
8
+ <img alt="Documentation" src="https://img.shields.io/badge/documentation-yes-brightgreen.svg" />
9
+ </a>
10
+ <a href="https://github.com/dvcol/neo-svelte/graphs/commit-activity" target="_blank">
11
+ <img alt="Maintenance" src="https://img.shields.io/badge/Maintained%3F-yes-green.svg" />
12
+ </a>
13
+ <a href="https://github.com/dvcol/neo-svelte/blob/master/LICENSE" target="_blank">
14
+ <img alt="License: MIT" src="https://img.shields.io/github/license/dvcol/neo-svelte" />
15
+ </a>
16
+ <a href="https://paypal.me/dvcol/5" target="_blank">
17
+ <img alt="donate" src="https://img.shields.io/badge/Donate%20€-PayPal-brightgreen.svg" />
18
+ </a>
19
+ </p>
20
+
21
+ ## Prerequisites
22
+
23
+ Note: Svelte Simple Router is a svelte 5 native library, and will not work with prior versions of svelte.
24
+
25
+ - svelte >= 5.0.0
26
+
27
+ ## Install
28
+
29
+ ```sh
30
+ pnpm add @dvcol/neo-svelte
31
+ ```
32
+
33
+ ## Getting Started
34
+
35
+ Wrap any component inside the style provider
36
+
37
+ ```svelte
38
+ <script lang="ts">
39
+ import { NeoThemeProvider } from '@dvcol/neo-svelte';
40
+ </script>
41
+
42
+ <NeoThemeProvider>
43
+ ...
44
+ </NeoThemeProvider>
45
+ ```
46
+
47
+ Then import any of the components you want to use.
48
+
49
+ See examples in the demo (code [here](https://github.com/dvcol/neo-svelte/tree/fed1b3f42e863e18968c77256527a837957b3304/demo/components), live demo [here](https://dvcol.github.io/neo-svelte/#/inputs)).
3
50
 
4
51
  ## TODO
5
52
  - [ ] @media any-pointer:coarse any-hover:none
@@ -19,20 +66,18 @@ Neomorphic ui library for svelte 5
19
66
  - [x] multiple
20
67
  - [x] numbers
21
68
  - [x] digits
22
- - [ ] range
23
69
  - [ ] phone
24
70
  - [ ] credit card
25
71
  - [x] pin
26
72
  - [x] time/date/week
27
73
  - [ ] range
28
74
  - [x] switch
29
- - [ ] slider
30
- - [ ] range
31
- - [ ] inset
32
- - [ ] before - after stepper
33
- - [ ] custom before-after
34
- - [ ] steps/ticks
35
- - [ ] labels
75
+ - [x] slider
76
+ - [X] range
77
+ - [X] inset
78
+ - [x] custom before-after
79
+ - [x] steps
80
+ - [ ] vertical
36
81
  - [ ] select
37
82
  - [ ] table
38
83
  - [ ] pagination
@@ -83,6 +128,21 @@ Neomorphic ui library for svelte 5
83
128
  - [ ] grid
84
129
  - [ ] masonry ?
85
130
 
131
+ ## Author
132
+
133
+ * Github: [@dvcol](https://github.com/dvcol)
134
+
135
+ ## Show your support
136
+
137
+ Give a ⭐️ if this project helped you!
138
+
139
+ <a href="https://paypal.me/dvcol/5" target="_blank">
140
+ <img alt="donate" src="https://img.shields.io/badge/Donate%20€-PayPal-brightgreen.svg" />
141
+ </a>
142
+
143
+ ## 📝 License
86
144
 
87
- # TODO (work in progress)
145
+ This project is [MIT](https://github.com/dvcol/neo-svelte/blob/master/LICENSE) licensed.
88
146
 
147
+ ***
148
+ _This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_
@@ -461,6 +461,7 @@
461
461
  display: inline-flex;
462
462
  align-items: center;
463
463
  justify-content: center;
464
+ min-width: max-content;
464
465
  }
465
466
  .neo-button .neo-content {
466
467
  height: 100%;
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import type { FocusEventHandler, MouseEventHandler } from 'svelte/elements';
2
+ import type { FocusEventHandler, PointerEventHandler } from 'svelte/elements';
3
3
  import type { NeoCardContext, NeoCardProps } from './neo-card.model.js';
4
4
 
5
5
  import NeoButton from '../buttons/NeoButton.svelte';
@@ -62,8 +62,8 @@
62
62
  onClose,
63
63
  onfocusin,
64
64
  onfocusout,
65
- onmouseenter,
66
- onmouseleave,
65
+ onpointerenter,
66
+ onpointerleave,
67
67
 
68
68
  // Other props
69
69
  contentTag = 'div',
@@ -92,14 +92,14 @@
92
92
 
93
93
  const segments = $derived([content, header, action, footer, media, close].filter(Boolean).length > 1);
94
94
 
95
- const onMouseEnter: MouseEventHandler<HTMLDivElement> = e => {
95
+ const onPointerEnter: PointerEventHandler<HTMLDivElement> = e => {
96
96
  hovered = true;
97
- onmouseenter?.(e);
97
+ onpointerenter?.(e);
98
98
  };
99
99
 
100
- const onMouseLeave: MouseEventHandler<HTMLDivElement> = e => {
100
+ const onPointerLeave: PointerEventHandler<HTMLDivElement> = e => {
101
101
  hovered = false;
102
- onmouseleave?.(e);
102
+ onpointerleave?.(e);
103
103
  };
104
104
 
105
105
  const onFocusIn: FocusEventHandler<HTMLInputElement> = e => {
@@ -192,8 +192,8 @@
192
192
  out:outFn={outProps}
193
193
  in:inFn={inProps}
194
194
  {...rest}
195
- onmouseenter={onMouseEnter}
196
- onmouseleave={onMouseLeave}
195
+ onpointerenter={onPointerEnter}
196
+ onpointerleave={onPointerLeave}
197
197
  onfocusin={onFocusIn}
198
198
  onfocusout={onFocusOut}
199
199
  >
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import type { EventHandler, FocusEventHandler, MouseEventHandler } from 'svelte/elements';
2
+ import type { EventHandler, FocusEventHandler, PointerEventHandler } from 'svelte/elements';
3
3
  import type { NeoInputHTMLElement } from './common/neo-input.model.js';
4
4
  import type { NeoPinContext, NeoPinProps } from './neo-pin.model.js';
5
5
  import type { SvelteEvent } from '../utils/html-element.utils.js';
@@ -297,13 +297,13 @@
297
297
  oninvalid?.(e);
298
298
  };
299
299
 
300
- const onMouseEnter: MouseEventHandler<HTMLDivElement> = e => {
300
+ const onPointerEnter: PointerEventHandler<HTMLDivElement> = e => {
301
301
  hovered = true;
302
- containerProps?.onmouseenter?.(e);
302
+ containerProps?.onpointerenter?.(e);
303
303
  };
304
- const onMouseLeave: MouseEventHandler<HTMLDivElement> = e => {
304
+ const onPointerLeave: PointerEventHandler<HTMLDivElement> = e => {
305
305
  hovered = false;
306
- containerProps?.onmouseleave?.(e);
306
+ containerProps?.onpointerleave?.(e);
307
307
  };
308
308
 
309
309
  const affix = $derived(clearable || loading !== undefined || validation);
@@ -359,8 +359,8 @@
359
359
  {...containerProps}
360
360
  onfocusin={onFocusIn}
361
361
  onfocusout={onFocusOut}
362
- onmouseenter={onMouseEnter}
363
- onmouseleave={onMouseLeave}
362
+ onpointerenter={onPointerEnter}
363
+ onpointerleave={onPointerLeave}
364
364
  >
365
365
  {#if before}
366
366
  <svelte:element this={beforeTag} class:neo-pin-before={true} class:neo-vertical={vertical} {...beforeProps}>