@plusui/library 0.1.15 → 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-DKbfGhXu.js → if-defined-DzyJw9oN.js} +1 -1
- package/dist/index.css +1 -1
- package/dist/{live-CtqYa7Iz.js → live-Dlj-D15j.js} +1 -1
- package/dist/{property-DhJ1LIGX.js → property-DRwbRRVL.js} +1 -1
- package/dist/{query-CJZ9rve2.js → query-CVSIfDVf.js} +1 -1
- package/dist/{query-assigned-elements-BTKIEABn.js → query-assigned-elements-CGjtMDM7.js} +1 -1
- package/dist/{state-BJT7gLGV.js → state-DibUHyPK.js} +1 -1
- package/dist/{style-map-4vJ38bCf.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-DGCiKnca.js +0 -1
- package/cdn/global-GTfSG3gU.js +0 -31
- /package/dist/{base-ByZpKIDU.js → base-CJK80TT1.js} +0 -0
- /package/dist/{directive-rJcjnQEi.js → directive-DJonW9K-.js} +0 -0
- /package/dist/{floating-ui.dom-CnRf1aAR.js → floating-ui.dom-Cx1F5m3b.js} +0 -0
- /package/dist/{index-DUwBBqWm.js → index-B49PNGQM.js} +0 -0
- /package/dist/{lit-element-Bu7TYzc7.js → lit-element-BS9RbLkf.js} +0 -0
package/public/react/index.d.ts
CHANGED
|
@@ -939,42 +939,72 @@ declare class PlusRadioGroup$1 extends Tailwind$1 {
|
|
|
939
939
|
render(): lit_html.TemplateResult<1>;
|
|
940
940
|
}
|
|
941
941
|
|
|
942
|
+
type ModalSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full';
|
|
943
|
+
type ModalPlacement = 'center' | 'top';
|
|
942
944
|
/**
|
|
943
945
|
* @tag plus-modal
|
|
944
|
-
* @summary Modal dialog component
|
|
946
|
+
* @summary Modal dialog component built on native HTML Dialog API. Displays content in a layer above the page with full keyboard and focus management.
|
|
945
947
|
*
|
|
948
|
+
* @slot - Main content area (same as body slot)
|
|
946
949
|
* @slot header - The header content of the modal
|
|
947
|
-
* @slot body - The main content of the modal
|
|
950
|
+
* @slot body - The main content of the modal (alternative to default slot)
|
|
948
951
|
* @slot footer - The footer content of the modal
|
|
949
952
|
* @slot close - Custom close button (defaults to an X icon)
|
|
950
953
|
*
|
|
951
|
-
* @csspart
|
|
952
|
-
* @csspart
|
|
953
|
-
* @csspart modal - The modal
|
|
954
|
-
* @csspart header - The header
|
|
955
|
-
* @csspart
|
|
956
|
-
* @csspart
|
|
954
|
+
* @csspart dialog - The native dialog element
|
|
955
|
+
* @csspart container - The container wrapper for centering and scrolling
|
|
956
|
+
* @csspart modal - The main modal box
|
|
957
|
+
* @csspart header - The header section
|
|
958
|
+
* @csspart header-content - The content wrapper inside header
|
|
959
|
+
* @csspart body - The main content area
|
|
960
|
+
* @csspart footer - The footer section
|
|
957
961
|
* @csspart close-button - The close button element
|
|
958
962
|
*
|
|
963
|
+
* @event plus-modal-open - Emitted after the modal has opened
|
|
964
|
+
* @event plus-modal-close - Emitted after the modal has closed
|
|
965
|
+
* @event plus-modal-before-open - Emitted before the modal opens (cancelable)
|
|
966
|
+
* @event plus-modal-before-close - Emitted before the modal closes (cancelable)
|
|
967
|
+
*
|
|
959
968
|
* @example
|
|
960
969
|
* ```html
|
|
961
|
-
*
|
|
970
|
+
* <!-- Basic usage -->
|
|
971
|
+
* <plus-modal is-open>
|
|
962
972
|
* <div slot="header">Modal Title</div>
|
|
963
973
|
* <div slot="body">Modal Content</div>
|
|
964
974
|
* <div slot="footer">
|
|
965
|
-
* <button>
|
|
975
|
+
* <button data-dismiss>Close</button>
|
|
966
976
|
* </div>
|
|
967
977
|
* </plus-modal>
|
|
978
|
+
*
|
|
979
|
+
* <!-- Full screen modal -->
|
|
980
|
+
* <plus-modal full-screen>
|
|
981
|
+
* <div slot="header">Full Screen</div>
|
|
982
|
+
* <p>Content here</p>
|
|
983
|
+
* </plus-modal>
|
|
984
|
+
*
|
|
985
|
+
* <!-- Static backdrop (shake on outside click) -->
|
|
986
|
+
* <plus-modal backdrop="static">
|
|
987
|
+
* <div slot="header">Can't Close Outside</div>
|
|
988
|
+
* <p>Must use close button</p>
|
|
989
|
+
* </plus-modal>
|
|
968
990
|
* ```
|
|
969
991
|
*/
|
|
970
992
|
declare class PlusModal$1 extends Tailwind$1 {
|
|
993
|
+
private dialogRef?;
|
|
971
994
|
/**
|
|
972
995
|
* The size of the modal
|
|
973
996
|
* @type {'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full'}
|
|
974
997
|
* @default 'md'
|
|
975
998
|
* @attr size
|
|
976
999
|
*/
|
|
977
|
-
size:
|
|
1000
|
+
size: ModalSize;
|
|
1001
|
+
/**
|
|
1002
|
+
* The placement of the modal on the screen
|
|
1003
|
+
* @type {'center' | 'top'}
|
|
1004
|
+
* @default 'center'
|
|
1005
|
+
* @attr placement
|
|
1006
|
+
*/
|
|
1007
|
+
placement: ModalPlacement;
|
|
978
1008
|
/**
|
|
979
1009
|
* Whether the modal is open
|
|
980
1010
|
* @type {boolean}
|
|
@@ -989,6 +1019,23 @@ declare class PlusModal$1 extends Tailwind$1 {
|
|
|
989
1019
|
* @attr full-width
|
|
990
1020
|
*/
|
|
991
1021
|
fullWidth: boolean;
|
|
1022
|
+
/**
|
|
1023
|
+
* Makes the modal take the full screen (100vw x 100vh, no border radius)
|
|
1024
|
+
* @type {boolean}
|
|
1025
|
+
* @default false
|
|
1026
|
+
* @attr full-screen
|
|
1027
|
+
*/
|
|
1028
|
+
fullScreen: boolean;
|
|
1029
|
+
/**
|
|
1030
|
+
* Controls backdrop behavior
|
|
1031
|
+
* - true: Shows backdrop, modal can be closed by clicking outside
|
|
1032
|
+
* - false: No backdrop
|
|
1033
|
+
* - 'static': Shows backdrop but prevents closing by clicking outside (triggers shake animation)
|
|
1034
|
+
* @type {boolean | 'static'}
|
|
1035
|
+
* @default true
|
|
1036
|
+
* @attr backdrop
|
|
1037
|
+
*/
|
|
1038
|
+
backdrop: boolean | 'static';
|
|
992
1039
|
/**
|
|
993
1040
|
* Whether the modal should close when clicking the backdrop
|
|
994
1041
|
* @type {boolean}
|
|
@@ -1003,6 +1050,20 @@ declare class PlusModal$1 extends Tailwind$1 {
|
|
|
1003
1050
|
* @attr close-on-esc
|
|
1004
1051
|
*/
|
|
1005
1052
|
closeOnEsc: boolean;
|
|
1053
|
+
/**
|
|
1054
|
+
* Hides the header section completely
|
|
1055
|
+
* @type {boolean}
|
|
1056
|
+
* @default false
|
|
1057
|
+
* @attr no-header
|
|
1058
|
+
*/
|
|
1059
|
+
noHeader: boolean;
|
|
1060
|
+
/**
|
|
1061
|
+
* Hides the footer section completely
|
|
1062
|
+
* @type {boolean}
|
|
1063
|
+
* @default false
|
|
1064
|
+
* @attr no-footer
|
|
1065
|
+
*/
|
|
1066
|
+
noFooter: boolean;
|
|
1006
1067
|
/**
|
|
1007
1068
|
* The duration of the animation in milliseconds
|
|
1008
1069
|
* @type {number}
|
|
@@ -1011,24 +1072,36 @@ declare class PlusModal$1 extends Tailwind$1 {
|
|
|
1011
1072
|
*/
|
|
1012
1073
|
animationDuration: number;
|
|
1013
1074
|
private isAnimating;
|
|
1014
|
-
private
|
|
1015
|
-
constructor();
|
|
1075
|
+
private shake;
|
|
1016
1076
|
connectedCallback(): void;
|
|
1077
|
+
disconnectedCallback(): void;
|
|
1078
|
+
firstUpdated(): void;
|
|
1079
|
+
updated(changedProperties: Map<string, unknown>): void;
|
|
1080
|
+
/**
|
|
1081
|
+
* Shows the modal with animation
|
|
1082
|
+
* @returns {Promise<void>}
|
|
1083
|
+
*/
|
|
1084
|
+
show(): Promise<void>;
|
|
1017
1085
|
/**
|
|
1018
1086
|
* Hides the modal with animation
|
|
1019
|
-
* @returns {void}
|
|
1087
|
+
* @returns {Promise<void>}
|
|
1020
1088
|
*/
|
|
1021
|
-
hide(): void
|
|
1022
|
-
private handleBeforeHide;
|
|
1089
|
+
hide(): Promise<void>;
|
|
1023
1090
|
/**
|
|
1024
|
-
*
|
|
1025
|
-
* @returns {void}
|
|
1091
|
+
* Toggles the modal open/closed state
|
|
1092
|
+
* @returns {Promise<void>}
|
|
1026
1093
|
*/
|
|
1027
|
-
|
|
1028
|
-
private
|
|
1029
|
-
|
|
1030
|
-
private
|
|
1094
|
+
toggle(): Promise<void>;
|
|
1095
|
+
private handleOpenChange;
|
|
1096
|
+
private handleCloseChange;
|
|
1097
|
+
private handleBeforeOpen;
|
|
1098
|
+
private handleBeforeClose;
|
|
1031
1099
|
private handleBackdropClick;
|
|
1100
|
+
private handleDialogCancel;
|
|
1101
|
+
private handleKeydown;
|
|
1102
|
+
private handleClick;
|
|
1103
|
+
private shakeModal;
|
|
1104
|
+
private getModalStyle;
|
|
1032
1105
|
render(): lit_html.TemplateResult<1>;
|
|
1033
1106
|
}
|
|
1034
1107
|
|
|
@@ -4437,15 +4510,33 @@ interface PlusModalProps
|
|
|
4437
4510
|
/** Whether the modal should take full width */
|
|
4438
4511
|
fullWidth?: boolean;
|
|
4439
4512
|
|
|
4513
|
+
/** Makes the modal take the full screen (100vw x 100vh, no border radius) */
|
|
4514
|
+
fullScreen?: boolean;
|
|
4515
|
+
|
|
4516
|
+
/** Controls backdrop behavior
|
|
4517
|
+
- true: Shows backdrop, modal can be closed by clicking outside
|
|
4518
|
+
- false: No backdrop
|
|
4519
|
+
- 'static': Shows backdrop but prevents closing by clicking outside (triggers shake animation) */
|
|
4520
|
+
backdrop?: boolean | "static";
|
|
4521
|
+
|
|
4440
4522
|
/** Whether the modal should close when clicking the backdrop */
|
|
4441
4523
|
closeOnBackdrop?: boolean;
|
|
4442
4524
|
|
|
4443
4525
|
/** Whether the modal should close when pressing the Escape key */
|
|
4444
4526
|
closeOnEsc?: boolean;
|
|
4445
4527
|
|
|
4528
|
+
/** Hides the header section completely */
|
|
4529
|
+
noHeader?: boolean;
|
|
4530
|
+
|
|
4531
|
+
/** Hides the footer section completely */
|
|
4532
|
+
noFooter?: boolean;
|
|
4533
|
+
|
|
4446
4534
|
/** The size of the modal */
|
|
4447
4535
|
size?: PlusModal$1["size"];
|
|
4448
4536
|
|
|
4537
|
+
/** The placement of the modal on the screen */
|
|
4538
|
+
placement?: PlusModal$1["placement"];
|
|
4539
|
+
|
|
4449
4540
|
/** The duration of the animation in milliseconds */
|
|
4450
4541
|
animationDuration?: PlusModal$1["animationDuration"];
|
|
4451
4542
|
|
|
@@ -4469,30 +4560,51 @@ interface PlusModalProps
|
|
|
4469
4560
|
|
|
4470
4561
|
/** Allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the `Tab` key, hence the name) and determine their relative ordering for sequential focus navigation. */
|
|
4471
4562
|
tabIndex?: number;
|
|
4563
|
+
|
|
4564
|
+
/** Emitted after the modal has opened */
|
|
4565
|
+
onPlusModalOpen?: (event: CustomEvent) => void;
|
|
4566
|
+
|
|
4567
|
+
/** Emitted after the modal has closed */
|
|
4568
|
+
onPlusModalClose?: (event: CustomEvent) => void;
|
|
4569
|
+
|
|
4570
|
+
/** Emitted before the modal opens (cancelable) */
|
|
4571
|
+
onPlusModalBeforeOpen?: (event: CustomEvent) => void;
|
|
4572
|
+
|
|
4573
|
+
/** Emitted before the modal closes (cancelable) */
|
|
4574
|
+
onPlusModalBeforeClose?: (event: CustomEvent) => void;
|
|
4472
4575
|
}
|
|
4473
4576
|
|
|
4474
4577
|
/**
|
|
4475
|
-
* Modal dialog component
|
|
4578
|
+
* Modal dialog component built on native HTML Dialog API. Displays content in a layer above the page with full keyboard and focus management.
|
|
4476
4579
|
* ---
|
|
4477
4580
|
*
|
|
4478
4581
|
*
|
|
4582
|
+
* ### **Events:**
|
|
4583
|
+
* - **plus-modal-open** - Emitted after the modal has opened
|
|
4584
|
+
* - **plus-modal-close** - Emitted after the modal has closed
|
|
4585
|
+
* - **plus-modal-before-open** - Emitted before the modal opens (cancelable)
|
|
4586
|
+
* - **plus-modal-before-close** - Emitted before the modal closes (cancelable)
|
|
4587
|
+
*
|
|
4479
4588
|
* ### **Methods:**
|
|
4480
|
-
* - **
|
|
4481
|
-
* - **
|
|
4589
|
+
* - **show(): _Promise<void>_** - Shows the modal with animation
|
|
4590
|
+
* - **hide(): _Promise<void>_** - Hides the modal with animation
|
|
4591
|
+
* - **toggle(): _Promise<void>_** - Toggles the modal open/closed state
|
|
4482
4592
|
*
|
|
4483
4593
|
* ### **Slots:**
|
|
4484
|
-
* -
|
|
4485
|
-
* - **
|
|
4594
|
+
* - _default_ - Main content area (same as body slot)
|
|
4595
|
+
* - **header** - The header content of the modal
|
|
4596
|
+
* - **body** - The main content of the modal (alternative to default slot)
|
|
4486
4597
|
* - **footer** - The footer content of the modal
|
|
4487
4598
|
* - **close** - Custom close button (defaults to an X icon)
|
|
4488
4599
|
*
|
|
4489
4600
|
* ### **CSS Parts:**
|
|
4490
|
-
* - **
|
|
4491
|
-
* - **
|
|
4492
|
-
* - **modal** - The modal
|
|
4493
|
-
* - **header** - The header
|
|
4494
|
-
* - **
|
|
4495
|
-
* - **
|
|
4601
|
+
* - **dialog** - The native dialog element
|
|
4602
|
+
* - **container** - The container wrapper for centering and scrolling
|
|
4603
|
+
* - **modal** - The main modal box
|
|
4604
|
+
* - **header** - The header section
|
|
4605
|
+
* - **header-content** - The content wrapper inside header
|
|
4606
|
+
* - **body** - The main content area
|
|
4607
|
+
* - **footer** - The footer section
|
|
4496
4608
|
* - **close-button** - The close button element
|
|
4497
4609
|
*/
|
|
4498
4610
|
declare const PlusModal: React.ForwardRefExoticComponent<PlusModalProps>;
|