@quaffui/quaff 0.1.0-prealpha15 → 0.1.0-prealpha16

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 (109) hide show
  1. package/dist/components/avatar/QAvatar.svelte +13 -3
  2. package/dist/components/avatar/docs.d.ts +1 -1
  3. package/dist/components/avatar/docs.js +1 -1
  4. package/dist/components/breadcrumbs/QBreadcrumbs.svelte +1 -2
  5. package/dist/components/breadcrumbs/QBreadcrumbsEl.svelte +5 -7
  6. package/dist/components/breadcrumbs/docs.d.ts +1 -1
  7. package/dist/components/breadcrumbs/docs.js +1 -1
  8. package/dist/components/button/QBtn.svelte +4 -1
  9. package/dist/components/button/docs.d.ts +1 -1
  10. package/dist/components/button/docs.js +1 -1
  11. package/dist/components/button/index.scss +6 -1
  12. package/dist/components/card/QCard.svelte +1 -1
  13. package/dist/components/card/QCardSection.svelte +2 -2
  14. package/dist/components/card/docs.d.ts +3 -3
  15. package/dist/components/card/docs.js +3 -3
  16. package/dist/components/checkbox/QCheckbox.svelte +1 -5
  17. package/dist/components/checkbox/docs.d.ts +1 -1
  18. package/dist/components/checkbox/docs.js +1 -1
  19. package/dist/components/chip/QChip.svelte +4 -1
  20. package/dist/components/chip/docs.d.ts +1 -1
  21. package/dist/components/chip/docs.js +1 -1
  22. package/dist/components/codeBlock/QCodeBlock.svelte +8 -12
  23. package/dist/components/codeBlock/QCodeBlock.svelte.d.ts +1 -0
  24. package/dist/components/codeBlock/docs.props.js +2 -2
  25. package/dist/components/codeBlock/props.d.ts +1 -1
  26. package/dist/components/dialog/docs.d.ts +1 -1
  27. package/dist/components/dialog/docs.js +1 -1
  28. package/dist/components/drawer/QDrawer.svelte +1 -4
  29. package/dist/components/drawer/QDrawer.svelte.d.ts +0 -7
  30. package/dist/components/drawer/docs.d.ts +1 -1
  31. package/dist/components/drawer/docs.js +1 -1
  32. package/dist/components/footer/QFooter.svelte +7 -5
  33. package/dist/components/footer/docs.d.ts +1 -1
  34. package/dist/components/footer/docs.js +1 -1
  35. package/dist/components/icon/docs.d.ts +1 -1
  36. package/dist/components/icon/docs.js +1 -1
  37. package/dist/components/icon/docs.props.js +3 -3
  38. package/dist/components/icon/props.d.ts +2 -2
  39. package/dist/components/input/docs.d.ts +1 -1
  40. package/dist/components/input/docs.js +1 -1
  41. package/dist/components/layout/docs.d.ts +1 -1
  42. package/dist/components/layout/docs.js +1 -1
  43. package/dist/components/list/QItemSection.svelte +1 -4
  44. package/dist/components/list/QList.svelte +6 -5
  45. package/dist/components/list/docs.d.ts +1 -1
  46. package/dist/components/list/docs.js +1 -1
  47. package/dist/components/list/docs.props.js +1 -1
  48. package/dist/components/list/props.d.ts +1 -1
  49. package/dist/components/list/props.js +1 -1
  50. package/dist/components/private/QApi.svelte +14 -7
  51. package/dist/components/private/QApi.svelte.d.ts +1 -1
  52. package/dist/components/private/QDocs.svelte +3 -13
  53. package/dist/components/private/QDocs.svelte.d.ts +1 -1
  54. package/dist/components/private/QDocsSection.svelte +5 -13
  55. package/dist/components/private/QDocsSection.svelte.d.ts +7 -17
  56. package/dist/components/progress/docs.d.ts +1 -1
  57. package/dist/components/progress/docs.js +1 -1
  58. package/dist/components/radio/docs.d.ts +1 -1
  59. package/dist/components/radio/docs.js +1 -1
  60. package/dist/components/radio/docs.props.js +2 -2
  61. package/dist/components/radio/props.d.ts +1 -1
  62. package/dist/components/railbar/docs.d.ts +1 -1
  63. package/dist/components/railbar/docs.js +1 -1
  64. package/dist/components/select/docs.d.ts +1 -1
  65. package/dist/components/select/docs.js +1 -1
  66. package/dist/components/separator/docs.d.ts +1 -1
  67. package/dist/components/separator/docs.js +1 -1
  68. package/dist/components/table/docs.d.ts +1 -1
  69. package/dist/components/table/docs.js +1 -1
  70. package/dist/components/tabs/QTab.svelte +2 -7
  71. package/dist/components/tabs/QTabs.svelte +2 -6
  72. package/dist/components/tabs/docs.d.ts +1 -1
  73. package/dist/components/tabs/docs.js +1 -1
  74. package/dist/components/tabs/docs.props.js +1 -1
  75. package/dist/components/tabs/props.js +1 -1
  76. package/dist/components/toggle/docs.d.ts +1 -1
  77. package/dist/components/toggle/docs.js +1 -1
  78. package/dist/components/toolbar/docs.d.ts +1 -1
  79. package/dist/components/toolbar/docs.js +1 -1
  80. package/dist/components/tooltip/docs.d.ts +1 -1
  81. package/dist/components/tooltip/docs.js +1 -1
  82. package/dist/composables/index.d.ts +3 -3
  83. package/dist/composables/index.js +3 -3
  84. package/dist/composables/{use-size.d.ts → useSize.d.ts} +1 -1
  85. package/dist/composables/{use-size.js → useSize.js} +1 -1
  86. package/dist/css/fonts.scss +16 -3
  87. package/dist/css/index.css +1 -1
  88. package/dist/css/ripple.scss +1 -1
  89. package/dist/global.d.ts +1 -1
  90. package/dist/helpers/clickOutside.d.ts +2 -2
  91. package/dist/helpers/clickOutside.js +3 -3
  92. package/dist/helpers/ripple.js +1 -1
  93. package/dist/helpers/version.d.ts +1 -1
  94. package/dist/helpers/version.js +1 -1
  95. package/dist/stores/QTheme.js +5 -6
  96. package/dist/stores/Quaff.js +1 -1
  97. package/dist/utils/clipboard.js +2 -2
  98. package/dist/utils/colors.js +2 -1
  99. package/dist/utils/dom.js +4 -4
  100. package/dist/utils/props.d.ts +2 -2
  101. package/dist/utils/props.js +5 -5
  102. package/dist/utils/string.js +1 -1
  103. package/dist/utils/types.d.ts +2 -2
  104. package/dist/utils/watchable.js +1 -1
  105. package/package.json +7 -7
  106. /package/dist/composables/{use-align.d.ts → useAlign.d.ts} +0 -0
  107. /package/dist/composables/{use-align.js → useAlign.js} +0 -0
  108. /package/dist/composables/{use-router-link.d.ts → useRouterLink.d.ts} +0 -0
  109. /package/dist/composables/{use-router-link.js → useRouterLink.js} +0 -0
@@ -2,7 +2,7 @@ import { SvelteComponent } from "svelte";
2
2
  import type { QComponentDocs } from "../../utils";
3
3
  declare const __propDef: {
4
4
  props: {
5
- QComponentDocs: QComponentDocs[];
5
+ componentDocs: QComponentDocs[];
6
6
  };
7
7
  events: {
8
8
  [evt: string]: CustomEvent<any>;
@@ -1,10 +1,10 @@
1
1
  <script>import { Quaff } from "../../stores";
2
2
  import { QCard, QCardSection } from "../..";
3
3
  import QApi from "./QApi.svelte";
4
- export let QComponentDocs;
4
+ export let componentDocs;
5
5
  $:
6
6
  isDark = $Quaff.dark.isActive;
7
- let principalDocument = Array.isArray(QComponentDocs) ? QComponentDocs[0] : QComponentDocs;
7
+ let principalDocument = Array.isArray(componentDocs) ? componentDocs[0] : componentDocs;
8
8
  </script>
9
9
 
10
10
  <div class="q-docs" style="margin: 1rem">
@@ -39,7 +39,7 @@ let principalDocument = Array.isArray(QComponentDocs) ? QComponentDocs[0] : QCom
39
39
  </QCard>
40
40
  </div>
41
41
 
42
- <QApi QComponentDocs={Array.isArray(QComponentDocs) ? QComponentDocs : [QComponentDocs]} />
42
+ <QApi componentDocs={Array.isArray(componentDocs) ? componentDocs : [componentDocs]} />
43
43
 
44
44
  {#if $$slots.usage}
45
45
  <div class="s12 q-pa-md">
@@ -78,16 +78,6 @@ let principalDocument = Array.isArray(QComponentDocs) ? QComponentDocs[0] : QCom
78
78
  font-size: 1.75rem;
79
79
  }
80
80
 
81
- .prop-type {
82
- opacity: 0.75;
83
- }
84
- .prop-type.clickable {
85
- cursor: pointer;
86
- }
87
- .prop-type.clickable:hover {
88
- opacity: 1;
89
- }
90
-
91
81
  .heading-usage {
92
82
  display: flex;
93
83
  align-items: center;
@@ -2,7 +2,7 @@ import { SvelteComponent } from "svelte";
2
2
  import type { QComponentDocs } from "../../utils";
3
3
  declare const __propDef: {
4
4
  props: {
5
- QComponentDocs: QComponentDocs | QComponentDocs[];
5
+ componentDocs: QComponentDocs | QComponentDocs[];
6
6
  };
7
7
  events: {
8
8
  [evt: string]: CustomEvent<any>;
@@ -1,9 +1,6 @@
1
- <script>
2
- import { QCodeBlock, QDialog } from "../..";
3
-
4
- export let title, snippets;
5
-
6
- let dialog = false;
1
+ <script>import { QCodeBlock, QDialog } from "../..";
2
+ export let title, snippets = void 0;
3
+ let dialog = false;
7
4
  </script>
8
5
 
9
6
  <div style="margin-bottom:48px">
@@ -13,7 +10,8 @@
13
10
  <QDialog
14
11
  class="snippet-dialog"
15
12
  bind:value={dialog}
16
- btnAttrs={{ outline: true, round: true, icon: "code" }}
13
+ button
14
+ buttonProps={{ outline: true, round: true, icon: "code" }}
17
15
  on:buttonClick={() => (dialog = true)}
18
16
  modal
19
17
  >
@@ -23,9 +21,3 @@
23
21
  </div>
24
22
  <slot />
25
23
  </div>
26
-
27
- <style>
28
- pre {
29
- max-height: 400px;
30
- }
31
- </style>
@@ -1,23 +1,8 @@
1
- /** @typedef {typeof __propDef.props} QDocsSectionProps */
2
- /** @typedef {typeof __propDef.events} QDocsSectionEvents */
3
- /** @typedef {typeof __propDef.slots} QDocsSectionSlots */
4
- export default class QDocsSection extends SvelteComponent<{
5
- title: any;
6
- snippets: any;
7
- }, {
8
- [evt: string]: CustomEvent<any>;
9
- }, {
10
- default: {};
11
- }> {
12
- }
13
- export type QDocsSectionProps = typeof __propDef.props;
14
- export type QDocsSectionEvents = typeof __propDef.events;
15
- export type QDocsSectionSlots = typeof __propDef.slots;
16
1
  import { SvelteComponent } from "svelte";
17
2
  declare const __propDef: {
18
3
  props: {
19
- title: any;
20
- snippets: any;
4
+ title: string;
5
+ snippets?: Record<string, string> | undefined;
21
6
  };
22
7
  events: {
23
8
  [evt: string]: CustomEvent<any>;
@@ -26,4 +11,9 @@ declare const __propDef: {
26
11
  default: {};
27
12
  };
28
13
  };
14
+ export type QDocsSectionProps = typeof __propDef.props;
15
+ export type QDocsSectionEvents = typeof __propDef.events;
16
+ export type QDocsSectionSlots = typeof __propDef.slots;
17
+ export default class QDocsSection extends SvelteComponent<QDocsSectionProps, QDocsSectionEvents, QDocsSectionSlots> {
18
+ }
29
19
  export {};
@@ -1,2 +1,2 @@
1
1
  import type { QComponentDocs } from "../../utils";
2
- export declare let QProgressDocs: QComponentDocs;
2
+ export declare const QProgressDocs: QComponentDocs;
@@ -1,5 +1,5 @@
1
1
  import { QLinearProgressDocsProps } from "./docs.props";
2
- export let QProgressDocs = {
2
+ export const QProgressDocs = {
3
3
  name: "QProgress",
4
4
  description: "The QProgress component is used to display a progress bar, indicating the completion status of a task or process.",
5
5
  docs: {
@@ -1,2 +1,2 @@
1
1
  import type { QComponentDocs } from "../../utils";
2
- export declare let QRadioDocs: QComponentDocs;
2
+ export declare const QRadioDocs: QComponentDocs;
@@ -1,4 +1,4 @@
1
- export let QRadioDocs = {
1
+ export const QRadioDocs = {
2
2
  name: "QRadio",
3
3
  description: "Radio buttons allow the user to select one option from a set.",
4
4
  docs: {
@@ -1,5 +1,5 @@
1
1
  // AUTO GENERATED FILE - DO NOT MODIFY OR DELETE
2
- // @quaffHash 69b1c5ef18592fae8026d06e26d19bfc
2
+ // @quaffHash 023f166466a04ae52838fa2fcbf5b5f9
3
3
  export const QRadioDocsProps = [
4
4
  {
5
5
  name: "value",
@@ -19,7 +19,7 @@ export const QRadioDocsProps = [
19
19
  },
20
20
  {
21
21
  name: "selected",
22
- type: "any",
22
+ type: "unknown",
23
23
  optional: true,
24
24
  clickableType: false,
25
25
  description: "",
@@ -3,7 +3,7 @@ import type { NativeProps } from "../../utils";
3
3
  export interface QRadioProps extends NativeProps, HTMLAttributes<HTMLLabelElement> {
4
4
  value: string;
5
5
  label?: string;
6
- selected?: any;
6
+ selected?: unknown;
7
7
  disable?: boolean;
8
8
  }
9
9
  export declare const QRadioPropsDefaults: QRadioProps;
@@ -1,2 +1,2 @@
1
1
  import type { QComponentDocs } from "../../utils";
2
- export declare let QRailbarDocs: QComponentDocs;
2
+ export declare const QRailbarDocs: QComponentDocs;
@@ -1,5 +1,5 @@
1
1
  import { QRailbarDocsProps } from "./docs.props";
2
- export let QRailbarDocs = {
2
+ export const QRailbarDocs = {
3
3
  name: "QRailbar",
4
4
  description: "Railbars are used to provide navigation between different sections or views within an application.",
5
5
  docs: {
@@ -1,2 +1,2 @@
1
1
  import type { QComponentDocs } from "../../utils";
2
- export declare let QSelectDocs: QComponentDocs;
2
+ export declare const QSelectDocs: QComponentDocs;
@@ -1,4 +1,4 @@
1
- export let QSelectDocs = {
1
+ export const QSelectDocs = {
2
2
  name: "QSelect",
3
3
  description: "QSelect is a form component that allows users to choose from multiple options in a dropdown list. It supports single and multiple selection, as well as different visual styles such as filled, outlined, and rounded.",
4
4
  docs: {
@@ -1,2 +1,2 @@
1
1
  import type { QComponentDocs } from "../../utils";
2
- export declare let QSeparatorDocs: QComponentDocs;
2
+ export declare const QSeparatorDocs: QComponentDocs;
@@ -1,5 +1,5 @@
1
1
  import { QSeparatorPropsVertical } from "./docs.props";
2
- export let QSeparatorDocs = {
2
+ export const QSeparatorDocs = {
3
3
  name: "QSeparator",
4
4
  description: "Separators can be used to create a dividing line or space between elements within a layout, offering visual separation and organization.",
5
5
  docs: {
@@ -1,2 +1,2 @@
1
1
  import type { QComponentDocs } from "../../utils";
2
- export declare let QTableDocs: QComponentDocs;
2
+ export declare const QTableDocs: QComponentDocs;
@@ -1,5 +1,5 @@
1
1
  import { QTableDocsProps } from "./docs.props";
2
- export let QTableDocs = {
2
+ export const QTableDocs = {
3
3
  name: "QTable",
4
4
  description: "Tables allow for a clear presentation of data sets.",
5
5
  docs: {
@@ -3,7 +3,6 @@ import { isRouteActive } from "../../composables";
3
3
  import { ripple } from "../../helpers";
4
4
  import { Quaff } from "../../stores";
5
5
  import {
6
- createClasses,
7
6
  isActivationKey,
8
7
  isArrowKey,
9
8
  getDirection,
@@ -11,7 +10,7 @@ import {
11
10
  isTabKey,
12
11
  getClosestFocusableBlock
13
12
  } from "../../utils";
14
- import { hasContext, getContext, onMount } from "svelte";
13
+ import { hasContext, getContext } from "svelte";
15
14
  import { get } from "svelte/store";
16
15
  export let name, to = void 0, icon = void 0, userClasses = "";
17
16
  export { userClasses as class };
@@ -85,21 +84,17 @@ function onKeydown(e) {
85
84
  </script>
86
85
 
87
86
  <svelte:element
87
+ this={tag}
88
88
  use:ripple
89
89
  bind:this={qTab}
90
- this={tag}
91
-
92
90
  href={to}
93
91
  role={tag === "a" ? "button" : undefined}
94
92
  aria-current={isActive || undefined}
95
-
96
93
  class="q-tab {userClasses}"
97
94
  class:q-tab--active={isActive}
98
-
99
95
  on:click
100
96
  on:click={onClick}
101
97
  on:keydown={onKeydown}
102
-
103
98
  {...$$restProps}
104
99
  >
105
100
  <div>
@@ -1,4 +1,4 @@
1
- <script context="module"></script>
1
+ <script context="module"></script>
2
2
 
3
3
  <script>import { movementDirection } from "../../utils";
4
4
  import { setContext } from "svelte";
@@ -61,10 +61,6 @@ function prepareTransitionSize(storeVariant, fromEl, toEl) {
61
61
  }
62
62
  </script>
63
63
 
64
- <nav
65
- bind:this={qTabs}
66
- class="q-tabs q-tabs--{variant} {userClasses}"
67
- class:q-tabs--rounded={round}
68
- >
64
+ <nav bind:this={qTabs} class="q-tabs q-tabs--{variant} {userClasses}" class:q-tabs--rounded={round}>
69
65
  <slot />
70
66
  </nav>
@@ -1,2 +1,2 @@
1
1
  import type { QComponentDocs } from "../../utils";
2
- export declare let QTabsDocs: QComponentDocs;
2
+ export declare const QTabsDocs: QComponentDocs;
@@ -1,5 +1,5 @@
1
1
  import { QTabsDocsProps } from "./docs.props";
2
- export let QTabsDocs = {
2
+ export const QTabsDocs = {
3
3
  name: "QTabs",
4
4
  description: "Tabs allow creating navigational tabs, enabling users to switch between different views or functional aspects.",
5
5
  docs: {
@@ -1,5 +1,5 @@
1
1
  // AUTO GENERATED FILE - DO NOT MODIFY OR DELETE
2
- // @quaffHash 448513ccbdd5582cec72c379c9659fc0
2
+ // @quaffHash f8981f83763a817f1b1dc144d170a1a4
3
3
  export const QTabsDocsProps = [
4
4
  {
5
5
  name: "value",
@@ -1 +1 @@
1
- import "$lib/utils";
1
+ export {};
@@ -1,2 +1,2 @@
1
1
  import type { QComponentDocs } from "../../utils";
2
- export declare let QToggleDocs: QComponentDocs;
2
+ export declare const QToggleDocs: QComponentDocs;
@@ -1,4 +1,4 @@
1
- export let QToggleDocs = {
1
+ export const QToggleDocs = {
2
2
  name: "QToggle",
3
3
  description: "QToggle is a switch-like checkbox which offers binary choices. It supports labels, icons and different positioning of the labels.",
4
4
  docs: {
@@ -1,2 +1,2 @@
1
1
  import type { QComponentDocs } from "../../utils";
2
- export declare let QToolbarDocs: QComponentDocs;
2
+ export declare const QToolbarDocs: QComponentDocs;
@@ -1,5 +1,5 @@
1
1
  import { QToolbarDocsProps } from "./docs.props";
2
- export let QToolbarDocs = {
2
+ export const QToolbarDocs = {
3
3
  name: "QToolbar",
4
4
  description: "The Toolbar component is used to hold common actions and controls, often located at the top of an application or view.",
5
5
  docs: {
@@ -1,2 +1,2 @@
1
1
  import type { QComponentDocs } from "../../utils";
2
- export declare let QTooltipDocs: QComponentDocs;
2
+ export declare const QTooltipDocs: QComponentDocs;
@@ -1,5 +1,5 @@
1
1
  import { QTooltipDocsProps } from "./docs.props";
2
- export let QTooltipDocs = {
2
+ export const QTooltipDocs = {
3
3
  name: "QTooltip",
4
4
  description: "The Tooltip component displays informative text on hover or focus, providing additional context.",
5
5
  docs: {
@@ -1,3 +1,3 @@
1
- export * from "./use-align";
2
- export * from "./use-router-link";
3
- export * from "./use-size";
1
+ export * from "./useAlign";
2
+ export * from "./useRouterLink";
3
+ export * from "./useSize";
@@ -1,3 +1,3 @@
1
- export * from "./use-align";
2
- export * from "./use-router-link";
3
- export * from "./use-size";
1
+ export * from "./useAlign";
2
+ export * from "./useRouterLink";
3
+ export * from "./useSize";
@@ -5,5 +5,5 @@ interface UseSize {
5
5
  class?: string;
6
6
  style?: string;
7
7
  }
8
- export declare function useSize(sizeProp: any): UseSize;
8
+ export declare function useSize(sizeProp: unknown): UseSize;
9
9
  export {};
@@ -8,7 +8,7 @@ export function useSize(sizeProp) {
8
8
  };
9
9
  }
10
10
  else if (typeof sizeProp === "string") {
11
- for (let unit of CssUnits) {
11
+ for (const unit of CssUnits) {
12
12
  if (sizeProp.slice(-unit.length) === unit) {
13
13
  return {
14
14
  style: sizeProp,
@@ -1,4 +1,17 @@
1
1
  @import "@fontsource/roboto";
2
- @import "@fontsource/material-symbols-outlined";
3
- @import "@fontsource/material-symbols-rounded";
4
- @import "@fontsource/material-symbols-sharp";
2
+
3
+ @mixin font-face-declaration($font-name) {
4
+ $file-name: to-lower-case($font-name);
5
+
6
+ @font-face {
7
+ font-family: "Material Symbols #{$font-name}";
8
+ src: url("material-symbols/material-symbols-#{$file-name}.woff2") format("woff2");
9
+ font-style: normal;
10
+ font-weight: 100 700;
11
+ font-display: block;
12
+ }
13
+ }
14
+
15
+ @include font-face-declaration("Outlined");
16
+ @include font-face-declaration("Rounded");
17
+ @include font-face-declaration("Sharp");