@plusui/library 0.1.14 → 0.1.16
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.
- package/cdn/components/accordion/accordion.js +1 -1
- package/cdn/components/accordion/index.js +1 -1
- package/cdn/components/accordion-group/accordion-group.js +1 -1
- package/cdn/components/accordion-group/index.js +1 -1
- package/cdn/components/alert/alert.js +1 -1
- package/cdn/components/alert/index.js +1 -1
- package/cdn/components/avatar/avatar.js +1 -1
- package/cdn/components/avatar/index.js +1 -1
- package/cdn/components/badge/badge.js +1 -1
- package/cdn/components/badge/index.js +1 -1
- package/cdn/components/base/index.js +1 -1
- package/cdn/components/base/tailwind-base.js +1 -1
- package/cdn/components/breadcrumb/breadcrumb.js +1 -1
- package/cdn/components/breadcrumb/index.js +1 -1
- package/cdn/components/breadcrumb-item/breadcrumb-item.js +1 -1
- package/cdn/components/breadcrumb-item/index.js +1 -1
- package/cdn/components/button/button.js +1 -1
- package/cdn/components/button/index.js +1 -1
- package/cdn/components/button-group/button-group.js +1 -1
- package/cdn/components/button-group/index.js +1 -1
- package/cdn/components/checkbox/checkbox.js +1 -1
- package/cdn/components/checkbox/index.js +1 -1
- package/cdn/components/checkbox-group/checkbox-group.js +1 -1
- package/cdn/components/checkbox-group/index.js +1 -1
- package/cdn/components/chip/chip.js +1 -1
- package/cdn/components/chip/index.js +1 -1
- package/cdn/components/divider/divider.js +1 -1
- package/cdn/components/divider/index.js +1 -1
- package/cdn/components/drawer/drawer.js +1 -1
- package/cdn/components/drawer/index.js +1 -1
- package/cdn/components/dropdown/dropdown.js +1 -1
- package/cdn/components/dropdown/index.js +1 -1
- package/cdn/components/dropdown-item/dropdown-item.js +1 -1
- package/cdn/components/dropdown-item/index.js +1 -1
- package/cdn/components/index.js +1 -1
- package/cdn/components/input/index.js +1 -1
- package/cdn/components/input/input.js +1 -1
- package/cdn/components/link/index.js +1 -1
- package/cdn/components/link/link.js +1 -1
- package/cdn/components/list-box-item/index.js +1 -1
- package/cdn/components/list-box-item/list-box-item.js +1 -1
- package/cdn/components/modal/index.js +5 -1
- package/cdn/components/modal/modal.js +340 -83
- package/cdn/components/modal/modal.style.js +70 -41
- package/cdn/components/popconfirm/index.js +1 -1
- package/cdn/components/popconfirm/popconfirm.js +1 -1
- package/cdn/components/popover/index.js +1 -1
- package/cdn/components/popover/popover.js +1 -1
- package/cdn/components/radio/index.js +1 -1
- package/cdn/components/radio/radio.js +1 -1
- package/cdn/components/radio-group/index.js +1 -1
- package/cdn/components/radio-group/radio-group.js +1 -1
- package/cdn/components/rating/index.js +1 -1
- package/cdn/components/rating/rating.js +1 -1
- package/cdn/components/segmented-picker/index.js +1 -1
- package/cdn/components/segmented-picker/segmented-picker.component.js +1 -1
- package/cdn/components/segmented-picker-item/index.js +1 -1
- package/cdn/components/segmented-picker-item/segmented-picker-item.component.js +1 -1
- package/cdn/components/select/index.js +1 -1
- package/cdn/components/select/select.js +1 -1
- package/cdn/components/select-item/index.js +1 -1
- package/cdn/components/select-item/select-item.js +1 -1
- package/cdn/components/service/index.js +1 -1
- package/cdn/components/service/service.js +1 -1
- package/cdn/components/tab/index.js +1 -1
- package/cdn/components/tab/tab.js +1 -1
- package/cdn/components/tab-group/index.js +1 -1
- package/cdn/components/tab-group/tab-group.js +1 -1
- package/cdn/components/tab-panel/index.js +1 -1
- package/cdn/components/tab-panel/tab-panel.js +1 -1
- package/cdn/components/tag/index.js +1 -1
- package/cdn/components/tag/tag.js +1 -1
- package/cdn/components/text/index.js +1 -1
- package/cdn/components/text/text.js +1 -1
- package/cdn/components/textarea/index.js +1 -1
- package/cdn/components/textarea/textarea.js +1 -1
- package/cdn/components/toast/index.js +1 -1
- package/cdn/components/toast/toast.js +1 -1
- package/cdn/components/toast-container/index.js +1 -1
- package/cdn/components/toast-container/toast-container.js +1 -1
- package/cdn/components/toggle/index.js +1 -1
- package/cdn/components/toggle/toggle.js +1 -1
- package/cdn/components/tooltip/index.js +1 -1
- package/cdn/components/tooltip/tooltip.js +1 -1
- package/cdn/factory/tailwind-factory.js +1 -1
- package/cdn/global-BfmuDcaf.js +1 -0
- package/cdn/global-m-W73pez.js +31 -0
- package/custom-elements.json +226 -25
- package/dist/components/modal/index.js +4 -0
- package/dist/components/modal/modal.d.ts +95 -22
- package/dist/components/modal/modal.d.ts.map +1 -1
- package/dist/components/modal/modal.js +339 -82
- package/dist/components/modal/modal.js.map +1 -1
- package/dist/components/modal/modal.style.d.ts +297 -122
- package/dist/components/modal/modal.style.d.ts.map +1 -1
- package/dist/components/modal/modal.style.js +70 -41
- package/dist/components/modal/modal.style.js.map +1 -1
- package/dist/{if-defined-CAh2WTyo.js → if-defined-DzyJw9oN.js} +1 -1
- package/dist/index.css +2 -2
- package/dist/{live-CSPSCWrs.js → live-Dlj-D15j.js} +1 -1
- package/dist/{property-BXP8koCN.js → property-DRwbRRVL.js} +1 -1
- package/dist/{query-DixClzz3.js → query-CVSIfDVf.js} +1 -1
- package/dist/{query-assigned-elements-tu2Z4Umd.js → query-assigned-elements-CGjtMDM7.js} +1 -1
- package/dist/{state-CRctcY5E.js → state-DibUHyPK.js} +1 -1
- package/dist/{style-map-BP6cVC6K.js → style-map-DE-r4ozp.js} +1 -1
- package/dist/styles/global.js +2 -2
- package/eslint/custom-element-eslint-rules.js +16 -0
- package/package.json +1 -1
- package/public/html/index.js +406 -124
- package/public/react/index.d.ts +145 -33
- package/public/react/index.js +430 -125
- package/react/PlusModal.d.ts +50 -11
- package/react/PlusModal.js +31 -2
- package/types/custom-element-jsx.d.ts +42 -11
- package/types/custom-element-solidjs.d.ts +42 -11
- package/types/custom-element-svelte.d.ts +42 -11
- package/types/custom-element-vuejs.d.ts +42 -11
- package/vscode.css-custom-data.json +10 -6
- package/vscode.html-custom-data.json +26 -1
- package/web-types.json +106 -11
- package/cdn/global-8uGSRUk7.js +0 -31
- package/cdn/global-DklV2dCX.js +0 -1
- /package/dist/{base-CesIX8_4.js → base-CJK80TT1.js} +0 -0
- /package/dist/{directive-BUtBNK63.js → directive-DJonW9K-.js} +0 -0
- /package/dist/{floating-ui.dom-DEPWsfNe.js → floating-ui.dom-Cx1F5m3b.js} +0 -0
- /package/dist/{index-CwglOP_H.js → index-B49PNGQM.js} +0 -0
- /package/dist/{lit-element-u_ybFE-X.js → lit-element-BS9RbLkf.js} +0 -0
package/custom-elements.json
CHANGED
|
@@ -4356,27 +4356,31 @@
|
|
|
4356
4356
|
"name": "PlusModal",
|
|
4357
4357
|
"cssParts": [
|
|
4358
4358
|
{
|
|
4359
|
-
"description": "The
|
|
4360
|
-
"name": "
|
|
4359
|
+
"description": "The native dialog element",
|
|
4360
|
+
"name": "dialog"
|
|
4361
4361
|
},
|
|
4362
4362
|
{
|
|
4363
|
-
"description": "The
|
|
4364
|
-
"name": "
|
|
4363
|
+
"description": "The container wrapper for centering and scrolling",
|
|
4364
|
+
"name": "container"
|
|
4365
4365
|
},
|
|
4366
4366
|
{
|
|
4367
|
-
"description": "The modal
|
|
4367
|
+
"description": "The main modal box",
|
|
4368
4368
|
"name": "modal"
|
|
4369
4369
|
},
|
|
4370
4370
|
{
|
|
4371
|
-
"description": "The header
|
|
4371
|
+
"description": "The header section",
|
|
4372
4372
|
"name": "header"
|
|
4373
4373
|
},
|
|
4374
4374
|
{
|
|
4375
|
-
"description": "The
|
|
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
|
|
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": "
|
|
4554
|
+
"name": "shake",
|
|
4484
4555
|
"type": {
|
|
4485
|
-
"text": "
|
|
4556
|
+
"text": "boolean"
|
|
4486
4557
|
},
|
|
4487
|
-
"privacy": "private"
|
|
4558
|
+
"privacy": "private",
|
|
4559
|
+
"default": "false"
|
|
4488
4560
|
},
|
|
4489
4561
|
{
|
|
4490
4562
|
"kind": "method",
|
|
4491
|
-
"name": "
|
|
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": "
|
|
4502
|
-
"
|
|
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": "
|
|
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": "
|
|
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": "
|
|
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
|
|
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
|
|
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
|
|
12
|
-
* @csspart
|
|
13
|
-
* @csspart modal - The modal
|
|
14
|
-
* @csspart header - The header
|
|
15
|
-
* @csspart
|
|
16
|
-
* @csspart
|
|
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
|
-
*
|
|
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>
|
|
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:
|
|
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
|
|
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
|
-
*
|
|
85
|
-
* @returns {void}
|
|
151
|
+
* Toggles the modal open/closed state
|
|
152
|
+
* @returns {Promise<void>}
|
|
86
153
|
*/
|
|
87
|
-
|
|
88
|
-
private
|
|
89
|
-
|
|
90
|
-
private
|
|
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":"
|
|
1
|
+
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/components/modal/modal.ts"],"names":[],"mappings":"AAKA,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAE7C,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;AACnE,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,KAAK,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,QAAQ;IAE7C,OAAO,CAAC,SAAS,CAAC,CAAoB;IAEtC;;;;;OAKG;IAEH,IAAI,EAAE,SAAS,CAAQ;IAEvB;;;;;OAKG;IAEH,SAAS,EAAE,cAAc,CAAY;IAErC;;;;;OAKG;IAOH,MAAM,UAAS;IAEf;;;;;OAKG;IAOH,SAAS,UAAS;IAElB;;;;;OAKG;IAOH,UAAU,UAAS;IAEnB;;;;;;;;OAQG;IAEH,QAAQ,EAAE,OAAO,GAAG,QAAQ,CAAQ;IAEpC;;;;;OAKG;IAOH,eAAe,UAAQ;IAEvB;;;;;OAKG;IAOH,UAAU,UAAQ;IAElB;;;;;OAKG;IAOH,QAAQ,UAAS;IAEjB;;;;;OAKG;IAOH,QAAQ,UAAS;IAEjB;;;;;OAKG;IAEH,iBAAiB,SAAO;IAGxB,OAAO,CAAC,WAAW,CAAS;IAG5B,OAAO,CAAC,KAAK,CAAS;IAEb,iBAAiB;IAMjB,oBAAoB;IASpB,YAAY;IAMZ,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAYxD;;;OAGG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAK3B;;;OAGG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAK3B;;;OAGG;IACG,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;YAQf,gBAAgB;YAmBhB,iBAAiB;IAmB/B,OAAO,CAAC,gBAAgB;IAIxB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,mBAAmB;IAY3B,OAAO,CAAC,kBAAkB;IAa1B,OAAO,CAAC,aAAa;IAuBrB,OAAO,CAAC,WAAW;IAsBnB,OAAO,CAAC,UAAU;IAOlB,OAAO,CAAC,aAAa;IAiCZ,MAAM;CA2EhB;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|