@placeholderco/placeholder-ui 2.5.3 → 2.5.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.
@@ -88,7 +88,7 @@
88
88
 
89
89
  <div class="avatar-container {classes}">
90
90
  {#if onClick}
91
- <button onclick={onClick}>
91
+ <button type="button" onclick={onClick}>
92
92
  {@render img()}
93
93
  </button>
94
94
  {:else if href}
@@ -84,6 +84,7 @@
84
84
  <div class="color-preset-grid">
85
85
  {#each brandColors as swatch}
86
86
  <button
87
+ type="button"
87
88
  class="color-preset"
88
89
  style="background: {swatch.value}"
89
90
  onclick={() => applyColor(swatch.value)}
@@ -97,6 +98,7 @@
97
98
  <div class="color-section-title">Common Colors</div>
98
99
  <div class="color-preset-grid">
99
100
  <button
101
+ type="button"
100
102
  class="color-preset"
101
103
  style="background: #000000"
102
104
  onclick={() => applyColor('#000000')}
@@ -104,6 +106,7 @@
104
106
  aria-label="Black"
105
107
  ></button>
106
108
  <button
109
+ type="button"
107
110
  class="color-preset"
108
111
  style="background: #495057"
109
112
  onclick={() => applyColor('#495057')}
@@ -111,6 +114,7 @@
111
114
  aria-label="Gray"
112
115
  ></button>
113
116
  <button
117
+ type="button"
114
118
  class="color-preset"
115
119
  style="background: #fa5252"
116
120
  onclick={() => applyColor('#fa5252')}
@@ -118,6 +122,7 @@
118
122
  aria-label="Red"
119
123
  ></button>
120
124
  <button
125
+ type="button"
121
126
  class="color-preset"
122
127
  style="background: #ff922b"
123
128
  onclick={() => applyColor('#ff922b')}
@@ -125,6 +130,7 @@
125
130
  aria-label="Orange"
126
131
  ></button>
127
132
  <button
133
+ type="button"
128
134
  class="color-preset"
129
135
  style="background: #fcc419"
130
136
  onclick={() => applyColor('#fcc419')}
@@ -132,6 +138,7 @@
132
138
  aria-label="Yellow"
133
139
  ></button>
134
140
  <button
141
+ type="button"
135
142
  class="color-preset"
136
143
  style="background: #51cf66"
137
144
  onclick={() => applyColor('#51cf66')}
@@ -139,6 +146,7 @@
139
146
  aria-label="Green"
140
147
  ></button>
141
148
  <button
149
+ type="button"
142
150
  class="color-preset"
143
151
  style="background: #22b8cf"
144
152
  onclick={() => applyColor('#22b8cf')}
@@ -146,6 +154,7 @@
146
154
  aria-label="Cyan"
147
155
  ></button>
148
156
  <button
157
+ type="button"
149
158
  class="color-preset"
150
159
  style="background: #228be6"
151
160
  onclick={() => applyColor('#228be6')}
@@ -153,6 +162,7 @@
153
162
  aria-label="Blue"
154
163
  ></button>
155
164
  <button
165
+ type="button"
156
166
  class="color-preset"
157
167
  style="background: #9775fa"
158
168
  onclick={() => applyColor('#9775fa')}
@@ -160,6 +170,7 @@
160
170
  aria-label="Purple"
161
171
  ></button>
162
172
  <button
173
+ type="button"
163
174
  class="color-preset"
164
175
  style="background: #f06595"
165
176
  onclick={() => applyColor('#f06595')}
@@ -175,7 +186,12 @@
175
186
  class="color-input"
176
187
  title="Custom Color"
177
188
  />
178
- <button onclick={removeColor} class="color-remove-button" title="Remove Color">
189
+ <button
190
+ type="button"
191
+ onclick={removeColor}
192
+ class="color-remove-button"
193
+ title="Remove Color"
194
+ >
179
195
  Clear
180
196
  </button>
181
197
  </div>
@@ -99,9 +99,11 @@
99
99
  placeholder="Enter URL"
100
100
  class="link-input"
101
101
  />
102
- <button onclick={setLink} class="link-submit-button" title="Apply">✓</button>
102
+ <button type="button" onclick={setLink} class="link-submit-button" title="Apply">✓</button>
103
103
  {#if editor.isActive('link')}
104
- <button onclick={removeLink} class="link-remove-button" title="Remove Link">✕</button>
104
+ <button type="button" onclick={removeLink} class="link-remove-button" title="Remove Link"
105
+ >✕</button
106
+ >
105
107
  {/if}
106
108
  </div>
107
109
  <label class="link-checkbox-label">
@@ -80,6 +80,7 @@
80
80
  {#each options as option, index}
81
81
  {@const localClasses = [selectedIndex === index ? 'selected p-2' : 'p-2']}
82
82
  <button
83
+ type="button"
83
84
  class="combobox-item {localClasses} {option.class}"
84
85
  class:selected={selectedIndex === index}
85
86
  onclick={() => {
@@ -108,6 +108,7 @@
108
108
  localIndex}
109
109
  {@const localClasses = [selectedIndex === globalIndex ? 'selected p-2' : 'p-2']}
110
110
  <button
111
+ type="button"
111
112
  class="combobox-item {localClasses.join(' ')} {option.class}"
112
113
  role="option"
113
114
  aria-selected={selectedIndex === globalIndex}
@@ -336,7 +336,7 @@
336
336
  size="1.5rem"
337
337
  onclick={() => incrementYearRange(-1)}
338
338
  />
339
- <button class="month-label clickable" onclick={toggleYearPicker}>
339
+ <button type="button" class="month-label clickable" onclick={toggleYearPicker}>
340
340
  {yearRangeStart} - {yearRangeStart + yearRangeSize - 1}
341
341
  </button>
342
342
  <ActionIcon
@@ -350,7 +350,7 @@
350
350
  size="1.5rem"
351
351
  onclick={() => incrementFocusedMonth(-1)}
352
352
  />
353
- <button class="month-label clickable" onclick={toggleYearPicker}>
353
+ <button type="button" class="month-label clickable" onclick={toggleYearPicker}>
354
354
  {focusedMonth.format('MMMM YYYY')}
355
355
  </button>
356
356
  <ActionIcon
@@ -365,6 +365,7 @@
365
365
  <div class="year-grid">
366
366
  {#each getYearRange() as year}
367
367
  <button
368
+ type="button"
368
369
  class="year-button"
369
370
  class:selected={focusedMonth.year() === year}
370
371
  class:current-year={todayDate.year() === year}
@@ -387,6 +388,7 @@
387
388
  <div class="days-grid">
388
389
  {#each calculateDays(selectedDate, focusedMonth) as day, i (i)}
389
390
  <button
391
+ type="button"
390
392
  class="day-button {buildDayClasses(day)}"
391
393
  disabled={day.isDisabled}
392
394
  onclick={(e) => handleDateChangeClick(e, day.date, day.isDisabled)}
@@ -342,7 +342,7 @@
342
342
  size="1.5rem"
343
343
  onclick={() => incrementYearRange(-1)}
344
344
  />
345
- <button class="month-label clickable" onclick={toggleYearPicker}>
345
+ <button type="button" class="month-label clickable" onclick={toggleYearPicker}>
346
346
  {yearRangeStart} – {yearRangeStart + yearRangeSize - 1}
347
347
  </button>
348
348
  <ActionIcon
@@ -356,7 +356,7 @@
356
356
  size="1.5rem"
357
357
  onclick={() => incrementFocusedMonth(-1)}
358
358
  />
359
- <button class="month-label clickable" onclick={toggleYearPicker}>
359
+ <button type="button" class="month-label clickable" onclick={toggleYearPicker}>
360
360
  {focusedMonth.format('MMMM YYYY')}
361
361
  </button>
362
362
  <ActionIcon
@@ -375,6 +375,7 @@
375
375
  <div class="year-grid">
376
376
  {#each getYearRange() as year}
377
377
  <button
378
+ type="button"
378
379
  class="year-button"
379
380
  class:selected={focusedMonth.year() === year}
380
381
  class:current-year={todayDate.year() === year}
@@ -408,6 +409,7 @@
408
409
  }}
409
410
  >
410
411
  <button
412
+ type="button"
411
413
  class={buildButtonClasses(d)}
412
414
  disabled={d.isDisabled}
413
415
  onclick={(e) => handleDayClick(d, e)}
@@ -331,7 +331,7 @@
331
331
  size="1.5rem"
332
332
  onclick={() => incrementYearRange(-1)}
333
333
  />
334
- <button class="month-label clickable" onclick={toggleYearPicker}>
334
+ <button type="button" class="month-label clickable" onclick={toggleYearPicker}>
335
335
  {yearRangeStart} - {yearRangeStart + yearRangeSize - 1}
336
336
  </button>
337
337
  <ActionIcon
@@ -345,7 +345,7 @@
345
345
  size="1.5rem"
346
346
  onclick={() => incrementFocusedMonth(-1)}
347
347
  />
348
- <button class="month-label clickable" onclick={toggleYearPicker}>
348
+ <button type="button" class="month-label clickable" onclick={toggleYearPicker}>
349
349
  {focusedMonth.format('MMMM YYYY')}
350
350
  </button>
351
351
  <ActionIcon
@@ -360,6 +360,7 @@
360
360
  <div class="year-grid">
361
361
  {#each getYearRange() as year}
362
362
  <button
363
+ type="button"
363
364
  class="year-button"
364
365
  class:selected={focusedMonth.year() === year}
365
366
  class:current-year={todayDate.year() === year}
@@ -382,6 +383,7 @@
382
383
  <div class="days-grid">
383
384
  {#each calculateDays(selectedDate, focusedMonth) as day, i (i)}
384
385
  <button
386
+ type="button"
385
387
  class="day-button {buildDayClasses(day)}"
386
388
  disabled={day.isDisabled}
387
389
  onclick={(e) => handleDateChangeClick(e, day.date, day.isDisabled)}
@@ -93,6 +93,7 @@
93
93
  {@const isSelected = option.value === value}
94
94
 
95
95
  <button
96
+ type="button"
96
97
  bind:this={buttonElements[index]}
97
98
  class="segmented-control-item {isSelected ? 'selected' : ''}"
98
99
  onclick={() => setValue(option.value)}
@@ -314,6 +314,7 @@
314
314
  </div>
315
315
  {:else}
316
316
  <button
317
+ type="button"
317
318
  bind:this={buttonElement}
318
319
  onclick={() => {
319
320
  open = !open;
@@ -289,6 +289,7 @@
289
289
  >
290
290
  <FormGroup {label} {required} {tooltipContent} {tooltipLocation}>
291
291
  <button
292
+ type="button"
292
293
  bind:this={buttonElement}
293
294
  onclick={() => {
294
295
  open = !open;
@@ -124,6 +124,8 @@ export { default as iconPlayerStop } from './player-stop.svg?raw';
124
124
  export { default as iconPlus } from './plus.svg?raw';
125
125
  export { default as iconPrinter } from './printer.svg?raw';
126
126
  export { default as iconQrcode } from './qrcode.svg?raw';
127
+ export { default as iconQuote } from './quote.svg?raw';
128
+ export { default as iconQuoteOpen } from './quote-open.svg?raw';
127
129
  export { default as iconRefresh } from './refresh.svg?raw';
128
130
  export { default as iconReorder } from './reorder.svg?raw';
129
131
  export { default as iconSearch } from './search.svg?raw';
@@ -124,6 +124,8 @@ export { default as iconPlayerStop } from './player-stop.svg?raw';
124
124
  export { default as iconPlus } from './plus.svg?raw';
125
125
  export { default as iconPrinter } from './printer.svg?raw';
126
126
  export { default as iconQrcode } from './qrcode.svg?raw';
127
+ export { default as iconQuote } from './quote.svg?raw';
128
+ export { default as iconQuoteOpen } from './quote-open.svg?raw';
127
129
  export { default as iconRefresh } from './refresh.svg?raw';
128
130
  export { default as iconReorder } from './reorder.svg?raw';
129
131
  export { default as iconSearch } from './search.svg?raw';
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-quote-open"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 13h4a1 1 0 0 1 1 1v3a1 1 0 0 1 -1 1h-3a1 1 0 0 1 -1 -1v-6q 0 -4 4 -5"></path><path d="M5 13h4a1 1 0 0 1 1 1v3a1 1 0 0 1 -1 1h-3a1 1 0 0 1 -1 -1v-6q 0 -4 4 -5"></path></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-quote"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 11h-4a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v6c0 2.667 -1.333 4.333 -4 5"></path><path d="M19 11h-4a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v6c0 2.667 -1.333 4.333 -4 5"></path></svg>
@@ -52,14 +52,16 @@
52
52
  {#if type == 'a' && !disabled}
53
53
  <a class={elClass} {href} {target}> {@render children?.()}</a>
54
54
  {:else if type == 'button'}
55
- <button class={elClass} disabled={isDisabled} onclick={onClick}> {@render children?.()}</button>
55
+ <button type="button" class={elClass} disabled={isDisabled} onclick={onClick}>
56
+ {@render children?.()}</button
57
+ >
56
58
  {:else}
57
59
  <div class={elClass}>
58
60
  {@render children?.()}
59
61
  </div>
60
62
  {/if}
61
63
  {#if onDelete}
62
- <button class="badge-button {variant}" disabled={isDisabled} onclick={onDelete}>
64
+ <button type="button" class="badge-button {variant}" disabled={isDisabled} onclick={onDelete}>
63
65
  <Icon size={size === 'sm' ? '12px' : size === 'lg' ? '16px' : '14px'} svg={iconX} />
64
66
  </button>
65
67
  {/if}
@@ -102,6 +102,7 @@
102
102
  <!-- svelte-ignore a11y_no_static_element_interactions -->
103
103
  <!-- svelte-ignore a11y_mouse_events_have_key_events -->
104
104
  <button
105
+ type="button"
105
106
  bind:this={triggerElement}
106
107
  onclick={handleClick}
107
108
  onmouseenter={handleMouseEnter}
@@ -70,6 +70,7 @@
70
70
  {@const isSelected = option.value === activeTab}
71
71
 
72
72
  <button
73
+ type="button"
73
74
  bind:this={buttonElements[index]}
74
75
  class="tab-item {isSelected ? 'selected' : ''} {solidBg ? 'solid' : ''}"
75
76
  onclick={() => setValue(option.value)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@placeholderco/placeholder-ui",
3
- "version": "2.5.3",
3
+ "version": "2.5.5",
4
4
  "description": "A modern, customizable Svelte 5 UI component library with comprehensive theming support. Re-brand it with a single config object.",
5
5
  "license": "MIT",
6
6
  "author": "Placeholderco",