@quaffui/quaff 0.1.0-prealpha12 → 0.1.0-prealpha15

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 (188) hide show
  1. package/dist/components/avatar/QAvatar.svelte +37 -29
  2. package/dist/components/avatar/QAvatar.svelte.d.ts +0 -1
  3. package/dist/components/avatar/docs.d.ts +1 -1
  4. package/dist/components/avatar/docs.props.js +2 -0
  5. package/dist/components/avatar/props.d.ts +1 -1
  6. package/dist/components/breadcrumbs/QBreadcrumbs.svelte +3 -8
  7. package/dist/components/breadcrumbs/QBreadcrumbsEl.svelte +12 -20
  8. package/dist/components/breadcrumbs/docs.d.ts +1 -1
  9. package/dist/components/breadcrumbs/docs.props.js +2 -0
  10. package/dist/components/breadcrumbs/props.d.ts +1 -1
  11. package/dist/components/button/QBtn.svelte +23 -27
  12. package/dist/components/button/docs.d.ts +1 -1
  13. package/dist/components/button/docs.props.js +18 -0
  14. package/dist/components/button/props.d.ts +1 -1
  15. package/dist/components/card/QCard.svelte +8 -9
  16. package/dist/components/card/QCardActions.svelte +7 -11
  17. package/dist/components/card/QCardSection.svelte +7 -9
  18. package/dist/components/card/docs.d.ts +1 -1
  19. package/dist/components/card/docs.props.js +3 -1
  20. package/dist/components/card/props.d.ts +2 -2
  21. package/dist/components/checkbox/QCheckbox.svelte +6 -8
  22. package/dist/components/checkbox/docs.d.ts +1 -1
  23. package/dist/components/checkbox/docs.props.js +2 -0
  24. package/dist/components/checkbox/props.d.ts +1 -1
  25. package/dist/components/chip/QChip.svelte +39 -30
  26. package/dist/components/chip/QChip.svelte.d.ts +2 -1
  27. package/dist/components/chip/docs.d.ts +1 -1
  28. package/dist/components/chip/docs.props.js +10 -0
  29. package/dist/components/chip/index.scss +18 -1
  30. package/dist/components/chip/props.d.ts +6 -1
  31. package/dist/components/codeBlock/QCodeBlock.svelte +24 -22
  32. package/dist/components/codeBlock/QCodeBlock.svelte.d.ts +0 -1
  33. package/dist/components/codeBlock/docs.props.js +2 -0
  34. package/dist/components/dialog/QDialog.svelte +40 -49
  35. package/dist/components/dialog/QDialog.svelte.d.ts +6 -5
  36. package/dist/components/dialog/docs.d.ts +1 -1
  37. package/dist/components/dialog/docs.props.js +22 -4
  38. package/dist/components/dialog/index.scss +5 -4
  39. package/dist/components/dialog/props.d.ts +5 -5
  40. package/dist/components/drawer/QDrawer.svelte +3 -3
  41. package/dist/components/drawer/docs.d.ts +1 -1
  42. package/dist/components/drawer/docs.props.js +3 -1
  43. package/dist/components/drawer/props.d.ts +1 -1
  44. package/dist/components/footer/QFooter.svelte +3 -3
  45. package/dist/components/footer/docs.d.ts +1 -1
  46. package/dist/components/footer/docs.props.js +6 -4
  47. package/dist/components/footer/props.d.ts +1 -1
  48. package/dist/components/header/QHeader.svelte +2 -2
  49. package/dist/components/header/docs.props.d.ts +24 -0
  50. package/dist/components/header/docs.props.js +72 -0
  51. package/dist/components/icon/QIcon.svelte +10 -19
  52. package/dist/components/icon/QIcon.svelte.d.ts +0 -1
  53. package/dist/components/icon/docs.d.ts +1 -1
  54. package/dist/components/icon/docs.props.js +6 -4
  55. package/dist/components/icon/props.d.ts +1 -1
  56. package/dist/components/index.d.ts +2 -1
  57. package/dist/components/index.js +2 -1
  58. package/dist/components/input/QInput.svelte +62 -73
  59. package/dist/components/input/QInput.svelte.d.ts +3 -2
  60. package/dist/components/input/docs.d.ts +1 -1
  61. package/dist/components/input/docs.js +1 -7
  62. package/dist/components/input/docs.props.js +7 -13
  63. package/dist/components/input/index.scss +1 -3
  64. package/dist/components/input/props.d.ts +1 -3
  65. package/dist/components/input/props.js +0 -1
  66. package/dist/components/layout/QLayout.svelte +6 -6
  67. package/dist/components/layout/QLayout.svelte.d.ts +2 -2
  68. package/dist/components/layout/docs.d.ts +1 -1
  69. package/dist/components/layout/docs.props.js +9 -7
  70. package/dist/components/layout/index.scss +2 -6
  71. package/dist/components/layout/props.d.ts +1 -1
  72. package/dist/components/list/QItem.svelte +29 -29
  73. package/dist/components/list/QItemSection.svelte +12 -15
  74. package/dist/components/list/QList.svelte +12 -13
  75. package/dist/components/list/docs.d.ts +1 -1
  76. package/dist/components/list/docs.props.js +45 -27
  77. package/dist/components/list/index.scss +1 -0
  78. package/dist/components/list/props.d.ts +1 -1
  79. package/dist/components/list/props.js +1 -1
  80. package/dist/components/private/QApi.svelte +2 -2
  81. package/dist/components/private/QApi.svelte.d.ts +1 -1
  82. package/dist/components/private/QDocs.svelte +2 -2
  83. package/dist/components/private/QDocs.svelte.d.ts +1 -1
  84. package/dist/components/private/QDocsSection.svelte +2 -3
  85. package/dist/components/progress/QCircularProgress.svelte +14 -11
  86. package/dist/components/progress/QLinearProgress.svelte +17 -23
  87. package/dist/components/progress/QLinearProgress.svelte.d.ts +0 -1
  88. package/dist/components/progress/docs.d.ts +1 -1
  89. package/dist/components/progress/docs.props.js +17 -15
  90. package/dist/components/progress/index.scss +20 -3
  91. package/dist/components/progress/props.d.ts +1 -1
  92. package/dist/components/radio/QRadio.svelte +2 -8
  93. package/dist/components/radio/docs.d.ts +1 -1
  94. package/dist/components/radio/docs.props.js +5 -3
  95. package/dist/components/radio/props.d.ts +1 -1
  96. package/dist/components/radio/props.js +1 -1
  97. package/dist/components/railbar/QRailbar.svelte +3 -3
  98. package/dist/components/railbar/docs.d.ts +1 -1
  99. package/dist/components/railbar/docs.props.js +9 -7
  100. package/dist/components/railbar/props.d.ts +1 -1
  101. package/dist/components/select/QSelect.svelte +87 -93
  102. package/dist/components/select/QSelect.svelte.d.ts +2 -1
  103. package/dist/components/select/docs.d.ts +1 -1
  104. package/dist/components/select/docs.js +1 -7
  105. package/dist/components/select/docs.props.js +6 -12
  106. package/dist/components/select/index.scss +17 -4
  107. package/dist/components/select/props.d.ts +1 -3
  108. package/dist/components/select/props.js +0 -1
  109. package/dist/components/separator/QSeparator.svelte +39 -50
  110. package/dist/components/separator/QSeparator.svelte.d.ts +0 -1
  111. package/dist/components/separator/docs.d.ts +1 -1
  112. package/dist/components/separator/docs.props.js +15 -13
  113. package/dist/components/separator/index.scss +52 -0
  114. package/dist/components/separator/props.d.ts +3 -3
  115. package/dist/components/table/QTable.svelte +8 -17
  116. package/dist/components/table/QTable.svelte.d.ts +1 -2
  117. package/dist/components/table/docs.d.ts +1 -1
  118. package/dist/components/table/docs.props.js +3 -1
  119. package/dist/components/table/props.d.ts +1 -1
  120. package/dist/components/tabs/QTab.svelte +50 -43
  121. package/dist/components/tabs/QTab.svelte.d.ts +1 -1
  122. package/dist/components/tabs/QTabs.svelte +61 -42
  123. package/dist/components/tabs/QTabs.svelte.d.ts +11 -1
  124. package/dist/components/tabs/docs.d.ts +1 -1
  125. package/dist/components/tabs/docs.props.js +5 -3
  126. package/dist/components/tabs/index.scss +30 -21
  127. package/dist/components/tabs/props.d.ts +2 -4
  128. package/dist/components/tabs/props.js +1 -13
  129. package/dist/components/toggle/QToggle.svelte +7 -16
  130. package/dist/components/toggle/docs.d.ts +1 -1
  131. package/dist/components/toggle/docs.props.js +2 -0
  132. package/dist/components/toggle/props.d.ts +1 -1
  133. package/dist/components/toggle/props.js +1 -1
  134. package/dist/components/toolbar/QToolbar.svelte +12 -16
  135. package/dist/components/toolbar/QToolbar.svelte.d.ts +0 -1
  136. package/dist/components/toolbar/QToolbarTitle.svelte +1 -1
  137. package/dist/components/toolbar/docs.d.ts +1 -1
  138. package/dist/components/toolbar/docs.props.js +26 -8
  139. package/dist/components/toolbar/props.d.ts +1 -1
  140. package/dist/components/tooltip/QTooltip.svelte +10 -8
  141. package/dist/components/tooltip/docs.d.ts +1 -1
  142. package/dist/components/tooltip/docs.props.js +3 -1
  143. package/dist/components/tooltip/index.scss +1 -0
  144. package/dist/components/tooltip/props.d.ts +1 -1
  145. package/dist/components/tooltip/props.js +1 -1
  146. package/dist/composables/index.d.ts +3 -0
  147. package/dist/composables/index.js +3 -1
  148. package/dist/composables/use-align.d.ts +1 -1
  149. package/dist/composables/use-align.js +1 -1
  150. package/dist/composables/use-router-link.d.ts +1 -1
  151. package/dist/composables/use-router-link.js +2 -2
  152. package/dist/composables/use-size.d.ts +1 -1
  153. package/dist/composables/use-size.js +2 -2
  154. package/dist/css/index.css +1 -1
  155. package/dist/css/index.scss +1 -0
  156. package/dist/css/mixins/field-mixins.scss +53 -0
  157. package/dist/css/mixins.scss +5 -4
  158. package/dist/css/ripple.scss +8 -1
  159. package/dist/css/shared/q-field.scss +318 -0
  160. package/dist/css/theme/colors.module.scss +261 -109
  161. package/dist/css/theme/palette.scss +8 -2
  162. package/dist/helpers/index.d.ts +1 -1
  163. package/dist/helpers/index.js +1 -1
  164. package/dist/helpers/ripple.js +12 -10
  165. package/dist/helpers/version.d.ts +1 -1
  166. package/dist/helpers/version.js +1 -1
  167. package/dist/stores/QTheme.d.ts +8 -7
  168. package/dist/stores/QTheme.js +3 -3
  169. package/dist/stores/Quaff.js +1 -1
  170. package/dist/stores/index.d.ts +2 -0
  171. package/dist/stores/index.js +2 -0
  172. package/dist/utils/clipboard.d.ts +1 -1
  173. package/dist/utils/clipboard.js +1 -2
  174. package/dist/utils/dom.d.ts +1 -0
  175. package/dist/utils/dom.js +4 -0
  176. package/dist/utils/index.d.ts +8 -0
  177. package/dist/utils/index.js +8 -1
  178. package/dist/utils/props.d.ts +1 -1
  179. package/dist/utils/types.d.ts +1 -1
  180. package/dist/utils/types.json +24 -1
  181. package/package.json +23 -24
  182. package/dist/composables/use-index.d.ts +0 -2
  183. package/dist/composables/use-index.js +0 -17
  184. package/dist/css/mixins/field.scss +0 -432
  185. package/dist/helpers/activationHandler.d.ts +0 -9
  186. package/dist/helpers/activationHandler.js +0 -23
  187. package/dist/utils/fields.d.ts +0 -1
  188. package/dist/utils/fields.js +0 -14
@@ -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,3 +1,5 @@
1
+ // AUTO GENERATED FILE - DO NOT MODIFY OR DELETE
2
+ // @quaffHash c12fedd812ba1e4b4a732b44d9624532
1
3
  export const QCodeBlockDocsProps = [
2
4
  {
3
5
  name: "language",
@@ -1,61 +1,41 @@
1
- <script>import { createClasses } from "../../utils/props";
2
- import { createEventDispatcher, onMount } from "svelte";
3
- import QBtn from "../button/QBtn.svelte";
4
- import { clickOutsideDialog } from "../../helpers";
5
- export let noBtn = false, btnContent = void 0, btnAttrs = {}, position = "default", modal = false, fullscreen = false, persistent = false, userClasses = void 0;
1
+ <script>import { clickOutsideDialog } from "../../helpers";
2
+ import { createEventDispatcher } from "svelte";
3
+ import { QBtn } from "../..";
4
+ export let button = false, buttonLabel = void 0, buttonProps = {}, position = "default", modal = false, fullscreen = false, persistent = false, userClasses = "", value = false;
6
5
  export { userClasses as class };
7
6
  const emit = createEventDispatcher();
8
7
  let dialogElement;
9
- let opened = false;
10
- onMount(() => {
11
- opened = dialogElement.open;
12
- dialogElement.style.display = opened ? "block" : "none";
13
- });
8
+ const ANIMATION_DURATION = 300;
14
9
  $:
15
- canHideOnClickOutside = opened && persistent !== true;
16
- $:
17
- positionClass = ["top", "right", "bottom", "left"].includes(position) ? position : void 0;
18
- $:
19
- classes = createClasses(
20
- [opened && "active", positionClass, modal && "modal", fullscreen && "max"],
21
- {
22
- component: "q-dialog",
23
- userClasses
10
+ if (dialogElement) {
11
+ if (value) {
12
+ dialogElement.style.visibility = "visible";
13
+ modal ? dialogElement.showModal() : dialogElement.show();
14
+ } else {
15
+ dialogElement.close();
16
+ setTimeout(() => {
17
+ dialogElement.style.visibility = "hidden";
18
+ }, ANIMATION_DURATION);
24
19
  }
25
- );
26
- export function hide() {
27
- if (dialogElement && dialogElement.open) {
28
- dialogElement.close();
29
- opened = false;
30
- setTimeout(() => {
31
- dialogElement.style.display = "none";
32
- }, 250);
33
20
  }
21
+ $:
22
+ canHideOnClickOutside = value && !persistent;
23
+ export function hide() {
24
+ value = false;
34
25
  }
35
26
  export function show() {
36
- if (dialogElement && !dialogElement.open) {
37
- modal ? dialogElement.showModal() : dialogElement.show();
38
- opened = true;
39
- dialogElement.style.display = "block";
40
- }
27
+ value = true;
41
28
  }
42
29
  export function toggle(e) {
43
- if (dialogElement) {
44
- opened = !opened;
45
- if (dialogElement.open) {
46
- hide();
47
- } else {
48
- show();
49
- }
50
- }
51
- e.stopPropagation();
30
+ value = !value;
31
+ e?.stopPropagation();
52
32
  }
53
33
  function addAnimation() {
54
- if (persistent && opened) {
34
+ if (persistent && value) {
55
35
  dialogElement?.classList.add("animating");
56
36
  setTimeout(() => {
57
37
  dialogElement?.classList.remove("animating");
58
- }, 150);
38
+ }, ANIMATION_DURATION);
59
39
  }
60
40
  }
61
41
  function handleKeyboardHide(e) {
@@ -75,17 +55,28 @@ function handleClickHide() {
75
55
  }
76
56
  </script>
77
57
 
78
- {#if noBtn === false}
79
- <QBtn {...btnAttrs} on:click={toggle} on:click={(event) => emit("btnClick", event)}>
80
- <slot name="button">
81
- {btnContent || ""}
82
- </slot>
58
+ {#if button}
59
+ <QBtn
60
+ {...buttonProps}
61
+ label={buttonLabel}
62
+ on:click={toggle}
63
+ on:click={(event) => emit("buttonClick", event)}
64
+ >
65
+ <slot name="button" />
83
66
  </QBtn>
84
67
  {/if}
85
68
 
86
69
  <dialog
87
70
  use:clickOutsideDialog={handleClickHide}
88
- class={classes}
71
+ class="q-dialog {userClasses}"
72
+ class:q-dialog--active={value}
73
+ class:q-dialog--top={position === "top"}
74
+ class:q-dialog--right={position === "right"}
75
+ class:q-dialog--bottom={position === "bottom"}
76
+ class:q-dialog--left={position === "left"}
77
+ class:q-dialog--modal={modal}
78
+ class:q-dialog--fullscreen={fullscreen}
79
+ class:q-dialog--persistent={persistent}
89
80
  {...$$restProps}
90
81
  bind:this={dialogElement}
91
82
  on:cancel={handleKeyboardHide}
@@ -3,20 +3,21 @@ import type { QDialogProps } from "./props";
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- noBtn?: QDialogProps["noBtn"];
7
- btnContent?: QDialogProps["btnContent"];
8
- btnAttrs?: QDialogProps["btnAttrs"];
6
+ button?: QDialogProps["button"];
7
+ buttonLabel?: QDialogProps["buttonLabel"];
8
+ buttonProps?: QDialogProps["buttonProps"];
9
9
  position?: QDialogProps["position"];
10
10
  modal?: QDialogProps["modal"];
11
11
  fullscreen?: QDialogProps["fullscreen"];
12
12
  persistent?: QDialogProps["persistent"];
13
13
  class?: string | null | undefined;
14
+ value?: boolean | undefined;
14
15
  hide?: (() => void) | undefined;
15
16
  show?: (() => void) | undefined;
16
- toggle?: ((e: MouseEvent) => void) | undefined;
17
+ toggle?: ((e?: MouseEvent) => void) | undefined;
17
18
  };
18
19
  events: {
19
- btnClick: CustomEvent<any>;
20
+ buttonClick: CustomEvent<any>;
20
21
  } & {
21
22
  [evt: string]: CustomEvent<any>;
22
23
  };
@@ -1,2 +1,2 @@
1
- import type { QComponentDocs } from "../../utils/types";
1
+ import type { QComponentDocs } from "../../utils";
2
2
  export declare let QDialogDocs: QComponentDocs;
@@ -1,3 +1,5 @@
1
+ // AUTO GENERATED FILE - DO NOT MODIFY OR DELETE
2
+ // @quaffHash 4086c9cbacac3999316434c5d965375c
1
3
  export const QBtnDocsProps = [
2
4
  {
3
5
  name: "disable",
@@ -55,6 +57,14 @@ export const QBtnDocsProps = [
55
57
  description: "Use rectangle design for the button, removing the large border-radius.",
56
58
  default: "false",
57
59
  },
60
+ {
61
+ name: "noRipple",
62
+ type: "boolean",
63
+ optional: true,
64
+ clickableType: false,
65
+ description: "Disable the ripple effect for the button.",
66
+ default: "false",
67
+ },
58
68
  {
59
69
  name: "round",
60
70
  type: "boolean",
@@ -87,6 +97,14 @@ export const QBtnDocsProps = [
87
97
  description: "Size of the button.",
88
98
  default: "md",
89
99
  },
100
+ {
101
+ name: "target",
102
+ type: 'HTMLAnchorAttributes["target"]',
103
+ optional: true,
104
+ clickableType: true,
105
+ description: 'For "a" (anchor) tag only, apply the target attribute.',
106
+ default: "undefined",
107
+ },
90
108
  ];
91
109
  export const QDialogDocsProps = [
92
110
  {
@@ -98,7 +116,7 @@ export const QDialogDocsProps = [
98
116
  default: "true",
99
117
  },
100
118
  {
101
- name: "noBtn",
119
+ name: "button",
102
120
  type: "boolean",
103
121
  optional: true,
104
122
  clickableType: false,
@@ -106,15 +124,15 @@ export const QDialogDocsProps = [
106
124
  default: "false",
107
125
  },
108
126
  {
109
- name: "btnContent",
127
+ name: "buttonLabel",
110
128
  type: "string",
111
129
  optional: true,
112
130
  clickableType: false,
113
- description: "The content to be displayed on the dialog button.",
131
+ description: 'The label of the trigger button. Requires "button" to be set.',
114
132
  default: "undefined",
115
133
  },
116
134
  {
117
- name: "btnAttrs",
135
+ name: "buttonProps",
118
136
  type: "QBtnProps",
119
137
  optional: true,
120
138
  clickableType: false,
@@ -21,6 +21,7 @@
21
21
  0s background-color;
22
22
  transform: translate(-50%, -4rem);
23
23
  animation-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
24
+ transform-origin: top left;
24
25
 
25
26
  &:is(&--active, [open]) {
26
27
  opacity: 1;
@@ -29,7 +30,7 @@
29
30
  }
30
31
 
31
32
  &::backdrop {
32
- display: none;
33
+ visibility: hidden;
33
34
  }
34
35
 
35
36
  &:not(&--left, &--right, &--top, &--bottom) {
@@ -57,7 +58,7 @@
57
58
  transform: translate(-50%, 0);
58
59
  }
59
60
 
60
- &:is(&--active, [open]):is(&--left, &--right, &--top, &--bottom, &--max) {
61
+ &:is(&--active, [open]):is(&--left, &--right, &--top, &--bottom, &--fullscreen) {
61
62
  transform: translate(0, 0);
62
63
  }
63
64
 
@@ -111,7 +112,7 @@
111
112
  transform: translateY(100%);
112
113
  }
113
114
 
114
- &--max {
115
+ &--fullscreen {
115
116
  top: 0;
116
117
  left: 0;
117
118
  right: auto;
@@ -152,7 +153,7 @@
152
153
  }
153
154
 
154
155
  &--modal::backdrop {
155
- display: block;
156
+ visibility: visible;
156
157
  background-color: rgba(0, 0, 0, 0.5);
157
158
  }
158
159
 
@@ -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";
@@ -12,17 +12,17 @@ export interface QDialogProps extends NativeProps, HTMLAttributes<HTMLDialogElem
12
12
  * Wether the dialog should have a trigger button or not.
13
13
  * @default false
14
14
  */
15
- noBtn?: boolean;
15
+ button?: boolean;
16
16
  /**
17
- * The content to be displayed on the dialog button.
17
+ * The label of the trigger button. Requires "button" to be set.
18
18
  * @default undefined
19
19
  */
20
- btnContent?: string;
20
+ buttonLabel?: string;
21
21
  /**
22
22
  * Additional attributes for the dialog button.
23
23
  * @default {}
24
24
  */
25
- btnAttrs?: QBtnProps;
25
+ buttonProps?: QBtnProps;
26
26
  /**
27
27
  * The position of the dialog relative to the viewport.
28
28
  * @default "default"
@@ -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;
@@ -1,3 +1,5 @@
1
+ // AUTO GENERATED FILE - DO NOT MODIFY OR DELETE
2
+ // @quaffHash 26351a76f5e5bdaa4daf1a4319e1d206
1
3
  export const QDrawerDocsProps = [
2
4
  {
3
5
  name: "value",
@@ -17,7 +19,7 @@ export const QDrawerDocsProps = [
17
19
  },
18
20
  {
19
21
  name: "width",
20
- type: "number | string",
22
+ type: "number | CssValue",
21
23
  optional: true,
22
24
  clickableType: true,
23
25
  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;
@@ -1,3 +1,5 @@
1
+ // AUTO GENERATED FILE - DO NOT MODIFY OR DELETE
2
+ // @quaffHash c4c13f38059522fc7b5db2ae14765e9f
1
3
  export const QFooterDocsProps = [
2
4
  {
3
5
  name: "value",
@@ -8,7 +10,7 @@ export const QFooterDocsProps = [
8
10
  default: "true",
9
11
  },
10
12
  {
11
- name: "bordered",
13
+ name: "border",
12
14
  type: "boolean",
13
15
  optional: true,
14
16
  clickableType: false,
@@ -16,7 +18,7 @@ export const QFooterDocsProps = [
16
18
  default: "false",
17
19
  },
18
20
  {
19
- name: "elevated",
21
+ name: "elevate",
20
22
  type: "boolean",
21
23
  optional: true,
22
24
  clickableType: false,
@@ -25,9 +27,9 @@ export const QFooterDocsProps = [
25
27
  },
26
28
  {
27
29
  name: "height",
28
- type: "string | number",
30
+ type: "number | CssValue",
29
31
  optional: true,
30
- clickableType: false,
32
+ clickableType: true,
31
33
  description: 'The height of the footer. Can be specified with a CSS unit. If not specified, "px" will be used. (not supported yet)',
32
34
  default: "undefined",
33
35
  },
@@ -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
+ }[];
@@ -0,0 +1,72 @@
1
+ // AUTO GENERATED FILE - DO NOT MODIFY OR DELETE
2
+ // @quaffHash 921eb52eb977e8c823f9b2c8af39279f
3
+ export const QToolbarDocsProps = [
4
+ {
5
+ name: "inset",
6
+ type: "boolean",
7
+ optional: true,
8
+ clickableType: false,
9
+ description: "",
10
+ default: "false",
11
+ },
12
+ {
13
+ name: "border",
14
+ type: "boolean",
15
+ optional: true,
16
+ clickableType: false,
17
+ description: "",
18
+ default: "false",
19
+ },
20
+ {
21
+ name: "elevate",
22
+ type: "boolean",
23
+ optional: true,
24
+ clickableType: false,
25
+ description: "",
26
+ default: "false",
27
+ },
28
+ {
29
+ name: "height",
30
+ type: "CssValue | number",
31
+ optional: true,
32
+ clickableType: true,
33
+ description: "",
34
+ default: "64px",
35
+ },
36
+ ];
37
+ export const QToolbarTitleDocsProps = [
38
+ {
39
+ name: "shrink",
40
+ type: "boolean",
41
+ optional: true,
42
+ clickableType: false,
43
+ description: "",
44
+ default: "false",
45
+ },
46
+ ];
47
+ export const QHeaderDocsProps = [
48
+ {
49
+ name: "inset",
50
+ type: "boolean",
51
+ optional: true,
52
+ clickableType: false,
53
+ description: "",
54
+ default: "false",
55
+ },
56
+ {
57
+ name: "elevate",
58
+ type: "boolean",
59
+ optional: true,
60
+ clickableType: false,
61
+ description: "",
62
+ default: "false",
63
+ },
64
+ {
65
+ name: "border",
66
+ type: "boolean",
67
+ optional: true,
68
+ clickableType: false,
69
+ description: "",
70
+ default: "false",
71
+ },
72
+ ];
@@ -1,24 +1,10 @@
1
- <script>import { createClasses, createStyles } from "../../utils/props";
2
- import { isNumber } from "../../utils/types";
3
- import { sizes } from "../../composables/use-size";
4
- import { useSize } from "../../composables/use-size";
5
- export let size = "md", name = void 0, type = "outlined", filled = false, svg = void 0, img = void 0, imgAttributes = {}, color = void 0, userClasses = void 0, userStyles = void 0;
6
- export { userClasses as class, userStyles as style };
1
+ <script>import { useSize } from "../../composables";
2
+ export let size = "md", name = void 0, type = "outlined", filled = false, svg = void 0, img = void 0, imgAttributes = {}, color = void 0, userClasses = "";
3
+ export { userClasses as class };
7
4
  $:
8
5
  sizeObj = useSize(size);
9
6
  $:
10
- classes = createClasses([type, filled && "filled", sizeObj.class], {
11
- component: "q-icon",
12
- userClasses,
13
- quaffClasses: [color && `text-${color}`]
14
- });
15
- $:
16
- style = createStyles(
17
- {
18
- "--size": sizeObj.style
19
- },
20
- userStyles
21
- );
7
+ sizeClass = sizeObj.class && sizeObj.class !== "md" ? `q-icon--${sizeObj.class}` : "";
22
8
  $:
23
9
  imgAttrs = {
24
10
  alt: "Quaff Image Icon",
@@ -26,7 +12,12 @@ $:
26
12
  };
27
13
  </script>
28
14
 
29
- <i class={classes} {style} {...$$restProps}>
15
+ <i
16
+ class="q-icon q-icon--{type} {sizeClass} {color ? `text-${color}` : ''} {userClasses}"
17
+ class:q-icon--filled={filled}
18
+ style:--size={sizeObj.style}
19
+ {...$$restProps}
20
+ >
30
21
  {#if name !== undefined}
31
22
  {name}
32
23
  {:else if img !== undefined}
@@ -12,7 +12,6 @@ declare const __propDef: {
12
12
  imgAttributes?: QIconProps["imgAttributes"];
13
13
  color?: QIconProps["color"];
14
14
  class?: string | null | undefined;
15
- style?: string | null | undefined;
16
15
  };
17
16
  events: {
18
17
  [evt: string]: CustomEvent<any>;
@@ -1,2 +1,2 @@
1
- import type { QComponentDocs } from "../../utils/types";
1
+ import type { QComponentDocs } from "../../utils";
2
2
  export declare let QIconDocs: QComponentDocs;