@spectric/ui 0.0.21 → 0.0.22

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 (45) hide show
  1. package/dist/components/dialog/dialog.d.ts +1 -0
  2. package/dist/components/pagination/pagination.d.ts +1 -1
  3. package/dist/components/query_bar/QueryBar.d.ts +30 -10
  4. package/dist/components/query_bar/dateTimePopup.d.ts +2 -0
  5. package/dist/components/query_bar/geojsonPopup.d.ts +2 -0
  6. package/dist/components/query_bar/querylanguage/kuery/functions/geospatial.d.ts +19 -0
  7. package/dist/components/query_bar/querylanguage/outputTypes/toCQL.d.ts +2 -1
  8. package/dist/components/query_bar/querylanguage/outputTypes/toMongo.d.ts +6 -1
  9. package/dist/components/symbols.d.ts +6 -0
  10. package/dist/components/table/cell.d.ts +1 -1
  11. package/dist/components/table/table.d.ts +5 -1
  12. package/dist/custom-elements.json +5 -5
  13. package/dist/index.d.ts +4 -0
  14. package/dist/index.es.js +4382 -2795
  15. package/dist/index.es.js.map +1 -1
  16. package/dist/index.umd.js +349 -248
  17. package/dist/index.umd.js.map +1 -1
  18. package/dist/style.css +1 -1
  19. package/package.json +6 -1
  20. package/src/components/dialog/dialog.css.ts +29 -29
  21. package/src/components/dialog/dialog.ts +3 -1
  22. package/src/components/input.ts +49 -39
  23. package/src/components/pagination/pagination.ts +167 -113
  24. package/src/components/query_bar/QueryBar.ts +438 -187
  25. package/src/components/query_bar/dateTimePopup.ts +54 -0
  26. package/src/components/query_bar/geojsonPopup.ts +44 -0
  27. package/src/components/query_bar/querylanguage/kuery/ast/_generated_/kuery.js +1836 -2745
  28. package/src/components/query_bar/querylanguage/kuery/ast/ast.ts +15 -13
  29. package/src/components/query_bar/querylanguage/kuery/ast/kuery.peg +92 -126
  30. package/src/components/query_bar/querylanguage/kuery/functions/geospatial.ts +25 -0
  31. package/src/components/query_bar/querylanguage/kuery/functions/index.ts +9 -7
  32. package/src/components/query_bar/querylanguage/outputTypes/toCQL.ts +56 -34
  33. package/src/components/query_bar/querylanguage/outputTypes/toMongo.ts +46 -34
  34. package/src/components/symbols.ts +6 -0
  35. package/src/components/table/__tests__/table.spec.ts +2 -2
  36. package/src/components/table/cell.ts +7 -3
  37. package/src/components/table/header.ts +3 -2
  38. package/src/components/table/table.css +4 -2
  39. package/src/components/table/table.ts +61 -5
  40. package/src/components/table/virtualBody.ts +8 -3
  41. package/src/components/tooltip/popover.ts +263 -225
  42. package/src/stories/Dialog.stories.ts +59 -0
  43. package/src/stories/QueryBar.stories.ts +46 -37
  44. package/src/stories/fixtures/data.ts +195 -36
  45. package/src/stories/table.stories.ts +70 -22
@@ -1,261 +1,299 @@
1
-
2
- import { customElement, property, query } from 'lit/decorators.js';
3
- import "./tooltip.css"
4
- export const PopoverElementTag = "spectric-popover"
1
+ import { customElement, property, query } from "lit/decorators.js";
2
+ import "./tooltip.css";
3
+ export const PopoverElementTag = "spectric-popover";
5
4
  import { css, CSSResultGroup, html } from "lit-element";
6
5
  import { DomRenderable } from "../table";
7
- import { DisposableElement } from '../../classes/DisposibleElement';
8
- import { HTMLElementTagWithEvents, ReactElementWithPropsAndEvents } from '../types';
9
- export type { TooltipProps, PopOverEvents }
6
+ import { DisposableElement } from "../../classes/DisposibleElement";
7
+ import {
8
+ HTMLElementTagWithEvents,
9
+ ReactElementWithPropsAndEvents,
10
+ } from "../types";
11
+ export type { TooltipProps, PopOverEvents };
10
12
  export enum TooltipPostions {
11
- top = "top",
12
- bottom = "bottom",
13
- left = "left",
14
- right = "right",
15
- mouse = "mouse"
13
+ top = "top",
14
+ bottom = "bottom",
15
+ left = "left",
16
+ right = "right",
17
+ mouse = "mouse",
16
18
  }
17
19
 
18
- export type TooltipPostionsTypes = `${TooltipPostions}`
20
+ export type TooltipPostionsTypes = `${TooltipPostions}`;
19
21
  interface TooltipProps {
20
- /**
21
- * How long you need to hover before the tooltip displays
22
- */
23
- delay?: number;
24
- /**
25
- * How long the fade in animation should run
26
- */
27
- animationDuration?: number;
28
- /**
29
- * Tooltip contents
30
- */
31
- text: DomRenderable
32
- /**
33
- * Where to anchor the tooltip
34
- */
35
- position?: TooltipPostionsTypes
36
- /**
37
- * Sets a max width for the contents you can disable this by setting to 0 or -1
38
- */
39
- maxWidth?: number
40
- /**
41
- * Container the tool tip will be attached to.
42
- */
43
- portalTarget?: HTMLElement
22
+ /**
23
+ * How long you need to hover before the tooltip displays
24
+ */
25
+ delay?: number;
26
+ /**
27
+ * How long the fade in animation should run
28
+ */
29
+ animationDuration?: number;
30
+ /**
31
+ * Tooltip contents
32
+ */
33
+ text: DomRenderable;
34
+ /**
35
+ * Where to anchor the tooltip
36
+ */
37
+ position?: TooltipPostionsTypes;
38
+ /**
39
+ * Sets a max width for the contents you can disable this by setting to 0 or -1
40
+ */
41
+ maxWidth?: number;
42
+ /**
43
+ * Container the tool tip will be attached to.
44
+ */
45
+ portalTarget?: HTMLElement;
44
46
 
45
- /**
46
- * The element that triggers the tooltip. This is used for special cases like in the shadow dom if you want to target a host element instead of the immediate parent element
47
- */
48
- triggerTarget?: HTMLElement
49
- mouseOffsetX?: number
50
- mouseOffsetY?: number
47
+ /**
48
+ * The element that triggers the tooltip. This is used for special cases like in the shadow dom if you want to target a host element instead of the immediate parent element
49
+ */
50
+ triggerTarget?: HTMLElement;
51
+ mouseOffsetX?: number;
52
+ mouseOffsetY?: number;
51
53
  }
52
54
 
53
55
  /**
54
- * Spectric tooltip will add a tooltip to any container
56
+ * Spectric tooltip will add a tooltip to any container
55
57
  */
56
58
  @customElement(PopoverElementTag)
57
59
  export class PopoverElement extends DisposableElement implements TooltipProps {
58
- @property({ type: Number, reflect: true })
59
- delay: number = 100;
60
- @property({ type: Number, reflect: true })
61
- animationDuration: number = 0;
62
- @property({ type: String, reflect: false })
63
- text: DomRenderable = "";
64
- @property({ type: String, reflect: true })
65
- position: TooltipPostionsTypes = "right";
66
- @property({ type: Number, reflect: true })
67
- maxWidth?: number = 300;
68
- @property({ type: Number, reflect: false })
69
- mouseOffsetX = 10
70
- @property({ type: Number, reflect: false })
71
- mouseOffsetY = 0
72
- @query(".spectric-popover-portal")
73
- protected portalElement!: HTMLDivElement
74
- protected mouseLocation?: { left: number; top: number; };
75
- static styles?: CSSResultGroup | undefined = css`:host{max-height: 0px;
76
- max-width: 0px;
77
- display: none;
78
- pointer-events:none;}`;
79
- @property({ attribute: false })
80
- portalTarget: HTMLElement = document.body
81
- protected timer?: number;
82
- protected open: boolean = false;
83
- protected mouseframe?: number;
84
- isOpen() {
85
- return this.open
60
+ @property({ type: Number, reflect: true })
61
+ delay: number = 100;
62
+ @property({ type: Number, reflect: true })
63
+ animationDuration: number = 0;
64
+ @property({ type: String, reflect: false })
65
+ text: DomRenderable = "";
66
+ @property({ type: String, reflect: true })
67
+ position: TooltipPostionsTypes = "right";
68
+ @property({ type: Number, reflect: true })
69
+ maxWidth?: number = 300;
70
+ @property({ type: Number, reflect: false })
71
+ mouseOffsetX = 10;
72
+ @property({ type: Number, reflect: false })
73
+ mouseOffsetY = 0;
74
+ @query(".spectric-popover-portal")
75
+ protected portalElement!: HTMLDivElement;
76
+ protected mouseLocation?: { left: number; top: number };
77
+ static styles?: CSSResultGroup | undefined = css`
78
+ :host {
79
+ max-height: 0px;
80
+ max-width: 0px;
81
+ display: none;
82
+ pointer-events: none;
86
83
  }
84
+ `;
85
+ @property({ attribute: false })
86
+ portalTarget: HTMLElement = document.body;
87
+ protected timer?: number;
88
+ protected open: boolean = false;
89
+ protected mouseframe?: number;
90
+ isOpen() {
91
+ return this.open;
92
+ }
93
+ /**
94
+ * @default parentElement
95
+ */
96
+ @property({ attribute: false })
97
+ triggerTarget!: HTMLElement;
98
+ protected get target() {
99
+ return this.triggerTarget || this.parentElement;
100
+ }
101
+ constructor() {
102
+ super();
87
103
  /**
88
- * @default parentElement
104
+ * Public method to trigger showing the tooltip programatically
89
105
  */
90
- @property({ attribute: false })
91
- triggerTarget!: HTMLElement;
92
- protected get target() {
93
- return this.triggerTarget || this.parentElement
106
+ this.showPopover = this.showPopover.bind(this);
107
+ this.hidePopover = this.hidePopover.bind(this);
108
+ this.addDisposableListener(
109
+ () => this.target,
110
+ "mousemove",
111
+ this._getMousePosition
112
+ );
113
+ }
114
+ protected createRenderRoot(): HTMLElement | DocumentFragment {
115
+ return this;
116
+ }
117
+ connectedCallback(): void {
118
+ super.connectedCallback();
119
+ //this.portalElement = document.createElement("div")
120
+ //this.portalElement.className = "spectric-tooltip-portal"
121
+ }
122
+ disconnectedCallback(): void {
123
+ super.disconnectedCallback();
124
+ //this.portalElement.remove()
125
+ //@ts-ignore
126
+ //this.portalElement = undefined
127
+ }
128
+ protected _getMousePosition = (ev: MouseEvent) => {
129
+ this.mouseLocation = {
130
+ left: ev.clientX,
131
+ top: ev.clientY,
132
+ };
133
+ if (this.position == "mouse" && this.open && !this.mouseframe) {
134
+ this.mouseframe = requestAnimationFrame(() => this.positionTooltip());
94
135
  }
95
- constructor() {
96
- super()
97
- /**
98
- * Public method to trigger showing the tooltip programatically
99
- */
100
- this.showPopover = this.showPopover.bind(this)
101
- this.hidePopover = this.hidePopover.bind(this)
102
- this.addDisposableListener(() => this.target, "mousemove", this._getMousePosition)
136
+ };
137
+ /**
138
+ * Public method to trigger hide the tooltip programatically
139
+ */
140
+ public hidePopover() {
141
+ if (this.timer) {
142
+ clearTimeout(this.timer);
103
143
  }
104
- protected createRenderRoot(): HTMLElement | DocumentFragment {
105
- return this
144
+ this.open = false;
145
+ this.portalElement.hidePopover();
146
+ }
147
+ /**
148
+ * Public method to trigger showing the tooltip programatically
149
+ */
150
+ public async showPopover() {
151
+ if (this.timer) {
152
+ clearTimeout(this.timer);
106
153
  }
107
- connectedCallback(): void {
108
- super.connectedCallback()
109
- //this.portalElement = document.createElement("div")
110
- //this.portalElement.className = "spectric-tooltip-portal"
154
+ await new Promise((resolve) => {
155
+ this.timer = window.setTimeout(resolve, this.delay);
156
+ });
157
+ // this.portalElement.className = `spectric-popover-portal ${this.position}`
158
+ // const tooltip = html`<div class="tooltip-container">
159
+ // <span class="tooltip-caret"></span>
160
+ // <div class="tooltip-content">${this.text}</div>
161
+ // </div>`
162
+ // render(tooltip, this.portalElement)
163
+ // //with the delay it is possible that the triggering element was removed or hidden lets check that it is visible
164
+ // if (!this.target || !this.target.checkVisibility()) {
165
+ // return
166
+ // }
167
+ // //We need to append our tooltip and let the css updates apply before we can take measurements
168
+ // this.portalTarget.appendChild(this.portalElement)
169
+ if (!this.isConnected) {
170
+ return;
111
171
  }
112
- disconnectedCallback(): void {
113
- super.disconnectedCallback();
114
- //this.portalElement.remove()
115
- //@ts-ignore
116
- //this.portalElement = undefined
172
+ this.portalElement.showPopover();
173
+ this.open = true;
174
+ requestAnimationFrame(this.positionTooltip);
175
+ }
176
+ protected applyStyle = (style: Record<string, string>) => {
177
+ Object.entries(style).forEach(([prop, value]) => {
178
+ this.portalElement.style.setProperty(prop, value);
179
+ });
180
+ };
181
+ protected positionTooltip = () => {
182
+ if (!this.target) {
183
+ //We got detached before the animation frame completed
184
+ return;
117
185
  }
118
- protected _getMousePosition = (ev: MouseEvent) => {
119
- this.mouseLocation = {
120
- left: ev.clientX,
121
- top: ev.clientY
122
- }
123
- if (this.position == "mouse" && this.open && !this.mouseframe) {
124
- this.mouseframe = requestAnimationFrame(() => this.positionTooltip())
125
- }
126
- }
127
- /**
128
- * Public method to trigger hide the tooltip programatically
129
- */
130
- public hidePopover() {
131
- if (this.timer) {
132
- clearTimeout(this.timer)
133
- }
134
- this.open = false
135
- this.portalElement.hidePopover()
186
+ //Since we are attaching to a body we need to send the correct styles from the target portion of the dom to the portal element
187
+
188
+ let styles: Record<string, string> = {};
189
+ const bounds = this.target.getBoundingClientRect();
190
+ const portalBounds = this.portalElement.getBoundingClientRect();
191
+ if (this.target !== document.body) {
192
+ if (this.maxWidth && this.maxWidth > 0) {
193
+ portalBounds.width = Math.min(portalBounds.width, this.maxWidth);
194
+ }
136
195
  }
137
- /**
138
- * Public method to trigger showing the tooltip programatically
139
- */
140
- public async showPopover() {
141
- if (this.timer) {
142
- clearTimeout(this.timer)
143
- }
144
- await new Promise(resolve => {
145
- this.timer = window.setTimeout(resolve, this.delay)
146
- })
147
- // this.portalElement.className = `spectric-popover-portal ${this.position}`
148
- // const tooltip = html`<div class="tooltip-container">
149
- // <span class="tooltip-caret"></span>
150
- // <div class="tooltip-content">${this.text}</div>
151
- // </div>`
152
- // render(tooltip, this.portalElement)
153
- // //with the delay it is possible that the triggering element was removed or hidden lets check that it is visible
154
- // if (!this.target || !this.target.checkVisibility()) {
155
- // return
156
- // }
157
- // //We need to append our tooltip and let the css updates apply before we can take measurements
158
- // this.portalTarget.appendChild(this.portalElement)
159
- this.portalElement.showPopover()
160
- this.open = true
161
- requestAnimationFrame(this.positionTooltip)
196
+ let location: {
197
+ left: string;
198
+ top: string;
199
+ };
200
+ if (this.position === "mouse" && this.mouseLocation) {
201
+ this.mouseframe = undefined;
202
+ location = {
203
+ left: this.mouseLocation.left + this.mouseOffsetX + "px",
204
+ top:
205
+ this.mouseLocation.top +
206
+ this.mouseOffsetY -
207
+ portalBounds.height / 2 +
208
+ "px",
209
+ };
210
+ } else if (this.position === "top") {
211
+ location = {
212
+ top: bounds.top - portalBounds.height + "px",
213
+ left: bounds.left + bounds.width / 2 - portalBounds.width / 2 + "px",
214
+ };
215
+ } else if (this.position === "bottom") {
216
+ location = {
217
+ top: bounds.bottom + "px",
218
+ left: bounds.left + bounds.width / 2 - portalBounds.width / 2 + "px",
219
+ };
220
+ } else if (this.position === "left") {
221
+ location = {
222
+ top:
223
+ Math.max(
224
+ 0,
225
+ bounds.top + bounds.height / 2 - portalBounds.height / 2
226
+ ) + "px",
227
+ left: bounds.left - portalBounds.width + "px",
228
+ };
229
+ } else if (this.position === "right") {
230
+ location = {
231
+ top:
232
+ Math.max(
233
+ 0,
234
+ bounds.top + bounds.height / 2 - portalBounds.height / 2
235
+ ) + "px",
236
+ left: bounds.right + "px",
237
+ };
238
+ } else {
239
+ location = { left: "0px", top: "0px" };
240
+ console.error("Unknown position... Maybe we sould implement auto?");
162
241
  }
163
- protected applyStyle = (style: Record<string, string>) => {
164
- Object.entries(style).forEach(([prop, value]) => {
165
- this.portalElement.style.setProperty(prop, value)
166
- })
242
+ this.applyStyle({ ...styles, ...location });
243
+ if (this.position !== "mouse") {
244
+ this.portalElement.animate(
245
+ { opacity: [0, 1] },
246
+ { duration: this.animationDuration }
247
+ );
167
248
  }
168
- protected positionTooltip = () => {
169
- if (!this.target) {
170
- //We got detached before the animation frame completed
171
- return
172
- }
173
- //Since we are attaching to a body we need to send the correct styles from the target portion of the dom to the portal element
174
-
175
- let styles: Record<string, string> = {
176
-
177
- }
178
- const bounds = this.target.getBoundingClientRect()
179
- const portalBounds = this.portalElement.getBoundingClientRect()
180
- if (this.target !== document.body) {
181
- if (this.maxWidth && this.maxWidth > 0) {
182
- portalBounds.width = Math.min(portalBounds.width, this.maxWidth)
183
- }
184
- }
185
- let location: {
186
- left: string;
187
- top: string;
188
- };
189
- if (this.position === "mouse" && this.mouseLocation) {
190
- this.mouseframe = undefined
191
- location = { left: this.mouseLocation.left + this.mouseOffsetX + "px", top: this.mouseLocation.top + this.mouseOffsetY - (portalBounds.height / 2) + "px" }
192
- } else if (this.position === "top") {
193
- location = {
194
- top: bounds.top - portalBounds.height + "px",
195
- left: (bounds.left + (bounds.width / 2)) - (portalBounds.width / 2) + "px"
196
- }
197
- } else if (this.position === "bottom") {
198
- location = {
199
- top: bounds.bottom + "px",
200
- left: (bounds.left + (bounds.width / 2)) - (portalBounds.width / 2) + "px"
201
- }
202
- } else if (this.position === "left") {
203
- location = {
204
- top: Math.max(0, bounds.top + bounds.height / 2 - portalBounds.height / 2) + "px",
205
- left: bounds.left - (portalBounds.width) + "px"
206
- }
207
- } else if (this.position === "right") {
208
- location = {
209
- top: Math.max(0, bounds.top + bounds.height / 2 - portalBounds.height / 2) + "px",
210
- left: bounds.right + "px"
211
- }
212
- } else {
213
- location = { left: "0px", top: "0px" };
214
- console.error("Unknown position... Maybe we sould implement auto?")
215
- }
216
- this.applyStyle({ ...styles, ...location })
217
- if (this.position !== "mouse") {
218
- this.portalElement.animate({ opacity: [0, 1] }, { duration: this.animationDuration })
219
- }
220
- }
221
- protected render() {
222
- return html`<!-- ToolTip -->
223
- <div class="spectric-popover-portal ${this.position}" popover>
249
+ };
250
+ protected render() {
251
+ return html`<!-- ToolTip -->
252
+ <div class="spectric-popover-portal ${this.position}" popover>
224
253
  <div class="tooltip-container">
225
- <span class="tooltip-caret"></span>
226
- <div class="tooltip-content">${this.text}<slot></slot></div>
254
+ <span class="tooltip-caret"></span>
255
+ <div class="tooltip-content">${this.text}<slot></slot></div>
227
256
  </div>
228
- </div>`
229
- }
257
+ </div>`;
258
+ }
230
259
  }
231
260
 
232
261
  interface PopOverEvents {
233
- //'open': (event: CustomEvent<{ pagination: PaginationChangeProps }>) => void;
234
- //'filter': (event: CustomEvent<FilterEvent>) => void;
262
+ //'open': (event: CustomEvent<{ pagination: PaginationChangeProps }>) => void;
263
+ //'filter': (event: CustomEvent<FilterEvent>) => void;
235
264
  }
236
265
 
237
-
238
266
  declare global {
239
- interface HTMLElementTagNameMap {
240
- [PopoverElementTag]: HTMLElementTagWithEvents<PopoverElement, PopOverEvents>
241
-
267
+ interface HTMLElementTagNameMap {
268
+ [PopoverElementTag]: HTMLElementTagWithEvents<
269
+ PopoverElement,
270
+ PopOverEvents
271
+ >;
272
+ }
273
+ namespace JSX {
274
+ interface IntrinsicElements {
275
+ /**
276
+ * @see {@link TooltipElement}
277
+ */
278
+ [PopoverElementTag]: ReactElementWithPropsAndEvents<
279
+ PopoverElement,
280
+ TooltipProps,
281
+ PopOverEvents
282
+ >;
242
283
  }
284
+ }
285
+ namespace React {
243
286
  namespace JSX {
244
- interface IntrinsicElements {
245
- /**
246
- * @see {@link TooltipElement}
247
- */
248
- [PopoverElementTag]: ReactElementWithPropsAndEvents<PopoverElement, TooltipProps, PopOverEvents>;
249
- }
250
- }
251
- namespace React {
252
- namespace JSX {
253
- interface IntrinsicElements {
254
- /**
255
- * @see {@link TooltipElement}
256
- */
257
- [PopoverElementTag]: ReactElementWithPropsAndEvents<PopoverElement, TooltipProps, PopOverEvents>
258
- }
259
- }
287
+ interface IntrinsicElements {
288
+ /**
289
+ * @see {@link TooltipElement}
290
+ */
291
+ [PopoverElementTag]: ReactElementWithPropsAndEvents<
292
+ PopoverElement,
293
+ TooltipProps,
294
+ PopOverEvents
295
+ >;
296
+ }
260
297
  }
298
+ }
261
299
  }
@@ -0,0 +1,59 @@
1
+ import type { Meta, StoryObj } from "@storybook/web-components";
2
+ import { useArgs } from "@storybook/client-api";
3
+ import { type Props } from "../components/dialog";
4
+ import "../components/dialog";
5
+ import { html } from "lit";
6
+ import "./fixtures/ExampleContent";
7
+ import { unsafeHTML } from "lit/directives/unsafe-html.js";
8
+ const meta = {
9
+ title: "UI/Dialog",
10
+ // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
11
+ tags: ["autodocs"],
12
+ component: "spectric-dialog",
13
+ render: () => {
14
+ const [args, updateArgs] = useArgs();
15
+ console.log(args);
16
+ return html`
17
+ <spectric-dialog
18
+ @close=${() => updateArgs({ open: false })}
19
+ ?open=${args.open}
20
+ ?closeOnEscape=${args.closeOnEscape}
21
+ ?closeOnOutsideClick=${args.closeOnOutsideClick}
22
+ ?hideBackdrop=${args.hideBackdrop}
23
+ ?dismissable=${args.dismissable}
24
+ title=${args.title || ""}
25
+ >
26
+ <div>
27
+ This is my content
28
+ <lorum-ipsum style="width:400px;display:block"></lorum-ipsum>
29
+ </div>
30
+ ${args.footer && args.footer != ""
31
+ ? html` <div slot="footer">${html`${unsafeHTML(args.footer)}`}</div> `
32
+ : null}
33
+ </spectric-dialog>
34
+ `;
35
+ },
36
+ args: {
37
+ closeOnEscape: false,
38
+ closeOnOutsideClick: false,
39
+ dismissable: true,
40
+ hideBackdrop: false,
41
+ open: true,
42
+ title: "Basic Dialog",
43
+ footer: "<spectric-button>hello</spectric-button>",
44
+ },
45
+ argTypes: {
46
+ closeOnEscape: { control: { type: "boolean" } },
47
+ closeOnOutsideClick: { control: { type: "boolean" } },
48
+ dismissable: { control: { type: "boolean" } },
49
+ hideBackdrop: { control: { type: "boolean" } },
50
+ open: { control: { type: "boolean" } },
51
+ title: { control: { type: "text" } },
52
+ footer: { control: { type: "text" } },
53
+ },
54
+ } satisfies Meta<Props>;
55
+
56
+ export default meta;
57
+ type Story = StoryObj<Props>;
58
+
59
+ export const Default: Story = {};