@quaffui/quaff 0.1.0-prealpha12 → 0.1.0-prealpha14

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 (173) hide show
  1. package/dist/components/avatar/QAvatar.svelte +2 -2
  2. package/dist/components/avatar/docs.d.ts +1 -1
  3. package/dist/components/avatar/props.d.ts +1 -1
  4. package/dist/components/breadcrumbs/QBreadcrumbs.svelte +1 -1
  5. package/dist/components/breadcrumbs/QBreadcrumbsEl.svelte +5 -5
  6. package/dist/components/breadcrumbs/docs.d.ts +1 -1
  7. package/dist/components/breadcrumbs/props.d.ts +1 -1
  8. package/dist/components/button/QBtn.svelte +12 -8
  9. package/dist/components/button/docs.d.ts +1 -1
  10. package/dist/components/button/docs.props.js +16 -0
  11. package/dist/components/button/props.d.ts +1 -1
  12. package/dist/components/card/QCard.svelte +2 -2
  13. package/dist/components/card/QCardActions.svelte +2 -2
  14. package/dist/components/card/QCardSection.svelte +1 -1
  15. package/dist/components/card/docs.d.ts +1 -1
  16. package/dist/components/card/docs.props.js +1 -1
  17. package/dist/components/card/props.d.ts +2 -2
  18. package/dist/components/checkbox/QCheckbox.svelte +1 -1
  19. package/dist/components/checkbox/docs.d.ts +1 -1
  20. package/dist/components/checkbox/props.d.ts +1 -1
  21. package/dist/components/chip/QChip.svelte +26 -10
  22. package/dist/components/chip/QChip.svelte.d.ts +2 -1
  23. package/dist/components/chip/docs.d.ts +1 -1
  24. package/dist/components/chip/docs.props.js +8 -0
  25. package/dist/components/chip/index.scss +18 -1
  26. package/dist/components/chip/props.d.ts +6 -1
  27. package/dist/components/codeBlock/QCodeBlock.svelte +24 -22
  28. package/dist/components/codeBlock/QCodeBlock.svelte.d.ts +0 -1
  29. package/dist/components/dialog/QDialog.svelte +3 -3
  30. package/dist/components/dialog/docs.d.ts +1 -1
  31. package/dist/components/dialog/docs.props.js +16 -0
  32. package/dist/components/dialog/props.d.ts +1 -1
  33. package/dist/components/drawer/QDrawer.svelte +3 -3
  34. package/dist/components/drawer/docs.d.ts +1 -1
  35. package/dist/components/drawer/docs.props.js +1 -1
  36. package/dist/components/drawer/props.d.ts +1 -1
  37. package/dist/components/footer/QFooter.svelte +3 -3
  38. package/dist/components/footer/docs.d.ts +1 -1
  39. package/dist/components/footer/docs.props.js +4 -4
  40. package/dist/components/footer/props.d.ts +1 -1
  41. package/dist/components/header/QHeader.svelte +2 -2
  42. package/dist/components/header/docs.props.d.ts +24 -0
  43. package/dist/components/header/docs.props.js +70 -0
  44. package/dist/components/icon/QIcon.svelte +2 -4
  45. package/dist/components/icon/docs.d.ts +1 -1
  46. package/dist/components/icon/docs.props.js +4 -4
  47. package/dist/components/icon/props.d.ts +1 -1
  48. package/dist/components/index.d.ts +2 -1
  49. package/dist/components/index.js +2 -1
  50. package/dist/components/input/QInput.svelte +62 -73
  51. package/dist/components/input/QInput.svelte.d.ts +3 -2
  52. package/dist/components/input/docs.d.ts +1 -1
  53. package/dist/components/input/docs.js +1 -7
  54. package/dist/components/input/docs.props.js +5 -13
  55. package/dist/components/input/index.scss +1 -3
  56. package/dist/components/input/props.d.ts +1 -3
  57. package/dist/components/input/props.js +0 -1
  58. package/dist/components/layout/QLayout.svelte +6 -6
  59. package/dist/components/layout/QLayout.svelte.d.ts +2 -2
  60. package/dist/components/layout/docs.d.ts +1 -1
  61. package/dist/components/layout/docs.props.js +7 -7
  62. package/dist/components/layout/index.scss +2 -6
  63. package/dist/components/layout/props.d.ts +1 -1
  64. package/dist/components/list/QItem.svelte +5 -5
  65. package/dist/components/list/QItemSection.svelte +7 -7
  66. package/dist/components/list/QList.svelte +1 -1
  67. package/dist/components/list/docs.d.ts +1 -1
  68. package/dist/components/list/docs.props.js +43 -27
  69. package/dist/components/list/index.scss +1 -0
  70. package/dist/components/list/props.d.ts +1 -1
  71. package/dist/components/list/props.js +1 -1
  72. package/dist/components/private/QApi.svelte +2 -2
  73. package/dist/components/private/QApi.svelte.d.ts +1 -1
  74. package/dist/components/private/QDocs.svelte +2 -2
  75. package/dist/components/private/QDocs.svelte.d.ts +1 -1
  76. package/dist/components/private/QDocsSection.svelte +1 -2
  77. package/dist/components/progress/QCircularProgress.svelte +3 -4
  78. package/dist/components/progress/QLinearProgress.svelte +1 -1
  79. package/dist/components/progress/docs.d.ts +1 -1
  80. package/dist/components/progress/docs.props.js +15 -15
  81. package/dist/components/progress/props.d.ts +1 -1
  82. package/dist/components/radio/QRadio.svelte +1 -1
  83. package/dist/components/radio/docs.d.ts +1 -1
  84. package/dist/components/radio/docs.props.js +3 -3
  85. package/dist/components/radio/props.d.ts +1 -1
  86. package/dist/components/radio/props.js +1 -1
  87. package/dist/components/railbar/QRailbar.svelte +3 -3
  88. package/dist/components/railbar/docs.d.ts +1 -1
  89. package/dist/components/railbar/docs.props.js +7 -7
  90. package/dist/components/railbar/props.d.ts +1 -1
  91. package/dist/components/select/QSelect.svelte +87 -93
  92. package/dist/components/select/QSelect.svelte.d.ts +2 -1
  93. package/dist/components/select/docs.d.ts +1 -1
  94. package/dist/components/select/docs.js +1 -7
  95. package/dist/components/select/docs.props.js +4 -12
  96. package/dist/components/select/index.scss +17 -4
  97. package/dist/components/select/props.d.ts +1 -3
  98. package/dist/components/select/props.js +0 -1
  99. package/dist/components/separator/QSeparator.svelte +50 -55
  100. package/dist/components/separator/QSeparator.svelte.d.ts +0 -1
  101. package/dist/components/separator/docs.d.ts +1 -1
  102. package/dist/components/separator/docs.props.js +13 -13
  103. package/dist/components/separator/index.scss +52 -0
  104. package/dist/components/separator/props.d.ts +3 -3
  105. package/dist/components/table/QTable.svelte +2 -4
  106. package/dist/components/table/QTable.svelte.d.ts +1 -2
  107. package/dist/components/table/docs.d.ts +1 -1
  108. package/dist/components/table/docs.props.js +1 -1
  109. package/dist/components/table/props.d.ts +1 -1
  110. package/dist/components/tabs/QTab.svelte +50 -43
  111. package/dist/components/tabs/QTab.svelte.d.ts +1 -1
  112. package/dist/components/tabs/QTabs.svelte +61 -42
  113. package/dist/components/tabs/QTabs.svelte.d.ts +11 -1
  114. package/dist/components/tabs/docs.d.ts +1 -1
  115. package/dist/components/tabs/docs.props.js +2 -2
  116. package/dist/components/tabs/index.scss +30 -21
  117. package/dist/components/tabs/props.d.ts +2 -4
  118. package/dist/components/tabs/props.js +1 -13
  119. package/dist/components/toggle/QToggle.svelte +1 -2
  120. package/dist/components/toggle/docs.d.ts +1 -1
  121. package/dist/components/toggle/props.d.ts +1 -1
  122. package/dist/components/toggle/props.js +1 -1
  123. package/dist/components/toolbar/QToolbar.svelte +2 -2
  124. package/dist/components/toolbar/QToolbarTitle.svelte +1 -1
  125. package/dist/components/toolbar/docs.d.ts +1 -1
  126. package/dist/components/toolbar/docs.props.js +24 -8
  127. package/dist/components/toolbar/props.d.ts +1 -1
  128. package/dist/components/tooltip/QTooltip.svelte +1 -1
  129. package/dist/components/tooltip/docs.d.ts +1 -1
  130. package/dist/components/tooltip/docs.props.js +1 -1
  131. package/dist/components/tooltip/props.d.ts +1 -1
  132. package/dist/components/tooltip/props.js +1 -1
  133. package/dist/composables/index.d.ts +3 -0
  134. package/dist/composables/index.js +3 -1
  135. package/dist/composables/use-align.d.ts +1 -1
  136. package/dist/composables/use-align.js +1 -1
  137. package/dist/composables/use-router-link.d.ts +1 -1
  138. package/dist/composables/use-router-link.js +2 -2
  139. package/dist/composables/use-size.d.ts +1 -1
  140. package/dist/composables/use-size.js +2 -2
  141. package/dist/css/index.css +1 -1
  142. package/dist/css/index.scss +1 -0
  143. package/dist/css/mixins/field-mixins.scss +52 -0
  144. package/dist/css/mixins.scss +3 -4
  145. package/dist/css/shared/q-field.scss +305 -0
  146. package/dist/css/theme/colors.module.scss +261 -109
  147. package/dist/css/theme/palette.scss +8 -2
  148. package/dist/helpers/index.d.ts +1 -1
  149. package/dist/helpers/index.js +1 -1
  150. package/dist/helpers/version.d.ts +1 -1
  151. package/dist/helpers/version.js +1 -1
  152. package/dist/stores/QTheme.d.ts +8 -7
  153. package/dist/stores/QTheme.js +3 -3
  154. package/dist/stores/Quaff.js +1 -1
  155. package/dist/stores/index.d.ts +2 -0
  156. package/dist/stores/index.js +2 -0
  157. package/dist/utils/clipboard.d.ts +1 -1
  158. package/dist/utils/clipboard.js +1 -2
  159. package/dist/utils/dom.d.ts +1 -0
  160. package/dist/utils/dom.js +4 -0
  161. package/dist/utils/index.d.ts +8 -0
  162. package/dist/utils/index.js +8 -1
  163. package/dist/utils/props.d.ts +1 -1
  164. package/dist/utils/types.d.ts +1 -1
  165. package/dist/utils/types.json +1 -1
  166. package/package.json +22 -23
  167. package/dist/composables/use-index.d.ts +0 -2
  168. package/dist/composables/use-index.js +0 -17
  169. package/dist/css/mixins/field.scss +0 -432
  170. package/dist/helpers/activationHandler.d.ts +0 -9
  171. package/dist/helpers/activationHandler.js +0 -23
  172. package/dist/utils/fields.d.ts +0 -1
  173. package/dist/utils/fields.js +0 -14
@@ -1,5 +1,5 @@
1
- <script>import { useSize } from "../../composables/use-size";
2
- import { createClasses, createStyles } from "../../utils/props";
1
+ <script>import { useSize } from "../../composables";
2
+ import { createClasses, createStyles } from "../../utils";
3
3
  export let shape = "circle", size = "md", src = void 0, video = false, userClasses = void 0, userStyles = void 0;
4
4
  export { userClasses as class };
5
5
  export { userStyles as style };
@@ -1,2 +1,2 @@
1
- import type { QComponentDocs } from "../../utils/types";
1
+ import type { QComponentDocs } from "../../utils";
2
2
  export declare let QAvatarDocs: QComponentDocs;
@@ -1,4 +1,4 @@
1
- import type { QuaffSizes, CssValue, NativeProps } from "../../utils/types";
1
+ import type { QuaffSizes, CssValue, NativeProps } from "../../utils";
2
2
  import type { HTMLAttributes } from "svelte/elements";
3
3
  export type QAvatarShapeOptions = "circle" | "rounded" | "top-round" | "left-round" | "right-round" | "bottom-round" | "top-left-round" | "top-right-round" | "bottom-left-round" | "bottom-right-round";
4
4
  export type QAvatarSizeOptions = QuaffSizes | CssValue | number;
@@ -1,4 +1,4 @@
1
- <script>import { createClasses } from "../../utils/props";
1
+ <script>import { createClasses } from "../../utils";
2
2
  import { onMount, setContext } from "svelte";
3
3
  export let separator = "/", gutter = "sm", activeColor = "primary", separatorColor = "outline", userClasses = void 0;
4
4
  export { userClasses as class };
@@ -1,8 +1,8 @@
1
- <script>import { getContext } from "svelte";
2
- import QIcon from "../icon/QIcon.svelte";
3
- import { createClasses } from "../../utils/props";
4
- import { isRouteActive } from "../../composables/use-router-link";
1
+ <script>import { isRouteActive } from "../../composables";
5
2
  import { Quaff } from "../../stores/Quaff";
3
+ import { createClasses } from "../../utils";
4
+ import { getContext } from "svelte";
5
+ import { QIcon } from "../..";
6
6
  export let label = "", icon = void 0, tag = "div", to = void 0, href = void 0, activeClass = "active", userClasses = void 0;
7
7
  export { userClasses as class };
8
8
  const activeColor = getContext("activeColor");
@@ -13,7 +13,7 @@ $:
13
13
  classes = createClasses([isActive && activeClass], {
14
14
  component: "q-breadcrumbs",
15
15
  element: "el",
16
- quaffClasses: [isActive && `${activeColor}-text`],
16
+ quaffClasses: [isActive && `text-${activeColor}`],
17
17
  userClasses
18
18
  });
19
19
  $:
@@ -1,2 +1,2 @@
1
- import type { QComponentDocs } from "../../utils/types";
1
+ import type { QComponentDocs } from "../../utils";
2
2
  export declare let QBreadcrumbsDocs: QComponentDocs;
@@ -1,4 +1,4 @@
1
- import type { NativeProps } from "../../utils/types";
1
+ import type { NativeProps } from "../../utils";
2
2
  import type { HTMLAttributes } from "svelte/elements";
3
3
  export type QBreadcrumbsGutterOptions = "none" | "sm" | "md" | "lg";
4
4
  export interface QBreadcrumbsProps extends NativeProps, HTMLAttributes<HTMLDivElement> {
@@ -1,10 +1,7 @@
1
- <script>import { createClasses } from "../../utils/props";
2
- import { createEventDispatcher, onMount } from "svelte";
3
- import QIcon from "../icon/QIcon.svelte";
4
- import QCircularProgress from "../progress/QCircularProgress.svelte";
5
- import { useSize } from "../../composables/use-size";
6
- import { isActivationKey } from "../../utils/events";
7
- import { ripple } from "../../helpers/ripple";
1
+ <script>import { useSize } from "../../composables";
2
+ import { ripple } from "../../helpers";
3
+ import { createClasses, isActivationKey } from "../../utils";
4
+ import { QIcon, QCircularProgress } from "../..";
8
5
  export let icon = void 0, label = void 0, disable = false, loading = false, unelevated = false, outline = false, round = false, rectangle = false, noRipple = false, flat = false, to = void 0, size = void 0, userClasses = void 0;
9
6
  export { userClasses as class };
10
7
  let qBtn;
@@ -28,6 +25,12 @@ $:
28
25
  userClasses
29
26
  }
30
27
  );
28
+ function stopIfDisabled(e) {
29
+ if (disable) {
30
+ e.preventDefault();
31
+ e.stopImmediatePropagation();
32
+ }
33
+ }
31
34
  function onKeyDown(e) {
32
35
  if (!isActivationKey(e))
33
36
  return;
@@ -46,8 +49,9 @@ function onKeyDown(e) {
46
49
  class={classes}
47
50
  aria-disabled={disable || undefined}
48
51
  tabindex={disable ? -1 : 0}
49
- on:click
50
52
  on:keydown={onKeyDown}
53
+ on:click={stopIfDisabled}
54
+ on:click
51
55
  {...$$restProps}
52
56
  >
53
57
  {#if icon && !loading}
@@ -1,2 +1,2 @@
1
- import type { QComponentDocs } from "../../utils/types";
1
+ import type { QComponentDocs } from "../../utils";
2
2
  export declare let QBtnDocs: QComponentDocs;
@@ -55,6 +55,14 @@ export const QBtnDocsProps = [
55
55
  description: "Use rectangle design for the button, removing the large border-radius.",
56
56
  default: "false",
57
57
  },
58
+ {
59
+ name: "noRipple",
60
+ type: "boolean",
61
+ optional: true,
62
+ clickableType: false,
63
+ description: "Disable the ripple effect for the button.",
64
+ default: "false",
65
+ },
58
66
  {
59
67
  name: "round",
60
68
  type: "boolean",
@@ -87,4 +95,12 @@ export const QBtnDocsProps = [
87
95
  description: "Size of the button.",
88
96
  default: "md",
89
97
  },
98
+ {
99
+ name: "target",
100
+ type: 'HTMLAnchorAttributes["target"]',
101
+ optional: true,
102
+ clickableType: true,
103
+ description: 'For "a" (anchor) tag only, apply the target attribute.',
104
+ default: "undefined",
105
+ },
90
106
  ];
@@ -1,4 +1,4 @@
1
- import type { NativeProps, QuaffSizes } from "../../utils/types";
1
+ import type { NativeProps, QuaffSizes } from "../../utils";
2
2
  import type { HTMLAnchorAttributes, HTMLAttributes } from "svelte/elements";
3
3
  export type QBtnSizeOptions = Exclude<QuaffSizes, "xs">;
4
4
  export interface QBtnProps extends NativeProps, HTMLAttributes<HTMLElement> {
@@ -1,4 +1,4 @@
1
- <script>import { createClasses } from "../../utils/props";
1
+ <script>import { createClasses } from "../../utils";
2
2
  export let bordered = false, fill = void 0, flat = false, round = false, title = void 0, userClasses = void 0;
3
3
  export { userClasses as class };
4
4
  const colorOptions = ["primary", "secondary", "tertiary"];
@@ -7,7 +7,7 @@ $:
7
7
  $:
8
8
  classes = createClasses([bordered && "bordered", flat && "flat", round && "rounded"], {
9
9
  component: "q-card",
10
- quaffClasses: [`${color} on-${color}-text`],
10
+ quaffClasses: [color],
11
11
  userClasses
12
12
  });
13
13
  </script>
@@ -1,5 +1,5 @@
1
- <script>import useAlign from "../../composables/use-align";
2
- import { createClasses } from "../../utils/props";
1
+ <script>import { useAlign } from "../../composables";
2
+ import { createClasses } from "../../utils";
3
3
  export let align = void 0, vertical = false, userClasses = void 0;
4
4
  export { userClasses as class };
5
5
  $:
@@ -1,4 +1,4 @@
1
- <script>import { createClasses } from "../../utils/props";
1
+ <script>import { createClasses } from "../../utils";
2
2
  export let horizontal = false, userClasses = void 0;
3
3
  export { userClasses as class };
4
4
  $:
@@ -1,4 +1,4 @@
1
- import type { QComponentDocs } from "../../utils/types";
1
+ import type { QComponentDocs } from "../../utils";
2
2
  export declare let QCardDocs: QComponentDocs;
3
3
  export declare let QCardSectionDocs: QComponentDocs;
4
4
  export declare let QCardActionsDocs: QComponentDocs;
@@ -54,7 +54,7 @@ export const QCardActionsDocsProps = [
54
54
  {
55
55
  name: "vertical",
56
56
  type: "boolean",
57
- optional: false,
57
+ optional: true,
58
58
  clickableType: false,
59
59
  description: "Lays out the action items vertically.",
60
60
  default: "false",
@@ -1,5 +1,5 @@
1
- import type { UseAlignProps } from "../../composables/use-align";
2
- import type { NativeProps } from "../../utils/types";
1
+ import type { UseAlignProps } from "../../composables";
2
+ import type { NativeProps } from "../../utils";
3
3
  import type { HTMLAttributes } from "svelte/elements";
4
4
  export type QCardFillColors = "primary" | "secondary" | "tertiary";
5
5
  export interface QCardProps extends NativeProps, HTMLAttributes<HTMLElement> {
@@ -1,4 +1,4 @@
1
- <script>import { createClasses } from "../../utils/props";
1
+ <script>import { createClasses } from "../../utils";
2
2
  export let value = false, label = "", disable = false, userClasses = void 0;
3
3
  export { userClasses as class };
4
4
  $:
@@ -1,2 +1,2 @@
1
- import type { QComponentDocs } from "../../utils/types";
1
+ import type { QComponentDocs } from "../../utils";
2
2
  export declare let QCheckboxDocs: QComponentDocs;
@@ -1,4 +1,4 @@
1
- import type { NativeProps } from "../../utils/types";
1
+ import type { NativeProps } from "../../utils";
2
2
  import type { HTMLAttributes } from "svelte/elements";
3
3
  export interface QCheckboxProps extends NativeProps, HTMLAttributes<HTMLLabelElement> {
4
4
  /**
@@ -1,11 +1,10 @@
1
- <script>import { activationHandler } from "../../helpers/activationHandler";
2
- import { createClasses } from "../../utils/props";
3
- import { createEventDispatcher } from "svelte";
4
- import QIcon from "../icon/QIcon.svelte";
5
- import { useSize } from "../../composables/use-size";
6
- export let content = void 0, icon = void 0, iconRight = void 0, disable = false, responsive = false, vertical = false, round = false, outlined = false, size = "md", tabindex = void 0, href = void 0, userClasses = void 0;
1
+ <script>import { useSize } from "../../composables";
2
+ import { ripple } from "../../helpers";
3
+ import { createClasses, isActivationKey } from "../../utils";
4
+ import { QIcon } from "../..";
5
+ export let content = void 0, icon = void 0, iconRight = void 0, disable = false, responsive = false, vertical = false, round = false, outlined = false, noRipple = false, size = "md", tabindex = void 0, href = void 0, userClasses = void 0;
7
6
  export { userClasses as class };
8
- const emit = createEventDispatcher();
7
+ let qChip;
9
8
  $:
10
9
  img = icon?.startsWith("img:") ? icon.slice(4) : void 0;
11
10
  $:
@@ -32,15 +31,32 @@ $:
32
31
  });
33
32
  $:
34
33
  tab = disable ? -1 : tabindex ?? 0;
34
+ function stopIfDisabled(e) {
35
+ if (disable) {
36
+ e.preventDefault();
37
+ e.stopImmediatePropagation();
38
+ }
39
+ }
40
+ function onKeyDown(e) {
41
+ if (!isActivationKey(e))
42
+ return;
43
+ e.preventDefault();
44
+ let click = new MouseEvent("click");
45
+ qChip.dispatchEvent(click);
46
+ }
35
47
  </script>
36
48
 
37
49
  <a
38
- use:activationHandler={{ disable, callback: (e) => emit("activated", e) }}
39
- {href}
50
+ bind:this={qChip}
51
+ use:ripple={{disable: noRipple || disable}}
52
+ aria-disabled={disable || undefined}
40
53
  class={classes}
54
+ {href}
41
55
  tabindex={tab}
56
+ on:keydown={onKeyDown}
57
+ on:click={stopIfDisabled}
58
+ on:click
42
59
  {...$$restProps}
43
- aria-disabled={disable || undefined}
44
60
  >
45
61
  {#if $$slots.leading}
46
62
  <slot name="leading" />
@@ -11,13 +11,14 @@ declare const __propDef: {
11
11
  vertical?: QChipProps["vertical"];
12
12
  round?: QChipProps["round"];
13
13
  outlined?: QChipProps["outlined"];
14
+ noRipple?: QChipProps["noRipple"];
14
15
  size?: QChipProps["size"];
15
16
  tabindex?: QChipProps["tabindex"];
16
17
  href?: QChipProps["href"];
17
18
  class?: string | null | undefined;
18
19
  };
19
20
  events: {
20
- activated: CustomEvent<any>;
21
+ click: MouseEvent;
21
22
  } & {
22
23
  [evt: string]: CustomEvent<any>;
23
24
  };
@@ -1,2 +1,2 @@
1
- import type { QComponentDocs } from "../../utils/types";
1
+ import type { QComponentDocs } from "../../utils";
2
2
  export declare let QChipDocs: QComponentDocs;
@@ -63,6 +63,14 @@ export const QChipDocsProps = [
63
63
  description: "Use outline design for the chip, adding a border around it.",
64
64
  default: "false",
65
65
  },
66
+ {
67
+ name: "noRipple",
68
+ type: "boolean",
69
+ optional: true,
70
+ clickableType: false,
71
+ description: "Disable the ripple effect for the chip.",
72
+ default: "false",
73
+ },
66
74
  {
67
75
  name: "size",
68
76
  type: "QChipSizeOptions",
@@ -21,7 +21,6 @@
21
21
  cursor: pointer;
22
22
  border: none;
23
23
 
24
- @extend .ripple;
25
24
  @extend .no-select;
26
25
  @include padding("x", "md");
27
26
  @include margin("x");
@@ -77,6 +76,24 @@
77
76
  border-color: var(--on-surface);
78
77
  }
79
78
  }
79
+
80
+ &:is(:hover, :focus):not([aria-disabled])::after {
81
+ content: "";
82
+ position: absolute;
83
+ top: 0;
84
+ left: 0;
85
+ width: 100%;
86
+ height: 100%;
87
+ background-color: var(--on-primary);
88
+ }
89
+
90
+ &:hover:not([aria-disabled])::after {
91
+ opacity: 0.08;
92
+ }
93
+
94
+ &:focus:not([aria-disabled])::after {
95
+ opacity: 0.16;
96
+ }
80
97
  }
81
98
 
82
99
  // QChip icons
@@ -1,4 +1,4 @@
1
- import type { NativeProps, QuaffSizes } from "../../utils/types";
1
+ import type { QuaffSizes, NativeProps } from "../../utils";
2
2
  import type { HTMLAttributes } from "svelte/elements";
3
3
  export type QChipSizeOptions = Exclude<QuaffSizes, "xs" | "xl">;
4
4
  export interface QChipProps extends NativeProps, HTMLAttributes<HTMLAnchorElement> {
@@ -42,6 +42,11 @@ export interface QChipProps extends NativeProps, HTMLAttributes<HTMLAnchorElemen
42
42
  * @default false
43
43
  */
44
44
  outlined?: boolean;
45
+ /**
46
+ * Disable the ripple effect for the chip.
47
+ * @default false
48
+ */
49
+ noRipple?: boolean;
45
50
  /**
46
51
  * Size of the chip.
47
52
  * @default small
@@ -1,34 +1,36 @@
1
1
  <script>import Highlight from "svelte-highlight";
2
2
  import typescript from "svelte-highlight/languages/typescript";
3
- import "svelte-highlight/styles/material.css";
3
+ import { copy } from "../../utils";
4
4
  import { QBtn } from "../..";
5
5
  export let language, code = "/* No code found */", title = void 0, copiable = void 0;
6
6
  let btnContent = "Copy";
7
7
  let btnColor = "primary";
8
- async function copyCode() {
9
- try {
10
- if (navigator.clipboard.write) {
11
- let blob = new Blob([code], { type: "text/plain" });
12
- let item = new ClipboardItem({ "text/plain": blob });
13
- await navigator.clipboard.write([item]);
14
- } else {
15
- await navigator.clipboard.writeText(code);
16
- }
17
- btnContent = "Copied!";
18
- btnColor = "green";
19
- setTimeout(() => {
20
- btnContent = "Copy";
21
- btnColor = "primary";
22
- }, 3e3);
23
- } catch (e) {
24
- btnContent = "Error while copying...";
25
- btnColor = "error";
26
- setTimeout(() => {
8
+ function setBtn(type) {
9
+ switch (type) {
10
+ case "error":
11
+ btnContent = "Error while copying...";
12
+ btnColor = "error";
13
+ break;
14
+ case "success":
15
+ btnContent = "Copied!";
16
+ btnColor = "green";
17
+ break;
18
+ default:
27
19
  btnContent = "Copy";
28
20
  btnColor = "primary";
29
- }, 3e3);
21
+ break;
30
22
  }
31
23
  }
24
+ async function copyCode() {
25
+ await copy(code).catch((_) => {
26
+ setBtn("error");
27
+ setTimeout(() => setBtn("base"), 3e3);
28
+ });
29
+ setBtn("success");
30
+ setTimeout(() => {
31
+ setBtn("base");
32
+ }, 3e3);
33
+ }
32
34
  </script>
33
35
 
34
36
  <div class="q-code-block">
@@ -38,7 +40,7 @@ async function copyCode() {
38
40
  <h4 class="q-ma-none q-pr-lg">{title}</h4>
39
41
  {/if}
40
42
  <QBtn
41
- class="{btnColor}-border {btnColor}-text"
43
+ class="border-{btnColor} text-{btnColor}"
42
44
  size="sm"
43
45
  icon="content_copy"
44
46
  outline
@@ -1,5 +1,4 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import "svelte-highlight/styles/material.css";
3
2
  import type { QCodeBlockProps } from "./props";
4
3
  declare const __propDef: {
5
4
  props: {
@@ -1,7 +1,7 @@
1
- <script>import { createClasses } from "../../utils/props";
1
+ <script>import { clickOutsideDialog } from "../../helpers";
2
+ import { createClasses } from "../../utils";
2
3
  import { createEventDispatcher, onMount } from "svelte";
3
- import QBtn from "../button/QBtn.svelte";
4
- import { clickOutsideDialog } from "../../helpers";
4
+ import { QBtn } from "../..";
5
5
  export let noBtn = false, btnContent = void 0, btnAttrs = {}, position = "default", modal = false, fullscreen = false, persistent = false, userClasses = void 0;
6
6
  export { userClasses as class };
7
7
  const emit = createEventDispatcher();
@@ -1,2 +1,2 @@
1
- import type { QComponentDocs } from "../../utils/types";
1
+ import type { QComponentDocs } from "../../utils";
2
2
  export declare let QDialogDocs: QComponentDocs;
@@ -55,6 +55,14 @@ export const QBtnDocsProps = [
55
55
  description: "Use rectangle design for the button, removing the large border-radius.",
56
56
  default: "false",
57
57
  },
58
+ {
59
+ name: "noRipple",
60
+ type: "boolean",
61
+ optional: true,
62
+ clickableType: false,
63
+ description: "Disable the ripple effect for the button.",
64
+ default: "false",
65
+ },
58
66
  {
59
67
  name: "round",
60
68
  type: "boolean",
@@ -87,6 +95,14 @@ export const QBtnDocsProps = [
87
95
  description: "Size of the button.",
88
96
  default: "md",
89
97
  },
98
+ {
99
+ name: "target",
100
+ type: 'HTMLAnchorAttributes["target"]',
101
+ optional: true,
102
+ clickableType: true,
103
+ description: 'For "a" (anchor) tag only, apply the target attribute.',
104
+ default: "undefined",
105
+ },
90
106
  ];
91
107
  export const QDialogDocsProps = [
92
108
  {
@@ -1,4 +1,4 @@
1
- import type { NativeProps } from "../../utils/types";
1
+ import type { NativeProps } from "../../utils";
2
2
  import type { HTMLAttributes } from "svelte/elements";
3
3
  import type { QBtnProps } from "../button/props";
4
4
  export type QDialogPositionOptions = "default" | "top" | "right" | "bottom" | "left";
@@ -1,8 +1,8 @@
1
1
  <script>import { navigating } from "$app/stores";
2
- import { createClasses, createStyles } from "../../utils/props";
3
- import { getContext } from "svelte";
2
+ import { useSize } from "../../composables";
4
3
  import { clickOutside } from "../../helpers";
5
- import { useSize } from "../../composables/use-size";
4
+ import { createClasses, createStyles } from "../../utils";
5
+ import { getContext } from "svelte";
6
6
  import { derived } from "svelte/store";
7
7
  export let value = false, side = "left", width = 300, breakpoint = 1023, showIfAbove = false, behavior = "default", bordered = false, elevated = false, overlay = false, persistent = false, noSwipeOpen = false, noSwipeClose = false, noSwipeBackdrop = false, userClasses = void 0, userStyles = void 0;
8
8
  export { userClasses as class, userStyles as style };
@@ -1,2 +1,2 @@
1
- import type { QComponentDocs } from "../../utils/types";
1
+ import type { QComponentDocs } from "../../utils";
2
2
  export declare let QDrawerDocs: QComponentDocs;
@@ -17,7 +17,7 @@ export const QDrawerDocsProps = [
17
17
  },
18
18
  {
19
19
  name: "width",
20
- type: "number | string",
20
+ type: "number | CssValue",
21
21
  optional: true,
22
22
  clickableType: true,
23
23
  description: 'The width of the drawer. Can be specified with a CSS unit. If no unit is specified, "px" will be used.',
@@ -1,4 +1,4 @@
1
- import type { CssValue, NativeProps } from "../../utils/types";
1
+ import type { CssValue, NativeProps } from "../../utils";
2
2
  import type { HTMLAttributes } from "svelte/elements";
3
3
  export type QDrawerSideOptions = "left" | "right";
4
4
  export type QDrawerBehaviorOptions = "default" | "desktop" | "mobile";
@@ -1,6 +1,6 @@
1
- <script>import { getContext } from "svelte";
2
- import { createClasses, createStyles } from "../../utils/props";
3
- import { useSize } from "../../composables/use-size";
1
+ <script>import { useSize } from "../../composables";
2
+ import { createClasses, createStyles } from "../../utils";
3
+ import { getContext } from "svelte";
4
4
  export let value = true, border = false, elevate = false, height = void 0, userClasses = void 0, userStyles = void 0;
5
5
  export { userClasses as class, userStyles as style };
6
6
  let ctx = getContext("layout");
@@ -1,2 +1,2 @@
1
- import type { QComponentDocs } from "../../utils/types";
1
+ import type { QComponentDocs } from "../../utils";
2
2
  export declare let QFooterDocs: QComponentDocs;
@@ -8,7 +8,7 @@ export const QFooterDocsProps = [
8
8
  default: "true",
9
9
  },
10
10
  {
11
- name: "bordered",
11
+ name: "border",
12
12
  type: "boolean",
13
13
  optional: true,
14
14
  clickableType: false,
@@ -16,7 +16,7 @@ export const QFooterDocsProps = [
16
16
  default: "false",
17
17
  },
18
18
  {
19
- name: "elevated",
19
+ name: "elevate",
20
20
  type: "boolean",
21
21
  optional: true,
22
22
  clickableType: false,
@@ -25,9 +25,9 @@ export const QFooterDocsProps = [
25
25
  },
26
26
  {
27
27
  name: "height",
28
- type: "string | number",
28
+ type: "number | CssValue",
29
29
  optional: true,
30
- clickableType: false,
30
+ clickableType: true,
31
31
  description: 'The height of the footer. Can be specified with a CSS unit. If not specified, "px" will be used. (not supported yet)',
32
32
  default: "undefined",
33
33
  },
@@ -1,4 +1,4 @@
1
- import type { CssValue, NativeProps } from "../../utils/types";
1
+ import type { CssValue, NativeProps } from "../../utils";
2
2
  import type { HTMLAttributes } from "svelte/elements";
3
3
  export interface QFooterProps extends NativeProps, HTMLAttributes<HTMLElement> {
4
4
  /**
@@ -1,6 +1,6 @@
1
- <script>import { createClasses } from "../../utils/props";
1
+ <script>import { createClasses } from "../../utils";
2
2
  import { getContext } from "svelte";
3
- import QToolbar from "../toolbar/QToolbar.svelte";
3
+ import { QToolbar } from "../..";
4
4
  export let inset = false, elevate = false, border = false, userClasses = void 0, userStyles = void 0;
5
5
  export { userClasses as class, userStyles as style };
6
6
  let ctx = getContext("layout");
@@ -0,0 +1,24 @@
1
+ export declare const QToolbarDocsProps: {
2
+ name: string;
3
+ type: string;
4
+ optional: boolean;
5
+ clickableType: boolean;
6
+ description: string;
7
+ default: string;
8
+ }[];
9
+ export declare const QToolbarTitleDocsProps: {
10
+ name: string;
11
+ type: string;
12
+ optional: boolean;
13
+ clickableType: boolean;
14
+ description: string;
15
+ default: string;
16
+ }[];
17
+ export declare const QHeaderDocsProps: {
18
+ name: string;
19
+ type: string;
20
+ optional: boolean;
21
+ clickableType: boolean;
22
+ description: string;
23
+ default: string;
24
+ }[];