@plusui/library 0.1.15 → 0.1.17

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 (127) hide show
  1. package/cdn/components/accordion/accordion.js +1 -1
  2. package/cdn/components/accordion/index.js +1 -1
  3. package/cdn/components/accordion-group/accordion-group.js +1 -1
  4. package/cdn/components/accordion-group/index.js +1 -1
  5. package/cdn/components/alert/alert.js +1 -1
  6. package/cdn/components/alert/index.js +1 -1
  7. package/cdn/components/avatar/avatar.js +1 -1
  8. package/cdn/components/avatar/index.js +1 -1
  9. package/cdn/components/badge/badge.js +1 -1
  10. package/cdn/components/badge/index.js +1 -1
  11. package/cdn/components/base/index.js +1 -1
  12. package/cdn/components/base/tailwind-base.js +1 -1
  13. package/cdn/components/breadcrumb/breadcrumb.js +1 -1
  14. package/cdn/components/breadcrumb/index.js +1 -1
  15. package/cdn/components/breadcrumb-item/breadcrumb-item.js +1 -1
  16. package/cdn/components/breadcrumb-item/index.js +1 -1
  17. package/cdn/components/button/button.js +1 -1
  18. package/cdn/components/button/index.js +1 -1
  19. package/cdn/components/button-group/button-group.js +1 -1
  20. package/cdn/components/button-group/index.js +1 -1
  21. package/cdn/components/checkbox/checkbox.js +1 -1
  22. package/cdn/components/checkbox/index.js +1 -1
  23. package/cdn/components/checkbox-group/checkbox-group.js +1 -1
  24. package/cdn/components/checkbox-group/index.js +1 -1
  25. package/cdn/components/chip/chip.js +1 -1
  26. package/cdn/components/chip/index.js +1 -1
  27. package/cdn/components/divider/divider.js +1 -1
  28. package/cdn/components/divider/index.js +1 -1
  29. package/cdn/components/drawer/drawer.js +1 -1
  30. package/cdn/components/drawer/index.js +1 -1
  31. package/cdn/components/dropdown/dropdown.js +1 -1
  32. package/cdn/components/dropdown/index.js +1 -1
  33. package/cdn/components/dropdown-item/dropdown-item.js +1 -1
  34. package/cdn/components/dropdown-item/index.js +1 -1
  35. package/cdn/components/index.js +1 -1
  36. package/cdn/components/input/index.js +1 -1
  37. package/cdn/components/input/input.js +1 -1
  38. package/cdn/components/link/index.js +1 -1
  39. package/cdn/components/link/link.js +1 -1
  40. package/cdn/components/list-box-item/index.js +1 -1
  41. package/cdn/components/list-box-item/list-box-item.js +1 -1
  42. package/cdn/components/modal/index.js +5 -1
  43. package/cdn/components/modal/modal.js +343 -83
  44. package/cdn/components/modal/modal.style.js +70 -41
  45. package/cdn/components/popconfirm/index.js +1 -1
  46. package/cdn/components/popconfirm/popconfirm.js +1 -1
  47. package/cdn/components/popover/index.js +1 -1
  48. package/cdn/components/popover/popover.js +1 -1
  49. package/cdn/components/radio/index.js +1 -1
  50. package/cdn/components/radio/radio.js +1 -1
  51. package/cdn/components/radio-group/index.js +1 -1
  52. package/cdn/components/radio-group/radio-group.js +1 -1
  53. package/cdn/components/rating/index.js +1 -1
  54. package/cdn/components/rating/rating.js +1 -1
  55. package/cdn/components/segmented-picker/index.js +1 -1
  56. package/cdn/components/segmented-picker/segmented-picker.component.js +1 -1
  57. package/cdn/components/segmented-picker-item/index.js +1 -1
  58. package/cdn/components/segmented-picker-item/segmented-picker-item.component.js +1 -1
  59. package/cdn/components/select/index.js +1 -1
  60. package/cdn/components/select/select.js +1 -1
  61. package/cdn/components/select-item/index.js +1 -1
  62. package/cdn/components/select-item/select-item.js +1 -1
  63. package/cdn/components/service/index.js +1 -1
  64. package/cdn/components/service/service.js +1 -1
  65. package/cdn/components/tab/index.js +1 -1
  66. package/cdn/components/tab/tab.js +1 -1
  67. package/cdn/components/tab-group/index.js +1 -1
  68. package/cdn/components/tab-group/tab-group.js +1 -1
  69. package/cdn/components/tab-panel/index.js +1 -1
  70. package/cdn/components/tab-panel/tab-panel.js +1 -1
  71. package/cdn/components/tag/index.js +1 -1
  72. package/cdn/components/tag/tag.js +1 -1
  73. package/cdn/components/text/index.js +1 -1
  74. package/cdn/components/text/text.js +1 -1
  75. package/cdn/components/textarea/index.js +1 -1
  76. package/cdn/components/textarea/textarea.js +1 -1
  77. package/cdn/components/toast/index.js +1 -1
  78. package/cdn/components/toast/toast.js +1 -1
  79. package/cdn/components/toast-container/index.js +1 -1
  80. package/cdn/components/toast-container/toast-container.js +1 -1
  81. package/cdn/components/toggle/index.js +1 -1
  82. package/cdn/components/toggle/toggle.js +1 -1
  83. package/cdn/components/tooltip/index.js +1 -1
  84. package/cdn/components/tooltip/tooltip.js +1 -1
  85. package/cdn/factory/tailwind-factory.js +1 -1
  86. package/cdn/global-BfmuDcaf.js +1 -0
  87. package/cdn/global-m-W73pez.js +31 -0
  88. package/custom-elements.json +226 -25
  89. package/dist/components/modal/index.js +4 -0
  90. package/dist/components/modal/modal.d.ts +95 -22
  91. package/dist/components/modal/modal.d.ts.map +1 -1
  92. package/dist/components/modal/modal.js +342 -82
  93. package/dist/components/modal/modal.js.map +1 -1
  94. package/dist/components/modal/modal.style.d.ts +297 -122
  95. package/dist/components/modal/modal.style.d.ts.map +1 -1
  96. package/dist/components/modal/modal.style.js +70 -41
  97. package/dist/components/modal/modal.style.js.map +1 -1
  98. package/dist/{if-defined-DKbfGhXu.js → if-defined-DBB3AQZw.js} +1 -1
  99. package/dist/index.css +1 -1
  100. package/dist/{live-CtqYa7Iz.js → live-Db5nLVo0.js} +1 -1
  101. package/dist/{property-DhJ1LIGX.js → property-C9Hzx3kj.js} +1 -1
  102. package/dist/{query-CJZ9rve2.js → query-RewOgxYG.js} +1 -1
  103. package/dist/{query-assigned-elements-BTKIEABn.js → query-assigned-elements-DY-CICub.js} +1 -1
  104. package/dist/{state-BJT7gLGV.js → state-B4zcCODl.js} +1 -1
  105. package/dist/{style-map-4vJ38bCf.js → style-map-sUMHadXp.js} +1 -1
  106. package/dist/styles/global.js +2 -2
  107. package/eslint/custom-element-eslint-rules.js +16 -0
  108. package/package.json +1 -1
  109. package/public/html/index.js +409 -124
  110. package/public/react/index.d.ts +145 -33
  111. package/public/react/index.js +433 -125
  112. package/react/PlusModal.d.ts +50 -11
  113. package/react/PlusModal.js +31 -2
  114. package/types/custom-element-jsx.d.ts +42 -11
  115. package/types/custom-element-solidjs.d.ts +42 -11
  116. package/types/custom-element-svelte.d.ts +42 -11
  117. package/types/custom-element-vuejs.d.ts +42 -11
  118. package/vscode.css-custom-data.json +10 -6
  119. package/vscode.html-custom-data.json +26 -1
  120. package/web-types.json +106 -11
  121. package/cdn/global-DGCiKnca.js +0 -1
  122. package/cdn/global-GTfSG3gU.js +0 -31
  123. /package/dist/{base-ByZpKIDU.js → base-CBi-OLn2.js} +0 -0
  124. /package/dist/{directive-rJcjnQEi.js → directive-B_gs7lGG.js} +0 -0
  125. /package/dist/{floating-ui.dom-CnRf1aAR.js → floating-ui.dom-Cv67XeEd.js} +0 -0
  126. /package/dist/{index-DUwBBqWm.js → index-Cobjj9Q1.js} +0 -0
  127. /package/dist/{lit-element-Bu7TYzc7.js → lit-element-naXdLm94.js} +0 -0
@@ -4356,27 +4356,31 @@
4356
4356
  "name": "PlusModal",
4357
4357
  "cssParts": [
4358
4358
  {
4359
- "description": "The main container element",
4360
- "name": "container"
4359
+ "description": "The native dialog element",
4360
+ "name": "dialog"
4361
4361
  },
4362
4362
  {
4363
- "description": "The overlay element",
4364
- "name": "overlay"
4363
+ "description": "The container wrapper for centering and scrolling",
4364
+ "name": "container"
4365
4365
  },
4366
4366
  {
4367
- "description": "The modal element",
4367
+ "description": "The main modal box",
4368
4368
  "name": "modal"
4369
4369
  },
4370
4370
  {
4371
- "description": "The header element",
4371
+ "description": "The header section",
4372
4372
  "name": "header"
4373
4373
  },
4374
4374
  {
4375
- "description": "The body element",
4375
+ "description": "The content wrapper inside header",
4376
+ "name": "header-content"
4377
+ },
4378
+ {
4379
+ "description": "The main content area",
4376
4380
  "name": "body"
4377
4381
  },
4378
4382
  {
4379
- "description": "The footer element",
4383
+ "description": "The footer section",
4380
4384
  "name": "footer"
4381
4385
  },
4382
4386
  {
@@ -4385,12 +4389,16 @@
4385
4389
  }
4386
4390
  ],
4387
4391
  "slots": [
4392
+ {
4393
+ "description": "Main content area (same as body slot)",
4394
+ "name": ""
4395
+ },
4388
4396
  {
4389
4397
  "description": "The header content of the modal",
4390
4398
  "name": "header"
4391
4399
  },
4392
4400
  {
4393
- "description": "The main content of the modal",
4401
+ "description": "The main content of the modal (alternative to default slot)",
4394
4402
  "name": "body"
4395
4403
  },
4396
4404
  {
@@ -4403,6 +4411,14 @@
4403
4411
  }
4404
4412
  ],
4405
4413
  "members": [
4414
+ {
4415
+ "kind": "field",
4416
+ "name": "dialogRef",
4417
+ "type": {
4418
+ "text": "HTMLDialogElement | undefined"
4419
+ },
4420
+ "privacy": "private"
4421
+ },
4406
4422
  {
4407
4423
  "kind": "field",
4408
4424
  "name": "size",
@@ -4414,6 +4430,17 @@
4414
4430
  "attribute": "size",
4415
4431
  "reflects": true
4416
4432
  },
4433
+ {
4434
+ "kind": "field",
4435
+ "name": "placement",
4436
+ "type": {
4437
+ "text": "'center' | 'top'"
4438
+ },
4439
+ "default": "'center'",
4440
+ "description": "The placement of the modal on the screen",
4441
+ "attribute": "placement",
4442
+ "reflects": true
4443
+ },
4417
4444
  {
4418
4445
  "kind": "field",
4419
4446
  "name": "isOpen",
@@ -4436,6 +4463,28 @@
4436
4463
  "attribute": "full-width",
4437
4464
  "reflects": true
4438
4465
  },
4466
+ {
4467
+ "kind": "field",
4468
+ "name": "fullScreen",
4469
+ "type": {
4470
+ "text": "boolean"
4471
+ },
4472
+ "default": "false",
4473
+ "description": "Makes the modal take the full screen (100vw x 100vh, no border radius)",
4474
+ "attribute": "full-screen",
4475
+ "reflects": true
4476
+ },
4477
+ {
4478
+ "kind": "field",
4479
+ "name": "backdrop",
4480
+ "type": {
4481
+ "text": "boolean | 'static'"
4482
+ },
4483
+ "default": "true",
4484
+ "description": "Controls backdrop behavior\n- true: Shows backdrop, modal can be closed by clicking outside\n- false: No backdrop\n- 'static': Shows backdrop but prevents closing by clicking outside (triggers shake animation)",
4485
+ "attribute": "backdrop",
4486
+ "reflects": true
4487
+ },
4439
4488
  {
4440
4489
  "kind": "field",
4441
4490
  "name": "closeOnBackdrop",
@@ -4458,6 +4507,28 @@
4458
4507
  "attribute": "close-on-esc",
4459
4508
  "reflects": true
4460
4509
  },
4510
+ {
4511
+ "kind": "field",
4512
+ "name": "noHeader",
4513
+ "type": {
4514
+ "text": "boolean"
4515
+ },
4516
+ "default": "false",
4517
+ "description": "Hides the header section completely",
4518
+ "attribute": "no-header",
4519
+ "reflects": true
4520
+ },
4521
+ {
4522
+ "kind": "field",
4523
+ "name": "noFooter",
4524
+ "type": {
4525
+ "text": "boolean"
4526
+ },
4527
+ "default": "false",
4528
+ "description": "Hides the footer section completely",
4529
+ "attribute": "no-footer",
4530
+ "reflects": true
4531
+ },
4461
4532
  {
4462
4533
  "kind": "field",
4463
4534
  "name": "animationDuration",
@@ -4480,42 +4551,89 @@
4480
4551
  },
4481
4552
  {
4482
4553
  "kind": "field",
4483
- "name": "keydownHandler",
4554
+ "name": "shake",
4484
4555
  "type": {
4485
- "text": "(e: KeyboardEvent) => void"
4556
+ "text": "boolean"
4486
4557
  },
4487
- "privacy": "private"
4558
+ "privacy": "private",
4559
+ "default": "false"
4488
4560
  },
4489
4561
  {
4490
4562
  "kind": "method",
4491
- "name": "hide",
4492
- "description": "Hides the modal with animation",
4563
+ "name": "show",
4493
4564
  "return": {
4494
4565
  "type": {
4495
- "text": "void"
4566
+ "text": "Promise<void>"
4496
4567
  }
4497
- }
4568
+ },
4569
+ "description": "Shows the modal with animation"
4498
4570
  },
4499
4571
  {
4500
4572
  "kind": "method",
4501
- "name": "handleBeforeHide",
4502
- "privacy": "private"
4573
+ "name": "hide",
4574
+ "return": {
4575
+ "type": {
4576
+ "text": "Promise<void>"
4577
+ }
4578
+ },
4579
+ "description": "Hides the modal with animation"
4503
4580
  },
4504
4581
  {
4505
4582
  "kind": "method",
4506
- "name": "show",
4507
- "description": "Shows the modal with animation",
4583
+ "name": "toggle",
4508
4584
  "return": {
4509
4585
  "type": {
4510
- "text": "void"
4586
+ "text": "Promise<void>"
4511
4587
  }
4512
- }
4588
+ },
4589
+ "description": "Toggles the modal open/closed state"
4513
4590
  },
4514
4591
  {
4515
4592
  "kind": "method",
4516
- "name": "handleBeforeShow",
4593
+ "name": "handleOpenChange",
4594
+ "privacy": "private"
4595
+ },
4596
+ {
4597
+ "kind": "method",
4598
+ "name": "handleCloseChange",
4517
4599
  "privacy": "private"
4518
4600
  },
4601
+ {
4602
+ "kind": "method",
4603
+ "name": "handleBeforeOpen",
4604
+ "privacy": "private"
4605
+ },
4606
+ {
4607
+ "kind": "method",
4608
+ "name": "handleBeforeClose",
4609
+ "privacy": "private"
4610
+ },
4611
+ {
4612
+ "kind": "method",
4613
+ "name": "handleBackdropClick",
4614
+ "privacy": "private",
4615
+ "parameters": [
4616
+ {
4617
+ "name": "e",
4618
+ "type": {
4619
+ "text": "MouseEvent"
4620
+ }
4621
+ }
4622
+ ]
4623
+ },
4624
+ {
4625
+ "kind": "method",
4626
+ "name": "handleDialogCancel",
4627
+ "privacy": "private",
4628
+ "parameters": [
4629
+ {
4630
+ "name": "e",
4631
+ "type": {
4632
+ "text": "Event"
4633
+ }
4634
+ }
4635
+ ]
4636
+ },
4519
4637
  {
4520
4638
  "kind": "method",
4521
4639
  "name": "handleKeydown",
@@ -4531,7 +4649,7 @@
4531
4649
  },
4532
4650
  {
4533
4651
  "kind": "method",
4534
- "name": "handleBackdropClick",
4652
+ "name": "handleClick",
4535
4653
  "privacy": "private",
4536
4654
  "parameters": [
4537
4655
  {
@@ -4542,6 +4660,16 @@
4542
4660
  }
4543
4661
  ]
4544
4662
  },
4663
+ {
4664
+ "kind": "method",
4665
+ "name": "shakeModal",
4666
+ "privacy": "private"
4667
+ },
4668
+ {
4669
+ "kind": "method",
4670
+ "name": "getModalStyle",
4671
+ "privacy": "private"
4672
+ },
4545
4673
  {
4546
4674
  "kind": "method",
4547
4675
  "name": "emit",
@@ -4566,6 +4694,24 @@
4566
4694
  }
4567
4695
  }
4568
4696
  ],
4697
+ "events": [
4698
+ {
4699
+ "description": "Emitted after the modal has opened",
4700
+ "name": "plus-modal-open"
4701
+ },
4702
+ {
4703
+ "description": "Emitted after the modal has closed",
4704
+ "name": "plus-modal-close"
4705
+ },
4706
+ {
4707
+ "description": "Emitted before the modal opens (cancelable)",
4708
+ "name": "plus-modal-before-open"
4709
+ },
4710
+ {
4711
+ "description": "Emitted before the modal closes (cancelable)",
4712
+ "name": "plus-modal-before-close"
4713
+ }
4714
+ ],
4569
4715
  "attributes": [
4570
4716
  {
4571
4717
  "name": "size",
@@ -4578,6 +4724,17 @@
4578
4724
  "attribute": "size",
4579
4725
  "propName": "size"
4580
4726
  },
4727
+ {
4728
+ "name": "placement",
4729
+ "type": {
4730
+ "text": "'center' | 'top'"
4731
+ },
4732
+ "default": "'center'",
4733
+ "description": "The placement of the modal on the screen",
4734
+ "fieldName": "placement",
4735
+ "attribute": "placement",
4736
+ "propName": "placement"
4737
+ },
4581
4738
  {
4582
4739
  "name": "is-open",
4583
4740
  "type": {
@@ -4600,6 +4757,28 @@
4600
4757
  "attribute": "full-width",
4601
4758
  "propName": "fullWidth"
4602
4759
  },
4760
+ {
4761
+ "name": "full-screen",
4762
+ "type": {
4763
+ "text": "boolean"
4764
+ },
4765
+ "default": "false",
4766
+ "description": "Makes the modal take the full screen (100vw x 100vh, no border radius)",
4767
+ "fieldName": "fullScreen",
4768
+ "attribute": "full-screen",
4769
+ "propName": "fullScreen"
4770
+ },
4771
+ {
4772
+ "name": "backdrop",
4773
+ "type": {
4774
+ "text": "boolean | 'static'"
4775
+ },
4776
+ "default": "true",
4777
+ "description": "Controls backdrop behavior\n- true: Shows backdrop, modal can be closed by clicking outside\n- false: No backdrop\n- 'static': Shows backdrop but prevents closing by clicking outside (triggers shake animation)",
4778
+ "fieldName": "backdrop",
4779
+ "attribute": "backdrop",
4780
+ "propName": "backdrop"
4781
+ },
4603
4782
  {
4604
4783
  "name": "close-on-backdrop",
4605
4784
  "type": {
@@ -4622,6 +4801,28 @@
4622
4801
  "attribute": "close-on-esc",
4623
4802
  "propName": "closeOnEsc"
4624
4803
  },
4804
+ {
4805
+ "name": "no-header",
4806
+ "type": {
4807
+ "text": "boolean"
4808
+ },
4809
+ "default": "false",
4810
+ "description": "Hides the header section completely",
4811
+ "fieldName": "noHeader",
4812
+ "attribute": "no-header",
4813
+ "propName": "noHeader"
4814
+ },
4815
+ {
4816
+ "name": "no-footer",
4817
+ "type": {
4818
+ "text": "boolean"
4819
+ },
4820
+ "default": "false",
4821
+ "description": "Hides the footer section completely",
4822
+ "fieldName": "noFooter",
4823
+ "attribute": "no-footer",
4824
+ "propName": "noFooter"
4825
+ },
4625
4826
  {
4626
4827
  "name": "animation-duration",
4627
4828
  "type": {
@@ -4640,7 +4841,7 @@
4640
4841
  },
4641
4842
  "tagName": "plus-modal",
4642
4843
  "customElement": true,
4643
- "summary": "Modal dialog component that appears on top of the page content."
4844
+ "summary": "Modal dialog component built on native HTML Dialog API. Displays content in a layer above the page with full keyboard and focus management."
4644
4845
  }
4645
4846
  ],
4646
4847
  "exports": [
@@ -2,6 +2,10 @@ import PlusModal from './modal.js';
2
2
  import '../../property-DiPQx9S3.js';
3
3
  import '../../lit-element-ByzbtpGk.js';
4
4
  import '../../state-D1d5Sfj8.js';
5
+ import '../../query-CHb9Ft_d.js';
6
+ import '../../base-Cl6v8-BZ.js';
7
+ import '../../style-map-DC_vNus2.js';
8
+ import '../../directive-DZCF8pFJ.js';
5
9
  import '../../utils/boolean-converter.js';
6
10
  import './modal.style.js';
7
11
  import '../../index-B9iart53.js';
@@ -1,40 +1,70 @@
1
1
  import Tailwind from '../base/tailwind-base';
2
+ export type ModalSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full';
3
+ export type ModalPlacement = 'center' | 'top';
2
4
  /**
3
5
  * @tag plus-modal
4
- * @summary Modal dialog component that appears on top of the page content.
6
+ * @summary Modal dialog component built on native HTML Dialog API. Displays content in a layer above the page with full keyboard and focus management.
5
7
  *
8
+ * @slot - Main content area (same as body slot)
6
9
  * @slot header - The header content of the modal
7
- * @slot body - The main content of the modal
10
+ * @slot body - The main content of the modal (alternative to default slot)
8
11
  * @slot footer - The footer content of the modal
9
12
  * @slot close - Custom close button (defaults to an X icon)
10
13
  *
11
- * @csspart container - The main container element
12
- * @csspart overlay - The overlay element
13
- * @csspart modal - The modal element
14
- * @csspart header - The header element
15
- * @csspart body - The body element
16
- * @csspart footer - The footer element
14
+ * @csspart dialog - The native dialog element
15
+ * @csspart container - The container wrapper for centering and scrolling
16
+ * @csspart modal - The main modal box
17
+ * @csspart header - The header section
18
+ * @csspart header-content - The content wrapper inside header
19
+ * @csspart body - The main content area
20
+ * @csspart footer - The footer section
17
21
  * @csspart close-button - The close button element
18
22
  *
23
+ * @event plus-modal-open - Emitted after the modal has opened
24
+ * @event plus-modal-close - Emitted after the modal has closed
25
+ * @event plus-modal-before-open - Emitted before the modal opens (cancelable)
26
+ * @event plus-modal-before-close - Emitted before the modal closes (cancelable)
27
+ *
19
28
  * @example
20
29
  * ```html
21
- * <plus-modal>
30
+ * <!-- Basic usage -->
31
+ * <plus-modal is-open>
22
32
  * <div slot="header">Modal Title</div>
23
33
  * <div slot="body">Modal Content</div>
24
34
  * <div slot="footer">
25
- * <button>Save</button>
35
+ * <button data-dismiss>Close</button>
26
36
  * </div>
27
37
  * </plus-modal>
38
+ *
39
+ * <!-- Full screen modal -->
40
+ * <plus-modal full-screen>
41
+ * <div slot="header">Full Screen</div>
42
+ * <p>Content here</p>
43
+ * </plus-modal>
44
+ *
45
+ * <!-- Static backdrop (shake on outside click) -->
46
+ * <plus-modal backdrop="static">
47
+ * <div slot="header">Can't Close Outside</div>
48
+ * <p>Must use close button</p>
49
+ * </plus-modal>
28
50
  * ```
29
51
  */
30
52
  export default class PlusModal extends Tailwind {
53
+ private dialogRef?;
31
54
  /**
32
55
  * The size of the modal
33
56
  * @type {'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full'}
34
57
  * @default 'md'
35
58
  * @attr size
36
59
  */
37
- size: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full';
60
+ size: ModalSize;
61
+ /**
62
+ * The placement of the modal on the screen
63
+ * @type {'center' | 'top'}
64
+ * @default 'center'
65
+ * @attr placement
66
+ */
67
+ placement: ModalPlacement;
38
68
  /**
39
69
  * Whether the modal is open
40
70
  * @type {boolean}
@@ -49,6 +79,23 @@ export default class PlusModal extends Tailwind {
49
79
  * @attr full-width
50
80
  */
51
81
  fullWidth: boolean;
82
+ /**
83
+ * Makes the modal take the full screen (100vw x 100vh, no border radius)
84
+ * @type {boolean}
85
+ * @default false
86
+ * @attr full-screen
87
+ */
88
+ fullScreen: boolean;
89
+ /**
90
+ * Controls backdrop behavior
91
+ * - true: Shows backdrop, modal can be closed by clicking outside
92
+ * - false: No backdrop
93
+ * - 'static': Shows backdrop but prevents closing by clicking outside (triggers shake animation)
94
+ * @type {boolean | 'static'}
95
+ * @default true
96
+ * @attr backdrop
97
+ */
98
+ backdrop: boolean | 'static';
52
99
  /**
53
100
  * Whether the modal should close when clicking the backdrop
54
101
  * @type {boolean}
@@ -63,6 +110,20 @@ export default class PlusModal extends Tailwind {
63
110
  * @attr close-on-esc
64
111
  */
65
112
  closeOnEsc: boolean;
113
+ /**
114
+ * Hides the header section completely
115
+ * @type {boolean}
116
+ * @default false
117
+ * @attr no-header
118
+ */
119
+ noHeader: boolean;
120
+ /**
121
+ * Hides the footer section completely
122
+ * @type {boolean}
123
+ * @default false
124
+ * @attr no-footer
125
+ */
126
+ noFooter: boolean;
66
127
  /**
67
128
  * The duration of the animation in milliseconds
68
129
  * @type {number}
@@ -71,24 +132,36 @@ export default class PlusModal extends Tailwind {
71
132
  */
72
133
  animationDuration: number;
73
134
  private isAnimating;
74
- private keydownHandler;
75
- constructor();
135
+ private shake;
76
136
  connectedCallback(): void;
137
+ disconnectedCallback(): void;
138
+ firstUpdated(): void;
139
+ updated(changedProperties: Map<string, unknown>): void;
140
+ /**
141
+ * Shows the modal with animation
142
+ * @returns {Promise<void>}
143
+ */
144
+ show(): Promise<void>;
77
145
  /**
78
146
  * Hides the modal with animation
79
- * @returns {void}
147
+ * @returns {Promise<void>}
80
148
  */
81
- hide(): void;
82
- private handleBeforeHide;
149
+ hide(): Promise<void>;
83
150
  /**
84
- * Shows the modal with animation
85
- * @returns {void}
151
+ * Toggles the modal open/closed state
152
+ * @returns {Promise<void>}
86
153
  */
87
- show(): void;
88
- private handleBeforeShow;
89
- disconnectedCallback(): void;
90
- private handleKeydown;
154
+ toggle(): Promise<void>;
155
+ private handleOpenChange;
156
+ private handleCloseChange;
157
+ private handleBeforeOpen;
158
+ private handleBeforeClose;
91
159
  private handleBackdropClick;
160
+ private handleDialogCancel;
161
+ private handleKeydown;
162
+ private handleClick;
163
+ private shakeModal;
164
+ private getModalStyle;
92
165
  render(): import("lit-html").TemplateResult<1>;
93
166
  }
94
167
  export { PlusModal };
@@ -1 +1 @@
1
- {"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/components/modal/modal.ts"],"names":[],"mappings":"AAIA,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,QAAQ;IAC7C;;;;;OAKG;IAEH,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAQ;IAExD;;;;;OAKG;IAOH,MAAM,UAAS;IAEf;;;;;OAKG;IAOH,SAAS,UAAS;IAElB;;;;;OAKG;IAOH,eAAe,UAAQ;IAEvB;;;;;OAKG;IAOH,UAAU,UAAQ;IAElB;;;;;OAKG;IAEH,iBAAiB,SAAO;IAGxB,OAAO,CAAC,WAAW,CAAS;IAG5B,OAAO,CAAC,cAAc,CAA6B;;IAO1C,iBAAiB;IAM1B;;;OAGG;IACH,IAAI;IAKJ,OAAO,CAAC,gBAAgB;IAUxB;;;OAGG;IACH,IAAI;IAKJ,OAAO,CAAC,gB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