update-to-daisui-5.0 #1
12 changed files with 47 additions and 17 deletions
|
|
@ -56,6 +56,7 @@
|
||||||
class:btn-sm={size === 'sm'}
|
class:btn-sm={size === 'sm'}
|
||||||
class:btn-md={size === 'md'}
|
class:btn-md={size === 'md'}
|
||||||
class:btn-lg={size === 'lg'}
|
class:btn-lg={size === 'lg'}
|
||||||
|
class:btn-xl={size === 'xl'}
|
||||||
class:btn-outline={style === 'outline'}
|
class:btn-outline={style === 'outline'}
|
||||||
class:btn-dash={style === 'dash'}
|
class:btn-dash={style === 'dash'}
|
||||||
class:btn-soft={style === 'soft'}
|
class:btn-soft={style === 'soft'}
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
},
|
},
|
||||||
size: {
|
size: {
|
||||||
control: 'radio',
|
control: 'radio',
|
||||||
options: ['xs', 'sm', 'md', 'lg'],
|
options: ['xs', 'sm', 'md', 'lg', 'xl'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
@ -60,6 +60,29 @@
|
||||||
|
|
||||||
<Story name="Placeholder" args={{ placeholder: 'BP' }} children={template} />
|
<Story name="Placeholder" args={{ placeholder: 'BP' }} children={template} />
|
||||||
|
|
||||||
|
<Story name="Sizes">
|
||||||
|
{@render template({
|
||||||
|
size: 'xs',
|
||||||
|
placeholder: 'XS',
|
||||||
|
})}
|
||||||
|
{@render template({
|
||||||
|
size: 'sm',
|
||||||
|
placeholder: 'SM',
|
||||||
|
})}
|
||||||
|
{@render template({
|
||||||
|
size: 'md',
|
||||||
|
placeholder: 'MD',
|
||||||
|
})}
|
||||||
|
{@render template({
|
||||||
|
size: 'lg',
|
||||||
|
placeholder: 'LG',
|
||||||
|
})}
|
||||||
|
{@render template({
|
||||||
|
size: 'xl',
|
||||||
|
placeholder: 'XL',
|
||||||
|
})}
|
||||||
|
</Story>
|
||||||
|
|
||||||
<Story name="Avatar Group">
|
<Story name="Avatar Group">
|
||||||
<AvatarGroups>
|
<AvatarGroups>
|
||||||
{@render template({ placeholder: 'BP' })}
|
{@render template({ placeholder: 'BP' })}
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,8 @@
|
||||||
'w-12': size === 'xs',
|
'w-12': size === 'xs',
|
||||||
'w-16': size === 'sm',
|
'w-16': size === 'sm',
|
||||||
'w-20': size === 'md',
|
'w-20': size === 'md',
|
||||||
'w-32': size === 'lg',
|
'w-24': size === 'lg',
|
||||||
|
'w-32': size === 'xl',
|
||||||
'avatar-ring ring-offset-base-100 ring ring-offset-2': !!ring,
|
'avatar-ring ring-offset-base-100 ring ring-offset-2': !!ring,
|
||||||
})
|
})
|
||||||
)}
|
)}
|
||||||
|
|
@ -64,8 +65,9 @@
|
||||||
<img src={img} alt={placeholder} />
|
<img src={img} alt={placeholder} />
|
||||||
{:else}
|
{:else}
|
||||||
<span
|
<span
|
||||||
|
class:text-5xl={size === 'xl'}
|
||||||
class:text-3xl={size === 'lg'}
|
class:text-3xl={size === 'lg'}
|
||||||
class:text-xl={size === 'md'}
|
class:text-2xl={size === 'md'}
|
||||||
class:text-xs={size === 'xs'}>{placeholder}</span
|
class:text-xs={size === 'xs'}>{placeholder}</span
|
||||||
>
|
>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
},
|
},
|
||||||
size: {
|
size: {
|
||||||
control: 'radio',
|
control: 'radio',
|
||||||
options: ['xs', 'sm', 'md', 'lg'],
|
options: ['xs', 'sm', 'md', 'lg', 'xl'],
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
control: 'radio',
|
control: 'radio',
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
type Props = {
|
type Props = {
|
||||||
children: Snippet;
|
children: Snippet;
|
||||||
color?: DaisyColor;
|
color?: DaisyColor;
|
||||||
size?: DaisySize | 'xl';
|
size?: DaisySize;
|
||||||
style?: BadgeStyle;
|
style?: BadgeStyle;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
},
|
},
|
||||||
size: {
|
size: {
|
||||||
control: 'select',
|
control: 'select',
|
||||||
options: ['xs', 'sm', '-', 'lg'],
|
options: ['xs', 'sm', 'md', 'lg', 'xl'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
error?: string | Snippet;
|
error?: string | Snippet;
|
||||||
label?: string | Snippet;
|
label?: string | Snippet;
|
||||||
resizable?: boolean | 'yes' | 'no' | 'x' | 'y';
|
resizable?: boolean | 'yes' | 'no' | 'x' | 'y';
|
||||||
size?: DaisySize | 'md';
|
size?: DaisySize;
|
||||||
} & SvelteHTMLElements['textarea'];
|
} & SvelteHTMLElements['textarea'];
|
||||||
let {
|
let {
|
||||||
bordered,
|
bordered,
|
||||||
|
|
@ -57,7 +57,9 @@
|
||||||
class:textarea-bordered={bordered}
|
class:textarea-bordered={bordered}
|
||||||
class:textarea-xs={size === 'xs'}
|
class:textarea-xs={size === 'xs'}
|
||||||
class:textarea-sm={size === 'sm'}
|
class:textarea-sm={size === 'sm'}
|
||||||
|
class:textarea-md={size === 'md'}
|
||||||
class:textarea-lg={size === 'lg'}
|
class:textarea-lg={size === 'lg'}
|
||||||
|
class:textarea-xl={size === 'xl'}
|
||||||
class:textarea-ghost={color === 'ghost'}
|
class:textarea-ghost={color === 'ghost'}
|
||||||
class:textarea-primary={color === 'primary'}
|
class:textarea-primary={color === 'primary'}
|
||||||
class:textarea-secondary={color === 'secondary'}
|
class:textarea-secondary={color === 'secondary'}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
'error',
|
'error',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
size: { control: 'select', options: ['xs', 'sm', 'md', 'lg'] },
|
size: { control: 'select', options: ['xs', 'sm', 'md', 'lg', 'xl'] },
|
||||||
variant: {
|
variant: {
|
||||||
control: 'select',
|
control: 'select',
|
||||||
options: ['spinner', 'dots', 'ring', 'ball', 'bars', 'infinity'],
|
options: ['spinner', 'dots', 'ring', 'ball', 'bars', 'infinity'],
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
color?: Exclude<DaisyColor, 'ghost'>;
|
color?: Exclude<DaisyColor, 'ghost'>;
|
||||||
size?: DaisySize | 'md';
|
size?: DaisySize;
|
||||||
variant?: 'spinner' | 'dots' | 'ring' | 'ball' | 'bars' | 'infinity';
|
variant?: 'spinner' | 'dots' | 'ring' | 'ball' | 'bars' | 'infinity';
|
||||||
} & Pick<SvelteHTMLElements['span'], 'class'>;
|
} & Pick<SvelteHTMLElements['span'], 'class'>;
|
||||||
let { class: className, color, size = 'md', variant = 'spinner' }: Props = $props();
|
let { class: className, color, size = 'md', variant = 'spinner' }: Props = $props();
|
||||||
|
|
@ -25,6 +25,7 @@
|
||||||
class:loading-sm={size === 'sm'}
|
class:loading-sm={size === 'sm'}
|
||||||
class:loading-md={size === 'md'}
|
class:loading-md={size === 'md'}
|
||||||
class:loading-lg={size === 'lg'}
|
class:loading-lg={size === 'lg'}
|
||||||
|
class:loading-xl={size === 'xl'}
|
||||||
class:loading-spinner={variant === 'spinner'}
|
class:loading-spinner={variant === 'spinner'}
|
||||||
class:loading-dots={variant === 'dots'}
|
class:loading-dots={variant === 'dots'}
|
||||||
class:loading-ring={variant === 'ring'}
|
class:loading-ring={variant === 'ring'}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
argTypes: {
|
argTypes: {
|
||||||
size: {
|
size: {
|
||||||
control: 'select',
|
control: 'select',
|
||||||
options: ['xs', 'sm', 'rg', 'lg'],
|
options: ['xs', 'sm', 'md', 'lg', 'xl'],
|
||||||
},
|
},
|
||||||
variant: {
|
variant: {
|
||||||
control: 'select',
|
control: 'select',
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@
|
||||||
class:tabs-xs={size === 'xs'}
|
class:tabs-xs={size === 'xs'}
|
||||||
class:tabs-sm={size === 'sm'}
|
class:tabs-sm={size === 'sm'}
|
||||||
class:tabs-lg={size === 'lg'}
|
class:tabs-lg={size === 'lg'}
|
||||||
|
class:tabs-xl={size === 'xl'}
|
||||||
class:tabs-bordered={variant === 'bordered'}
|
class:tabs-bordered={variant === 'bordered'}
|
||||||
class:tabs-lifted={variant === 'lifted'}
|
class:tabs-lifted={variant === 'lifted'}
|
||||||
class:tabs-boxed={variant === 'boxed'}
|
class:tabs-boxed={variant === 'boxed'}
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
export type DaisySize = 'xs' | 'sm' | 'md' | 'lg';
|
export type DaisySize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
||||||
Loading…
Add table
Reference in a new issue