mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
chore: run prettier [ci skip]
This commit is contained in:
parent
f59ccf77ff
commit
46c611f638
9 changed files with 37 additions and 30 deletions
|
@ -1,7 +1,7 @@
|
||||||
import flatpickr from "flatpickr";
|
import flatpickr from "flatpickr";
|
||||||
import rangePlugin from "flatpickr/dist/plugins/rangePlugin";
|
import rangePlugin from "flatpickr/dist/plugins/rangePlugin";
|
||||||
|
|
||||||
let l10n
|
let l10n;
|
||||||
|
|
||||||
function updateClasses(instance) {
|
function updateClasses(instance) {
|
||||||
const {
|
const {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
export { default as FluidForm } from './FluidForm.svelte'
|
export { default as FluidForm } from "./FluidForm.svelte";
|
||||||
|
|
|
@ -9,11 +9,11 @@
|
||||||
* Obtain a reference to the input HTML element
|
* Obtain a reference to the input HTML element
|
||||||
* @type {null | HTMLDivElement} [ref=null]
|
* @type {null | HTMLDivElement} [ref=null]
|
||||||
*/
|
*/
|
||||||
export let ref = null;
|
export let ref = null;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
bind:this={ref}
|
bind:this="{ref}"
|
||||||
role="listbox"
|
role="listbox"
|
||||||
id="menu-{id}"
|
id="menu-{id}"
|
||||||
class:bx--list-box__menu="{true}"
|
class:bx--list-box__menu="{true}"
|
||||||
|
|
|
@ -20,7 +20,10 @@ export const Default = () => ({
|
||||||
false
|
false
|
||||||
),
|
),
|
||||||
pageInputDisabled: boolean("Disable page input (pageInputDisabled)", false),
|
pageInputDisabled: boolean("Disable page input (pageInputDisabled)", false),
|
||||||
pageSizeInputDisabled: boolean("Disable page size input (pageSizeInputDisabled)", false),
|
pageSizeInputDisabled: boolean(
|
||||||
|
"Disable page size input (pageSizeInputDisabled)",
|
||||||
|
false
|
||||||
|
),
|
||||||
backwardText: text(
|
backwardText: text(
|
||||||
"The description for the backward icon (backwardText)",
|
"The description for the backward icon (backwardText)",
|
||||||
"Previous page"
|
"Previous page"
|
||||||
|
@ -50,7 +53,10 @@ export const Multiple = () => ({
|
||||||
false
|
false
|
||||||
),
|
),
|
||||||
pageInputDisabled: boolean("Disable page input (pageInputDisabled)", false),
|
pageInputDisabled: boolean("Disable page input (pageInputDisabled)", false),
|
||||||
pageSizeInputDisabled: boolean("Disable page size input (pageSizeInputDisabled)", false),
|
pageSizeInputDisabled: boolean(
|
||||||
|
"Disable page size input (pageSizeInputDisabled)",
|
||||||
|
false
|
||||||
|
),
|
||||||
backwardText: text(
|
backwardText: text(
|
||||||
"The description for the backward icon (backwardText)",
|
"The description for the backward icon (backwardText)",
|
||||||
"Previous page"
|
"Previous page"
|
||||||
|
|
|
@ -125,25 +125,25 @@
|
||||||
<div id="{id}" class:bx--pagination="{true}" {...$$restProps}>
|
<div id="{id}" class:bx--pagination="{true}" {...$$restProps}>
|
||||||
<div class:bx--pagination__left="{true}">
|
<div class:bx--pagination__left="{true}">
|
||||||
{#if !pageSizeInputDisabled}
|
{#if !pageSizeInputDisabled}
|
||||||
<label
|
<label
|
||||||
id="bx--pagination-select-{id}-count-label"
|
id="bx--pagination-select-{id}-count-label"
|
||||||
for="bx--pagination-select-{id}"
|
for="bx--pagination-select-{id}"
|
||||||
class:bx--pagination__text="{true}"
|
class:bx--pagination__text="{true}"
|
||||||
>
|
>
|
||||||
{itemsPerPageText}
|
{itemsPerPageText}
|
||||||
</label>
|
</label>
|
||||||
<Select
|
<Select
|
||||||
id="bx--pagination-select-{id}"
|
id="bx--pagination-select-{id}"
|
||||||
class="bx--select__item-count"
|
class="bx--select__item-count"
|
||||||
hideLabel
|
hideLabel
|
||||||
noLabel
|
noLabel
|
||||||
inline
|
inline
|
||||||
bind:selected="{pageSize}"
|
bind:selected="{pageSize}"
|
||||||
>
|
>
|
||||||
{#each pageSizes as size, i (size)}
|
{#each pageSizes as size, i (size)}
|
||||||
<SelectItem value="{size}" text="{size.toString()}" />
|
<SelectItem value="{size}" text="{size.toString()}" />
|
||||||
{/each}
|
{/each}
|
||||||
</Select>
|
</Select>
|
||||||
{/if}
|
{/if}
|
||||||
<span class:bx--pagination__text="{!pageSizeInputDisabled}">
|
<span class:bx--pagination__text="{!pageSizeInputDisabled}">
|
||||||
{#if pagesUnknown}
|
{#if pagesUnknown}
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
* Set an id for the container div element
|
* Set an id for the container div element
|
||||||
* @type {string} [id]
|
* @type {string} [id]
|
||||||
*/
|
*/
|
||||||
export let id
|
export let id;
|
||||||
|
|
||||||
import { createEventDispatcher, setContext } from "svelte";
|
import { createEventDispatcher, setContext } from "svelte";
|
||||||
import { writable } from "svelte/store";
|
import { writable } from "svelte/store";
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
{id}
|
id="{id}"
|
||||||
class:bx--form-item="{true}"
|
class:bx--form-item="{true}"
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
on:click
|
on:click
|
||||||
|
|
|
@ -38,7 +38,7 @@ export const Default = () => ({
|
||||||
export const Fluid = () => ({
|
export const Fluid = () => ({
|
||||||
Component,
|
Component,
|
||||||
props: {
|
props: {
|
||||||
story: 'fluid',
|
story: "fluid",
|
||||||
size: select("Field size (size)", sizes, undefined) || undefined,
|
size: select("Field size (size)", sizes, undefined) || undefined,
|
||||||
disabled: boolean("Disabled (disabled)", false),
|
disabled: boolean("Disabled (disabled)", false),
|
||||||
light: boolean("Light variant (light)", false),
|
light: boolean("Light variant (light)", false),
|
||||||
|
|
|
@ -57,7 +57,8 @@
|
||||||
isOpen = false;
|
isOpen = false;
|
||||||
dispatch('close');
|
dispatch('close');
|
||||||
}
|
}
|
||||||
}}" />
|
}}"
|
||||||
|
/>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue