@dvcol/neo-svelte 1.1.0 → 1.1.1

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,14 @@
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
+ ### [1.1.1](https://github.com/dvcol/neo-svelte/compare/v1.1.0...v1.1.1) (2025-04-21)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **lint:** bump deps & fix errors ([b349483](https://github.com/dvcol/neo-svelte/commit/b3494830f2c91586c3b9983e6d016b0fa853c226))
11
+ * **loading:** fix flex behavior ([6bbb288](https://github.com/dvcol/neo-svelte/commit/6bbb288c1e7dcfbd1575960801fdb67dd07c1d11))
12
+
5
13
  ## [1.1.0](https://github.com/dvcol/neo-svelte/compare/v1.0.1...v1.1.0) (2025-04-21)
6
14
 
7
15
 
@@ -15,6 +15,11 @@
15
15
  id = `neo-portal-container-${getUUID()}`,
16
16
  scale = true,
17
17
 
18
+ // Flex
19
+ justify,
20
+ align,
21
+ flex,
22
+
18
23
  // Other Props
19
24
  ...rest
20
25
  }: NeoPortalContainerProps = $props();
@@ -39,6 +44,9 @@
39
44
  class:neo-portal-container={true}
40
45
  class:neo-scale={scale}
41
46
  class:neo-open={open}
47
+ style:flex
48
+ style:align-items={align}
49
+ style:justify-content={justify}
42
50
  {id}
43
51
  {...rest}
44
52
  >
@@ -49,6 +57,9 @@
49
57
  display: contents;
50
58
  }
51
59
  .neo-portal-container.neo-scale {
60
+ display: flex;
61
+ flex: 1 1 auto;
62
+ flex-direction: column;
52
63
  transition-timing-function: var(--neo-portail-container-exit-timing, ease);
53
64
  transition-duration: var(--neo-portail-container-exit-duration, 0.4s);
54
65
  transition-property: scale, translate;
@@ -74,8 +85,8 @@
74
85
  --neo-portail-container-enter-translate: calc(env(safe-area-inset-left) + 1rem);
75
86
  }
76
87
  .neo-portal-container.neo-scale.neo-open {
77
- scale: var(--neo-portail-container-enter-scale, 0.98);
78
- translate: var(--neo-portail-container-enter-translate, 0);
79
88
  transition-timing-function: var(--neo-portail-container-enter-timing, ease);
80
89
  transition-duration: var(--neo-portail-container-enter-duration, 0.4s);
90
+ scale: var(--neo-portail-container-enter-scale, 0.98);
91
+ translate: var(--neo-portail-container-enter-translate, 0);
81
92
  }</style>
@@ -1,4 +1,4 @@
1
- import type { HTMLNeoBaseElement, HTMLRefProps } from '../../utils/html-element.utils.js';
1
+ import type { HTMLFlexProps, HTMLNeoBaseElement, HTMLRefProps } from '../../utils/html-element.utils.js';
2
2
  export type NeoPortalContainerProps<Tag extends keyof HTMLElementTagNameMap = 'div'> = {
3
3
  /**
4
4
  * The HTML tag to use for the container.
@@ -9,4 +9,4 @@ export type NeoPortalContainerProps<Tag extends keyof HTMLElementTagNameMap = 'd
9
9
  * Whether to scale the container when a portal dialog is open.
10
10
  */
11
11
  scale?: boolean;
12
- } & HTMLNeoBaseElement<HTMLElementTagNameMap[Tag]> & HTMLRefProps<HTMLElementTagNameMap[Tag]>;
12
+ } & HTMLNeoBaseElement<HTMLElementTagNameMap[Tag]> & HTMLRefProps<HTMLElementTagNameMap[Tag]> & HTMLFlexProps;
@@ -82,8 +82,8 @@
82
82
  {/snippet}
83
83
 
84
84
  {#snippet content()}
85
- {#each items as { label, ...option }}
86
- <option {...option} value={option.value}>{label ?? option.value}</option>
85
+ {#each items as { id, label, ...option }, i (id ?? i)}
86
+ <option {id} {...option} value={option.value}>{label ?? option.value}</option>
87
87
  {/each}
88
88
  {@render children?.()}
89
89
  {/snippet}
@@ -409,9 +409,9 @@
409
409
  bind:value
410
410
  oninvalid={onInvalid}
411
411
  />
412
- {#each { length: Number(groups) } as _, i}
412
+ {#each { length: Number(groups) } as _, i (i)}
413
413
  <div class="neo-pin-group">
414
- {#each { length: Number(count) } as __, j}
414
+ {#each { length: Number(count) } as __, j (j)}
415
415
  <NeoInput
416
416
  bind:ref={refs[i][j]}
417
417
  bind:value={values[i][j]}
@@ -516,7 +516,7 @@
516
516
  <!-- handle after -->
517
517
  </span>
518
518
  {#if steps > 1}
519
- {#each { length: (steps ?? 0) + 1 } as _, i}
519
+ {#each { length: (steps ?? 0) + 1 } as _, i (i)}
520
520
  {#if showTick(i)}
521
521
  {@const filled = isFilled(i)}
522
522
  <div class="neo-range-tick" style:--neo-range-tick-index={i}>
@@ -7,6 +7,7 @@ import type { NeoListItemOrSection, NeoListSelectedItem } from '../list/neo-list
7
7
  export type NeoNativeSelectOption<Value = unknown> = string | number | ({
8
8
  value: Value;
9
9
  label?: string | Snippet;
10
+ id?: string | number;
10
11
  } & HTMLOptionAttributes);
11
12
  export type NeoNativeSelectProps<Value = unknown> = {
12
13
  /**
@@ -31,6 +31,7 @@
31
31
 
32
32
  <style>.neo-loading-matrix {
33
33
  display: flex;
34
+ flex: 1 1 auto;
34
35
  align-items: center;
35
36
  justify-content: center;
36
37
  width: 100%;
@@ -145,7 +145,7 @@
145
145
  {...containerRest}
146
146
  >
147
147
  <NeoProgress bind:ref bind:status bind:value bind:buffer {direction} {width} {height} {track} {...rest} />
148
- {#each marks as position, index}
148
+ {#each marks as position, index (index)}
149
149
  {#if position !== undefined}
150
150
  <span bind:this={refs[index]} class="neo-progress-bar-mark" style:--neo-progress-bar-mark-position="{position}%">
151
151
  {#if typeof mark === 'function'}
@@ -104,9 +104,9 @@
104
104
  {/if}
105
105
 
106
106
  {#if paragraphs && lines}
107
- {#each Array.from({ length: Number(paragraphs) }) as _, i}
107
+ {#each Array.from({ length: Number(paragraphs) }) as _, i (i)}
108
108
  <div class:neo-skeleton-text-paragraph={true} class:neo-alt={alt} class:neo-justify={justify} {...paragraphProps}>
109
- {#each Array.from({ length: Number(Array.isArray(lines) ? lines[i] : lines) }) as __}
109
+ {#each Array.from({ length: Number(Array.isArray(lines) ? lines[i] : lines) }) as __, j (j)}
110
110
  <div class="neo-skeleton-text-line" class:neo-alt={alt}>&nbsp;</div>
111
111
  {/each}
112
112
  </div>
@@ -24,7 +24,7 @@
24
24
 
25
25
  <svelte:element this={tag} class:neo-mark={true} {...rest}>
26
26
  {#if parts?.length && parts?.at(0)?.mark}
27
- {#each parts as { token, mark }}{token}{#if mark}<mark>{mark}</mark>{/if}{/each}
27
+ {#each parts as { token, mark }, i (i)}{token}{#if mark}<mark>{mark}</mark>{/if}{/each}
28
28
  {:else}
29
29
  {value}
30
30
  {/if}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dvcol/neo-svelte",
3
3
  "type": "module",
4
- "version": "1.1.0",
4
+ "version": "1.1.1",
5
5
  "description": "Neomorphic ui library for svelte 5",
6
6
  "author": "dvcol",
7
7
  "license": "MIT",
@@ -184,7 +184,7 @@
184
184
  "devDependencies": {
185
185
  "@commitlint/cli": "^19.8.0",
186
186
  "@commitlint/config-conventional": "^19.8.0",
187
- "@dvcol/eslint-config": "^1.5.0",
187
+ "@dvcol/eslint-config": "^1.6.0",
188
188
  "@dvcol/stylelint-plugin-presets": "^2.1.2",
189
189
  "@dvcol/svelte-simple-router": "^1.11.2",
190
190
  "@prettier/plugin-xml": "^3.4.1",