@likable-hair/svelte 0.0.75 → 0.0.77

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.
@@ -1,6 +1,6 @@
1
1
  <script context="module"></script>
2
2
 
3
- <script>export let label = "", placeholder = "", color = null, value = "", disabled = false, variant = 'outlined', width = "100%", height = "50px", maxWidth = undefined, minWidth = undefined, textColor = "black", borderWeight = "2px", borderRadius = "5px", borderColor = null, focusBorderColor = null, focusedBoxShadow = undefined, backgroundColor = null, padding = undefined, paddingLeft = undefined, paddingRight = undefined, paddingBottom = undefined, paddingTop = undefined, fontSize = undefined, type = 'text', readonly = false, inputElement = undefined;
3
+ <script>export let label = "", placeholder = "", color = null, value = "", disabled = false, variant = 'outlined', width = "100%", height = "50px", maxWidth = undefined, minWidth = undefined, textColor = "black", borderWeight = "2px", borderRadius = "5px", borderColor = null, focusBorderColor = null, focusedBoxShadow = undefined, backgroundColor = null, padding = undefined, paddingLeft = undefined, paddingRight = undefined, paddingBottom = undefined, paddingTop = undefined, fontSize = undefined, type = 'text', readonly = false, inputElement = undefined, autocomplete = true;
4
4
  import { v4 as uuidv4 } from 'uuid';
5
5
  import { onMount } from 'svelte';
6
6
  let inputId = uuidv4(), focused = false, legendWidth = 0, labelElement = undefined;
@@ -110,7 +110,7 @@ $: if (!!labelElement) {
110
110
  </style>
111
111
 
112
112
 
113
- <div
113
+ <div
114
114
  style:width={width}
115
115
  style:min-width={minWidth}
116
116
  style:max-width={maxWidth}
@@ -121,12 +121,12 @@ $: if (!!labelElement) {
121
121
  style:--textfield-focus-border-color={focusBorderColor}
122
122
  style:--textfield-legend-width={legendWidth + 'px'}
123
123
  style:--textfield-focused-box-shadow={focusedBoxShadow}
124
- class="input-container"
124
+ class="input-container"
125
125
  class:focused={focused}
126
126
  class:not-focused={!focused}
127
127
  class:texted={focused || !!value}
128
128
  >
129
- <fieldset
129
+ <fieldset
130
130
  aria-hidden="true"
131
131
  style:border-radius={borderRadius}
132
132
  style:background-color={backgroundColor}
@@ -141,12 +141,12 @@ $: if (!!labelElement) {
141
141
  >
142
142
  {#if variant == 'outlined'}
143
143
  <legend class="legend-outlined"></legend>
144
- <label
144
+ <label
145
145
  for={inputId}
146
146
  class="label-outlined"
147
147
  bind:this={labelElement}
148
148
  >{label}</label>
149
- <div
149
+ <div
150
150
  style:display="flex"
151
151
  style:position="relative"
152
152
  style:bottom="8px"
@@ -157,11 +157,12 @@ $: if (!!labelElement) {
157
157
  <slot name="prepend-inner"></slot>
158
158
  </div>
159
159
  {#if type == 'password'}
160
- <input
160
+ <input
161
+ autocomplete={autocomplete ? 'on' : 'new-password'}
161
162
  style:background-color={backgroundColor}
162
163
  style:color={textColor}
163
164
  style:font-size={fontSize}
164
- id={inputId}
165
+ id={inputId}
165
166
  class="input-outlined"
166
167
  type="password"
167
168
  placeholder={placeholder}
@@ -180,11 +181,12 @@ $: if (!!labelElement) {
180
181
  bind:this={inputElement}
181
182
  />
182
183
  {:else if type == 'text'}
183
- <input
184
+ <input
185
+ autocomplete={autocomplete ? 'on' : 'off'}
184
186
  style:background-color={backgroundColor}
185
187
  style:color={textColor}
186
188
  style:font-size={fontSize}
187
- id={inputId}
189
+ id={inputId}
188
190
  class="input-outlined"
189
191
  type="text"
190
192
  placeholder={placeholder}
@@ -231,7 +233,7 @@ $: if (!!labelElement) {
231
233
  </div>
232
234
  </div>
233
235
  {:else if variant == 'boxed'}
234
- <div
236
+ <div
235
237
  style:display="flex"
236
238
  >
237
239
  <div>
@@ -239,6 +241,7 @@ $: if (!!labelElement) {
239
241
  </div>
240
242
  {#if type == 'password'}
241
243
  <input
244
+ autocomplete={autocomplete ? 'on' : 'new-password'}
242
245
  style:background-color={backgroundColor}
243
246
  style:color={textColor}
244
247
  style:font-size={fontSize}
@@ -258,10 +261,10 @@ $: if (!!labelElement) {
258
261
  on:keydown
259
262
  on:keypress
260
263
  on:keyup
261
- bind:this={inputElement}
262
264
  />
263
265
  {:else if type == 'text'}
264
266
  <input
267
+ autocomplete={autocomplete ? 'on' : 'off'}
265
268
  style:background-color={backgroundColor}
266
269
  style:color={textColor}
267
270
  style:font-size={fontSize}
@@ -28,6 +28,7 @@ declare const __propDef: {
28
28
  type?: 'text' | 'password' | 'number';
29
29
  readonly?: boolean;
30
30
  inputElement?: HTMLElement;
31
+ autocomplete?: boolean;
31
32
  };
32
33
  events: {
33
34
  change: Event;
@@ -1,4 +1,4 @@
1
- <script>export let title = undefined, description = undefined, borderColor = "#B8B8B8", iconColor = "#8D8D8D", borderWidth = '1px', maxWidth = undefined, maxHeight = undefined, minWidth = undefined, minHeight = undefined, width = 'fit-content', height = undefined;
1
+ <script>export let title = undefined, description = undefined, borderColor = "#B8B8B8", iconColor = "#8D8D8D", iconSize = 40, iconName = 'mdi-file', borderWidth = '1px', maxWidth = undefined, maxHeight = undefined, minWidth = undefined, minHeight = undefined, width = 'fit-content', height = undefined;
2
2
  import Icon from './Icon.svelte';
3
3
  import Card from '../common/Card.svelte';
4
4
  </script>
@@ -31,10 +31,11 @@ import Card from '../common/Card.svelte';
31
31
  <div
32
32
  style:display="flex"
33
33
  style:align-items="center"
34
+ style:gap="10px"
34
35
  >
35
36
  <Icon
36
- name="mdi-file"
37
- size={40}
37
+ name={iconName}
38
+ size={iconSize}
38
39
  color={iconColor}
39
40
  ></Icon>
40
41
  <div
@@ -5,6 +5,8 @@ declare const __propDef: {
5
5
  description?: string;
6
6
  borderColor?: string;
7
7
  iconColor?: string;
8
+ iconSize?: number;
9
+ iconName?: string;
8
10
  borderWidth?: string;
9
11
  maxWidth?: string;
10
12
  maxHeight?: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@likable-hair/svelte",
3
3
  "description": "A Svelte component for likablehair",
4
- "version": "0.0.75",
4
+ "version": "0.0.77",
5
5
  "devDependencies": {
6
6
  "@sveltejs/adapter-auto": "next",
7
7
  "@sveltejs/kit": "next",