@hyvor/design 2.0.0-beta.1 → 2.0.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.
Files changed (61) hide show
  1. package/README.md +9 -0
  2. package/dist/cloud/HyvorBar/BarProducts/BarProducts.svelte +1 -4
  3. package/dist/cloud/HyvorBar/BarUpdatesList.svelte +1 -3
  4. package/dist/cloud/HyvorBar/HyvorBar.svelte +0 -2
  5. package/dist/cloud/HyvorBar/bar.d.ts +1 -1
  6. package/dist/cloud/OrganizationMembers/OrganizationMembersSearch.svelte +1 -4
  7. package/dist/cloud/ResourceCreator/Accordian.svelte +2 -4
  8. package/dist/components/Accordion/Accordion.svelte +134 -134
  9. package/dist/components/ActionList/ActionList.svelte +2 -8
  10. package/dist/components/ActionList/ActionListGroup.svelte +1 -5
  11. package/dist/components/ActionList/ActionListItem.svelte +7 -7
  12. package/dist/components/Button/Button.svelte +2 -12
  13. package/dist/components/CodeBlock/CodeBlock.svelte +45 -28
  14. package/dist/components/CodeBlock/CodeBlock.svelte.d.ts +2 -3
  15. package/dist/components/CodeBlock/TabbedCodeBlock.svelte +60 -64
  16. package/dist/components/CodeBlock/TabbedCodeBlock.svelte.d.ts +1 -1
  17. package/dist/components/CodeBlock/getCode.d.ts +3 -1
  18. package/dist/components/CodeBlock/getCode.js +33 -50
  19. package/dist/components/ColorPicker/ColorPicker.svelte +1 -1
  20. package/dist/components/Dark/DarkProvider.svelte +1 -1
  21. package/dist/components/DetailCard/DetailCard.svelte +43 -46
  22. package/dist/components/DetailCard/DetailCard.svelte.d.ts +1 -1
  23. package/dist/components/DetailCard/DetailCards.svelte +13 -16
  24. package/dist/components/DetailCard/DetailCards.svelte.d.ts +1 -1
  25. package/dist/components/Dropdown/DropdownContent.svelte +1 -2
  26. package/dist/components/EmojiPicker/EmojiSelector.svelte +3 -14
  27. package/dist/components/EmojiPicker/emojidata.js +3 -3
  28. package/dist/components/FileUploader/Preview/Preview.svelte +1 -1
  29. package/dist/components/FileUploader/TabUpload/TabUpload.svelte +2 -4
  30. package/dist/components/FileUploader/file-uploader.js +5 -10
  31. package/dist/components/FileUploader/helpers.js +1 -1
  32. package/dist/components/IconButton/IconButton.svelte +2 -10
  33. package/dist/components/IconMessage/IconMessage.svelte +29 -44
  34. package/dist/components/Internationalization/LanguageToggle.svelte +2 -2
  35. package/dist/components/Internationalization/T.svelte +2 -9
  36. package/dist/components/Internationalization/i18n.js +3 -1
  37. package/dist/components/Loader/Loader.svelte +1 -3
  38. package/dist/components/Modal/ConfirmModalProvider.svelte +1 -3
  39. package/dist/components/Modal/Modal.svelte +16 -12
  40. package/dist/components/TabNav/TabNav.svelte +0 -2
  41. package/dist/components/TextInput/TextInput.svelte +29 -52
  42. package/dist/components/TextInput/TextInput.svelte.d.ts +5 -3
  43. package/dist/components/Textarea/Textarea.svelte +84 -98
  44. package/dist/index.css +4 -4
  45. package/dist/legacy.js +2 -2
  46. package/dist/marketing/Affiliate/Affiliate.svelte +53 -51
  47. package/dist/marketing/Container/Container.svelte +4 -5
  48. package/dist/marketing/Docs/Nav/Nav.svelte +1 -2
  49. package/dist/marketing/Footer/Footer.svelte +2 -2
  50. package/dist/marketing/Header/Header.svelte +131 -140
  51. package/dist/marketing/Header/Header.svelte.d.ts +3 -1
  52. package/dist/marketing/Header/HeaderNotification.svelte +64 -0
  53. package/dist/marketing/Header/HeaderNotification.svelte.d.ts +7 -0
  54. package/dist/marketing/cloud.d.ts +1 -0
  55. package/dist/marketing/cloud.js +15 -0
  56. package/dist/marketing/track/track.d.ts +0 -1
  57. package/dist/marketing/track/track.js +3 -6
  58. package/dist/variables.scss +1 -1
  59. package/package.json +24 -22
  60. package/dist/components/CodeBlock/hljs.scss +0 -228
  61. package/dist/components/CodeBlock/prism.scss +0 -375
@@ -40,20 +40,11 @@
40
40
  ...rest
41
41
  }: Props = $props();
42
42
 
43
- // export let size: 'small' | 'medium' | 'large' = 'medium';
44
-
45
- // export let icon: ComponentType | null = null;
46
- // export let message: string | null = null;
47
-
48
- // export let iconSize: number | undefined = undefined;
49
43
  const iconsSizes = {
50
44
  small: 35,
51
45
  medium: 50,
52
46
  large: 75
53
47
  };
54
- iconSize = iconSize || iconsSizes[size];
55
-
56
- // export let padding: number | undefined = undefined;
57
48
 
58
49
  const paddings = {
59
50
  small: 15,
@@ -61,36 +52,31 @@
61
52
  large: 60
62
53
  };
63
54
 
64
- padding = padding === undefined ? paddings[size] : padding;
65
-
66
- //console.log(icon?.prototype);
67
- // $inspect(icon?.prototype, icon?);
68
-
69
- // export let empty: boolean = false;
70
- // export let error: boolean = false;
71
-
72
- // export let iconColor: string | null = null;
73
-
74
- if (empty) {
75
- message = message || 'No results found';
76
- icon = IconInbox;
77
- }
78
-
79
- if (error) {
80
- message = message || 'Something went wrong';
81
- icon = IconBug;
82
- iconColor = iconColor || 'var(--gray-dark)';
83
- }
55
+ const config = $derived.by(() => {
56
+ const ret = {
57
+ padding: padding === undefined ? paddings[size] : padding,
58
+ message,
59
+ icon,
60
+ iconSize: iconSize || iconsSizes[size],
61
+ iconColor
62
+ };
63
+
64
+ if (!ret.message) {
65
+ if (empty) ret.message = 'No results found';
66
+ if (error) ret.message = 'Something went wrong';
67
+ }
84
68
 
85
- const Icon = icon;
69
+ if (!ret.icon) {
70
+ if (empty) ret.icon = IconInbox;
71
+ if (error) ret.icon = IconBug;
72
+ }
86
73
 
87
- iconColor = iconColor || 'var(--gray-dark)';
74
+ if (!ret.iconColor) {
75
+ ret.iconColor = 'var(--gray-dark)';
76
+ }
88
77
 
89
- // export let cta: {
90
- // text: string;
91
- // onClick: (e: MouseEvent) => void;
92
- // props?: Record<string, any>;
93
- // } | null = null;
78
+ return ret;
79
+ });
94
80
 
95
81
  function onCtaClick(e: MouseEvent) {
96
82
  if (cta && typeof cta === 'object') {
@@ -99,18 +85,18 @@
99
85
  }
100
86
  </script>
101
87
 
102
- <div class="icon-message {size}" style:padding={padding + 'px'}>
103
- <div class="icon" style:color={iconColor} {...rest}>
104
- <Icon size={iconSize + 'px'} />
88
+ <div class="icon-message {size}" style:padding={config.padding + 'px'}>
89
+ <div class="icon" style:color={config.iconColor} {...rest}>
90
+ <config.icon size={config.iconSize + 'px'} />
105
91
  </div>
106
92
 
107
93
  <div class="message">
108
94
  {#if children}
109
95
  {@render children()}
110
- {:else if typeof message === 'string'}
111
- {message}
112
- {:else if message}
113
- {@render message()}
96
+ {:else if typeof config.message === 'string'}
97
+ {config.message}
98
+ {:else if config.message}
99
+ {@render config.message()}
114
100
  {/if}
115
101
  </div>
116
102
 
@@ -146,7 +132,6 @@
146
132
  }
147
133
 
148
134
  .message {
149
- /* Add message styles here */
150
135
  color: var(--text-light);
151
136
  margin-top: 10px;
152
137
  }
@@ -26,7 +26,7 @@
26
26
  icon = false,
27
27
  size = 'medium',
28
28
  staticPage = false,
29
- goto,
29
+ goto
30
30
  }: Props = $props();
31
31
 
32
32
  const i18n = getContext<InternationalizationService>('i18n');
@@ -45,7 +45,7 @@
45
45
  }
46
46
  const url = new URL(window.location.href);
47
47
  url.pathname = url.pathname.replace(`/${currentLocale}`, `/${language.code}`);
48
-
48
+
49
49
  if (goto) {
50
50
  goto(url.toString());
51
51
  } else {
@@ -57,10 +57,7 @@
57
57
  };
58
58
  hasComponentParams = true;
59
59
  } else if (value.hasOwnProperty('element')) {
60
- newValue = getElementFunc(
61
- (value as any).element as string,
62
- (value as any).props || {}
63
- );
60
+ newValue = getElementFunc((value as any).element as string, (value as any).props || {});
64
61
  }
65
62
  } else {
66
63
  newValue = value as PrimitiveType;
@@ -91,11 +88,7 @@
91
88
  newValue = (chunks: string | string[]) => {
92
89
  const children = typeof chunks === 'string' ? chunks : chunks.join('');
93
90
  const id =
94
- key +
95
- '-' +
96
- Math.random().toString(36).substring(7) +
97
- '-' +
98
- Date.now().toString();
91
+ key + '-' + Math.random().toString(36).substring(7) + '-' + Date.now().toString();
99
92
  componentBindings.set(id, {
100
93
  component: component!,
101
94
  props: {
@@ -28,7 +28,9 @@ export class InternationalizationService {
28
28
  this.register(language);
29
29
  }
30
30
  const localeStorageLocale = InternationalizationService.getLocaleFromLocalStorage();
31
- const browserLocale = typeof navigator !== "undefined" ? InternationalizationService.getClosestLanguageCode(navigator.language, this.languages.map((l) => l.code)) : null;
31
+ const browserLocale = typeof navigator !== 'undefined'
32
+ ? InternationalizationService.getClosestLanguageCode(navigator.language, this.languages.map((l) => l.code))
33
+ : null;
32
34
  if (forceLanguage) {
33
35
  this.setLocale(forceLanguage);
34
36
  }
@@ -1,6 +1,4 @@
1
1
  <script lang="ts">
2
- import { run } from 'svelte/legacy';
3
-
4
2
  import IconCheckCircleFill from '@hyvor/icons/IconCheckCircleFill';
5
3
  import IconXCircleFill from '@hyvor/icons/IconXCircleFill';
6
4
 
@@ -58,7 +56,7 @@
58
56
  large: 250
59
57
  };
60
58
  padding = typeof padding === 'number' ? padding : paddings[padding];
61
- run(() => {
59
+ $effect(() => {
62
60
  if (duration && (state === 'success' || state === 'error')) {
63
61
  setTimeout(() => {
64
62
  state = 'none';
@@ -1,6 +1,4 @@
1
1
  <script lang="ts">
2
- import { run } from 'svelte/legacy';
3
-
4
2
  import Modal from './Modal.svelte';
5
3
  import { confirmStore } from './confirm.js';
6
4
  import Button from './../Button/Button.svelte';
@@ -16,7 +14,7 @@
16
14
  $confirmStore!.onConfirm();
17
15
  }
18
16
 
19
- run(() => {
17
+ $effect(() => {
20
18
  if (!show) {
21
19
  handleCancel();
22
20
  show = true;
@@ -1,8 +1,6 @@
1
- <!-- @migration-task Error while migrating Svelte code: This migration would change the name of a slot making the component unusable -->
2
1
  <script lang="ts">
3
2
  import ModalFooter from './ModalFooter.svelte';
4
3
  import type { Footer } from './modal-types.js';
5
- import { clickOutside } from '../directives/clickOutside.js';
6
4
  import IconX from '@hyvor/icons/IconX';
7
5
  import IconButton from './../IconButton/IconButton.svelte';
8
6
  import { fade, scale } from 'svelte/transition';
@@ -69,6 +67,13 @@
69
67
  show;
70
68
  setFlex();
71
69
  });
70
+
71
+ function handleClose(e: MouseEvent) {
72
+ // close only when clicking directy on backdrop (not inner content)
73
+ if (closeOnOutsideClick && !loading && e.target === e.currentTarget) {
74
+ handleCancel();
75
+ }
76
+ }
72
77
  </script>
73
78
 
74
79
  <svelte:window
@@ -80,13 +85,16 @@
80
85
  />
81
86
 
82
87
  {#if show}
83
- <div class="wrap" bind:this={wrapEl} in:fade={{ duration: 100 }} out:fade={{ duration: 100 }}>
88
+ <div
89
+ role="presentation"
90
+ class="wrap"
91
+ bind:this={wrapEl}
92
+ in:fade={{ duration: 100 }}
93
+ out:fade={{ duration: 100 }}
94
+ onclick={(e) => handleClose(e)}
95
+ >
84
96
  <div
85
97
  class="inner {size}"
86
- use:clickOutside={{
87
- enabled: closeOnOutsideClick,
88
- callback: () => (!loading ? handleCancel() : null)
89
- }}
90
98
  in:scale={{ duration: 100, start: 0.9, opacity: 0.9 }}
91
99
  out:scale={{ duration: 100, start: 0.9, opacity: 0.9 }}
92
100
  bind:this={innerEl}
@@ -105,11 +113,7 @@
105
113
  </div>
106
114
 
107
115
  <div class="close-wrap">
108
- <IconButton
109
- variant="invisible"
110
- on:click={handleCancel}
111
- aria-label="Close modal"
112
- >
116
+ <IconButton variant="invisible" on:click={handleCancel} aria-label="Close modal">
113
117
  <IconX size={25} />
114
118
  </IconButton>
115
119
  </div>
@@ -1,6 +1,4 @@
1
1
  <script lang="ts">
2
- import { run } from 'svelte/legacy';
3
-
4
2
  import { onMount, setContext } from 'svelte';
5
3
  import { writable } from 'svelte/store';
6
4
 
@@ -1,14 +1,21 @@
1
1
  <script lang="ts">
2
- interface Props {
2
+ import { legacyHandlers } from '../../legacy.js';
3
+ import type { Snippet } from 'svelte';
4
+ import type { HTMLInputAttributes } from 'svelte/elements';
5
+ import { createBubbler } from 'svelte/legacy';
6
+
7
+ const bubble = createBubbler();
8
+
9
+ interface Props extends HTMLInputAttributes {
3
10
  state?: 'default' | 'error' | 'success' | 'warning';
4
- size?: 'small' | 'medium' | 'large' | 'x-small';
11
+ size?: 'small' | 'medium' | 'large' | 'x-small' | any;
5
12
  block?: boolean;
6
13
  value?: any;
7
14
  input?: HTMLInputElement;
8
15
  start?: import('svelte').Snippet;
9
16
  end?: import('svelte').Snippet;
10
- select?: boolean;
11
17
  selectInput?: HTMLSelectElement;
18
+ children?: Snippet;
12
19
  [key: string]: any;
13
20
 
14
21
  onkeyup?: (event: KeyboardEvent) => void;
@@ -32,8 +39,8 @@
32
39
  input = $bindable(),
33
40
  start,
34
41
  end,
35
- select = false,
36
42
  selectInput = $bindable({} as HTMLSelectElement),
43
+ children,
37
44
 
38
45
  onkeyup,
39
46
  onkeydown,
@@ -45,9 +52,7 @@
45
52
  onmouseenter,
46
53
  onmouseleave,
47
54
  onchange,
48
- oninput,
49
-
50
- ...rest
55
+ oninput
51
56
  }: Props = $props();
52
57
  </script>
53
58
 
@@ -58,43 +63,21 @@
58
63
  </span>
59
64
  {/if}
60
65
 
61
- {#if select}
62
- <select
63
- {...rest}
64
- bind:value
65
- bind:this={selectInput}
66
- {onkeyup}
67
- {onkeydown}
68
- {onkeypress}
69
- {onfocus}
70
- {onblur}
71
- {onclick}
72
- {onmouseover}
73
- {onmouseenter}
74
- {onmouseleave}
75
- {onchange}
76
- {oninput}
77
- >
78
- {@render rest?.children()}
79
- </select>
80
- {:else}
81
- <input
82
- {...rest}
83
- bind:value
84
- bind:this={input}
85
- {onkeyup}
86
- {onkeydown}
87
- {onkeypress}
88
- {onfocus}
89
- {onblur}
90
- {onclick}
91
- {onmouseover}
92
- {onmouseenter}
93
- {onmouseleave}
94
- {onchange}
95
- {oninput}
96
- />
97
- {/if}
66
+ <input
67
+ bind:value
68
+ bind:this={input}
69
+ onkeyup={legacyHandlers(onkeyup, bubble('keyup'))}
70
+ onkeydown={legacyHandlers(onkeydown, bubble('keydown'))}
71
+ onkeypress={legacyHandlers(onkeypress, bubble('keypress'))}
72
+ onfocus={legacyHandlers(onfocus, bubble('focus'))}
73
+ onblur={legacyHandlers(onblur, bubble('blur'))}
74
+ onclick={legacyHandlers(onclick, bubble('click'))}
75
+ onmouseover={legacyHandlers(onmouseover, bubble('mouseover'))}
76
+ onmouseenter={legacyHandlers(onmouseenter, bubble('mouseenter'))}
77
+ onmouseleave={legacyHandlers(onmouseleave, bubble('mouseleave'))}
78
+ onchange={legacyHandlers(onchange, bubble('change'))}
79
+ oninput={legacyHandlers(oninput, bubble('input'))}
80
+ />
98
81
 
99
82
  {#if end}
100
83
  <span class="slot end">
@@ -136,8 +119,7 @@
136
119
  width: 100%;
137
120
  }
138
121
 
139
- input,
140
- select {
122
+ input {
141
123
  flex: 1;
142
124
  width: 100%;
143
125
  border: none;
@@ -149,15 +131,10 @@ select {
149
131
  color: inherit;
150
132
  height: 100%;
151
133
  }
152
- input:focus,
153
- select:focus {
134
+ input:focus {
154
135
  outline: none;
155
136
  }
156
137
 
157
- select {
158
- min-width: 180px;
159
- }
160
-
161
138
  .input-wrap.size-x-small {
162
139
  padding: 0 15px;
163
140
  height: 20px;
@@ -1,13 +1,15 @@
1
- interface Props {
1
+ import type { Snippet } from 'svelte';
2
+ import type { HTMLInputAttributes } from 'svelte/elements';
3
+ interface Props extends HTMLInputAttributes {
2
4
  state?: 'default' | 'error' | 'success' | 'warning';
3
- size?: 'small' | 'medium' | 'large' | 'x-small';
5
+ size?: 'small' | 'medium' | 'large' | 'x-small' | any;
4
6
  block?: boolean;
5
7
  value?: any;
6
8
  input?: HTMLInputElement;
7
9
  start?: import('svelte').Snippet;
8
10
  end?: import('svelte').Snippet;
9
- select?: boolean;
10
11
  selectInput?: HTMLSelectElement;
12
+ children?: Snippet;
11
13
  [key: string]: any;
12
14
  onkeyup?: (event: KeyboardEvent) => void;
13
15
  onkeydown?: (event: KeyboardEvent) => void;
@@ -28,18 +28,7 @@
28
28
  }: Props = $props();
29
29
  </script>
30
30
 
31
- <span
32
- class="input-wrap state-{state}"
33
- class:block
34
- onclick={() => textarea.focus()}
35
- onkeydown={(e) => {
36
- if (e.key === 'Enter') {
37
- textarea.focus();
38
- }
39
- }}
40
- role="textbox"
41
- tabindex="0"
42
- >
31
+ <div class="textarea-container" class:block>
43
32
  {#if start}
44
33
  <span class="slot start">
45
34
  {@render start?.()}
@@ -60,6 +49,7 @@
60
49
  onmouseleave={bubble('mouseleave')}
61
50
  onchange={bubble('change')}
62
51
  oninput={bubble('input')}
52
+ class="state-{state}"
63
53
  {rows}
64
54
  {cols}
65
55
  {...rest}
@@ -70,89 +60,85 @@
70
60
  {@render end?.()}
71
61
  </span>
72
62
  {/if}
73
- </span>
74
-
75
- <style>.input-wrap {
76
- padding: 10px 15px;
77
- background-color: var(--input);
78
- transition: 0.2s box-shadow;
79
- font-family: inherit;
80
- font-size: 14px;
81
- border-radius: 20px;
82
- border: none;
83
- transition: 0.2s box-shadow;
84
- max-width: 100%;
85
- color: inherit;
86
- display: inline-flex;
87
- resize: vertical;
88
- overflow: auto;
89
- align-items: flex-start;
90
- justify-content: center;
91
- }
92
- .input-wrap:focus-within {
93
- outline: 0;
94
- box-shadow: 0 0 0 var(--local-shadow-size) var(--accent-light);
95
- }
96
- .input-wrap {
97
- --local-shadow-size: 2px;
98
- }
99
-
100
- .input-wrap.block {
101
- display: block;
102
- width: 100%;
103
- resize: vertical;
104
- }
105
-
106
- .input-wrap:focus-visible {
107
- outline: 0;
108
- }
109
-
110
- .input-wrap.state-error {
111
- box-shadow: 0 0 0 var(--local-shadow-size) var(--red-light);
112
- }
113
- .input-wrap.state-error:focus-within {
114
- box-shadow: 0 0 0 calc(var(--local-shadow-size) + 1px) var(--red-light);
115
- }
116
-
117
- .input-wrap.state-success {
118
- box-shadow: 0 0 0 2px var(--green-light);
119
- }
120
- .input-wrap.state-success:focus-within {
121
- box-shadow: 0 0 0 calc(var(--local-shadow-size) + 1px) var(--green-light);
122
- }
123
-
124
- .input-wrap.state-warning {
125
- box-shadow: 0 0 0 2px var(--orange-light);
126
- }
127
- .input-wrap.state-warning:focus-within {
128
- box-shadow: 0 0 0 calc(var(--local-shadow-size) + 1px) var(--orange-light);
129
- }
130
-
131
- .input-wrap .slot {
132
- padding: 0 10px;
133
- }
134
-
135
- .input-wrap .slot.start {
136
- margin-right: 10px;
137
- }
138
-
139
- .input-wrap .slot.end {
140
- margin-left: 10px;
141
- }
142
-
143
- .input-wrap textarea {
144
- flex: 1;
145
- width: 100%;
146
- border: none;
147
- font-family: inherit;
148
- font-size: inherit;
149
- background: transparent;
150
- padding: 0;
151
- margin: 0;
152
- }
153
- .input-wrap textarea:focus {
154
- outline: none;
155
- }
156
- .input-wrap textarea {
157
- resize: none;
158
- }</style>
63
+ </div>
64
+
65
+ <style>
66
+ .textarea-container {
67
+ position: relative;
68
+ display: inline-block;
69
+ max-width: 100%;
70
+
71
+ &.block {
72
+ display: block;
73
+ width: 100%;
74
+ }
75
+ }
76
+
77
+ textarea {
78
+ padding: 10px 15px;
79
+ background-color: var(--input);
80
+ font-family: inherit;
81
+ font-size: 14px;
82
+ border-radius: 20px;
83
+ border-bottom-right-radius: 0;
84
+ border: none;
85
+ transition: 0.2s box-shadow;
86
+ width: 100%;
87
+ color: inherit;
88
+ resize: vertical;
89
+ box-sizing: border-box;
90
+
91
+ &:focus {
92
+ outline: 0;
93
+ box-shadow: 0 0 0 var(--local-shadow-size) var(--accent-light);
94
+ }
95
+
96
+ --local-shadow-size: 2px;
97
+
98
+ &.state-error {
99
+ box-shadow: 0 0 0 var(--local-shadow-size) var(--red-light);
100
+ &:focus {
101
+ box-shadow: 0 0 0 calc(var(--local-shadow-size) + 1px) var(--red-light);
102
+ }
103
+ }
104
+
105
+ &.state-success {
106
+ box-shadow: 0 0 0 2px var(--green-light);
107
+ &:focus {
108
+ box-shadow: 0 0 0 calc(var(--local-shadow-size) + 1px) var(--green-light);
109
+ }
110
+ }
111
+
112
+ &.state-warning {
113
+ box-shadow: 0 0 0 2px var(--orange-light);
114
+ &:focus {
115
+ box-shadow: 0 0 0 calc(var(--local-shadow-size) + 1px) var(--orange-light);
116
+ }
117
+ }
118
+ }
119
+
120
+ .start ~ textarea {
121
+ padding-left: 45px;
122
+ }
123
+
124
+ .end ~ textarea {
125
+ padding-right: 45px;
126
+ }
127
+
128
+ .slot {
129
+ position: absolute;
130
+ top: 10px;
131
+ pointer-events: none;
132
+ display: flex;
133
+ align-items: center;
134
+ z-index: 1;
135
+
136
+ &.start {
137
+ left: 15px;
138
+ }
139
+
140
+ &.end {
141
+ right: 15px;
142
+ }
143
+ }
144
+ </style>
package/dist/index.css CHANGED
@@ -51,10 +51,10 @@ a {
51
51
  }
52
52
 
53
53
  .hds-container-max {
54
- width: 1400px;
55
- max-width: 100%;
56
- padding: 0 15px;
57
- margin: auto;
54
+ width: 1400px;
55
+ max-width: 100%;
56
+ padding: 0 15px;
57
+ margin: auto;
58
58
  }
59
59
 
60
60
  .hds-link {
package/dist/legacy.js CHANGED
@@ -1,8 +1,8 @@
1
- import { handlers } from "svelte/legacy";
1
+ import { handlers } from 'svelte/legacy';
2
2
  /**
3
3
  * Extends svelte4 handlers to support undefined
4
4
  */
5
5
  export function legacyHandlers(...eventHandlers) {
6
- const all = eventHandlers.filter(h => h !== undefined);
6
+ const all = eventHandlers.filter((h) => h !== undefined);
7
7
  return handlers(...all);
8
8
  }