feat(prettier): add svelteBracketNewLine

This commit is contained in:
josefaidt 2020-09-24 10:50:34 -05:00
commit 398887a3d3
182 changed files with 974 additions and 494 deletions

View file

@ -18,19 +18,22 @@
on:click
on:mouseover
on:mouseenter
on:mouseleave>
on:mouseleave
>
<div
class:bx--date-picker="{true}"
class:bx--skeleton="{true}"
class:bx--date-picker--range="{true}"
class:bx--date-picker--short="{!range}"
class:bx--date-picker--simple="{!range}">
class:bx--date-picker--simple="{!range}"
>
{#each Array.from({ length: range ? 2 : 1 }, (_, i) => i) as input, i (input)}
<div class:bx--date-picker-container="{true}">
<label for="{id}" class:bx--label="{true}"></label>
<div
class:bx--date-picker__input="{true}"
class:bx--skeleton="{true}"></div>
class:bx--skeleton="{true}"
></div>
</div>
{/each}
</div>

View file

@ -19,7 +19,8 @@
datePickerType="single"
on:change="{({ detail }) => {
console.log('change', detail);
}}">
}}"
>
<DatePickerInput
{...$$props.datePickerInput}
on:close="{() => {
@ -27,13 +28,15 @@
}}"
on:input="{() => {
console.log('on:input');
}}" />
}}"
/>
</DatePicker>
<button
on:click|preventDefault="{() => {
value = '12/12/2020';
}}"
style="margin-top: 1rem">
style="margin-top: 1rem"
>
Set date to 12/12/2020
</button>
</div>
@ -42,11 +45,13 @@
<DatePickerInput
{...$$props.datePickerInput}
id="date-picker-input-id-start"
labelText="Start date" />
labelText="Start date"
/>
<DatePickerInput
{...$$props.datePickerInput}
id="date-picker-input-id-end"
labelText="End date" />
labelText="End date"
/>
</DatePicker>
{:else}
<DatePicker
@ -55,7 +60,8 @@
bind:value
on:change="{({ detail }) => {
console.log('on:change', detail);
}}">
}}"
>
<DatePickerInput {...$$props.datePickerInput} />
</DatePicker>
{/if}

View file

@ -191,7 +191,8 @@
on:click
on:mouseover
on:mouseenter
on:mouseleave>
on:mouseleave
>
<div
bind:this="{datePickerRef}"
id="{id}"
@ -199,7 +200,8 @@
class:bx--date-picker--short="{short}"
class:bx--date-picker--light="{light}"
class="{datePickerType && `bx--date-picker--${datePickerType}`}
{datePickerType === 'range' && $labelTextEmpty && 'bx--date-picker--nolabel'}">
{datePickerType === 'range' && $labelTextEmpty && 'bx--date-picker--nolabel'}"
>
<slot />
</div>
</div>

View file

@ -102,13 +102,15 @@
<div
class:bx--date-picker-container="{true}"
class:bx--date-picker--nolabel="{!labelText}"
{...$$restProps}>
{...$$restProps}
>
{#if labelText}
<label
for="{id}"
class:bx--label="{true}"
class:bx--visually-hidden="{hideLabel}"
class:bx--label--disabled="{disabled}">
class:bx--label--disabled="{disabled}"
>
{labelText}
</label>
{/if}
@ -141,14 +143,16 @@
on:blur
on:blur="{({ relatedTarget }) => {
blurInput(relatedTarget);
}}" />
}}"
/>
{#if $hasCalendar}
<Calendar16
role="img"
class="bx--date-picker__icon"
aria-label="{iconDescription}"
title="{iconDescription}"
on:click="{openCalendar}" />
on:click="{openCalendar}"
/>
{/if}
</div>
{#if invalid}