@quaffui/quaff 0.1.0-prealpha6 → 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 (115) 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 -1
  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 +1 -1
  113. package/dist/helpers/version.js +1 -1
  114. package/dist/utils/types.json +1 -1
  115. package/package.json +5 -1
@@ -3,7 +3,7 @@ import { createEventDispatcher } from "svelte";
3
3
  import QIcon from "../icon/QIcon.svelte";
4
4
  import QCircularProgress from "../progress/QCircularProgress.svelte";
5
5
  import { activationHandler } from "../../helpers/activationHandler";
6
- export let icon = void 0, label = void 0, disable = false, loading = false, unelevated = false, outline = false, rectangle = false, flat = false, to = void 0, size = void 0, userClasses = void 0;
6
+ export let icon = void 0, label = void 0, disable = false, loading = false, unelevated = false, outline = false, round = false, rectangle = false, flat = false, to = void 0, size = void 0, userClasses = void 0;
7
7
  export { userClasses as class };
8
8
  const emit = createEventDispatcher();
9
9
  let tag;
@@ -16,7 +16,7 @@ $:
16
16
  rectangle && "rectangle",
17
17
  outline && "outlined",
18
18
  flat && "flat",
19
- !$$slots.default && !label && "circle",
19
+ (!$$slots.default && !label || round) && "round",
20
20
  size && size !== "md" && size
21
21
  ],
22
22
  {
@@ -9,6 +9,7 @@ declare const __propDef: {
9
9
  loading?: QBtnProps["loading"];
10
10
  unelevated?: QBtnProps["unelevated"];
11
11
  outline?: QBtnProps["outline"];
12
+ round?: QBtnProps["round"];
12
13
  rectangle?: QBtnProps["rectangle"];
13
14
  flat?: QBtnProps["flat"];
14
15
  to?: QBtnProps["to"];
@@ -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: "round",
60
+ type: "boolean",
61
+ optional: true,
62
+ clickableType: false,
63
+ description: "Use round design for the button, giving it a circular shape.",
64
+ default: "false",
65
+ },
58
66
  {
59
67
  name: "to",
60
68
  type: "string",
@@ -66,7 +66,7 @@
66
66
  border-radius: 0.5rem;
67
67
  }
68
68
 
69
- &.q-btn--circle {
69
+ &.q-btn--round {
70
70
  width: 2.5rem;
71
71
  height: 2.5rem;
72
72
  border-radius: 50%;
@@ -36,6 +36,11 @@ export interface QBtnProps extends NativeProps {
36
36
  * @default false
37
37
  */
38
38
  rectangle?: boolean;
39
+ /**
40
+ * Use round design for the button, giving it a circular shape.
41
+ * @default false
42
+ */
43
+ round?: boolean;
39
44
  /**
40
45
  * Makes the button navigational. Can be used with the router (e.g to="/home") or as a normal href attribute (e.g to="#section-id").
41
46
  * @default undefined
@@ -9,7 +9,7 @@ export const QCardDocsProps = [
9
9
  },
10
10
  {
11
11
  name: "fill",
12
- type: "string | boolean",
12
+ type: "boolean | QCardFillColors",
13
13
  optional: true,
14
14
  clickableType: false,
15
15
  description: "Defines the fill color of the card.",
@@ -1,3 +1,7 @@
1
1
  .q-checkbox {
2
2
  @include selection(checkbox);
3
+
4
+ > span::before {
5
+ content: "check_box_outline_blank";
6
+ }
3
7
  }
@@ -65,15 +65,15 @@ export const QChipDocsProps = [
65
65
  },
66
66
  {
67
67
  name: "size",
68
- type: '"small" | "medium" | "large"',
68
+ type: "QChipSizeOptions",
69
69
  optional: true,
70
- clickableType: false,
70
+ clickableType: true,
71
71
  description: "Size of the chip.",
72
72
  default: "small",
73
73
  },
74
74
  {
75
75
  name: "tabindex",
76
- type: "string | number",
76
+ type: "number",
77
77
  optional: true,
78
78
  clickableType: false,
79
79
  description: "Tabindex of the chip.",
@@ -33,7 +33,7 @@ async function copyCode() {
33
33
 
34
34
  <div class="q-code-block">
35
35
  {#if copiable}
36
- <div class="flex between-align {title ? 'middle' : 'right'}-align q-pb-sm">
36
+ <div class="flex justify-between {title ? 'items-center' : 'justify-end'} q-pb-sm">
37
37
  {#if title}
38
38
  <h4 class="q-ma-none q-pr-lg">{title}</h4>
39
39
  {/if}
@@ -11,14 +11,13 @@ $:
11
11
  $:
12
12
  positionClass = ["top", "right", "bottom", "left"].includes(position) ? position : void 0;
13
13
  $:
14
- classes = createClasses([
15
- "q-dialog",
16
- value && "active",
17
- positionClass,
18
- modal && "modal",
19
- fullscreen && "max",
20
- userClasses
21
- ]);
14
+ classes = createClasses(
15
+ [value && "active", positionClass, modal && "modal", fullscreen && "max"],
16
+ {
17
+ component: "q-dialog",
18
+ userClasses
19
+ }
20
+ );
22
21
  $:
23
22
  value === true ? modal ? dialogElement?.showModal() : dialogElement?.show() : dialogElement?.close();
24
23
  export function hide() {
@@ -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: "round",
60
+ type: "boolean",
61
+ optional: true,
62
+ clickableType: false,
63
+ description: "Use round design for the button, giving it a circular shape.",
64
+ default: "false",
65
+ },
58
66
  {
59
67
  name: "to",
60
68
  type: "string",
@@ -84,10 +92,10 @@ export const QDialogDocsProps = [
84
92
  {
85
93
  name: "value",
86
94
  type: "boolean",
87
- optional: true,
95
+ optional: false,
88
96
  clickableType: false,
89
97
  description: "The value indicating whether the dialog is visible or hidden.",
90
- default: "false",
98
+ default: "true",
91
99
  },
92
100
  {
93
101
  name: "noBtn",
@@ -1,10 +1,157 @@
1
- dialog.q-dialog {
1
+ .q-dialog {
2
+ display: block;
3
+ border: none;
4
+ opacity: 0;
5
+ visibility: hidden;
6
+ position: fixed;
7
+ box-shadow: var(--elevate2);
8
+ color: var(--on-surface);
9
+ background-color: var(--surface);
10
+ padding: 1rem;
11
+ z-index: 1000;
12
+ left: 50%;
13
+ top: 10%;
14
+ min-width: 20rem;
15
+ max-width: 100%;
16
+ max-height: 80%;
17
+ overflow-x: hidden;
18
+ overflow-y: auto;
19
+ transition:
20
+ var(--speed3) all,
21
+ 0s background-color;
22
+ transform: translate(-50%, -4rem);
2
23
  animation-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
3
24
 
4
- &:is(.left, .right, .top, .bottom) {
25
+ &:is(&--active, [open]) {
26
+ opacity: 1;
27
+ visibility: visible;
28
+ transform: translate(-50%, 0);
29
+ }
30
+
31
+ &::backdrop {
32
+ display: none;
33
+ }
34
+
35
+ &:not(&--left, &--right, &--top, &--bottom) {
36
+ border-radius: 0.75rem;
37
+ }
38
+
39
+ &--small {
40
+ width: 25%;
41
+ height: 25%;
42
+ }
43
+
44
+ &--medium {
45
+ width: 50%;
46
+ height: 50%;
47
+ }
48
+
49
+ &--large {
50
+ width: 75%;
51
+ height: 75%;
52
+ }
53
+
54
+ &:is(&--active, [open]) {
55
+ opacity: 1;
56
+ visibility: visible;
57
+ transform: translate(-50%, 0);
58
+ }
59
+
60
+ &:is(&--active, [open]):is(&--left, &--right, &--top, &--bottom, &--max) {
61
+ transform: translate(0, 0);
62
+ }
63
+
64
+ &--top {
65
+ opacity: 1;
66
+ top: 0;
67
+ left: 0;
68
+ right: auto;
69
+ bottom: auto;
70
+ height: auto;
71
+ width: 100%;
72
+ min-width: auto;
73
+ max-height: 100%;
74
+ transform: translateY(-100%);
75
+ }
76
+
77
+ &--left {
78
+ opacity: 1;
79
+ top: 0;
80
+ left: 0;
81
+ right: auto;
82
+ bottom: auto;
83
+ width: auto;
84
+ height: 100%;
85
+ max-height: 100%;
86
+ transform: translateX(-100%);
87
+ }
88
+
89
+ &--right {
90
+ opacity: 1;
91
+ top: 0;
92
+ left: auto;
93
+ right: 0;
94
+ bottom: auto;
95
+ width: auto;
96
+ height: 100%;
97
+ max-height: 100%;
98
+ transform: translateX(100%);
99
+ }
100
+
101
+ &--bottom {
102
+ opacity: 1;
103
+ top: auto;
104
+ left: 0;
105
+ right: auto;
106
+ bottom: 0;
107
+ height: auto;
108
+ width: 100%;
109
+ min-width: auto;
110
+ max-height: 100%;
111
+ transform: translateY(100%);
112
+ }
113
+
114
+ &--max {
115
+ top: 0;
116
+ left: 0;
117
+ right: auto;
118
+ bottom: auto;
119
+ width: 100%;
120
+ height: 100%;
121
+ max-width: 100%;
122
+ max-height: 100%;
123
+ transform: translateY(4rem);
124
+ }
125
+
126
+ &--small:is(&--left, &--right) {
127
+ width: 20rem;
128
+ }
129
+
130
+ &--medium:is(&--left, &--right) {
131
+ width: 32rem;
132
+ }
133
+
134
+ &--large:is(&--left, &--right) {
135
+ width: 44rem;
136
+ }
137
+
138
+ &--small:is(&--top, &--bottom) {
139
+ height: 16rem;
140
+ }
141
+
142
+ &--medium:is(&--top, &--bottom) {
143
+ height: 24rem;
144
+ }
145
+
146
+ &--large:is(&--top, &--bottom) {
147
+ height: 32rem;
148
+ }
149
+
150
+ &:is(&--left, &--right, &--top, &--bottom) {
5
151
  border-radius: 0;
6
152
  }
7
- &.modal::backdrop {
153
+
154
+ &--modal::backdrop {
8
155
  display: block;
9
156
  background-color: rgba(0, 0, 0, 0.5);
10
157
  }
@@ -82,6 +82,6 @@ function getBorderRadiusClasses(sideProp, overlayProp, context) {
82
82
  }
83
83
  </script>
84
84
 
85
- <div use:clickOutside={hide} class={classes} {style}>
85
+ <div use:clickOutside={hide} class={classes} {style} {...$$restProps}>
86
86
  <slot />
87
87
  </div>
@@ -2,6 +2,7 @@ import { SvelteComponent } from "svelte";
2
2
  import type { QDrawerProps } from "./props";
3
3
  declare const __propDef: {
4
4
  props: {
5
+ [x: string]: any;
5
6
  value?: QDrawerProps["value"];
6
7
  side?: QDrawerProps["side"];
7
8
  width?: QDrawerProps["width"];
@@ -1,23 +1,28 @@
1
- <script>import useSize from "../../composables/use-size";
2
- import { createClasses, createStyles } from "../../utils/props";
1
+ <script>import { createClasses, createStyles } from "../../utils/props";
3
2
  import { isNumber } from "../../utils/types";
4
- export let size = "md", name = void 0, type = "outlined", fill = false, svg = void 0, img = void 0, imgAttributes = {}, color = void 0, userClasses = void 0, userStyles = void 0;
3
+ import { sizes } from "../../composables/use-size";
4
+ 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;
5
5
  export { userClasses as class, userStyles as style };
6
+ let sizeStyle;
7
+ $: {
8
+ if (isNumber(size)) {
9
+ sizeStyle = `${size}px`;
10
+ } else if (typeof size === "string" && !sizes.includes(size)) {
11
+ sizeStyle = size;
12
+ } else {
13
+ sizeStyle = void 0;
14
+ }
15
+ }
6
16
  $:
7
- sizeStyle = useSize(size) === null ? isNumber(size) ? `${size}px` : size : void 0;
8
- $:
9
- classes = createClasses([
10
- "q-icon",
11
- `q-icon__${type}`,
12
- fill && "fill",
13
- useSize(size),
14
- color && `${color}-text`,
15
- userClasses
16
- ]);
17
+ classes = createClasses([type, filled && "filled", sizes.includes(size) && size], {
18
+ component: "q-icon",
19
+ userClasses,
20
+ quaffClasses: [color && `text-${color}`]
21
+ });
17
22
  $:
18
23
  style = createStyles(
19
24
  {
20
- "---size": sizeStyle
25
+ "--size": sizeStyle
21
26
  },
22
27
  userStyles
23
28
  );
@@ -5,7 +5,7 @@ declare const __propDef: {
5
5
  size?: import("./props").QIconSizeOptions | undefined;
6
6
  name?: QIconProps["name"];
7
7
  type?: import("./props").QIconTypeOptions | undefined;
8
- fill?: boolean | undefined;
8
+ filled?: boolean | undefined;
9
9
  svg?: QIconProps["svg"];
10
10
  img?: QIconProps["img"];
11
11
  imgAttributes?: Record<string, any> | undefined;
@@ -24,7 +24,7 @@ export const QIconDocsProps = [
24
24
  default: "undefined",
25
25
  },
26
26
  {
27
- name: "fill",
27
+ name: "filled",
28
28
  type: "boolean",
29
29
  optional: false,
30
30
  clickableType: false,
@@ -1,18 +1,75 @@
1
- $icon-font: "Material Symbols Outlined";
2
-
3
1
  .q-icon {
2
+ --font: "Material Symbols Outlined";
3
+ --size: 1.5rem;
4
4
  overflow: visible;
5
- font-family: $icon-font;
5
+ font-family: var(--font);
6
+ font-weight: normal;
7
+ font-style: normal;
8
+ font-size: var(--size);
9
+ letter-spacing: normal;
10
+ text-transform: none;
11
+ display: inline-flex;
12
+ align-items: center;
13
+ justify-content: center;
14
+ white-space: nowrap;
15
+ word-wrap: normal;
16
+ direction: ltr;
17
+ font-feature-settings: "liga";
18
+ -webkit-font-smoothing: antialiased;
19
+ vertical-align: middle;
20
+ text-align: center;
21
+ overflow: hidden;
22
+ width: var(--size);
23
+ min-width: var(--size);
24
+ height: var(--size);
25
+ min-height: var(--size);
26
+ box-sizing: content-box;
27
+ line-height: normal;
6
28
 
7
29
  &--outlined {
8
- $icon-font: "Material Symbols Outlined";
30
+ --font: "Material Symbols Outlined";
9
31
  }
10
32
 
11
33
  &--rounded {
12
- $icon-font: "Material Symbols Rounded";
34
+ --font: "Material Symbols Rounded";
13
35
  }
14
36
 
15
37
  &--sharp {
16
- $icon-font: "Material Symbols Sharp";
38
+ --font: "Material Symbols Sharp";
39
+ }
40
+
41
+ &--xs {
42
+ --size: 1rem;
43
+ }
44
+
45
+ &--sm {
46
+ --size: 1.25rem;
47
+ }
48
+
49
+ &--lg {
50
+ --size: 1.75rem;
51
+ }
52
+
53
+ &--xl {
54
+ --size: 2rem;
55
+ }
56
+
57
+ > :is(img, svg) {
58
+ width: 100%;
59
+ height: 100%;
60
+ background-size: 100%;
61
+ border-radius: inherit;
62
+ position: absolute;
63
+ top: 0;
64
+ left: 0;
65
+ padding: inherit;
66
+ }
67
+
68
+ &.filled
69
+ // we might need these selectors later:
70
+ // a.row:is(:hover, :focus) > i,
71
+ // .transparent:is(:hover, :focus) > i
72
+ {
73
+ font-variation-settings: "FILL" 1;
17
74
  }
18
75
  }
@@ -21,7 +21,7 @@ export interface QIconProps extends NativeProps {
21
21
  * Determines whether the icon should be filled.
22
22
  * @default false
23
23
  */
24
- fill: boolean;
24
+ filled: boolean;
25
25
  /**
26
26
  * The SVG content for the icon.
27
27
  * @default undefined
@@ -25,5 +25,6 @@ import QTab from "./tabs/QTab.svelte";
25
25
  import QTable from "./table/QTable.svelte";
26
26
  import QToggle from "./toggle/QToggle.svelte";
27
27
  import QToolbar from "./toolbar/QToolbar.svelte";
28
+ import QToolbarTitle from "./toolbar/QToolbarTitle.svelte";
28
29
  import QTooltip from "./tooltip/QTooltip.svelte";
29
- export { QAvatar, QBtn, QCard, QCardSection, QCardActions, QCheckbox, QChip, QCodeBlock, QDialog, QDrawer, QFooter, QIcon, QInput, QSelect, QLayout, QList, QItem, QItemSection, QLinearProgress, QRadio, QRailbar, QSeparator, QTabs, QTab, QTable, QToggle, QToolbar, QTooltip, };
30
+ export { QAvatar, QBtn, QCard, QCardSection, QCardActions, QCheckbox, QChip, QCodeBlock, QDialog, QDrawer, QFooter, QIcon, QInput, QSelect, QLayout, QList, QItem, QItemSection, QLinearProgress, QRadio, QRailbar, QSeparator, QTabs, QTab, QTable, QToggle, QToolbar, QToolbarTitle, QTooltip, };
@@ -25,5 +25,6 @@ import QTab from "./tabs/QTab.svelte";
25
25
  import QTable from "./table/QTable.svelte";
26
26
  import QToggle from "./toggle/QToggle.svelte";
27
27
  import QToolbar from "./toolbar/QToolbar.svelte";
28
+ import QToolbarTitle from "./toolbar/QToolbarTitle.svelte";
28
29
  import QTooltip from "./tooltip/QTooltip.svelte";
29
- export { QAvatar, QBtn, QCard, QCardSection, QCardActions, QCheckbox, QChip, QCodeBlock, QDialog, QDrawer, QFooter, QIcon, QInput, QSelect, QLayout, QList, QItem, QItemSection, QLinearProgress, QRadio, QRailbar, QSeparator, QTabs, QTab, QTable, QToggle, QToolbar, QTooltip, };
30
+ export { QAvatar, QBtn, QCard, QCardSection, QCardActions, QCheckbox, QChip, QCodeBlock, QDialog, QDrawer, QFooter, QIcon, QInput, QSelect, QLayout, QList, QItem, QItemSection, QLinearProgress, QRadio, QRailbar, QSeparator, QTabs, QTab, QTable, QToggle, QToolbar, QToolbarTitle, QTooltip, };
@@ -26,7 +26,7 @@ $:
26
26
  isActive = isRouteActive($Quaff.router, to);
27
27
  $:
28
28
  classes = createClasses([
29
- "q-item flex middle-align",
29
+ "q-item flex items-center",
30
30
  $hasMultiplLines && "multiline",
31
31
  dense && "dense",
32
32
  hasLink && active && "q-item--active",
@@ -0,0 +1,2 @@
1
+ import type { QComponentDocs } from "../../utils/types";
2
+ export declare let QListDocs: QComponentDocs;
@@ -0,0 +1,11 @@
1
+ import { QListDocsProps } from "./docs.props";
2
+ export let QListDocs = {
3
+ name: "QList",
4
+ description: "The QList component is used to display a list of items with options for adding text, icons and actions.",
5
+ docs: {
6
+ props: QListDocsProps,
7
+ slots: [],
8
+ methods: [],
9
+ events: [],
10
+ },
11
+ };
@@ -149,7 +149,7 @@ export const QListDocsProps = [
149
149
  },
150
150
  {
151
151
  name: "separatorOptions",
152
- type: 'QSeparatorProps["textAlign"]\r\n };',
152
+ type: 'QSeparatorProps["textAlign"]\n };',
153
153
  optional: false,
154
154
  clickableType: true,
155
155
  description: "",
@@ -24,6 +24,12 @@
24
24
  }
25
25
 
26
26
  .q-item {
27
+ display: flex;
28
+ align-items: center;
29
+ justify-content: flex-start;
30
+ white-space: nowrap;
31
+ gap: 1rem;
32
+
27
33
  min-width: 100%;
28
34
  min-height: 56px;
29
35
  margin-top: 0 !important;
@@ -34,28 +34,28 @@ function getType(type) {
34
34
  let found = type in Types ? Types[type] : void 0;
35
35
  return found;
36
36
  }
37
- function handleDrawer(QDocument, doc) {
37
+ function handleDrawer(QDocument, doc, e) {
38
+ e.stopPropagation();
38
39
  let content = getType(doc.type);
40
+ for (let docName in drawer[QDocument.name]) {
41
+ if (drawer[QDocument.name][docName] === true && docName !== doc.name) {
42
+ drawer[QDocument.name][docName] = false;
43
+ }
44
+ }
39
45
  if (!drawer[QDocument.name][doc.name]) {
40
- drawerContent = content;
41
- drawer[QDocument.name][doc.name] = true;
46
+ setTimeout(() => {
47
+ drawerContent = content;
48
+ drawer[QDocument.name][doc.name] = true;
49
+ }, 100);
42
50
  } else {
43
- if (content !== drawerContent) {
44
- drawer[QDocument.name][doc.name] = false;
45
- setTimeout(() => {
46
- drawerContent = content;
47
- drawer[QDocument.name][doc.name] = true;
48
- }, 250);
49
- } else {
50
- drawer[QDocument.name][doc.name] = false;
51
- }
51
+ drawer[QDocument.name][doc.name] = false;
52
52
  }
53
53
  }
54
54
  </script>
55
55
 
56
56
  {#each QComponentDocs as QDocument, index}
57
- <QCard class="q-px-none q-pb-none">
58
- <div slot="title" class="flex between-align middle-align q-px-md">
57
+ <QCard class="q-px-none q-pb-none q-mt-lg">
58
+ <div slot="title" class="flex justify-between items-center q-px-md">
59
59
  <h5 class="no-margin">
60
60
  <QIcon name="info" />
61
61
  <span class="q-ml-md">{QDocument.name} API</span>
@@ -64,7 +64,7 @@ function handleDrawer(QDocument, doc) {
64
64
  {#each Object.entries(QDocument.docs) as [tabName, _tabDoc]}
65
65
  {#if _tabDoc.length !== 0}
66
66
  <QTab name={tabName} style="min-width: 100px">
67
- <h6>{capitalize(tabName)}</h6>
67
+ <h6 style="margin: 0">{capitalize(tabName)}</h6>
68
68
  </QTab>
69
69
  {/if}
70
70
  {/each}
@@ -77,7 +77,7 @@ function handleDrawer(QDocument, doc) {
77
77
  {#if isProp(doc, index) && doc.clickableType}
78
78
  <QDrawer
79
79
  side="right"
80
- class="no-padding"
80
+ class="no-padding api-drawer"
81
81
  style="height: fit-content; max-height: 400%; overflow: auto; border-radius: 0;"
82
82
  bind:value={drawer[QDocument.name][doc.name]}
83
83
  width="50%"
@@ -87,7 +87,7 @@ function handleDrawer(QDocument, doc) {
87
87
  {/if}
88
88
  <QItemSection type="content" style="overflow: visible">
89
89
  <div slot="headline" class="q-my-sm" style="flex: 1 1 0; white-space: nowrap">
90
- <span class=" small-padding surface-variant small-round">
90
+ <span class="q-pa-sm surface-variant">
91
91
  <b>{doc.name}</b>
92
92
  {#if isProp(doc, index)}
93
93
  {doc.optional ? "?" : ""}
@@ -95,7 +95,7 @@ function handleDrawer(QDocument, doc) {
95
95
  <!-- svelte-ignore a11y-click-events-have-key-events -->
96
96
  <span
97
97
  class="prop-type clickable"
98
- on:click={() => isProp(doc, index) && handleDrawer(QDocument, doc)}
98
+ on:click={(e) => isProp(doc, index) && handleDrawer(QDocument, doc, e)}
99
99
  >
100
100
  : {doc.type}
101
101
  </span>
@@ -131,10 +131,11 @@ function handleDrawer(QDocument, doc) {
131
131
  .q-item {
132
132
  overflow: visible;
133
133
  }
134
- pre[class*=language-] {
134
+
135
+ :global(.q-drawer.api-drawer pre) {
135
136
  margin: 0;
136
- padding: 1em;
137
137
  border-radius: inherit;
138
+ white-space: pre-wrap;
138
139
  }
139
140
 
140
141
  :global(.prop-description > a:hover) {