@quaffui/quaff 0.1.0-prealpha5 → 0.1.0-prealpha7

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 (116) hide show
  1. package/dist/components/button/QBtn.svelte +2 -2
  2. package/dist/components/button/QBtn.svelte.d.ts +1 -0
  3. package/dist/components/button/docs.props.js +8 -0
  4. package/dist/components/button/index.scss +1 -1
  5. package/dist/components/button/props.d.ts +5 -0
  6. package/dist/components/card/docs.props.js +1 -1
  7. package/dist/components/checkbox/index.scss +4 -0
  8. package/dist/components/chip/docs.props.js +3 -3
  9. package/dist/components/codeBlock/QCodeBlock.svelte +1 -1
  10. package/dist/components/dialog/QDialog.svelte +7 -8
  11. package/dist/components/dialog/docs.props.js +10 -2
  12. package/dist/components/dialog/index.scss +150 -3
  13. package/dist/components/drawer/QDrawer.svelte +1 -1
  14. package/dist/components/drawer/QDrawer.svelte.d.ts +1 -0
  15. package/dist/components/icon/QIcon.svelte +19 -14
  16. package/dist/components/icon/QIcon.svelte.d.ts +1 -1
  17. package/dist/components/icon/docs.props.js +1 -1
  18. package/dist/components/icon/index.scss +63 -6
  19. package/dist/components/icon/props.d.ts +1 -1
  20. package/dist/components/index.d.ts +2 -1
  21. package/dist/components/index.js +2 -1
  22. package/dist/components/list/QItem.svelte +1 -1
  23. package/dist/components/list/docs.d.ts +2 -0
  24. package/dist/components/list/docs.js +11 -0
  25. package/dist/components/list/docs.props.js +1 -1
  26. package/dist/components/list/index.scss +6 -0
  27. package/dist/components/private/QApi.svelte +21 -20
  28. package/dist/components/private/QDocs.svelte +38 -10
  29. package/dist/components/private/QDocsSection.svelte +2 -2
  30. package/dist/components/progress/QLinearProgress.svelte +8 -2
  31. package/dist/components/progress/docs.d.ts +2 -0
  32. package/dist/components/progress/docs.js +11 -0
  33. package/dist/components/progress/docs.props.d.ts +8 -0
  34. package/dist/components/progress/docs.props.js +42 -0
  35. package/dist/components/progress/index.scss +15 -0
  36. package/dist/components/railbar/docs.d.ts +2 -0
  37. package/dist/components/railbar/docs.js +11 -0
  38. package/dist/components/select/QSelect.svelte +6 -4
  39. package/dist/components/select/docs.props.js +2 -2
  40. package/dist/components/separator/docs.d.ts +2 -0
  41. package/dist/components/separator/docs.js +11 -0
  42. package/dist/components/tabs/docs.d.ts +2 -0
  43. package/dist/components/tabs/docs.js +11 -0
  44. package/dist/components/tabs/docs.props.js +3 -11
  45. package/dist/components/toolbar/QToolbarTitle.svelte +10 -0
  46. package/dist/components/toolbar/QToolbarTitle.svelte.d.ts +22 -0
  47. package/dist/components/toolbar/docs.d.ts +2 -0
  48. package/dist/components/toolbar/docs.js +11 -0
  49. package/dist/components/toolbar/docs.props.d.ts +8 -0
  50. package/dist/components/toolbar/docs.props.js +10 -0
  51. package/dist/components/toolbar/index.scss +27 -0
  52. package/dist/components/toolbar/props.d.ts +4 -0
  53. package/dist/components/toolbar/props.js +4 -0
  54. package/dist/components/tooltip/QTooltip.svelte +3 -5
  55. package/dist/components/tooltip/docs.d.ts +2 -0
  56. package/dist/components/tooltip/docs.js +11 -0
  57. package/dist/components/tooltip/index.scss +77 -2
  58. package/dist/composables/use-align.js +17 -6
  59. package/dist/composables/use-size.d.ts +3 -5
  60. package/dist/composables/use-size.js +2 -0
  61. package/dist/css/flex.scss +41 -0
  62. package/dist/css/fonts.scss +4 -0
  63. package/dist/css/grid.scss +1 -16
  64. package/dist/css/index.css +1 -0
  65. package/dist/css/index.scss +4 -22
  66. package/dist/css/material-symbols-outlined-latin-100-normal.woff +0 -0
  67. package/dist/css/material-symbols-outlined-latin-100-normal.woff2 +0 -0
  68. package/dist/css/material-symbols-outlined-latin-200-normal.woff +0 -0
  69. package/dist/css/material-symbols-outlined-latin-200-normal.woff2 +0 -0
  70. package/dist/css/material-symbols-outlined-latin-300-normal.woff +0 -0
  71. package/dist/css/material-symbols-outlined-latin-300-normal.woff2 +0 -0
  72. package/dist/css/material-symbols-outlined-latin-400-normal.woff +0 -0
  73. package/dist/css/material-symbols-outlined-latin-400-normal.woff2 +0 -0
  74. package/dist/css/material-symbols-rounded-latin-100-normal.woff +0 -0
  75. package/dist/css/material-symbols-rounded-latin-100-normal.woff2 +0 -0
  76. package/dist/css/material-symbols-rounded-latin-200-normal.woff +0 -0
  77. package/dist/css/material-symbols-rounded-latin-200-normal.woff2 +0 -0
  78. package/dist/css/material-symbols-rounded-latin-300-normal.woff +0 -0
  79. package/dist/css/material-symbols-rounded-latin-300-normal.woff2 +0 -0
  80. package/dist/css/material-symbols-rounded-latin-400-normal.woff +0 -0
  81. package/dist/css/material-symbols-rounded-latin-400-normal.woff2 +0 -0
  82. package/dist/css/material-symbols-sharp-latin-100-normal.woff +0 -0
  83. package/dist/css/material-symbols-sharp-latin-100-normal.woff2 +0 -0
  84. package/dist/css/material-symbols-sharp-latin-200-normal.woff +0 -0
  85. package/dist/css/material-symbols-sharp-latin-200-normal.woff2 +0 -0
  86. package/dist/css/material-symbols-sharp-latin-300-normal.woff +0 -0
  87. package/dist/css/material-symbols-sharp-latin-300-normal.woff2 +0 -0
  88. package/dist/css/material-symbols-sharp-latin-400-normal.woff +0 -0
  89. package/dist/css/material-symbols-sharp-latin-400-normal.woff2 +0 -0
  90. package/dist/css/roboto-cyrillic-400-normal.woff +0 -0
  91. package/dist/css/roboto-cyrillic-400-normal.woff2 +0 -0
  92. package/dist/css/roboto-cyrillic-ext-400-normal.woff +0 -0
  93. package/dist/css/roboto-cyrillic-ext-400-normal.woff2 +0 -0
  94. package/dist/css/roboto-greek-400-normal.woff +0 -0
  95. package/dist/css/roboto-greek-400-normal.woff2 +0 -0
  96. package/dist/css/roboto-latin-400-normal.woff +0 -0
  97. package/dist/css/roboto-latin-400-normal.woff2 +0 -0
  98. package/dist/css/roboto-latin-ext-400-normal.woff +0 -0
  99. package/dist/css/roboto-latin-ext-400-normal.woff2 +0 -0
  100. package/dist/css/roboto-vietnamese-400-normal.woff +0 -0
  101. package/dist/css/roboto-vietnamese-400-normal.woff2 +0 -0
  102. package/dist/css/theme/bridge.scss +15 -0
  103. package/dist/css/theme/elevate.scss +57 -0
  104. package/dist/css/theme/page.scss +16 -0
  105. package/dist/css/theme/palette.scss +633 -0
  106. package/dist/css/theme/reset.scss +40 -0
  107. package/dist/css/theme/theme.dark.scss +1 -0
  108. package/dist/css/theme/theme.light.scss +1 -0
  109. package/dist/css/theme/theme.scss +6 -0
  110. package/dist/css/theme/typography.scss +111 -0
  111. package/dist/css/variables-sass.scss +16 -0
  112. package/dist/helpers/version.d.ts +2 -0
  113. package/dist/helpers/version.js +1 -0
  114. package/dist/stores/Quaff.d.ts +5 -5
  115. package/dist/utils/types.json +1 -1
  116. package/package.json +7 -3
@@ -7,28 +7,32 @@ $:
7
7
  let principalDocument = Array.isArray(QComponentDocs) ? QComponentDocs[0] : QComponentDocs;
8
8
  </script>
9
9
 
10
- <div style="margin: 1rem">
11
- <div class="grid" style="min-height: 400px">
12
- <QCard class="s12 l6 flex center-align" fill="primary">
10
+ <div class="q-docs" style="margin: 1rem">
11
+ <div class="row q-gutter-lg q-mb-lg" style="min-height: 400px">
12
+ <QCard class="col-sm-12 col-lg-6 flex flex-center" fill="primary" style="min-height: 400px">
13
13
  <h1 class="large no-margin" slot="title">{principalDocument.name}</h1>
14
14
  </QCard>
15
- <QCard class="s12 l6 q-mt-none q-pa-none" fill="secondary">
16
- <QCardSection class="no-padding">
15
+ <QCard
16
+ class="q-docs__preview col-sm-12 col-lg-6 q-mt-none q-pa-none"
17
+ fill="secondary"
18
+ style="min-height: 400px"
19
+ >
20
+ <QCardSection class="q-pa-none">
17
21
  <div
18
- class="flex center-align middle-align"
22
+ class="flex flex-center"
19
23
  style="position: absolute; height: 100%; width: 100%; z-index: 1;"
20
24
  >
21
25
  <slot name="display" />
22
26
  </div>
23
27
  <img
24
- class="responsive medium"
28
+ class="q-docs__image"
25
29
  src="/beer-splash-{isDark ? 'dark' : 'light'}.jpg"
26
30
  alt="Close-up of the content of a glass of beer"
27
31
  style={isDark ? "filter:brightness(0.3)" : ""}
28
32
  />
29
33
  </QCardSection>
30
- <QCardSection class="flex center-align middle-align">
31
- <h3 class="small">
34
+ <QCardSection class="q-docs__description flex flex-center">
35
+ <h3 class="q-docs__description-text">
32
36
  {principalDocument.description}
33
37
  </h3>
34
38
  </QCardSection>
@@ -50,7 +54,31 @@ let principalDocument = Array.isArray(QComponentDocs) ? QComponentDocs[0] : QCom
50
54
  <slot />
51
55
  </div>
52
56
 
53
- <style>.prop-type {
57
+ <style>.q-docs :global(.q-pa-none) {
58
+ padding: 0 !important;
59
+ }
60
+ .q-docs__image {
61
+ width: 100%;
62
+ height: 12rem;
63
+ object-fit: cover;
64
+ border-bottom-left-radius: 0;
65
+ border-bottom-right-radius: 0;
66
+ }
67
+ .q-docs :global(.q-docs__preview) {
68
+ display: flex !important;
69
+ flex-direction: column;
70
+ }
71
+ .q-docs :global(.q-docs__description) {
72
+ display: flex;
73
+ flex-grow: 1;
74
+ justify-content: center;
75
+ align-items: center;
76
+ }
77
+ .q-docs :global(.q-docs__description-text) {
78
+ font-size: 1.75rem;
79
+ }
80
+
81
+ .prop-type {
54
82
  opacity: 0.75;
55
83
  }
56
84
  .prop-type.clickable {
@@ -8,13 +8,13 @@
8
8
  </script>
9
9
 
10
10
  <div style="margin-bottom:48px">
11
- <div class="flex between-align q-mb-md">
11
+ <div class="flex justify-between q-mb-md">
12
12
  <h5>{title}</h5>
13
13
  {#if snippets}
14
14
  <QDialog
15
15
  class="snippet-dialog"
16
16
  bind:value={dialog}
17
- btnAttrs={{ outline: true, icon: "code", class: "circle" }}
17
+ btnAttrs={{ outline: true, round: true, icon: "code" }}
18
18
  on:btnClick={() => (dialog = true)}
19
19
  modal
20
20
  >
@@ -6,9 +6,15 @@ $:
6
6
  borderRadius: rounded ? "12px" : "0"
7
7
  };
8
8
  $:
9
- containerClasses = createClasses(["small-space", "border", userClasses]);
9
+ containerClasses = createClasses(["small-space", "border"], {
10
+ component: "q-linear-progress",
11
+ userClasses
12
+ });
10
13
  $:
11
- progressClasses = createClasses(["progress", from]);
14
+ progressClasses = createClasses([from], {
15
+ component: "q-linear-progress",
16
+ element: "progress"
17
+ });
12
18
  $:
13
19
  containerStyle = createStyles(roundedStyle, userStyles);
14
20
  $:
@@ -0,0 +1,2 @@
1
+ import type { QComponentDocs } from "../../utils/types";
2
+ export declare let QProgressDocs: QComponentDocs;
@@ -0,0 +1,11 @@
1
+ import { QLinearProgressDocsProps } from "./docs.props";
2
+ export let QProgressDocs = {
3
+ name: "QProgress",
4
+ description: "The QProgress component is used to display a progress bar, indicating the completion status of a task or process.",
5
+ docs: {
6
+ props: QLinearProgressDocsProps,
7
+ slots: [],
8
+ methods: [],
9
+ events: [],
10
+ },
11
+ };
@@ -6,3 +6,11 @@ export declare const QLinearProgressDocsProps: {
6
6
  description: string;
7
7
  default: string;
8
8
  }[];
9
+ export declare const QCircularProgressDocsProps: {
10
+ name: string;
11
+ type: string;
12
+ optional: boolean;
13
+ clickableType: boolean;
14
+ description: string;
15
+ default: string;
16
+ }[];
@@ -24,3 +24,45 @@ export const QLinearProgressDocsProps = [
24
24
  default: "",
25
25
  },
26
26
  ];
27
+ export const QCircularProgressDocsProps = [
28
+ {
29
+ name: "value",
30
+ type: "number",
31
+ optional: false,
32
+ clickableType: false,
33
+ description: "",
34
+ default: "",
35
+ },
36
+ {
37
+ name: "indeterminate",
38
+ type: "boolean",
39
+ optional: false,
40
+ clickableType: false,
41
+ description: "",
42
+ default: "",
43
+ },
44
+ {
45
+ name: "size",
46
+ type: "string | number",
47
+ optional: false,
48
+ clickableType: false,
49
+ description: "",
50
+ default: "",
51
+ },
52
+ {
53
+ name: "color",
54
+ type: "string",
55
+ optional: true,
56
+ clickableType: false,
57
+ description: "",
58
+ default: "",
59
+ },
60
+ {
61
+ name: "thickness",
62
+ type: "number",
63
+ optional: false,
64
+ clickableType: false,
65
+ description: "",
66
+ default: "",
67
+ },
68
+ ];
@@ -1,4 +1,19 @@
1
1
  // Linear progress
2
+ .q-linear-progress {
3
+ height: 1rem;
4
+ @include border;
5
+
6
+ &__progress {
7
+ position: absolute;
8
+ background-color: var(--active);
9
+ top: 0;
10
+ bottom: 0;
11
+ left: 0;
12
+ right: 0;
13
+ transition: var(--speed4) clip-path;
14
+ clip-path: polygon(0% 0%, 0% 0%, 0% 0%, 0% 0%);
15
+ }
16
+ }
2
17
 
3
18
  // Circular progress
4
19
  .q-circular-progress {
@@ -0,0 +1,2 @@
1
+ import type { QComponentDocs } from "../../utils/types";
2
+ export declare let QRailbarDocs: QComponentDocs;
@@ -0,0 +1,11 @@
1
+ import { QRailbarDocsProps } from "./docs.props";
2
+ export let QRailbarDocs = {
3
+ name: "QRailbar",
4
+ description: "Railbars are used to provide navigation between different sections or views within an application.",
5
+ docs: {
6
+ props: QRailbarDocsProps,
7
+ slots: [],
8
+ methods: [],
9
+ events: [],
10
+ },
11
+ };
@@ -1,4 +1,5 @@
1
- <script>import { onDestroy, onMount } from "svelte";
1
+ <script>import QIcon from "../icon/QIcon.svelte";
2
+ import { onDestroy, onMount } from "svelte";
2
3
  import { createClasses } from "../../utils/props";
3
4
  import { textWidth } from "../../utils/fields";
4
5
  import { browser } from "$app/environment";
@@ -129,9 +130,10 @@ onDestroy(() => {
129
130
  disabled={disable}
130
131
  />
131
132
 
132
- <i class="q-select__arrow-toggle" class:q-select__arrow-toggle--has-append={$$slots.append}
133
- >{`arrow_drop_${isMenuOpen ? "up" : "down"}`}</i
134
- >
133
+ <QIcon
134
+ class="q-select__arrow-toggle {$$slots.append ? 'q-select__arrow-toggle--has-append' : ''}"
135
+ name={`arrow_drop_${isMenuOpen ? "up" : "down"}`}
136
+ />
135
137
 
136
138
  <slot name="append" />
137
139
 
@@ -1,9 +1,9 @@
1
1
  export const QSelectDocsProps = [
2
2
  {
3
3
  name: "value",
4
- type: "string | string[]",
4
+ type: "string | string[] | number | number[]",
5
5
  optional: false,
6
- clickableType: false,
6
+ clickableType: true,
7
7
  description: "",
8
8
  default: "",
9
9
  },
@@ -0,0 +1,2 @@
1
+ import type { QComponentDocs } from "../../utils/types";
2
+ export declare let QSeparatorDocs: QComponentDocs;
@@ -0,0 +1,11 @@
1
+ import { QSeparatorPropsVertical } from "./docs.props";
2
+ export let QSeparatorDocs = {
3
+ name: "QSeparator",
4
+ description: "Separators can be used to create a dividing line or space between elements within a layout, offering visual separation and organization.",
5
+ docs: {
6
+ props: QSeparatorPropsVertical,
7
+ slots: [],
8
+ methods: [],
9
+ events: [],
10
+ },
11
+ };
@@ -0,0 +1,2 @@
1
+ import type { QComponentDocs } from "../../utils/types";
2
+ export declare let QTabsDocs: QComponentDocs;
@@ -0,0 +1,11 @@
1
+ import { QTabsDocsProps } from "./docs.props";
2
+ export let QTabsDocs = {
3
+ name: "QTabs",
4
+ description: "Tabs allow creating navigational tabs, enabling users to switch between different views or functional aspects.",
5
+ docs: {
6
+ props: QTabsDocsProps,
7
+ slots: [],
8
+ methods: [],
9
+ events: [],
10
+ },
11
+ };
@@ -8,10 +8,10 @@ export const QTabsDocsProps = [
8
8
  default: "",
9
9
  },
10
10
  {
11
- name: "vertical",
12
- type: "boolean",
11
+ name: "variant",
12
+ type: "QTabsVariants",
13
13
  optional: false,
14
- clickableType: false,
14
+ clickableType: true,
15
15
  description: "",
16
16
  default: "",
17
17
  },
@@ -23,14 +23,6 @@ export const QTabsDocsProps = [
23
23
  description: "",
24
24
  default: "",
25
25
  },
26
- {
27
- name: "smallIndicator",
28
- type: "boolean",
29
- optional: false,
30
- clickableType: false,
31
- description: "",
32
- default: "",
33
- },
34
26
  ];
35
27
  export const QTabDocsProps = [
36
28
  {
@@ -0,0 +1,10 @@
1
+ <script>import { createClasses } from "../../utils/props";
2
+ export let shrink = false, userClasses = void 0, userStyles = void 0;
3
+ export { userClasses as class, userStyles as style };
4
+ $:
5
+ classes = createClasses([shrink && "shrink", userClasses], { component: "q-toolbar-title" });
6
+ </script>
7
+
8
+ <div class={classes} {...$$restProps} style={userStyles}>
9
+ <slot />
10
+ </div>
@@ -0,0 +1,22 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import type { QToolbarTitleProps } from "./props";
3
+ declare const __propDef: {
4
+ props: {
5
+ [x: string]: any;
6
+ shrink?: boolean | undefined;
7
+ class?: string | undefined;
8
+ style?: string | undefined;
9
+ };
10
+ events: {
11
+ [evt: string]: CustomEvent<any>;
12
+ };
13
+ slots: {
14
+ default: {};
15
+ };
16
+ };
17
+ type QToolbarTitleProps_ = typeof __propDef.props;
18
+ export { QToolbarTitleProps_ as QToolbarTitleProps };
19
+ export type QToolbarTitleEvents = typeof __propDef.events;
20
+ export type QToolbarTitleSlots = typeof __propDef.slots;
21
+ export default class QToolbarTitle extends SvelteComponent<QToolbarTitleProps, QToolbarTitleEvents, QToolbarTitleSlots> {
22
+ }
@@ -0,0 +1,2 @@
1
+ import type { QComponentDocs } from "../../utils/types";
2
+ export declare let QToolbarDocs: QComponentDocs;
@@ -0,0 +1,11 @@
1
+ import { QToolbarDocsProps } from "./docs.props";
2
+ export let QToolbarDocs = {
3
+ name: "QToolbar",
4
+ description: "The Toolbar component is used to hold common actions and controls, often located at the top of an application or view.",
5
+ docs: {
6
+ props: QToolbarDocsProps,
7
+ slots: [],
8
+ methods: [],
9
+ events: [],
10
+ },
11
+ };
@@ -6,3 +6,11 @@ export declare const QToolbarDocsProps: {
6
6
  description: string;
7
7
  default: string;
8
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
+ }[];
@@ -16,3 +16,13 @@ export const QToolbarDocsProps = [
16
16
  default: "",
17
17
  },
18
18
  ];
19
+ export const QToolbarTitleDocsProps = [
20
+ {
21
+ name: "shrink",
22
+ type: "boolean",
23
+ optional: false,
24
+ clickableType: false,
25
+ description: "",
26
+ default: "",
27
+ },
28
+ ];
@@ -1,7 +1,34 @@
1
1
  .q-toolbar {
2
2
  width: 100%;
3
+ padding: 0 1rem;
3
4
  transition: all var(--speed3);
5
+ background-color: var(--surface);
6
+
7
+ nav {
8
+ display: flex;
9
+ align-items: center;
10
+ justify-content: flex-start;
11
+ white-space: nowrap;
12
+ gap: 1rem;
13
+
14
+ > * {
15
+ margin: 0;
16
+ }
17
+ }
18
+
4
19
  &--inset {
5
20
  padding-left: 58px;
6
21
  }
7
22
  }
23
+
24
+ .q-toolbar-title {
25
+ display: flex;
26
+ flex: auto;
27
+ font-size: 1.75rem;
28
+ font-weight: 400;
29
+ justify-content: center;
30
+
31
+ &--shrink {
32
+ flex: unset;
33
+ }
34
+ }
@@ -4,3 +4,7 @@ export interface QToolbarProps extends NativeProps {
4
4
  height: string | number;
5
5
  }
6
6
  export declare const QToolbarPropsDefaults: QToolbarProps;
7
+ export interface QToolbarTitleProps extends NativeProps {
8
+ shrink: boolean;
9
+ }
10
+ export declare const QToolbarTitlePropsDefaults: QToolbarTitleProps;
@@ -4,3 +4,7 @@ export const QToolbarPropsDefaults = {
4
4
  height: "64px",
5
5
  ...NativePropsDefaults,
6
6
  };
7
+ export const QToolbarTitlePropsDefaults = {
8
+ shrink: false,
9
+ ...NativePropsDefaults,
10
+ };
@@ -2,12 +2,10 @@
2
2
  export let value = void 0, position = "bottom", userClasses = "";
3
3
  export { userClasses as class };
4
4
  $:
5
- classes = createClasses([
6
- "q-tooltip tooltip",
7
- value !== false && "active",
8
- position,
5
+ classes = createClasses([value && "active", position || "top"], {
6
+ component: "q-tooltip",
9
7
  userClasses
10
- ]);
8
+ });
11
9
  </script>
12
10
 
13
11
  <div class={classes} {...$$restProps}>
@@ -0,0 +1,2 @@
1
+ import type { QComponentDocs } from "../../utils/types";
2
+ export declare let QTooltipDocs: QComponentDocs;
@@ -0,0 +1,11 @@
1
+ import { QTooltipDocsProps } from "./docs.props";
2
+ export let QTooltipDocs = {
3
+ name: "QTooltip",
4
+ description: "The Tooltip component displays informative text on hover or focus, providing additional context.",
5
+ docs: {
6
+ props: QTooltipDocsProps,
7
+ slots: [],
8
+ methods: [],
9
+ events: [],
10
+ },
11
+ };
@@ -1,7 +1,82 @@
1
1
  .q-tooltip {
2
+ --space: -0.5rem;
3
+ visibility: hidden;
4
+ display: flex;
5
+ align-items: center;
6
+ justify-content: center;
7
+ gap: 0.5rem;
8
+ background-color: var(--inverse-surface);
9
+ color: var(--inverse-on-surface);
10
+ font-size: 0.75rem;
11
+ text-align: center;
12
+ border-radius: 0.25rem;
13
+ padding: 0.5rem;
14
+ position: absolute;
15
+ top: 0;
16
+ left: 50%;
17
+ bottom: auto;
18
+ right: auto;
19
+ transform: translate(-50%, -100%) scale(0.9);
20
+ width: auto;
21
+ white-space: nowrap;
22
+ font-weight: 500;
23
+ opacity: 0;
24
+ transition: var(--speed2) all;
2
25
  z-index: 9999;
26
+
27
+ &--top {
28
+ margin-top: var(--space) !important;
29
+ }
30
+
31
+ &--right {
32
+ right: 0;
33
+ top: 50%;
34
+ bottom: auto;
35
+ left: auto;
36
+ transform: translate(100%, -50%) scale(0.9);
37
+ margin-right: var(--space) !important;
38
+ }
39
+
40
+ &--bottom {
41
+ bottom: 0;
42
+ left: 50%;
43
+ top: auto;
44
+ right: auto;
45
+ transform: translate(-50%, 100%) scale(0.9);
46
+ margin-bottom: var(--space) !important;
47
+ }
48
+
49
+ &--left {
50
+ margin-left: var(--space) !important;
51
+
52
+ left: 0;
53
+ top: 50%;
54
+ bottom: auto;
55
+ right: auto;
56
+ transform: translate(-100%, -50%) scale(0.9);
57
+ }
3
58
  }
4
59
 
5
- :hover > .q-tooltip.tooltip:not(.active) {
6
- opacity: 0;
60
+ // Not easily integratable into the block above due to the :hover
61
+ :hover > .q-tooltip,
62
+ .q-tooltip--active {
63
+ visibility: visible;
64
+ opacity: 1;
65
+
66
+ &.q-tooltip {
67
+ &--top {
68
+ transform: translate(-50%, -100%) scale(1);
69
+ }
70
+ &--left {
71
+ transform: translate(-100%, -50%) scale(1);
72
+ }
73
+
74
+ &--right {
75
+ transform: translate(100%, -50%) scale(1);
76
+ }
77
+
78
+ &--bottom {
79
+ transform: translate(-50%, 100%) scale(1);
80
+ }
81
+ }
7
82
  }
@@ -1,12 +1,23 @@
1
1
  export const UseAlignPropsDefaults = {
2
2
  align: "top left",
3
3
  };
4
+ const alignMap = {
5
+ left: "start",
6
+ center: "center",
7
+ right: "end",
8
+ between: "between",
9
+ around: "around",
10
+ evenly: "evenly",
11
+ // @todo - justify-stretch isn't possible
12
+ stretch: "stretch",
13
+ };
4
14
  export default function useAlign(align = "top left") {
5
- const alignClass = align
15
+ const alignments = align
6
16
  .split(" ")
7
- .map((a) => `${a}-align`)
8
- .join(" ");
9
- return ["between", "around", "evenly", "stretch"].some((alignment) => align.split(" ").includes(alignment))
10
- ? `flex ${alignClass}`
11
- : `${alignClass}`;
17
+ .map((entry) => {
18
+ const val = alignMap[entry];
19
+ return val ? `justify-${val}` : false;
20
+ })
21
+ .filter((entry) => typeof entry === "string");
22
+ return ["flex", ...alignments].join(" ");
12
23
  }
@@ -1,9 +1,7 @@
1
+ export type Size = "xs" | "sm" | "md" | "lg" | "xl";
2
+ export declare const sizes: Size[];
1
3
  export declare const useSizeClasses: {
2
- xs: string;
3
- sm: string;
4
- md: string;
5
- lg: string;
6
- xl: string;
4
+ [key in Size]: string;
7
5
  };
8
6
  export interface useSizeProps {
9
7
  size?: string;
@@ -1,3 +1,5 @@
1
+ export const sizes = ["xs", "sm", "md", "lg", "xl"];
2
+ // @todo change classes or deprecate
1
3
  export const useSizeClasses = {
2
4
  xs: "tiny",
3
5
  sm: "small",
@@ -0,0 +1,41 @@
1
+ .flex {
2
+ display: flex !important;
3
+ flex-wrap: wrap;
4
+ }
5
+
6
+ .column {
7
+ flex-direction: column;
8
+ }
9
+
10
+ .items-center {
11
+ align-items: center;
12
+ }
13
+
14
+ .justify-center {
15
+ justify-content: center;
16
+ }
17
+
18
+ .justify-start {
19
+ justify-content: flex-start;
20
+ }
21
+
22
+ .justify-end {
23
+ justify-content: flex-end;
24
+ }
25
+
26
+ .justify-between {
27
+ justify-content: space-between;
28
+ }
29
+
30
+ .justify-around {
31
+ justify-content: space-around;
32
+ }
33
+
34
+ .justify-evenly {
35
+ justify-content: space-evenly;
36
+ }
37
+
38
+ .flex-center {
39
+ @extend .items-center;
40
+ @extend .justify-center;
41
+ }
@@ -0,0 +1,4 @@
1
+ @import "@fontsource/roboto";
2
+ @import "@fontsource/material-symbols-outlined";
3
+ @import "@fontsource/material-symbols-rounded";
4
+ @import "@fontsource/material-symbols-sharp";