@quaffui/quaff 0.1.0-prealpha10 → 0.1.0-prealpha12

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.
Files changed (90) hide show
  1. package/dist/components/avatar/QAvatar.svelte.d.ts +2 -2
  2. package/dist/components/avatar/props.d.ts +2 -1
  3. package/dist/components/breadcrumbs/QBreadcrumbs.svelte.d.ts +1 -1
  4. package/dist/components/breadcrumbs/QBreadcrumbsEl.svelte.d.ts +1 -1
  5. package/dist/components/breadcrumbs/props.d.ts +3 -2
  6. package/dist/components/button/QBtn.svelte +2 -2
  7. package/dist/components/button/QBtn.svelte.d.ts +2 -1
  8. package/dist/components/button/props.d.ts +12 -1
  9. package/dist/components/card/QCard.svelte.d.ts +1 -1
  10. package/dist/components/card/QCardActions.svelte.d.ts +2 -2
  11. package/dist/components/card/QCardSection.svelte.d.ts +1 -1
  12. package/dist/components/card/props.d.ts +5 -4
  13. package/dist/components/checkbox/QCheckbox.svelte.d.ts +1 -1
  14. package/dist/components/checkbox/props.d.ts +2 -1
  15. package/dist/components/chip/QChip.svelte.d.ts +1 -1
  16. package/dist/components/chip/props.d.ts +2 -1
  17. package/dist/components/codeBlock/props.d.ts +2 -1
  18. package/dist/components/dialog/QDialog.svelte.d.ts +1 -1
  19. package/dist/components/dialog/props.d.ts +2 -1
  20. package/dist/components/drawer/QDrawer.svelte +8 -3
  21. package/dist/components/drawer/QDrawer.svelte.d.ts +2 -2
  22. package/dist/components/drawer/props.d.ts +2 -1
  23. package/dist/components/footer/QFooter.svelte.d.ts +2 -2
  24. package/dist/components/footer/props.d.ts +2 -1
  25. package/dist/components/header/QHeader.svelte.d.ts +2 -2
  26. package/dist/components/header/props.d.ts +2 -2
  27. package/dist/components/icon/QIcon.svelte +1 -1
  28. package/dist/components/icon/QIcon.svelte.d.ts +7 -6
  29. package/dist/components/icon/props.d.ts +6 -5
  30. package/dist/components/input/QInput.svelte.d.ts +7 -7
  31. package/dist/components/input/props.d.ts +8 -7
  32. package/dist/components/layout/QLayout.svelte +1 -1
  33. package/dist/components/layout/QLayout.svelte.d.ts +10 -9
  34. package/dist/components/layout/index.scss +8 -4
  35. package/dist/components/layout/props.d.ts +9 -8
  36. package/dist/components/list/QItem.svelte +22 -19
  37. package/dist/components/list/QItem.svelte.d.ts +9 -12
  38. package/dist/components/list/QItemSection.svelte +23 -19
  39. package/dist/components/list/QItemSection.svelte.d.ts +2 -2
  40. package/dist/components/list/QList.svelte +9 -10
  41. package/dist/components/list/QList.svelte.d.ts +7 -14
  42. package/dist/components/list/index.scss +27 -5
  43. package/dist/components/list/props.d.ts +19 -16
  44. package/dist/components/list/props.js +1 -1
  45. package/dist/components/progress/QCircularProgress.svelte +7 -1
  46. package/dist/components/progress/QCircularProgress.svelte.d.ts +5 -4
  47. package/dist/components/progress/QLinearProgress.svelte.d.ts +4 -4
  48. package/dist/components/progress/props.d.ts +8 -7
  49. package/dist/components/radio/QRadio.svelte.d.ts +3 -3
  50. package/dist/components/radio/props.d.ts +5 -4
  51. package/dist/components/railbar/QRailbar.svelte.d.ts +5 -5
  52. package/dist/components/railbar/props.d.ts +5 -4
  53. package/dist/components/select/QSelect.svelte +4 -2
  54. package/dist/components/select/QSelect.svelte.d.ts +4 -4
  55. package/dist/components/select/props.d.ts +10 -6
  56. package/dist/components/select/props.js +0 -1
  57. package/dist/components/separator/QSeparator.svelte +2 -2
  58. package/dist/components/separator/QSeparator.svelte.d.ts +8 -7
  59. package/dist/components/separator/props.d.ts +11 -10
  60. package/dist/components/table/QTable.svelte +1 -1
  61. package/dist/components/table/QTable.svelte.d.ts +3 -2
  62. package/dist/components/table/props.d.ts +3 -2
  63. package/dist/components/tabs/QTab.svelte.d.ts +1 -1
  64. package/dist/components/tabs/QTabs.svelte.d.ts +4 -4
  65. package/dist/components/tabs/index.scss +3 -2
  66. package/dist/components/tabs/props.d.ts +5 -4
  67. package/dist/components/toggle/QToggle.svelte +9 -1
  68. package/dist/components/toggle/QToggle.svelte.d.ts +1 -1
  69. package/dist/components/toolbar/QToolbar.svelte.d.ts +6 -6
  70. package/dist/components/toolbar/QToolbarTitle.svelte.d.ts +3 -3
  71. package/dist/components/toolbar/props.d.ts +8 -7
  72. package/dist/components/tooltip/QTooltip.svelte.d.ts +2 -2
  73. package/dist/components/tooltip/props.d.ts +3 -2
  74. package/dist/composables/use-router-link.d.ts +2 -2
  75. package/dist/composables/use-router-link.js +2 -2
  76. package/dist/css/index.css +1 -1
  77. package/dist/css/ripple.scss +1 -1
  78. package/dist/css/theme/palette.scss +18 -4
  79. package/dist/css/theme/theme.dark.scss +3 -1
  80. package/dist/css/theme/theme.light.scss +3 -1
  81. package/dist/helpers/ripple.d.ts +1 -0
  82. package/dist/helpers/ripple.js +1 -1
  83. package/dist/helpers/version.d.ts +1 -1
  84. package/dist/helpers/version.js +1 -1
  85. package/dist/stores/QTheme.d.ts +1 -2
  86. package/dist/stores/QTheme.js +22 -15
  87. package/dist/stores/Quaff.js +18 -13
  88. package/dist/utils/props.d.ts +1 -1
  89. package/dist/utils/types.d.ts +2 -2
  90. package/package.json +1 -1
@@ -4,10 +4,11 @@ import { createClasses } from "../../utils/props";
4
4
  import { getContext, setContext } from "svelte";
5
5
  import { Quaff } from "../../stores/Quaff";
6
6
  import { writable } from "svelte/store";
7
- export let tag = "div", active = false, clickable = false, dense = false, tabindex = 0, href = void 0, to = void 0, disable = false, activeClass = void 0, replace = false, userClasses = void 0;
7
+ import { ripple } from "../../helpers/ripple";
8
+ export let tag = "div", active = false, clickable = false, dense = false, tabindex = 0, href = void 0, to = void 0, disable = false, activeClass = void 0, replace = false, noRipple = false, userClasses = void 0;
8
9
  export { userClasses as class };
9
- let hasMultiplLines = writable(false);
10
- setContext("hasMultipleLines", hasMultiplLines);
10
+ let hasMultipleLines = writable(false);
11
+ setContext("hasMultipleLines", hasMultipleLines);
11
12
  $:
12
13
  ({ hasLink, linkAttributes, linkClasses } = useRouterLink({
13
14
  href,
@@ -19,23 +20,25 @@ $:
19
20
  $:
20
21
  separatorOptions = getContext("separator");
21
22
  $:
22
- isActionable = clickable === true || hasLink === true || tag === "label";
23
+ isActionable = clickable || hasLink || tag === "label";
23
24
  $:
24
- isClickable = disable !== true && isActionable === true;
25
+ isClickable = isActionable && !disable;
25
26
  $:
26
27
  isActive = isRouteActive($Quaff.router, to);
27
28
  $:
28
- classes = createClasses([
29
- "q-item flex items-center",
30
- $hasMultiplLines && "multiline",
31
- dense && "dense",
32
- hasLink && active && "q-item--active",
33
- hasLink && active && activeClass,
34
- isActive && "active",
35
- isClickable && "wave",
36
- linkClasses,
37
- userClasses
38
- ]);
29
+ classes = createClasses(
30
+ [
31
+ $hasMultipleLines && "multiline",
32
+ dense && "dense",
33
+ (isActive || hasLink && active) && activeClass,
34
+ (isActive || hasLink && active) && "active"
35
+ ],
36
+ {
37
+ component: "q-item",
38
+ quaffClasses: [linkClasses],
39
+ userClasses
40
+ }
41
+ );
39
42
  $:
40
43
  attributes = {
41
44
  class: classes,
@@ -50,11 +53,11 @@ $:
50
53
  {/if}
51
54
  {#if linkAttributes.href !== undefined}
52
55
  <!-- svelte-ignore a11y-missing-attribute -->
53
- <a {...attributes} {...linkAttributes} {...$$restProps} on:mouseenter on:mouseleave on:click>
56
+ <a use:ripple={{ disable: !isClickable || noRipple }} {...attributes} {...linkAttributes}>
54
57
  <slot />
55
58
  </a>
56
59
  {:else}
57
- <div {...attributes} {...$$restProps} on:mouseenter on:mouseleave on:click>
60
+ <svelte:element this={tag} {...attributes}>
58
61
  <slot />
59
- </div>
62
+ </svelte:element>
60
63
  {/if}
@@ -3,23 +3,20 @@ import type { QItemProps } from "./props";
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- tag?: string | undefined;
7
- active?: boolean | undefined;
8
- clickable?: boolean | undefined;
9
- dense?: boolean | undefined;
10
- tabindex?: string | number | undefined;
6
+ tag?: QItemProps["tag"];
7
+ active?: QItemProps["active"];
8
+ clickable?: QItemProps["clickable"];
9
+ dense?: QItemProps["dense"];
10
+ tabindex?: QItemProps["tabindex"];
11
11
  href?: QItemProps["href"];
12
12
  to?: QItemProps["to"];
13
- disable?: boolean | undefined;
13
+ disable?: QItemProps["disable"];
14
14
  activeClass?: QItemProps["activeClass"];
15
- replace?: boolean | undefined;
16
- class?: string | undefined;
15
+ replace?: QItemProps["replace"];
16
+ noRipple?: QItemProps["noRipple"];
17
+ class?: string | null | undefined;
17
18
  };
18
19
  events: {
19
- mouseenter: MouseEvent;
20
- mouseleave: MouseEvent;
21
- click: MouseEvent;
22
- } & {
23
20
  [evt: string]: CustomEvent<any>;
24
21
  };
25
22
  slots: {
@@ -9,33 +9,37 @@ $:
9
9
  $ctx = $$slots.headline && [$$slots.line1, $$slots.line2, $$slots.line3].filter(Boolean).length >= 2;
10
10
  }
11
11
  $:
12
- classes = createClasses([`q-item__section `, `q-item__section--${type}`, userClasses]);
12
+ classes = createClasses([type], {
13
+ component: "q-item__section",
14
+ userClasses
15
+ });
13
16
  </script>
14
17
 
15
18
  <div class={classes} {...$$restProps}>
16
19
  {#if type === "content"}
17
- {#if [$$slots.headline, $$slots.line2, $$slots.line2, $$slots.line3].some(Boolean) === false}
20
+ {#if [$$slots.headline, $$slots.line2, $$slots.line2, $$slots.line3].every(Boolean) === false}
18
21
  <slot />
19
- {/if}
20
- {#if $$slots.headline}
21
- <div class="body-large on-surface-text">
22
- <slot name="headline" />
23
- </div>
24
- {/if}
25
- <div class="body-medium on-surface-variant-text">
26
- {#if $$slots.line1}
27
- <slot name="line1" />
22
+ {:else}
23
+ {#if $$slots.headline}
24
+ <div class="body-large on-surface-text">
25
+ <slot name="headline" />
26
+ </div>
28
27
  {/if}
29
- </div>
30
- {#if $$slots.line2}
31
28
  <div class="body-medium on-surface-variant-text">
32
- <slot name="line2" />
33
- </div>
34
- {/if}
35
- {#if $$slots.line3}
36
- <div class="body-medium on-surface-variant-text">
37
- <slot name="line3" />
29
+ {#if $$slots.line1}
30
+ <slot name="line1" />
31
+ {/if}
38
32
  </div>
33
+ {#if $$slots.line2}
34
+ <div class="body-medium on-surface-variant-text">
35
+ <slot name="line2" />
36
+ </div>
37
+ {/if}
38
+ {#if $$slots.line3}
39
+ <div class="body-medium on-surface-variant-text">
40
+ <slot name="line3" />
41
+ </div>
42
+ {/if}
39
43
  {/if}
40
44
  {:else if type === "trailingText"}
41
45
  <div class="label-small on-surface-variant-text">
@@ -3,8 +3,8 @@ import type { QItemSectionProps } from "./props";
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- type?: import("./props").QItemSectionTypes | undefined;
7
- class?: string | undefined;
6
+ type?: QItemSectionProps["type"];
7
+ class?: string | null | undefined;
8
8
  };
9
9
  events: {
10
10
  [evt: string]: CustomEvent<any>;
@@ -1,5 +1,4 @@
1
- <script>import { setIndex } from "../../composables/use-index";
2
- import { createClasses } from "../../utils/props";
1
+ <script>import { createClasses } from "../../utils/props";
3
2
  import { onMount, setContext } from "svelte";
4
3
  export let bordered = false, roundedBorders = false, dense = false, separator = false, separatorOptions = {}, padding = false, tag = "div", userClasses = void 0;
5
4
  export { userClasses as class };
@@ -8,14 +7,14 @@ onMount(() => listElement.querySelector(".q-separator__wrapper:first-child")?.re
8
7
  $:
9
8
  setContext("separator", separator === true ? separatorOptions : void 0);
10
9
  $:
11
- classes = createClasses([
12
- "q-list",
13
- bordered && "border",
14
- dense && "dense",
15
- padding && "q-py-sm",
16
- roundedBorders && "rounded-borders",
17
- userClasses
18
- ]);
10
+ classes = createClasses(
11
+ [bordered && "bordered", dense && "dense", roundedBorders && "rounded"],
12
+ {
13
+ component: "q-list",
14
+ quaffClasses: [padding && "q-py-sm"],
15
+ userClasses
16
+ }
17
+ );
19
18
  </script>
20
19
 
21
20
  <svelte:element this={tag} class={classes} {...$$restProps} bind:this={listElement} on:scroll>
@@ -3,21 +3,14 @@ import type { QListProps } from "./props";
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- bordered?: boolean | undefined;
7
- roundedBorders?: boolean | undefined;
8
- dense?: boolean | undefined;
9
- separator?: boolean | undefined;
10
- separatorOptions?: {
11
- spacing?: "sm" | "md" | "lg" | "none" | undefined;
12
- inset?: boolean | undefined;
13
- color?: string | undefined;
14
- size?: string | undefined;
15
- text?: string | undefined;
16
- textAlign?: "top" | "bottom" | "left" | "right" | "center" | "middle" | undefined;
17
- } | undefined;
18
- padding?: boolean | undefined;
6
+ bordered?: QListProps["bordered"];
7
+ roundedBorders?: QListProps["roundedBorders"];
8
+ dense?: QListProps["dense"];
9
+ separator?: QListProps["separator"];
10
+ separatorOptions?: QListProps["separatorOptions"];
11
+ padding?: QListProps["padding"];
19
12
  tag?: QListProps["tag"];
20
- class?: string | undefined;
13
+ class?: string | null | undefined;
21
14
  };
22
15
  events: {
23
16
  scroll: Event;
@@ -5,11 +5,15 @@
5
5
  justify-content: center;
6
6
  width: 100%;
7
7
 
8
- &.rounded-borders {
8
+ &--bordered {
9
+ @include border;
10
+ }
11
+
12
+ &--rounded {
9
13
  border-radius: 0.25rem;
10
14
  }
11
15
 
12
- &.dense {
16
+ &--dense {
13
17
  min-height: 32px;
14
18
  padding-block: 0;
15
19
 
@@ -43,10 +47,28 @@
43
47
  width: 40px;
44
48
  }
45
49
 
46
- &.wave {
50
+ &.q-link {
47
51
  padding: 8px 24px 8px 16px;
48
52
 
49
- &.multiline {
53
+ &:is(:hover, :focus):not([aria-disabled])::after {
54
+ content: "";
55
+ position: absolute;
56
+ top: 0;
57
+ left: 0;
58
+ width: 100%;
59
+ height: 100%;
60
+ background-color: var(--on-surface);
61
+ }
62
+
63
+ &:hover:not([aria-disabled])::after {
64
+ opacity: 0.08;
65
+ }
66
+
67
+ &:focus:not([aria-disabled])::after {
68
+ opacity: 0.16;
69
+ }
70
+
71
+ &.q-item--multiline {
50
72
  padding-block: 12px;
51
73
  }
52
74
 
@@ -55,7 +77,7 @@
55
77
  }
56
78
  }
57
79
 
58
- &.multiline {
80
+ &--multiline {
59
81
  padding-block: 12px;
60
82
 
61
83
  &
@@ -1,12 +1,13 @@
1
1
  import { type NativeProps } from "../../utils/types";
2
+ import type { UseRouterLinkProps } from "../../composables/use-router-link";
2
3
  import type { QSeparatorProps } from "../separator/props";
3
- import { type UseRouterLinkProps } from "../../composables/use-router-link";
4
- export interface QListProps extends NativeProps {
5
- bordered: boolean;
6
- roundedBorders: boolean;
7
- dense: boolean;
8
- separator: boolean;
9
- separatorOptions: {
4
+ import type { HTMLAnchorAttributes, HTMLAttributes } from "svelte/elements";
5
+ export interface QListProps extends NativeProps, HTMLAttributes<HTMLElement> {
6
+ bordered?: boolean;
7
+ roundedBorders?: boolean;
8
+ dense?: boolean;
9
+ separator?: boolean;
10
+ separatorOptions?: {
10
11
  spacing?: QSeparatorProps["spacing"];
11
12
  inset?: QSeparatorProps["inset"];
12
13
  color?: QSeparatorProps["color"];
@@ -14,20 +15,22 @@ export interface QListProps extends NativeProps {
14
15
  text?: QSeparatorProps["text"];
15
16
  textAlign?: QSeparatorProps["textAlign"];
16
17
  };
17
- padding: boolean;
18
+ padding?: boolean;
18
19
  tag?: string;
19
20
  }
20
21
  export declare const QListPropsDefaults: QListProps;
21
- export interface QItemProps extends UseRouterLinkProps, NativeProps {
22
- tag: string;
23
- active: boolean;
24
- clickable: boolean;
25
- dense: boolean;
26
- tabindex: string | number;
22
+ export interface QItemProps extends UseRouterLinkProps, NativeProps, HTMLAttributes<HTMLElement> {
23
+ tag?: string;
24
+ active?: boolean;
25
+ clickable?: boolean;
26
+ dense?: boolean;
27
+ noRipple?: boolean;
28
+ tabindex?: HTMLAttributes<HTMLElement>["tabindex"];
29
+ target?: HTMLAnchorAttributes["target"];
27
30
  }
28
31
  export declare const QItemPropsDefaults: QItemProps;
29
32
  export type QItemSectionTypes = "thumbnail" | "video" | "avatar" | "toggle" | "icon" | "trailingIcon" | "trailingText" | "content";
30
- export interface QItemSectionProps extends NativeProps {
31
- type: QItemSectionTypes;
33
+ export interface QItemSectionProps extends NativeProps, HTMLAttributes<HTMLDivElement> {
34
+ type?: QItemSectionTypes;
32
35
  }
33
36
  export declare const QItemSectionPropsDefaults: QItemSectionProps;
@@ -1,5 +1,5 @@
1
1
  import { NativePropsDefaults } from "../../utils/types";
2
- import { UseRouterLinkPropsDefaults, } from "../../composables/use-router-link";
2
+ import { UseRouterLinkPropsDefaults } from "../../composables/use-router-link";
3
3
  export const QListPropsDefaults = {
4
4
  bordered: false,
5
5
  roundedBorders: false,
@@ -13,7 +13,13 @@ $:
13
13
  });
14
14
  </script>
15
15
 
16
- <svg class={classes} height={spinnerSize.style} width={spinnerSize.style} viewBox="25 25 50 50">
16
+ <svg
17
+ class={classes}
18
+ height={spinnerSize.style}
19
+ width={spinnerSize.style}
20
+ viewBox="25 25 50 50"
21
+ {...$$restProps}
22
+ >
17
23
  <circle
18
24
  class="path"
19
25
  cx="50"
@@ -2,12 +2,13 @@ import { SvelteComponent } from "svelte";
2
2
  import type { QCircularProgressProps } from "./props";
3
3
  declare const __propDef: {
4
4
  props: {
5
+ [x: string]: any;
5
6
  value?: number | undefined;
6
- indeterminate?: boolean | undefined;
7
- size?: number | `${number}px` | `${number}%` | `${number}em` | `${number}ex` | `${number}ch` | `${number}rem` | `${number}vw` | `${number}vh` | `${number}vmin` | `${number}vmax` | undefined;
7
+ indeterminate?: QCircularProgressProps["indeterminate"];
8
+ size?: QCircularProgressProps["size"];
8
9
  color?: QCircularProgressProps["color"];
9
- thickness?: number | undefined;
10
- class?: string | undefined;
10
+ thickness?: QCircularProgressProps["thickness"];
11
+ class?: string | null | undefined;
11
12
  };
12
13
  events: {
13
14
  [evt: string]: CustomEvent<any>;
@@ -4,10 +4,10 @@ declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
6
  value?: number | undefined;
7
- from?: "left" | "right" | undefined;
8
- rounded?: boolean | undefined;
9
- class?: string | undefined;
10
- style?: string | undefined;
7
+ from?: QLinearProgressProps["from"];
8
+ rounded?: QLinearProgressProps["rounded"];
9
+ class?: string | null | undefined;
10
+ style?: string | null | undefined;
11
11
  };
12
12
  events: {
13
13
  [evt: string]: CustomEvent<any>;
@@ -1,5 +1,6 @@
1
1
  import type { NativeProps, CssValue } from "../../utils/types";
2
- export interface QLinearProgressProps extends NativeProps {
2
+ import type { HTMLAttributes, SVGAttributes } from "svelte/elements";
3
+ export interface QLinearProgressProps extends NativeProps, HTMLAttributes<HTMLDivElement> {
3
4
  /**
4
5
  * @default 0
5
6
  */
@@ -7,13 +8,13 @@ export interface QLinearProgressProps extends NativeProps {
7
8
  /**
8
9
  * @default left
9
10
  */
10
- from: "left" | "right";
11
+ from?: "left" | "right";
11
12
  /**
12
13
  * @default false
13
14
  */
14
- rounded: boolean;
15
+ rounded?: boolean;
15
16
  }
16
- export interface QCircularProgressProps extends NativeProps {
17
+ export interface QCircularProgressProps extends NativeProps, SVGAttributes<SVGSVGElement> {
17
18
  /**
18
19
  * @default 0
19
20
  */
@@ -21,11 +22,11 @@ export interface QCircularProgressProps extends NativeProps {
21
22
  /**
22
23
  * @default false
23
24
  */
24
- indeterminate: boolean;
25
+ indeterminate?: boolean;
25
26
  /**
26
27
  * @default 2em
27
28
  */
28
- size: CssValue | number;
29
+ size?: CssValue | number;
29
30
  /**
30
31
  * @default undefined
31
32
  */
@@ -33,5 +34,5 @@ export interface QCircularProgressProps extends NativeProps {
33
34
  /**
34
35
  * @default 5
35
36
  */
36
- thickness: number;
37
+ thickness?: number;
37
38
  }
@@ -4,10 +4,10 @@ declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
6
  value?: string | undefined;
7
- label?: string | undefined;
7
+ label?: QRadioProps["label"];
8
8
  selected?: QRadioProps["selected"];
9
- disable?: boolean | undefined;
10
- class?: string | undefined;
9
+ disable?: QRadioProps["disable"];
10
+ class?: string | null | undefined;
11
11
  };
12
12
  events: {
13
13
  [evt: string]: CustomEvent<any>;
@@ -1,8 +1,9 @@
1
1
  import type { NativeProps } from "../../utils/types";
2
- export interface QRadioProps extends NativeProps {
2
+ import type { HTMLAttributes } from "svelte/elements";
3
+ export interface QRadioProps extends NativeProps, HTMLAttributes<HTMLLabelElement> {
3
4
  value: string;
4
- label: string;
5
- selected: any;
6
- disable: boolean;
5
+ label?: string;
6
+ selected?: any;
7
+ disable?: boolean;
7
8
  }
8
9
  export declare const QRadioPropsDefaults: QRadioProps;
@@ -2,11 +2,11 @@ import { SvelteComponent } from "svelte";
2
2
  import type { QRailbarProps } from "./props";
3
3
  declare const __propDef: {
4
4
  props: {
5
- width?: number | `${number}px` | `${number}%` | `${number}em` | `${number}ex` | `${number}ch` | `${number}rem` | `${number}vw` | `${number}vh` | `${number}vmin` | `${number}vmax` | undefined;
6
- side?: "left" | "right" | undefined;
7
- bordered?: boolean | undefined;
8
- class?: string | undefined;
9
- style?: string | undefined;
5
+ width?: QRailbarProps["width"];
6
+ side?: QRailbarProps["side"];
7
+ bordered?: QRailbarProps["bordered"];
8
+ class?: string | null | undefined;
9
+ style?: string | null | undefined;
10
10
  };
11
11
  events: {
12
12
  [evt: string]: CustomEvent<any>;
@@ -1,15 +1,16 @@
1
1
  import type { NativeProps, CssValue } from "../../utils/types";
2
- export interface QRailbarProps extends NativeProps {
2
+ import type { HTMLAttributes } from "svelte/elements";
3
+ export interface QRailbarProps extends NativeProps, HTMLAttributes<HTMLElement> {
3
4
  /**
4
5
  * @default 88px
5
6
  */
6
- width: CssValue | number;
7
+ width?: CssValue | number;
7
8
  /**
8
9
  * @default left
9
10
  */
10
- side: "left" | "right";
11
+ side?: "left" | "right";
11
12
  /**
12
13
  * @default false
13
14
  */
14
- bordered: boolean;
15
+ bordered?: boolean;
15
16
  }
@@ -7,7 +7,7 @@ export let options, multiple = false, bordered = false, dense = false, disable =
7
7
  export { userClasses as class };
8
8
  let active = false;
9
9
  $:
10
- active = value?.length > 0;
10
+ active = typeof value === "number" || value?.length > 0;
11
11
  $:
12
12
  hasBorder = bordered || rounded || outlined;
13
13
  $:
@@ -89,7 +89,9 @@ function select(evt, option) {
89
89
  if (multiple) {
90
90
  const hasItem = value.some((entry) => entry === optionValue);
91
91
  if (hasItem) {
92
- value = value.filter((val) => val !== optionValue);
92
+ value = value.filter(
93
+ (val) => val !== optionValue
94
+ );
93
95
  } else {
94
96
  value = [...value, optionValue];
95
97
  }
@@ -7,16 +7,16 @@ declare const __propDef: {
7
7
  multiple?: QSelectProps["multiple"];
8
8
  bordered?: QSelectProps["bordered"];
9
9
  dense?: QSelectProps["dense"];
10
- disable?: boolean | undefined;
11
- error?: boolean | undefined;
10
+ disable?: QSelectProps["disable"];
11
+ error?: QSelectProps["error"];
12
12
  errorMessage?: QSelectProps["errorMessage"];
13
- filled?: boolean | undefined;
13
+ filled?: QSelectProps["filled"];
14
14
  hint?: QSelectProps["hint"];
15
15
  label?: QSelectProps["label"];
16
16
  outlined?: QSelectProps["outlined"];
17
17
  rounded?: QSelectProps["rounded"];
18
18
  value: QSelectProps["value"];
19
- class?: string | undefined;
19
+ class?: string | null | undefined;
20
20
  };
21
21
  events: {
22
22
  [evt: string]: CustomEvent<any>;
@@ -1,18 +1,22 @@
1
- import { type NativeProps } from "../../utils/types";
1
+ import type { NativeProps } from "../../utils/types";
2
+ import type { HTMLAttributes } from "svelte/elements";
2
3
  export type QSelectOption = string | {
3
4
  label: string;
4
5
  value: string;
5
6
  };
6
- export interface QSelectProps extends NativeProps {
7
- value: string | string[] | number | number[];
7
+ export type QSelectValue = QSelectSingleValue | QSelectMultipleValue;
8
+ export type QSelectSingleValue = string | number;
9
+ export type QSelectMultipleValue = QSelectSingleValue[];
10
+ export interface QSelectProps extends NativeProps, HTMLAttributes<HTMLDivElement> {
11
+ value: QSelectValue;
8
12
  multiple?: boolean;
9
13
  options: QSelectOption[];
10
14
  bordered?: boolean;
11
15
  dense?: boolean;
12
- disable: boolean;
13
- error: boolean;
16
+ disable?: boolean;
17
+ error?: boolean;
14
18
  errorMessage?: string;
15
- filled: boolean;
19
+ filled?: boolean;
16
20
  hint?: string;
17
21
  label?: string;
18
22
  outlined?: boolean;
@@ -1,4 +1,3 @@
1
- import "$utils/types";
2
1
  export const QSelectPropsDefaults = {
3
2
  bordered: false,
4
3
  dense: false,
@@ -41,7 +41,7 @@ $:
41
41
  </script>
42
42
 
43
43
  {#if text !== undefined}
44
- <div class="q-separator__wrapper" style={containerStyle}>
44
+ <div class="q-separator__wrapper" style={containerStyle} {...$$restProps}>
45
45
  {#if (vertical === true && textAlign !== "top") || (vertical === false && textAlign !== "left")}
46
46
  <hr class={classes} {style} aria-orientation={orientationClass} />
47
47
  {/if}
@@ -51,7 +51,7 @@ $:
51
51
  {/if}
52
52
  </div>
53
53
  {:else}
54
- <div class="q-separator__wrapper" style={containerStyle}>
54
+ <div class="q-separator__wrapper" style={containerStyle} {...$$restProps}>
55
55
  <hr class={classes} {style} aria-orientation={orientationClass} />
56
56
  </div>
57
57
  {/if}
@@ -2,15 +2,16 @@ import { SvelteComponent } from "svelte";
2
2
  import type { QSeparatorProps } from "./props";
3
3
  declare const __propDef: {
4
4
  props: {
5
- spacing?: "sm" | "md" | "lg" | "none" | undefined;
6
- inset?: boolean | undefined;
7
- vertical?: boolean | undefined;
5
+ [x: string]: any;
6
+ spacing?: QSeparatorProps["spacing"];
7
+ inset?: QSeparatorProps["inset"];
8
+ vertical?: QSeparatorProps["vertical"];
8
9
  color?: QSeparatorProps["color"];
9
- size?: string | undefined;
10
+ size?: QSeparatorProps["size"];
10
11
  text?: QSeparatorProps["text"];
11
- textAlign?: "top" | "bottom" | "left" | "right" | "center" | "middle" | undefined;
12
- class?: string | undefined;
13
- style?: string | undefined;
12
+ textAlign?: QSeparatorProps["textAlign"];
13
+ class?: string | null | undefined;
14
+ style?: string | null | undefined;
14
15
  };
15
16
  events: {
16
17
  [evt: string]: CustomEvent<any>;