@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
@@ -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 that appears on top of the page content.
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 container - The main container element
952
- * @csspart overlay - The overlay element
953
- * @csspart modal - The modal element
954
- * @csspart header - The header element
955
- * @csspart body - The body element
956
- * @csspart footer - The footer element
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
- * <plus-modal>
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>Save</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: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full';
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 keydownHandler;
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
- * Shows the modal with animation
1025
- * @returns {void}
1091
+ * Toggles the modal open/closed state
1092
+ * @returns {Promise<void>}
1026
1093
  */
1027
- show(): void;
1028
- private handleBeforeShow;
1029
- disconnectedCallback(): void;
1030
- private handleKeydown;
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 that appears on top of the page content.
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
- * - **hide(): _void_** - Hides the modal with animation
4481
- * - **show(): _void_** - Shows the modal with animation
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
- * - **header** - The header content of the modal
4485
- * - **body** - The main content of the modal
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
- * - **container** - The main container element
4491
- * - **overlay** - The overlay element
4492
- * - **modal** - The modal element
4493
- * - **header** - The header element
4494
- * - **body** - The body element
4495
- * - **footer** - The footer element
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>;