@ims360/svelte-ivory 0.4.10 → 0.4.11

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.
@@ -47,14 +47,14 @@ class ThemeController {
47
47
  /** Add to hook sequence to enable correct prerendering ot the theme */
48
48
  handle = ({ event, resolve }) => {
49
49
  const theme = event.cookies.get(COOKIE_THEME_KEY);
50
- let isDark = false;
50
+ let dark;
51
51
  if (theme !== undefined && theme !== 'system') {
52
- isDark = theme === 'dark';
52
+ dark = theme === 'dark';
53
53
  }
54
54
  else {
55
- isDark = event.request.headers.get('sec-ch-prefers-color-scheme') === 'dark';
55
+ dark = event.request.headers.get('sec-ch-prefers-color-scheme') === 'dark';
56
56
  }
57
- if (!isDark)
57
+ if (!dark)
58
58
  return resolve(event);
59
59
  return resolve(event, {
60
60
  transformPageChunk: ({ html }) => html.replace('class="', 'class="dark ')
@@ -21,6 +21,7 @@
21
21
  }
22
22
 
23
23
  $effect(() => {
24
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions
24
25
  value;
25
26
  autoResize();
26
27
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/basic/Textarea.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAG9D,UAAU,KAAM,SAAQ,cAAc,CAAC,mBAAmB,CAAC;IACvD,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAqCL,QAAA,MAAM,QAAQ;;;WAAwC,CAAC;AACvD,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC5C,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"Textarea.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/basic/Textarea.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAG9D,UAAU,KAAM,SAAQ,cAAc,CAAC,mBAAmB,CAAC;IACvD,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAsCL,QAAA,MAAM,QAAQ;;;WAAwC,CAAC;AACvD,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC5C,eAAe,QAAQ,CAAC"}
@@ -30,7 +30,7 @@
30
30
  </script>
31
31
 
32
32
  <div class={merge('border-surface-300-700 grid grid-cols-3 rounded-full border', clazz)}>
33
- {#each options as { value, icon: Icon, ariaLabel }}
33
+ {#each options as { value, icon: Icon, ariaLabel }, index (index)}
34
34
  {@const selected = value === ColorTheme.theme}
35
35
  <button
36
36
  type="button"
@@ -12,7 +12,7 @@
12
12
 
13
13
  <Input {...props}>
14
14
  {#snippet children(inputProps)}
15
- {@const { name } = props.form.as?.('text')}
15
+ {@const { name } = props.form.as('text')}
16
16
  <TextArea
17
17
  {...inputProps}
18
18
  {name}
@@ -58,14 +58,14 @@
58
58
  onclose={() => {
59
59
  if (closeOnOutsideClick) close();
60
60
  }}
61
+ class={[
62
+ 'flex flex-row justify-start overflow-visible',
63
+ placement === 'left' && '',
64
+ placement === 'right' && 'justify-end'
65
+ ]}
61
66
  >
62
67
  <div
63
- class={merge([
64
- 'bg-surface-50-950 absolute top-0 flex h-full flex-col gap-4 p-4',
65
- placement === 'left' && 'left-0',
66
- placement === 'right' && 'right-0',
67
- clazz
68
- ])}
68
+ class={merge(['bg-surface-50-950 flex h-full flex-col gap-4 p-4', clazz])}
69
69
  onclick={(e) => e.stopPropagation()}
70
70
  in:inTransition|global
71
71
  out:outTransition|global
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/layout/drawer/Drawer.svelte.ts"],"names":[],"mappings":"AAGI,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAGlD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAKtC,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,CAAC;AAE/C,MAAM,MAAM,WAAW,GAAG,eAAe,GAAG;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,8CAA8C;IAC9C,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAwEN,QAAA,MAAM,MAAM;;;;;MAAwC,CAAC;AACrD,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AACxC,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Drawer.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/layout/drawer/Drawer.svelte.ts"],"names":[],"mappings":"AAGI,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAGlD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAKtC,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,CAAC;AAE/C,MAAM,MAAM,WAAW,GAAG,eAAe,GAAG;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,8CAA8C;IAC9C,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAuEN,QAAA,MAAM,MAAM;;;;;MAAwC,CAAC;AACrD,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AACxC,eAAe,MAAM,CAAC"}
@@ -45,8 +45,6 @@
45
45
  dragging = d;
46
46
  column.dragging = d;
47
47
  };
48
-
49
- $inspect(column.width);
50
48
  </script>
51
49
 
52
50
  <div
@@ -1 +1 @@
1
- {"version":3,"file":"ColumnHead.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/table/ColumnHead.svelte.ts"],"names":[],"mappings":"AAKI,OAAO,EAA0B,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAC;AAE9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAOlE,wBAAgB,oBAAoB,IAAI,gBAAgB,CAEvD;AAED,KAAK,KAAK,GAAG;IACT,MAAM,EAAE,gBAAgB,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AA+CN,QAAA,MAAM,UAAU,2CAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"ColumnHead.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/table/ColumnHead.svelte.ts"],"names":[],"mappings":"AAKI,OAAO,EAA0B,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAC;AAE9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAOlE,wBAAgB,oBAAoB,IAAI,gBAAgB,CAEvD;AAED,KAAK,KAAK,GAAG;IACT,MAAM,EAAE,gBAAgB,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AA6CN,QAAA,MAAM,UAAU,2CAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ims360/svelte-ivory",
3
- "version": "0.4.10",
3
+ "version": "0.4.11",
4
4
  "keywords": [
5
5
  "svelte"
6
6
  ],
@@ -119,4 +119,4 @@
119
119
  "@sveltejs/kit": "^2.49.5",
120
120
  "svelte": "^5.46.4"
121
121
  }
122
- }
122
+ }
@@ -50,14 +50,14 @@ class ThemeController {
50
50
  /** Add to hook sequence to enable correct prerendering ot the theme */
51
51
  handle: Handle = ({ event, resolve }) => {
52
52
  const theme = event.cookies.get(COOKIE_THEME_KEY);
53
- let isDark = false;
53
+ let dark;
54
54
  if (theme !== undefined && (theme as ColorThemePreference) !== 'system') {
55
- isDark = theme === 'dark';
55
+ dark = theme === 'dark';
56
56
  } else {
57
- isDark = event.request.headers.get('sec-ch-prefers-color-scheme') === 'dark';
57
+ dark = event.request.headers.get('sec-ch-prefers-color-scheme') === 'dark';
58
58
  }
59
59
 
60
- if (!isDark) return resolve(event);
60
+ if (!dark) return resolve(event);
61
61
 
62
62
  return resolve(event, {
63
63
  transformPageChunk: ({ html }) => html.replace('class="', 'class="dark ')
@@ -21,6 +21,7 @@
21
21
  }
22
22
 
23
23
  $effect(() => {
24
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions
24
25
  value;
25
26
  autoResize();
26
27
  });
@@ -30,7 +30,7 @@
30
30
  </script>
31
31
 
32
32
  <div class={merge('border-surface-300-700 grid grid-cols-3 rounded-full border', clazz)}>
33
- {#each options as { value, icon: Icon, ariaLabel }}
33
+ {#each options as { value, icon: Icon, ariaLabel }, index (index)}
34
34
  {@const selected = value === ColorTheme.theme}
35
35
  <button
36
36
  type="button"
@@ -12,7 +12,7 @@
12
12
 
13
13
  <Input {...props}>
14
14
  {#snippet children(inputProps)}
15
- {@const { name } = props.form.as?.('text')}
15
+ {@const { name } = props.form.as('text')}
16
16
  <TextArea
17
17
  {...inputProps}
18
18
  {name}
@@ -58,14 +58,14 @@
58
58
  onclose={() => {
59
59
  if (closeOnOutsideClick) close();
60
60
  }}
61
+ class={[
62
+ 'flex flex-row justify-start overflow-visible',
63
+ placement === 'left' && '',
64
+ placement === 'right' && 'justify-end'
65
+ ]}
61
66
  >
62
67
  <div
63
- class={merge([
64
- 'bg-surface-50-950 absolute top-0 flex h-full flex-col gap-4 p-4',
65
- placement === 'left' && 'left-0',
66
- placement === 'right' && 'right-0',
67
- clazz
68
- ])}
68
+ class={merge(['bg-surface-50-950 flex h-full flex-col gap-4 p-4', clazz])}
69
69
  onclick={(e) => e.stopPropagation()}
70
70
  in:inTransition|global
71
71
  out:outTransition|global
@@ -45,8 +45,6 @@
45
45
  dragging = d;
46
46
  column.dragging = d;
47
47
  };
48
-
49
- $inspect(column.width);
50
48
  </script>
51
49
 
52
50
  <div