bromcom-ui 2.7.37-rc.1 → 2.7.37-rc.3
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/dist/bromcom-ui/bromcom-ui.css +1 -1
- package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/p-00f2b559.entry.js +5 -0
- package/dist/bromcom-ui/{p-0e480b7b.entry.js → p-02892da0.entry.js} +1 -1
- package/dist/bromcom-ui/p-034cd518.js +5 -0
- package/dist/bromcom-ui/{p-cc270a88.entry.js → p-0653fefc.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ace65422.entry.js → p-087d371a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1a12fbd0.entry.js → p-0cd7e628.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1115af65.entry.js → p-109d49c2.entry.js} +1 -1
- package/dist/bromcom-ui/{p-0ba73c30.js → p-10caf4ce.js} +1 -1
- package/dist/bromcom-ui/p-11d54517.entry.js +5 -0
- package/dist/bromcom-ui/{p-2d3c0790.entry.js → p-1507f99a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-83317635.entry.js → p-151d7bec.entry.js} +1 -1
- package/dist/bromcom-ui/p-1672aa8b.js +5 -0
- package/dist/bromcom-ui/{p-10dfe83e.js → p-27f0db71.js} +1 -1
- package/dist/bromcom-ui/p-2b27570e.entry.js +5 -0
- package/dist/bromcom-ui/{p-6fe3bfd9.entry.js → p-2b332236.entry.js} +1 -1
- package/dist/bromcom-ui/{p-bfb83484.entry.js → p-2b3b55ef.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a0352fdd.entry.js → p-2b91dab0.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ca13fe84.entry.js → p-2c3c7265.entry.js} +1 -1
- package/dist/bromcom-ui/p-2cfa8d1a.js +5 -0
- package/dist/bromcom-ui/{p-f69302a8.js → p-30806ec7.js} +1 -1
- package/dist/bromcom-ui/{p-cc9ba164.entry.js → p-31bc32d4.entry.js} +1 -1
- package/dist/bromcom-ui/{p-20fc8571.entry.js → p-34b815f5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c562e4c2.entry.js → p-34f30b8b.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f053ed80.entry.js → p-3716c24c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d11eccc0.entry.js → p-47fa3046.entry.js} +1 -1
- package/dist/bromcom-ui/p-49c83e11.entry.js +5 -0
- package/dist/bromcom-ui/{p-128a5956.js → p-4be4c5bf.js} +1 -1
- package/dist/bromcom-ui/p-522c96a2.js +5 -0
- package/dist/bromcom-ui/{p-125213af.entry.js → p-55cce901.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8c4b256e.js → p-577cf8e3.js} +1 -1
- package/dist/bromcom-ui/{p-7fad995d.entry.js → p-591b3100.entry.js} +1 -1
- package/dist/bromcom-ui/{p-23d5fe0b.entry.js → p-609bc368.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c7b9b694.entry.js → p-640244fa.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e73e6d2b.entry.js → p-65dcaa9e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f9401599.entry.js → p-6768e612.entry.js} +1 -1
- package/dist/bromcom-ui/{p-56f22945.entry.js → p-6a3c1fb9.entry.js} +1 -1
- package/dist/bromcom-ui/p-6ad01d01.entry.js +5 -0
- package/dist/bromcom-ui/{p-de9979a6.entry.js → p-6c12e5dd.entry.js} +1 -1
- package/dist/bromcom-ui/{p-173ebc98.entry.js → p-6c7eb43f.entry.js} +1 -1
- package/dist/bromcom-ui/{p-9ecacdbb.entry.js → p-751c94dd.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1a03334e.entry.js → p-76153673.entry.js} +1 -1
- package/dist/bromcom-ui/{p-51f23b60.entry.js → p-78d48636.entry.js} +1 -1
- package/dist/bromcom-ui/{p-81927f68.entry.js → p-7b7caea1.entry.js} +1 -1
- package/dist/bromcom-ui/{p-eb809fa4.entry.js → p-7c8d47f6.entry.js} +1 -1
- package/dist/bromcom-ui/p-7d119b6d.js +5 -0
- package/dist/bromcom-ui/p-7df25164.entry.js +5 -0
- package/dist/bromcom-ui/{p-5ae0a59b.js → p-7e44e6b5.js} +1 -1
- package/dist/bromcom-ui/{p-1c525c05.entry.js → p-7f065a45.entry.js} +1 -1
- package/dist/bromcom-ui/{p-603183c2.entry.js → p-8255f60a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7477b927.entry.js → p-82ad3d24.entry.js} +1 -1
- package/dist/bromcom-ui/{p-172edb20.entry.js → p-8513e734.entry.js} +1 -1
- package/dist/bromcom-ui/p-85d1183b.entry.js +5 -0
- package/dist/bromcom-ui/{p-3c7a0345.js → p-8c018ae0.js} +1 -1
- package/dist/bromcom-ui/p-99dc108e.entry.js +5 -0
- package/dist/bromcom-ui/{p-f4c06b78.entry.js → p-9e8eb647.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b9f0114c.entry.js → p-9efe118a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-6cda636f.entry.js → p-a04909f2.entry.js} +1 -1
- package/dist/bromcom-ui/p-a1c849e7.js +5 -0
- package/dist/bromcom-ui/{p-a8d1397d.js → p-a3ffcb0d.js} +1 -1
- package/dist/bromcom-ui/{p-d36f9b12.entry.js → p-a59a0361.entry.js} +1 -1
- package/dist/bromcom-ui/p-a661a9d5.entry.js +5 -0
- package/dist/bromcom-ui/p-a677275e.entry.js +5 -0
- package/dist/bromcom-ui/{p-99009fb3.entry.js → p-a98aecdf.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5fb75161.entry.js → p-ab3f2735.entry.js} +1 -1
- package/dist/bromcom-ui/{p-250f52d3.entry.js → p-ad11bb72.entry.js} +1 -1
- package/dist/bromcom-ui/{p-6f5cff36.entry.js → p-b1d1cdb0.entry.js} +1 -1
- package/dist/bromcom-ui/{p-dbc48ab6.entry.js → p-b4cbf3bd.entry.js} +1 -1
- package/dist/bromcom-ui/p-b9421650.entry.js +5 -0
- package/dist/bromcom-ui/{p-236a8be4.entry.js → p-b9983e4b.entry.js} +1 -1
- package/dist/bromcom-ui/{p-12c97616.entry.js → p-bf30bf7f.entry.js} +1 -1
- package/dist/bromcom-ui/{p-20e22beb.js → p-cd0490e2.js} +1 -1
- package/dist/bromcom-ui/p-cd638c37.entry.js +5 -0
- package/dist/bromcom-ui/p-ce9f87de.entry.js +5 -0
- package/dist/bromcom-ui/p-d18c5524.entry.js +5 -0
- package/dist/bromcom-ui/{p-0540bd97.entry.js → p-d9fb53c9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-df0a2839.entry.js → p-db7c75ac.entry.js} +1 -1
- package/dist/bromcom-ui/p-dbb106a4.entry.js +5 -0
- package/dist/bromcom-ui/{p-ac7386a1.entry.js → p-e467d49f.entry.js} +1 -1
- package/dist/bromcom-ui/p-e75fa6be.entry.js +5 -0
- package/dist/bromcom-ui/{p-1bb1ffce.entry.js → p-ea15e1f4.entry.js} +1 -1
- package/dist/bromcom-ui/p-ea9c10c3.js +5 -0
- package/dist/bromcom-ui/{p-0baf7808.entry.js → p-f9b0e4d2.entry.js} +1 -1
- package/dist/bromcom-ui/{p-be904c55.js → p-f9cb7ae4.js} +1 -1
- package/dist/bromcom-ui/{p-1b5695a9.entry.js → p-fa42b2de.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c1253548.entry.js → p-fda9a21b.entry.js} +1 -1
- package/dist/bromcom-ui/p-fe3e3210.js +5 -0
- package/dist/bromcom-ui/{p-515f3937.entry.js → p-fef3003b.entry.js} +1 -1
- package/dist/cjs/_commonjsHelpers-bd20f4c0.js +29 -0
- package/dist/cjs/bcm-2c51bf0c.js +448 -0
- package/dist/cjs/bcm-accordion.cjs.entry.js +85 -0
- package/dist/cjs/bcm-alert.cjs.entry.js +112 -0
- package/dist/cjs/bcm-attendance.cjs.entry.js +50 -0
- package/dist/cjs/bcm-autocomplete.cjs.entry.js +155 -0
- package/dist/cjs/bcm-avatar_2.cjs.entry.js +156 -0
- package/dist/cjs/bcm-box.cjs.entry.js +35 -0
- package/dist/cjs/bcm-breadcrumb.cjs.entry.js +67 -0
- package/dist/cjs/bcm-button-group.cjs.entry.js +102 -0
- package/dist/cjs/bcm-button_4.cjs.entry.js +997 -0
- package/dist/cjs/bcm-card.cjs.entry.js +76 -0
- package/dist/cjs/bcm-checkbox-group.cjs.entry.js +409 -0
- package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +2570 -0
- package/dist/cjs/bcm-checkbox_2.cjs.entry.js +203 -0
- package/dist/cjs/bcm-chip.cjs.entry.js +70 -0
- package/dist/cjs/bcm-collapse-group.cjs.entry.js +57 -0
- package/dist/cjs/bcm-collapse.cjs.entry.js +58 -0
- package/dist/cjs/bcm-colorpicker.cjs.entry.js +433 -0
- package/dist/cjs/bcm-date-picker.cjs.entry.js +171 -0
- package/dist/cjs/bcm-datetime-picker.cjs.entry.js +1432 -0
- package/dist/cjs/bcm-default.cjs.entry.js +40 -0
- package/dist/cjs/bcm-drawer.cjs.entry.js +111 -0
- package/dist/cjs/bcm-dropdown.cjs.entry.js +239 -0
- package/dist/cjs/bcm-error-layout.cjs.entry.js +78 -0
- package/dist/cjs/bcm-expansion-panel.cjs.entry.js +127 -0
- package/dist/cjs/bcm-form-2.cjs.entry.js +206 -0
- package/dist/cjs/bcm-form-group.cjs.entry.js +45 -0
- package/dist/cjs/bcm-input.cjs.entry.js +325 -0
- package/dist/cjs/bcm-item.cjs.entry.js +83 -0
- package/dist/cjs/bcm-items.cjs.entry.js +61 -0
- package/dist/cjs/bcm-label_2.cjs.entry.js +119 -0
- package/dist/cjs/bcm-link.cjs.entry.js +62 -0
- package/dist/cjs/bcm-linked.cjs.entry.js +179 -0
- package/dist/cjs/bcm-list.cjs.entry.js +1768 -0
- package/dist/cjs/bcm-menu.cjs.entry.js +248 -0
- package/dist/cjs/bcm-message.cjs.entry.js +99 -0
- package/dist/cjs/bcm-notification.cjs.entry.js +103 -0
- package/dist/cjs/bcm-old-input.cjs.entry.js +398 -0
- package/dist/cjs/bcm-old-tag_2.cjs.entry.js +157 -0
- package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +122 -0
- package/dist/cjs/bcm-popconfirm.cjs.entry.js +112 -0
- package/dist/cjs/bcm-popover.cjs.entry.js +182 -0
- package/dist/cjs/bcm-progress.cjs.entry.js +174 -0
- package/dist/cjs/bcm-radio-group.cjs.entry.js +267 -0
- package/dist/cjs/bcm-radio.cjs.entry.js +104 -0
- package/dist/cjs/bcm-range.cjs.entry.js +189 -0
- package/dist/cjs/bcm-result.cjs.entry.js +79 -0
- package/dist/cjs/bcm-search.cjs.entry.js +256 -0
- package/dist/cjs/bcm-select-group.cjs.entry.js +31 -0
- package/dist/cjs/bcm-select-option.cjs.entry.js +37 -0
- package/dist/cjs/bcm-select.cjs.entry.js +1198 -0
- package/dist/cjs/bcm-skeleton.cjs.entry.js +56 -0
- package/dist/cjs/bcm-step.cjs.entry.js +93 -0
- package/dist/cjs/bcm-stepper.cjs.entry.js +211 -0
- package/dist/cjs/bcm-switch.cjs.entry.js +139 -0
- package/dist/cjs/bcm-tab-group.cjs.entry.js +172 -0
- package/dist/cjs/bcm-tab-pane.cjs.entry.js +70 -0
- package/dist/cjs/bcm-tab.cjs.entry.js +89 -0
- package/dist/cjs/bcm-table.cjs.entry.js +78 -0
- package/dist/cjs/bcm-tabs-content.cjs.entry.js +62 -0
- package/dist/cjs/bcm-tabs.cjs.entry.js +390 -0
- package/dist/cjs/bcm-tag.cjs.entry.js +101 -0
- package/dist/cjs/bcm-text.cjs.entry.js +60 -0
- package/dist/cjs/bcm-textarea.cjs.entry.js +150 -0
- package/dist/cjs/bcm-time-picker.cjs.entry.js +139 -0
- package/dist/cjs/bcm-timeline-item.cjs.entry.js +55 -0
- package/dist/cjs/bcm-timeline.cjs.entry.js +73 -0
- package/dist/cjs/bcm-treeview-group.cjs.entry.js +23 -0
- package/dist/cjs/bromcom-ui.cjs.js +24 -0
- package/dist/cjs/caption-template-954d34bc.js +34 -0
- package/dist/cjs/color-helper-c9882bd8.js +490 -0
- package/dist/cjs/colors-56282b00.js +224 -0
- package/dist/cjs/datetime-helper-eaf4fadb.js +11 -0
- package/dist/cjs/element-dragger-a8562f82.js +279 -0
- package/dist/cjs/floating-ui-dae608ba.js +1455 -0
- package/dist/cjs/generate-9444aa87.js +203 -0
- package/dist/cjs/global-b0d21446.js +15 -0
- package/dist/cjs/index-9d98aa56.js +1864 -0
- package/dist/cjs/index-a2b50e51.js +64 -0
- package/dist/cjs/index-f8547ecd.js +193 -0
- package/dist/cjs/index.cjs.js +6 -0
- package/dist/cjs/input-template-623d767d.js +86 -0
- package/dist/cjs/is-load-decorator-65755a67.js +56 -0
- package/dist/cjs/json-parse-decarator-e39af071.js +40 -0
- package/dist/cjs/label-template-1ed6a569.js +23 -0
- package/dist/cjs/loader.cjs.js +26 -0
- package/dist/cjs/number-helper-ba5aa459.js +20 -0
- package/dist/cjs/old-bcm-popover-box.cjs.entry.js +161 -0
- package/dist/cjs/old-bcm-popover.cjs.entry.js +104 -0
- package/dist/cjs/popover-placement-87901bb3.js +98 -0
- package/dist/cjs/property-decorators-cb2155ed.js +33 -0
- package/dist/cjs/slot-template-2ff0d22a.js +15 -0
- package/dist/cjs/stepper-states-46c5f64b.js +83 -0
- package/dist/cjs/string-helper-df40a475.js +134 -0
- package/dist/cjs/tooltip-helper-5442af2e.js +104 -0
- package/dist/cjs/types-3871235f.js +32 -0
- package/dist/cjs/types-6eb7e028.js +32 -0
- package/dist/cjs/types-cc4adee7.js +19 -0
- package/dist/cjs/utils-fc077139.js +131 -0
- package/dist/cjs/validators-e45ced35.js +33 -0
- package/dist/collection/collection-manifest.json +95 -0
- package/dist/collection/components/atoms/avatar/avatar.css +448 -0
- package/dist/collection/components/atoms/avatar/avatar.js +259 -0
- package/dist/collection/components/atoms/badge/badge.css +481 -0
- package/dist/collection/components/atoms/badge/badge.js +224 -0
- package/dist/collection/components/atoms/box/box.js +23 -0
- package/dist/collection/components/atoms/button/button.css +652 -0
- package/dist/collection/components/atoms/button/button.js +527 -0
- package/dist/collection/components/atoms/button/types.js +170 -0
- package/dist/collection/components/atoms/chip/chip.css +453 -0
- package/dist/collection/components/atoms/chip/chip.js +187 -0
- package/dist/collection/components/atoms/divider/divider.css +142 -0
- package/dist/collection/components/atoms/divider/divider.js +83 -0
- package/dist/collection/components/atoms/icon/icon.css +127 -0
- package/dist/collection/components/atoms/icon/icon.js +70 -0
- package/dist/collection/components/atoms/label/label.css +408 -0
- package/dist/collection/components/atoms/label/label.js +216 -0
- package/dist/collection/components/atoms/link/link.css +419 -0
- package/dist/collection/components/atoms/link/link.js +176 -0
- package/dist/collection/components/atoms/states/button.states.js +31 -0
- package/dist/collection/components/atoms/tag/tag.js +334 -0
- package/dist/collection/components/atoms/tag/types.js +30 -0
- package/dist/collection/components/atoms/typography/typography.js +23 -0
- package/dist/collection/components/molecules/accordion/accordion.css +127 -0
- package/dist/collection/components/molecules/accordion/accordion.js +129 -0
- package/dist/collection/components/molecules/alert/alert.css +191 -0
- package/dist/collection/components/molecules/alert/alert.js +298 -0
- package/dist/collection/components/molecules/alert/types.js +23 -0
- package/dist/collection/components/molecules/breadcrumb/breadcrumb.css +201 -0
- package/dist/collection/components/molecules/breadcrumb/breadcrumb.js +155 -0
- package/dist/collection/components/molecules/breadcrumb/types.js +5 -0
- package/dist/collection/components/molecules/button-group/button-group.css +423 -0
- package/dist/collection/components/molecules/button-group/button-group.js +235 -0
- package/dist/collection/components/molecules/card/card.css +408 -0
- package/dist/collection/components/molecules/card/card.js +128 -0
- package/dist/collection/components/molecules/checkbox/checkbox-lite.js +237 -0
- package/dist/collection/components/molecules/checkbox/checkbox.css +1280 -0
- package/dist/collection/components/molecules/checkbox/checkbox.js +688 -0
- package/dist/collection/components/molecules/checkbox/group.css +156 -0
- package/dist/collection/components/molecules/checkbox/group.js +779 -0
- package/dist/collection/components/molecules/drawer/drawer.css +502 -0
- package/dist/collection/components/molecules/drawer/drawer.js +272 -0
- package/dist/collection/components/molecules/dropdown/dropdown.css +419 -0
- package/dist/collection/components/molecules/dropdown/dropdown.js +857 -0
- package/dist/collection/components/molecules/empty/empty.js +44 -0
- package/dist/collection/components/molecules/error-layout/error-layout.css +396 -0
- package/dist/collection/components/molecules/error-layout/error-layout.js +177 -0
- package/dist/collection/components/molecules/error-layout/types.js +5 -0
- package/dist/collection/components/molecules/expansion-panel/expansion-panel.css +488 -0
- package/dist/collection/components/molecules/expansion-panel/expansion-panel.js +322 -0
- package/dist/collection/components/molecules/input/input.css +1208 -0
- package/dist/collection/components/molecules/input/input.js +1171 -0
- package/dist/collection/components/molecules/input/types.js +17 -0
- package/dist/collection/components/molecules/item/item.css +446 -0
- package/dist/collection/components/molecules/item/item.js +151 -0
- package/dist/collection/components/molecules/items/items.js +84 -0
- package/dist/collection/components/molecules/linked/linked.js +410 -0
- package/dist/collection/components/molecules/menu/menu.css +718 -0
- package/dist/collection/components/molecules/menu/menu.js +623 -0
- package/dist/collection/components/molecules/message/message.css +165 -0
- package/dist/collection/components/molecules/message/message.js +222 -0
- package/dist/collection/components/molecules/message/types.js +14 -0
- package/dist/collection/components/molecules/modal/modal.css +526 -0
- package/dist/collection/components/molecules/modal/modal.js +374 -0
- package/dist/collection/components/molecules/notification/notification.css +183 -0
- package/dist/collection/components/molecules/notification/notification.js +244 -0
- package/dist/collection/components/molecules/notification/types.js +15 -0
- package/dist/collection/components/molecules/popconfirm/popconfirm-box.css +563 -0
- package/dist/collection/components/molecules/popconfirm/popconfirm-box.js +396 -0
- package/dist/collection/components/molecules/popconfirm/popconfirm.css +127 -0
- package/dist/collection/components/molecules/popconfirm/popconfirm.js +382 -0
- package/dist/collection/components/molecules/popover/popover.js +254 -0
- package/dist/collection/components/molecules/progress/progress.css +486 -0
- package/dist/collection/components/molecules/progress/progress.js +404 -0
- package/dist/collection/components/molecules/progress/types.js +28 -0
- package/dist/collection/components/molecules/radio/group.css +798 -0
- package/dist/collection/components/molecules/radio/group.js +652 -0
- package/dist/collection/components/molecules/radio/radio.css +1280 -0
- package/dist/collection/components/molecules/radio/radio.js +291 -0
- package/dist/collection/components/molecules/radio/types.js +30 -0
- package/dist/collection/components/molecules/range/range.css +570 -0
- package/dist/collection/components/molecules/range/range.js +472 -0
- package/dist/collection/components/molecules/result/result.css +164 -0
- package/dist/collection/components/molecules/result/result.js +143 -0
- package/dist/collection/components/molecules/result/types.js +22 -0
- package/dist/collection/components/molecules/search/search.css +1208 -0
- package/dist/collection/components/molecules/search/search.js +406 -0
- package/dist/collection/components/molecules/skeleton/skeleton.js +94 -0
- package/dist/collection/components/molecules/states/alert.states.js +25 -0
- package/dist/collection/components/molecules/states/checkbox-group.states.js +199 -0
- package/dist/collection/components/molecules/states/radio-group.states.js +107 -0
- package/dist/collection/components/molecules/states/search.states.js +137 -0
- package/dist/collection/components/molecules/states/stepper-states.js +79 -0
- package/dist/collection/components/molecules/stepper/step.js +346 -0
- package/dist/collection/components/molecules/stepper/stepper.css +617 -0
- package/dist/collection/components/molecules/stepper/stepper.js +484 -0
- package/dist/collection/components/molecules/switch/switch.css +1272 -0
- package/dist/collection/components/molecules/switch/switch.js +716 -0
- package/dist/collection/components/molecules/tab-group/tab-group.js +280 -0
- package/dist/collection/components/molecules/textarea/textarea.css +1208 -0
- package/dist/collection/components/molecules/textarea/textarea.js +731 -0
- package/dist/collection/components/molecules/textarea/types.js +13 -0
- package/dist/collection/components/molecules/timeline/timeline-item.css +254 -0
- package/dist/collection/components/molecules/timeline/timeline-item.js +159 -0
- package/dist/collection/components/molecules/timeline/timeline.css +205 -0
- package/dist/collection/components/molecules/timeline/timeline.js +125 -0
- package/dist/collection/components/molecules/tooltip/tooltip.js +232 -0
- package/dist/collection/components/organism/autocomplete/autocomplete.css +168 -0
- package/dist/collection/components/organism/autocomplete/autocomplete.js +399 -0
- package/dist/collection/components/organism/colorpicker/colorpicker.css +313 -0
- package/dist/collection/components/organism/colorpicker/colorpicker.js +774 -0
- package/dist/collection/components/organism/colorpicker/static/chess.png +0 -0
- package/dist/collection/components/organism/colorpicker/static/color.svg +14 -0
- package/dist/collection/components/organism/colorpicker/static/colors.svg +16 -0
- package/dist/collection/components/organism/date-picker/date-picker.css +141 -0
- package/dist/collection/components/organism/date-picker/date-picker.js +780 -0
- package/dist/collection/components/organism/datetime-picker/datetime-picker.css +1429 -0
- package/dist/collection/components/organism/datetime-picker/datetime-picker.js +2166 -0
- package/dist/collection/components/organism/datetime-picker/types.js +39 -0
- package/dist/collection/components/organism/form/form-group.css +131 -0
- package/dist/collection/components/organism/form/form-group.js +131 -0
- package/dist/collection/components/organism/form/form.css +132 -0
- package/dist/collection/components/organism/form/form.js +680 -0
- package/dist/collection/components/organism/form-2/bcm-form-components.js +26 -0
- package/dist/collection/components/organism/form-2/form-2.css +127 -0
- package/dist/collection/components/organism/form-2/form-2.js +329 -0
- package/dist/collection/components/organism/list/list-key-control.js +125 -0
- package/dist/collection/components/organism/list/list-tag-control.js +172 -0
- package/dist/collection/components/organism/list/list.css +2047 -0
- package/dist/collection/components/organism/list/list.js +1894 -0
- package/dist/collection/components/organism/states/bcm-list2.states.js +532 -0
- package/dist/collection/components/organism/time-picker/time-picker.css +141 -0
- package/dist/collection/components/organism/time-picker/time-picker.js +627 -0
- package/dist/collection/components/other/attendance/attendance.css +433 -0
- package/dist/collection/components/other/attendance/attendance.js +87 -0
- package/dist/collection/components/other/data-table/table.css +130 -0
- package/dist/collection/components/other/data-table/table.js +92 -0
- package/dist/collection/components/other/default/default.css +127 -0
- package/dist/collection/components/other/default/default.js +54 -0
- package/dist/collection/components/other_deprecated/collapse/collapse.css +177 -0
- package/dist/collection/components/other_deprecated/collapse/collapse.js +163 -0
- package/dist/collection/components/other_deprecated/collapse/group.js +128 -0
- package/dist/collection/components/other_deprecated/listbox/listbox-group.css +139 -0
- package/dist/collection/components/other_deprecated/listbox/listbox-group.js +93 -0
- package/dist/collection/components/other_deprecated/listbox/listbox-item.css +269 -0
- package/dist/collection/components/other_deprecated/listbox/listbox-item.js +641 -0
- package/dist/collection/components/other_deprecated/listbox/listbox.css +365 -0
- package/dist/collection/components/other_deprecated/listbox/listbox.js +1999 -0
- package/dist/collection/components/other_deprecated/listbox/types.js +11 -0
- package/dist/collection/components/other_deprecated/old-input/old-input.css +1360 -0
- package/dist/collection/components/other_deprecated/old-input/old-input.js +1154 -0
- package/dist/collection/components/other_deprecated/old-input/types.js +17 -0
- package/dist/collection/components/other_deprecated/old-popover/old-popover-box.css +582 -0
- package/dist/collection/components/other_deprecated/old-popover/old-popover-box.js +422 -0
- package/dist/collection/components/other_deprecated/old-popover/old-popover.css +127 -0
- package/dist/collection/components/other_deprecated/old-popover/old-popover.js +296 -0
- package/dist/collection/components/other_deprecated/old-search/old-search.css +131 -0
- package/dist/collection/components/other_deprecated/old-search/old-search.js +496 -0
- package/dist/collection/components/other_deprecated/old-tag/old-tag.css +305 -0
- package/dist/collection/components/other_deprecated/old-tag/old-tag.js +326 -0
- package/dist/collection/components/other_deprecated/old-tag/types.js +30 -0
- package/dist/collection/components/other_deprecated/select/group.css +144 -0
- package/dist/collection/components/other_deprecated/select/group.js +88 -0
- package/dist/collection/components/other_deprecated/select/option.css +164 -0
- package/dist/collection/components/other_deprecated/select/option.js +142 -0
- package/dist/collection/components/other_deprecated/select/select-box.css +143 -0
- package/dist/collection/components/other_deprecated/select/select-box.js +104 -0
- package/dist/collection/components/other_deprecated/select/select.css +364 -0
- package/dist/collection/components/other_deprecated/select/select.js +2281 -0
- package/dist/collection/components/other_deprecated/tabs/tab-pane.css +142 -0
- package/dist/collection/components/other_deprecated/tabs/tab-pane.js +168 -0
- package/dist/collection/components/other_deprecated/tabs/tab.css +587 -0
- package/dist/collection/components/other_deprecated/tabs/tab.js +303 -0
- package/dist/collection/components/other_deprecated/tabs/tabs-content.css +136 -0
- package/dist/collection/components/other_deprecated/tabs/tabs-content.js +147 -0
- package/dist/collection/components/other_deprecated/tabs/tabs.css +212 -0
- package/dist/collection/components/other_deprecated/tabs/tabs.js +806 -0
- package/dist/collection/components/other_deprecated/tabs/types.js +30 -0
- package/dist/collection/components/other_deprecated/text/text.css +429 -0
- package/dist/collection/components/other_deprecated/text/text.js +159 -0
- package/dist/collection/components/other_deprecated/treeview/treeview-group.css +0 -0
- package/dist/collection/components/other_deprecated/treeview/treeview-group.js +18 -0
- package/dist/collection/components/other_deprecated/treeview/treeview-item.css +318 -0
- package/dist/collection/components/other_deprecated/treeview/treeview-item.js +977 -0
- package/dist/collection/components/other_deprecated/treeview/treeview.css +190 -0
- package/dist/collection/components/other_deprecated/treeview/treeview.js +1699 -0
- package/dist/collection/components/other_deprecated/treeview/types.js +11 -0
- package/dist/collection/decorators/id-decorator.js +18 -0
- package/dist/collection/decorators/index.js +8 -0
- package/dist/collection/decorators/is-load-decorator.js +51 -0
- package/dist/collection/decorators/json-parse-decarator.js +35 -0
- package/dist/collection/decorators/property-decorators.js +28 -0
- package/dist/collection/global/components/_checkbox.css +627 -0
- package/dist/collection/global/config.js +45 -0
- package/dist/collection/global/global.js +43 -0
- package/dist/collection/global/variables/colors.js +220 -0
- package/dist/collection/helper/color-helper.js +81 -0
- package/dist/collection/helper/datetime-helper.js +7 -0
- package/dist/collection/helper/generate.js +168 -0
- package/dist/collection/helper/index.js +12 -0
- package/dist/collection/helper/number-helper.js +15 -0
- package/dist/collection/helper/popover-helper.js +106 -0
- package/dist/collection/helper/string-helper.js +65 -0
- package/dist/collection/helper/tooltip-helper.js +95 -0
- package/dist/collection/helper/validators.js +28 -0
- package/dist/collection/index.js +5 -0
- package/dist/collection/models/abstract-classes/abstract-key-control.js +97 -0
- package/dist/collection/models/bcm-types.js +5 -0
- package/dist/collection/models/bcm.js +466 -0
- package/dist/collection/models/index.js +6 -0
- package/dist/collection/models/states/atoms/bcm-atoms-state.js +5 -0
- package/dist/collection/models/states/molecules/bcm-molecules-state.js +5 -0
- package/dist/collection/models/states/organisms/bcm-organisms-state.js +5 -0
- package/dist/collection/templates/button-template.js +22 -0
- package/dist/collection/templates/caption-template.js +29 -0
- package/dist/collection/templates/checkbox-group-template.js +10 -0
- package/dist/collection/templates/checkbox-template.js +31 -0
- package/dist/collection/templates/icon-template.js +24 -0
- package/dist/collection/templates/index.js +17 -0
- package/dist/collection/templates/info-footer-template.js +16 -0
- package/dist/collection/templates/input-template.js +81 -0
- package/dist/collection/templates/label-template.js +18 -0
- package/dist/collection/templates/list-item-template.js +58 -0
- package/dist/collection/templates/list-template.js +24 -0
- package/dist/collection/templates/slot-template.js +10 -0
- package/dist/collection/templates/step-template.js +26 -0
- package/dist/collection/templates/tag-template.js +45 -0
- package/dist/collection/types/index.js +5 -0
- package/dist/collection/utils/element-dragger.js +274 -0
- package/dist/collection/utils/floating-ui.js +95 -0
- package/dist/collection/utils/index.js +9 -0
- package/dist/collection/utils/popover-placement.js +96 -0
- package/dist/collection/utils/utils.js +223 -0
- package/dist/collection/utils/validation.js +47 -0
- package/dist/esm/_commonjsHelpers-3016b722.js +25 -0
- package/dist/esm/bcm-accordion.entry.js +81 -0
- package/dist/esm/bcm-alert.entry.js +108 -0
- package/dist/esm/bcm-attendance.entry.js +46 -0
- package/dist/esm/bcm-autocomplete.entry.js +151 -0
- package/dist/esm/bcm-avatar_2.entry.js +151 -0
- package/dist/esm/bcm-b8d8a236.js +446 -0
- package/dist/esm/bcm-box.entry.js +31 -0
- package/dist/esm/bcm-breadcrumb.entry.js +63 -0
- package/dist/esm/bcm-button-group.entry.js +98 -0
- package/dist/esm/bcm-button_4.entry.js +990 -0
- package/dist/esm/bcm-card.entry.js +72 -0
- package/dist/esm/bcm-checkbox-group.entry.js +405 -0
- package/dist/esm/bcm-checkbox-lite_9.entry.js +2558 -0
- package/dist/esm/bcm-checkbox_2.entry.js +198 -0
- package/dist/esm/bcm-chip.entry.js +66 -0
- package/dist/esm/bcm-collapse-group.entry.js +53 -0
- package/dist/esm/bcm-collapse.entry.js +54 -0
- package/dist/esm/bcm-colorpicker.entry.js +429 -0
- package/dist/esm/bcm-date-picker.entry.js +167 -0
- package/dist/esm/bcm-datetime-picker.entry.js +1428 -0
- package/dist/esm/bcm-default.entry.js +36 -0
- package/dist/esm/bcm-drawer.entry.js +107 -0
- package/dist/esm/bcm-dropdown.entry.js +235 -0
- package/dist/esm/bcm-error-layout.entry.js +74 -0
- package/dist/esm/bcm-expansion-panel.entry.js +123 -0
- package/dist/esm/bcm-form-2.entry.js +202 -0
- package/dist/esm/bcm-form-group.entry.js +41 -0
- package/dist/esm/bcm-input.entry.js +321 -0
- package/dist/esm/bcm-item.entry.js +79 -0
- package/dist/esm/bcm-items.entry.js +57 -0
- package/dist/esm/bcm-label_2.entry.js +114 -0
- package/dist/esm/bcm-link.entry.js +58 -0
- package/dist/esm/bcm-linked.entry.js +175 -0
- package/dist/esm/bcm-list.entry.js +1764 -0
- package/dist/esm/bcm-menu.entry.js +244 -0
- package/dist/esm/bcm-message.entry.js +95 -0
- package/dist/esm/bcm-notification.entry.js +99 -0
- package/dist/esm/bcm-old-input.entry.js +394 -0
- package/dist/esm/bcm-old-tag_2.entry.js +152 -0
- package/dist/esm/bcm-popconfirm-box.entry.js +118 -0
- package/dist/esm/bcm-popconfirm.entry.js +108 -0
- package/dist/esm/bcm-popover.entry.js +178 -0
- package/dist/esm/bcm-progress.entry.js +170 -0
- package/dist/esm/bcm-radio-group.entry.js +263 -0
- package/dist/esm/bcm-radio.entry.js +100 -0
- package/dist/esm/bcm-range.entry.js +185 -0
- package/dist/esm/bcm-result.entry.js +75 -0
- package/dist/esm/bcm-search.entry.js +252 -0
- package/dist/esm/bcm-select-group.entry.js +27 -0
- package/dist/esm/bcm-select-option.entry.js +33 -0
- package/dist/esm/bcm-select.entry.js +1194 -0
- package/dist/esm/bcm-skeleton.entry.js +52 -0
- package/dist/esm/bcm-step.entry.js +89 -0
- package/dist/esm/bcm-stepper.entry.js +207 -0
- package/dist/esm/bcm-switch.entry.js +135 -0
- package/dist/esm/bcm-tab-group.entry.js +168 -0
- package/dist/esm/bcm-tab-pane.entry.js +66 -0
- package/dist/esm/bcm-tab.entry.js +85 -0
- package/dist/esm/bcm-table.entry.js +74 -0
- package/dist/esm/bcm-tabs-content.entry.js +58 -0
- package/dist/esm/bcm-tabs.entry.js +386 -0
- package/dist/esm/bcm-tag.entry.js +97 -0
- package/dist/esm/bcm-text.entry.js +56 -0
- package/dist/esm/bcm-textarea.entry.js +146 -0
- package/dist/esm/bcm-time-picker.entry.js +135 -0
- package/dist/esm/bcm-timeline-item.entry.js +51 -0
- package/dist/esm/bcm-timeline.entry.js +69 -0
- package/dist/esm/bcm-treeview-group.entry.js +19 -0
- package/dist/esm/bromcom-ui.js +22 -0
- package/dist/esm/caption-template-d54ee0c3.js +32 -0
- package/dist/esm/color-helper-7e202fd8.js +488 -0
- package/dist/esm/colors-1d7854ea.js +222 -0
- package/dist/esm/datetime-helper-df25808a.js +9 -0
- package/dist/esm/element-dragger-89bb52fd.js +277 -0
- package/dist/esm/floating-ui-f03a96ce.js +1453 -0
- package/dist/esm/generate-d57a5f95.js +200 -0
- package/dist/esm/global-4fad925b.js +13 -0
- package/dist/esm/index-2a3eeccc.js +1833 -0
- package/dist/esm/index-6e950253.js +191 -0
- package/dist/esm/index-ba2edd32.js +62 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/input-template-2044f4f6.js +84 -0
- package/dist/esm/is-load-decorator-b990575a.js +54 -0
- package/dist/esm/json-parse-decarator-50541a21.js +38 -0
- package/dist/esm/label-template-e3eebfbc.js +21 -0
- package/dist/esm/loader.js +22 -0
- package/dist/esm/number-helper-75d21178.js +18 -0
- package/dist/esm/old-bcm-popover-box.entry.js +157 -0
- package/dist/esm/old-bcm-popover.entry.js +100 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/popover-placement-9864294b.js +95 -0
- package/dist/esm/property-decorators-f3f1e7de.js +31 -0
- package/dist/esm/slot-template-877c4e01.js +13 -0
- package/dist/esm/stepper-states-9f66e2b4.js +81 -0
- package/dist/esm/string-helper-74a1648f.js +132 -0
- package/dist/esm/tooltip-helper-bed79484.js +102 -0
- package/dist/esm/types-6f06fa1a.js +19 -0
- package/dist/esm/types-b211a5eb.js +32 -0
- package/dist/esm/types-bfc3bba1.js +32 -0
- package/dist/esm/utils-57652744.js +123 -0
- package/dist/esm/validators-6af629b4.js +31 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/atoms/avatar/avatar.d.ts +23 -0
- package/dist/types/components/atoms/badge/badge.d.ts +17 -0
- package/dist/types/components/atoms/box/box.d.ts +5 -0
- package/dist/types/components/atoms/button/button.d.ts +33 -0
- package/dist/types/components/atoms/button/types.d.ts +166 -0
- package/dist/types/components/atoms/chip/chip.d.ts +24 -0
- package/dist/types/components/atoms/divider/divider.d.ts +7 -0
- package/dist/types/components/atoms/icon/icon.d.ts +6 -0
- package/dist/types/components/atoms/label/label.d.ts +16 -0
- package/dist/types/components/atoms/link/link.d.ts +13 -0
- package/dist/types/components/atoms/states/button.states.d.ts +7 -0
- package/dist/types/components/atoms/tag/tag.d.ts +24 -0
- package/dist/types/components/atoms/tag/types.d.ts +29 -0
- package/dist/types/components/atoms/typography/typography.d.ts +5 -0
- package/dist/types/components/molecules/accordion/accordion.d.ts +11 -0
- package/dist/types/components/molecules/alert/alert.d.ts +21 -0
- package/dist/types/components/molecules/alert/types.d.ts +25 -0
- package/dist/types/components/molecules/breadcrumb/breadcrumb.d.ts +14 -0
- package/dist/types/components/molecules/breadcrumb/types.d.ts +10 -0
- package/dist/types/components/molecules/button-group/button-group.d.ts +21 -0
- package/dist/types/components/molecules/card/card.d.ts +11 -0
- package/dist/types/components/molecules/checkbox/checkbox-lite.d.ts +14 -0
- package/dist/types/components/molecules/checkbox/checkbox.d.ts +56 -0
- package/dist/types/components/molecules/checkbox/group.d.ts +56 -0
- package/dist/types/components/molecules/drawer/drawer.d.ts +21 -0
- package/dist/types/components/molecules/dropdown/dropdown.d.ts +55 -0
- package/dist/types/components/molecules/empty/empty.d.ts +5 -0
- package/dist/types/components/molecules/error-layout/error-layout.d.ts +25 -0
- package/dist/types/components/molecules/error-layout/types.d.ts +4 -0
- package/dist/types/components/molecules/expansion-panel/expansion-panel.d.ts +31 -0
- package/dist/types/components/molecules/input/input.d.ts +82 -0
- package/dist/types/components/molecules/input/types.d.ts +13 -0
- package/dist/types/components/molecules/item/item.d.ts +13 -0
- package/dist/types/components/molecules/items/items.d.ts +10 -0
- package/dist/types/components/molecules/linked/linked.d.ts +30 -0
- package/dist/types/components/molecules/menu/menu.d.ts +41 -0
- package/dist/types/components/molecules/message/message.d.ts +32 -0
- package/dist/types/components/molecules/message/types.d.ts +13 -0
- package/dist/types/components/molecules/modal/modal.d.ts +25 -0
- package/dist/types/components/molecules/notification/notification.d.ts +42 -0
- package/dist/types/components/molecules/notification/types.d.ts +14 -0
- package/dist/types/components/molecules/popconfirm/popconfirm-box.d.ts +29 -0
- package/dist/types/components/molecules/popconfirm/popconfirm.d.ts +28 -0
- package/dist/types/components/molecules/popover/popover.d.ts +20 -0
- package/dist/types/components/molecules/progress/progress.d.ts +25 -0
- package/dist/types/components/molecules/progress/types.d.ts +14 -0
- package/dist/types/components/molecules/radio/group.d.ts +54 -0
- package/dist/types/components/molecules/radio/radio.d.ts +21 -0
- package/dist/types/components/molecules/radio/types.d.ts +29 -0
- package/dist/types/components/molecules/range/range.d.ts +36 -0
- package/dist/types/components/molecules/result/result.d.ts +13 -0
- package/dist/types/components/molecules/result/types.d.ts +19 -0
- package/dist/types/components/molecules/search/search.d.ts +35 -0
- package/dist/types/components/molecules/skeleton/skeleton.d.ts +8 -0
- package/dist/types/components/molecules/states/alert.states.d.ts +7 -0
- package/dist/types/components/molecules/states/checkbox-group.states.d.ts +53 -0
- package/dist/types/components/molecules/states/radio-group.states.d.ts +48 -0
- package/dist/types/components/molecules/states/search.states.d.ts +14 -0
- package/dist/types/components/molecules/states/stepper-states.d.ts +13 -0
- package/dist/types/components/molecules/stepper/step.d.ts +25 -0
- package/dist/types/components/molecules/stepper/stepper.d.ts +34 -0
- package/dist/types/components/molecules/switch/switch.d.ts +46 -0
- package/dist/types/components/molecules/tab-group/tab-group.d.ts +18 -0
- package/dist/types/components/molecules/textarea/textarea.d.ts +53 -0
- package/dist/types/components/molecules/textarea/types.d.ts +9 -0
- package/dist/types/components/molecules/timeline/timeline-item.d.ts +16 -0
- package/dist/types/components/molecules/timeline/timeline.d.ts +25 -0
- package/dist/types/components/molecules/tooltip/tooltip.d.ts +19 -0
- package/dist/types/components/organism/autocomplete/autocomplete.d.ts +31 -0
- package/dist/types/components/organism/colorpicker/colorpicker.d.ts +176 -0
- package/dist/types/components/organism/date-picker/date-picker.d.ts +77 -0
- package/dist/types/components/organism/datetime-picker/datetime-picker.d.ts +438 -0
- package/dist/types/components/organism/datetime-picker/types.d.ts +54 -0
- package/dist/types/components/organism/form/form-group.d.ts +10 -0
- package/dist/types/components/organism/form/form.d.ts +34 -0
- package/dist/types/components/organism/form-2/bcm-form-components.d.ts +2 -0
- package/dist/types/components/organism/form-2/form-2.d.ts +25 -0
- package/dist/types/components/organism/list/list-key-control.d.ts +18 -0
- package/dist/types/components/organism/list/list-tag-control.d.ts +18 -0
- package/dist/types/components/organism/list/list.d.ts +140 -0
- package/dist/types/components/organism/states/bcm-list2.states.d.ts +28 -0
- package/dist/types/components/organism/time-picker/time-picker.d.ts +69 -0
- package/dist/types/components/other/attendance/attendance.d.ts +7 -0
- package/dist/types/components/other/data-table/table.d.ts +8 -0
- package/dist/types/components/other/default/default.d.ts +6 -0
- package/dist/types/components/other_deprecated/collapse/collapse.d.ts +12 -0
- package/dist/types/components/other_deprecated/collapse/group.d.ts +15 -0
- package/dist/types/components/other_deprecated/listbox/listbox-group.d.ts +7 -0
- package/dist/types/components/other_deprecated/listbox/listbox-item.d.ts +58 -0
- package/dist/types/components/other_deprecated/listbox/listbox.d.ts +152 -0
- package/dist/types/components/other_deprecated/listbox/types.d.ts +11 -0
- package/dist/types/components/other_deprecated/old-input/old-input.d.ts +80 -0
- package/dist/types/components/other_deprecated/old-input/types.d.ts +13 -0
- package/dist/types/components/other_deprecated/old-popover/old-popover-box.d.ts +26 -0
- package/dist/types/components/other_deprecated/old-popover/old-popover.d.ts +22 -0
- package/dist/types/components/other_deprecated/old-search/old-search.d.ts +32 -0
- package/dist/types/components/other_deprecated/old-tag/old-tag.d.ts +27 -0
- package/dist/types/components/other_deprecated/old-tag/types.d.ts +29 -0
- package/dist/types/components/other_deprecated/select/group.d.ts +6 -0
- package/dist/types/components/other_deprecated/select/option.d.ts +10 -0
- package/dist/types/components/other_deprecated/select/select-box.d.ts +15 -0
- package/dist/types/components/other_deprecated/select/select.d.ts +133 -0
- package/dist/types/components/other_deprecated/tabs/tab-pane.d.ts +19 -0
- package/dist/types/components/other_deprecated/tabs/tab.d.ts +36 -0
- package/dist/types/components/other_deprecated/tabs/tabs-content.d.ts +18 -0
- package/dist/types/components/other_deprecated/tabs/tabs.d.ts +112 -0
- package/dist/types/components/other_deprecated/tabs/types.d.ts +39 -0
- package/dist/types/components/other_deprecated/text/text.d.ts +11 -0
- package/dist/types/components/other_deprecated/treeview/treeview-group.d.ts +3 -0
- package/dist/types/components/other_deprecated/treeview/treeview-item.d.ts +119 -0
- package/dist/types/components/other_deprecated/treeview/treeview.d.ts +181 -0
- package/dist/types/components/other_deprecated/treeview/types.d.ts +11 -0
- package/dist/types/components.d.ts +3532 -0
- package/dist/types/decorators/id-decorator.d.ts +4 -0
- package/dist/types/decorators/index.d.ts +4 -0
- package/dist/types/decorators/is-load-decorator.d.ts +7 -0
- package/dist/types/decorators/json-parse-decarator.d.ts +4 -0
- package/dist/types/decorators/property-decorators.d.ts +4 -0
- package/dist/types/global/variables/colors.d.ts +217 -0
- package/dist/types/helper/color-helper.d.ts +16 -0
- package/dist/types/helper/datetime-helper.d.ts +3 -0
- package/dist/types/helper/generate.d.ts +22 -0
- package/dist/types/helper/index.d.ts +8 -0
- package/dist/types/helper/number-helper.d.ts +10 -0
- package/dist/types/helper/popover-helper.d.ts +31 -0
- package/dist/types/helper/string-helper.d.ts +27 -0
- package/dist/types/helper/tooltip-helper.d.ts +25 -0
- package/dist/types/helper/validators.d.ts +10 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/models/abstract-classes/abstract-key-control.d.ts +31 -0
- package/dist/types/models/bcm-types.d.ts +21 -0
- package/dist/types/models/bcm.d.ts +456 -0
- package/dist/types/models/index.d.ts +2 -0
- package/dist/types/models/states/atoms/bcm-atoms-state.d.ts +34 -0
- package/dist/types/models/states/molecules/bcm-molecules-state.d.ts +90 -0
- package/dist/types/models/states/organisms/bcm-organisms-state.d.ts +78 -0
- package/dist/types/stencil-public-runtime.d.ts +1565 -0
- package/dist/types/templates/button-template.d.ts +18 -0
- package/dist/types/templates/caption-template.d.ts +14 -0
- package/dist/types/templates/checkbox-group-template.d.ts +10 -0
- package/dist/types/templates/checkbox-template.d.ts +13 -0
- package/dist/types/templates/icon-template.d.ts +7 -0
- package/dist/types/templates/index.d.ts +13 -0
- package/dist/types/templates/info-footer-template.d.ts +10 -0
- package/dist/types/templates/input-template.d.ts +34 -0
- package/dist/types/templates/label-template.d.ts +12 -0
- package/dist/types/templates/list-item-template.d.ts +13 -0
- package/dist/types/templates/list-template.d.ts +29 -0
- package/dist/types/templates/slot-template.d.ts +8 -0
- package/dist/types/templates/step-template.d.ts +17 -0
- package/dist/types/templates/tag-template.d.ts +21 -0
- package/dist/types/types/index.d.ts +12 -0
- package/dist/types/utils/element-dragger.d.ts +146 -0
- package/dist/types/utils/floating-ui.d.ts +1 -0
- package/dist/types/utils/index.d.ts +5 -0
- package/dist/types/utils/popover-placement.d.ts +3 -0
- package/dist/types/utils/utils.d.ts +55 -0
- package/dist/types/utils/validation.d.ts +19 -0
- package/package.json +7 -5
- package/dist/bromcom-ui/p-0846712b.js +0 -5
- package/dist/bromcom-ui/p-0f4e34e9.js +0 -5
- package/dist/bromcom-ui/p-1b60d9d1.entry.js +0 -5
- package/dist/bromcom-ui/p-2135cb11.js +0 -5
- package/dist/bromcom-ui/p-3c8d24f0.entry.js +0 -5
- package/dist/bromcom-ui/p-4958dd94.js +0 -5
- package/dist/bromcom-ui/p-4ee3fbcf.entry.js +0 -5
- package/dist/bromcom-ui/p-517bca05.entry.js +0 -5
- package/dist/bromcom-ui/p-73cacbce.entry.js +0 -5
- package/dist/bromcom-ui/p-7a34d5a4.entry.js +0 -5
- package/dist/bromcom-ui/p-7de55a4c.entry.js +0 -5
- package/dist/bromcom-ui/p-8f394771.js +0 -5
- package/dist/bromcom-ui/p-b66edda8.js +0 -5
- package/dist/bromcom-ui/p-b970549a.entry.js +0 -5
- package/dist/bromcom-ui/p-bb698305.js +0 -5
- package/dist/bromcom-ui/p-d3d143b3.entry.js +0 -5
- package/dist/bromcom-ui/p-d9913ea9.js +0 -5
- package/dist/bromcom-ui/p-dbde0dc8.entry.js +0 -5
- package/dist/bromcom-ui/p-e8159c40.entry.js +0 -5
- package/dist/bromcom-ui/p-f7589887.entry.js +0 -5
- package/dist/bromcom-ui/p-f932d88a.entry.js +0 -5
|
@@ -0,0 +1,1453 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* Copyright (c) Bromcom.
|
|
4
|
+
*/
|
|
5
|
+
import { a as Bcm } from './bcm-b8d8a236.js';
|
|
6
|
+
|
|
7
|
+
function getSide(placement) {
|
|
8
|
+
return placement.split('-')[0];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function getAlignment(placement) {
|
|
12
|
+
return placement.split('-')[1];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function getMainAxisFromPlacement(placement) {
|
|
16
|
+
return ['top', 'bottom'].includes(getSide(placement)) ? 'x' : 'y';
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function getLengthFromAxis(axis) {
|
|
20
|
+
return axis === 'y' ? 'height' : 'width';
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
24
|
+
let {
|
|
25
|
+
reference,
|
|
26
|
+
floating
|
|
27
|
+
} = _ref;
|
|
28
|
+
const commonX = reference.x + reference.width / 2 - floating.width / 2;
|
|
29
|
+
const commonY = reference.y + reference.height / 2 - floating.height / 2;
|
|
30
|
+
const mainAxis = getMainAxisFromPlacement(placement);
|
|
31
|
+
const length = getLengthFromAxis(mainAxis);
|
|
32
|
+
const commonAlign = reference[length] / 2 - floating[length] / 2;
|
|
33
|
+
const side = getSide(placement);
|
|
34
|
+
const isVertical = mainAxis === 'x';
|
|
35
|
+
let coords;
|
|
36
|
+
|
|
37
|
+
switch (side) {
|
|
38
|
+
case 'top':
|
|
39
|
+
coords = {
|
|
40
|
+
x: commonX,
|
|
41
|
+
y: reference.y - floating.height
|
|
42
|
+
};
|
|
43
|
+
break;
|
|
44
|
+
|
|
45
|
+
case 'bottom':
|
|
46
|
+
coords = {
|
|
47
|
+
x: commonX,
|
|
48
|
+
y: reference.y + reference.height
|
|
49
|
+
};
|
|
50
|
+
break;
|
|
51
|
+
|
|
52
|
+
case 'right':
|
|
53
|
+
coords = {
|
|
54
|
+
x: reference.x + reference.width,
|
|
55
|
+
y: commonY
|
|
56
|
+
};
|
|
57
|
+
break;
|
|
58
|
+
|
|
59
|
+
case 'left':
|
|
60
|
+
coords = {
|
|
61
|
+
x: reference.x - floating.width,
|
|
62
|
+
y: commonY
|
|
63
|
+
};
|
|
64
|
+
break;
|
|
65
|
+
|
|
66
|
+
default:
|
|
67
|
+
coords = {
|
|
68
|
+
x: reference.x,
|
|
69
|
+
y: reference.y
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
switch (getAlignment(placement)) {
|
|
74
|
+
case 'start':
|
|
75
|
+
coords[mainAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
|
|
76
|
+
break;
|
|
77
|
+
|
|
78
|
+
case 'end':
|
|
79
|
+
coords[mainAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return coords;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Computes the `x` and `y` coordinates that will place the floating element
|
|
88
|
+
* next to a reference element when it is given a certain positioning strategy.
|
|
89
|
+
*
|
|
90
|
+
* This export does not have any `platform` interface logic. You will need to
|
|
91
|
+
* write one for the platform you are using Floating UI with.
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
const computePosition$1 = async (reference, floating, config) => {
|
|
95
|
+
const {
|
|
96
|
+
placement = 'bottom',
|
|
97
|
+
strategy = 'absolute',
|
|
98
|
+
middleware = [],
|
|
99
|
+
platform
|
|
100
|
+
} = config;
|
|
101
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
|
|
102
|
+
|
|
103
|
+
let rects = await platform.getElementRects({
|
|
104
|
+
reference,
|
|
105
|
+
floating,
|
|
106
|
+
strategy
|
|
107
|
+
});
|
|
108
|
+
let {
|
|
109
|
+
x,
|
|
110
|
+
y
|
|
111
|
+
} = computeCoordsFromPlacement(rects, placement, rtl);
|
|
112
|
+
let statefulPlacement = placement;
|
|
113
|
+
let middlewareData = {};
|
|
114
|
+
let resetCount = 0;
|
|
115
|
+
|
|
116
|
+
for (let i = 0; i < middleware.length; i++) {
|
|
117
|
+
const {
|
|
118
|
+
name,
|
|
119
|
+
fn
|
|
120
|
+
} = middleware[i];
|
|
121
|
+
const {
|
|
122
|
+
x: nextX,
|
|
123
|
+
y: nextY,
|
|
124
|
+
data,
|
|
125
|
+
reset
|
|
126
|
+
} = await fn({
|
|
127
|
+
x,
|
|
128
|
+
y,
|
|
129
|
+
initialPlacement: placement,
|
|
130
|
+
placement: statefulPlacement,
|
|
131
|
+
strategy,
|
|
132
|
+
middlewareData,
|
|
133
|
+
rects,
|
|
134
|
+
platform,
|
|
135
|
+
elements: {
|
|
136
|
+
reference,
|
|
137
|
+
floating
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
x = nextX != null ? nextX : x;
|
|
141
|
+
y = nextY != null ? nextY : y;
|
|
142
|
+
middlewareData = { ...middlewareData,
|
|
143
|
+
[name]: { ...middlewareData[name],
|
|
144
|
+
...data
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
if (reset && resetCount <= 50) {
|
|
149
|
+
resetCount++;
|
|
150
|
+
|
|
151
|
+
if (typeof reset === 'object') {
|
|
152
|
+
if (reset.placement) {
|
|
153
|
+
statefulPlacement = reset.placement;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if (reset.rects) {
|
|
157
|
+
rects = reset.rects === true ? await platform.getElementRects({
|
|
158
|
+
reference,
|
|
159
|
+
floating,
|
|
160
|
+
strategy
|
|
161
|
+
}) : reset.rects;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
({
|
|
165
|
+
x,
|
|
166
|
+
y
|
|
167
|
+
} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
i = -1;
|
|
171
|
+
continue;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
return {
|
|
176
|
+
x,
|
|
177
|
+
y,
|
|
178
|
+
placement: statefulPlacement,
|
|
179
|
+
strategy,
|
|
180
|
+
middlewareData
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
function expandPaddingObject(padding) {
|
|
185
|
+
return {
|
|
186
|
+
top: 0,
|
|
187
|
+
right: 0,
|
|
188
|
+
bottom: 0,
|
|
189
|
+
left: 0,
|
|
190
|
+
...padding
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
function getSideObjectFromPadding(padding) {
|
|
195
|
+
return typeof padding !== 'number' ? expandPaddingObject(padding) : {
|
|
196
|
+
top: padding,
|
|
197
|
+
right: padding,
|
|
198
|
+
bottom: padding,
|
|
199
|
+
left: padding
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
function rectToClientRect(rect) {
|
|
204
|
+
return { ...rect,
|
|
205
|
+
top: rect.y,
|
|
206
|
+
left: rect.x,
|
|
207
|
+
right: rect.x + rect.width,
|
|
208
|
+
bottom: rect.y + rect.height
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Resolves with an object of overflow side offsets that determine how much the
|
|
214
|
+
* element is overflowing a given clipping boundary.
|
|
215
|
+
* - positive = overflowing the boundary by that number of pixels
|
|
216
|
+
* - negative = how many pixels left before it will overflow
|
|
217
|
+
* - 0 = lies flush with the boundary
|
|
218
|
+
* @see https://floating-ui.com/docs/detectOverflow
|
|
219
|
+
*/
|
|
220
|
+
async function detectOverflow(middlewareArguments, options) {
|
|
221
|
+
var _await$platform$isEle;
|
|
222
|
+
|
|
223
|
+
if (options === void 0) {
|
|
224
|
+
options = {};
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
const {
|
|
228
|
+
x,
|
|
229
|
+
y,
|
|
230
|
+
platform,
|
|
231
|
+
rects,
|
|
232
|
+
elements,
|
|
233
|
+
strategy
|
|
234
|
+
} = middlewareArguments;
|
|
235
|
+
const {
|
|
236
|
+
boundary = 'clippingAncestors',
|
|
237
|
+
rootBoundary = 'viewport',
|
|
238
|
+
elementContext = 'floating',
|
|
239
|
+
altBoundary = false,
|
|
240
|
+
padding = 0
|
|
241
|
+
} = options;
|
|
242
|
+
const paddingObject = getSideObjectFromPadding(padding);
|
|
243
|
+
const altContext = elementContext === 'floating' ? 'reference' : 'floating';
|
|
244
|
+
const element = elements[altBoundary ? altContext : elementContext];
|
|
245
|
+
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
|
246
|
+
element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
|
|
247
|
+
boundary,
|
|
248
|
+
rootBoundary,
|
|
249
|
+
strategy
|
|
250
|
+
}));
|
|
251
|
+
const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
252
|
+
rect: elementContext === 'floating' ? { ...rects.floating,
|
|
253
|
+
x,
|
|
254
|
+
y
|
|
255
|
+
} : rects.reference,
|
|
256
|
+
offsetParent: await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating)),
|
|
257
|
+
strategy
|
|
258
|
+
}) : rects[elementContext]);
|
|
259
|
+
return {
|
|
260
|
+
top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
|
|
261
|
+
bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
|
|
262
|
+
left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
|
|
263
|
+
right: elementClientRect.right - clippingClientRect.right + paddingObject.right
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
const min$1 = Math.min;
|
|
268
|
+
const max$1 = Math.max;
|
|
269
|
+
|
|
270
|
+
function within(min$1$1, value, max$1$1) {
|
|
271
|
+
return max$1(min$1$1, min$1(value, max$1$1));
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Positions an inner element of the floating element such that it is centered
|
|
276
|
+
* to the reference element.
|
|
277
|
+
* @see https://floating-ui.com/docs/arrow
|
|
278
|
+
*/
|
|
279
|
+
const arrow = options => ({
|
|
280
|
+
name: 'arrow',
|
|
281
|
+
options,
|
|
282
|
+
|
|
283
|
+
async fn(middlewareArguments) {
|
|
284
|
+
// Since `element` is required, we don't Partial<> the type
|
|
285
|
+
const {
|
|
286
|
+
element,
|
|
287
|
+
padding = 0
|
|
288
|
+
} = options != null ? options : {};
|
|
289
|
+
const {
|
|
290
|
+
x,
|
|
291
|
+
y,
|
|
292
|
+
placement,
|
|
293
|
+
rects,
|
|
294
|
+
platform
|
|
295
|
+
} = middlewareArguments;
|
|
296
|
+
|
|
297
|
+
if (element == null) {
|
|
298
|
+
|
|
299
|
+
return {};
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
const paddingObject = getSideObjectFromPadding(padding);
|
|
303
|
+
const coords = {
|
|
304
|
+
x,
|
|
305
|
+
y
|
|
306
|
+
};
|
|
307
|
+
const axis = getMainAxisFromPlacement(placement);
|
|
308
|
+
const alignment = getAlignment(placement);
|
|
309
|
+
const length = getLengthFromAxis(axis);
|
|
310
|
+
const arrowDimensions = await platform.getDimensions(element);
|
|
311
|
+
const minProp = axis === 'y' ? 'top' : 'left';
|
|
312
|
+
const maxProp = axis === 'y' ? 'bottom' : 'right';
|
|
313
|
+
const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
|
|
314
|
+
const startDiff = coords[axis] - rects.reference[axis];
|
|
315
|
+
const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
|
|
316
|
+
let clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
|
|
317
|
+
|
|
318
|
+
if (clientSize === 0) {
|
|
319
|
+
clientSize = rects.floating[length];
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
const centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the floating element if the center
|
|
323
|
+
// point is outside the floating element's bounds
|
|
324
|
+
|
|
325
|
+
const min = paddingObject[minProp];
|
|
326
|
+
const max = clientSize - arrowDimensions[length] - paddingObject[maxProp];
|
|
327
|
+
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
|
328
|
+
const offset = within(min, center, max); // Make sure that arrow points at the reference
|
|
329
|
+
|
|
330
|
+
const alignmentPadding = alignment === 'start' ? paddingObject[minProp] : paddingObject[maxProp];
|
|
331
|
+
const shouldAddOffset = alignmentPadding > 0 && center !== offset && rects.reference[length] <= rects.floating[length];
|
|
332
|
+
const alignmentOffset = shouldAddOffset ? center < min ? min - center : max - center : 0;
|
|
333
|
+
return {
|
|
334
|
+
[axis]: coords[axis] - alignmentOffset,
|
|
335
|
+
data: {
|
|
336
|
+
[axis]: offset,
|
|
337
|
+
centerOffset: center - offset
|
|
338
|
+
}
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
});
|
|
343
|
+
|
|
344
|
+
const hash$1 = {
|
|
345
|
+
left: 'right',
|
|
346
|
+
right: 'left',
|
|
347
|
+
bottom: 'top',
|
|
348
|
+
top: 'bottom'
|
|
349
|
+
};
|
|
350
|
+
function getOppositePlacement(placement) {
|
|
351
|
+
return placement.replace(/left|right|bottom|top/g, matched => hash$1[matched]);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
function getAlignmentSides(placement, rects, rtl) {
|
|
355
|
+
if (rtl === void 0) {
|
|
356
|
+
rtl = false;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
const alignment = getAlignment(placement);
|
|
360
|
+
const mainAxis = getMainAxisFromPlacement(placement);
|
|
361
|
+
const length = getLengthFromAxis(mainAxis);
|
|
362
|
+
let mainAlignmentSide = mainAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
|
|
363
|
+
|
|
364
|
+
if (rects.reference[length] > rects.floating[length]) {
|
|
365
|
+
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
return {
|
|
369
|
+
main: mainAlignmentSide,
|
|
370
|
+
cross: getOppositePlacement(mainAlignmentSide)
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
const hash = {
|
|
375
|
+
start: 'end',
|
|
376
|
+
end: 'start'
|
|
377
|
+
};
|
|
378
|
+
function getOppositeAlignmentPlacement(placement) {
|
|
379
|
+
return placement.replace(/start|end/g, matched => hash[matched]);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
const sides = ['top', 'right', 'bottom', 'left'];
|
|
383
|
+
|
|
384
|
+
function getExpandedPlacements(placement) {
|
|
385
|
+
const oppositePlacement = getOppositePlacement(placement);
|
|
386
|
+
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Changes the placement of the floating element to one that will fit if the
|
|
391
|
+
* initially specified `placement` does not.
|
|
392
|
+
* @see https://floating-ui.com/docs/flip
|
|
393
|
+
*/
|
|
394
|
+
const flip = function (options) {
|
|
395
|
+
if (options === void 0) {
|
|
396
|
+
options = {};
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
return {
|
|
400
|
+
name: 'flip',
|
|
401
|
+
options,
|
|
402
|
+
|
|
403
|
+
async fn(middlewareArguments) {
|
|
404
|
+
var _middlewareData$flip;
|
|
405
|
+
|
|
406
|
+
const {
|
|
407
|
+
placement,
|
|
408
|
+
middlewareData,
|
|
409
|
+
rects,
|
|
410
|
+
initialPlacement,
|
|
411
|
+
platform,
|
|
412
|
+
elements
|
|
413
|
+
} = middlewareArguments;
|
|
414
|
+
const {
|
|
415
|
+
mainAxis: checkMainAxis = true,
|
|
416
|
+
crossAxis: checkCrossAxis = true,
|
|
417
|
+
fallbackPlacements: specifiedFallbackPlacements,
|
|
418
|
+
fallbackStrategy = 'bestFit',
|
|
419
|
+
flipAlignment = true,
|
|
420
|
+
...detectOverflowOptions
|
|
421
|
+
} = options;
|
|
422
|
+
const side = getSide(placement);
|
|
423
|
+
const isBasePlacement = side === initialPlacement;
|
|
424
|
+
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
425
|
+
const placements = [initialPlacement, ...fallbackPlacements];
|
|
426
|
+
const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);
|
|
427
|
+
const overflows = [];
|
|
428
|
+
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
429
|
+
|
|
430
|
+
if (checkMainAxis) {
|
|
431
|
+
overflows.push(overflow[side]);
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
if (checkCrossAxis) {
|
|
435
|
+
const {
|
|
436
|
+
main,
|
|
437
|
+
cross
|
|
438
|
+
} = getAlignmentSides(placement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
|
|
439
|
+
overflows.push(overflow[main], overflow[cross]);
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
overflowsData = [...overflowsData, {
|
|
443
|
+
placement,
|
|
444
|
+
overflows
|
|
445
|
+
}]; // One or more sides is overflowing
|
|
446
|
+
|
|
447
|
+
if (!overflows.every(side => side <= 0)) {
|
|
448
|
+
var _middlewareData$flip$, _middlewareData$flip2;
|
|
449
|
+
|
|
450
|
+
const nextIndex = ((_middlewareData$flip$ = (_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) != null ? _middlewareData$flip$ : 0) + 1;
|
|
451
|
+
const nextPlacement = placements[nextIndex];
|
|
452
|
+
|
|
453
|
+
if (nextPlacement) {
|
|
454
|
+
// Try next placement and re-run the lifecycle
|
|
455
|
+
return {
|
|
456
|
+
data: {
|
|
457
|
+
index: nextIndex,
|
|
458
|
+
overflows: overflowsData
|
|
459
|
+
},
|
|
460
|
+
reset: {
|
|
461
|
+
placement: nextPlacement
|
|
462
|
+
}
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
let resetPlacement = 'bottom';
|
|
467
|
+
|
|
468
|
+
switch (fallbackStrategy) {
|
|
469
|
+
case 'bestFit':
|
|
470
|
+
{
|
|
471
|
+
var _overflowsData$map$so;
|
|
472
|
+
|
|
473
|
+
const placement = (_overflowsData$map$so = overflowsData.map(d => [d, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0].placement;
|
|
474
|
+
|
|
475
|
+
if (placement) {
|
|
476
|
+
resetPlacement = placement;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
break;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
case 'initialPlacement':
|
|
483
|
+
resetPlacement = initialPlacement;
|
|
484
|
+
break;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
if (placement !== resetPlacement) {
|
|
488
|
+
return {
|
|
489
|
+
reset: {
|
|
490
|
+
placement: resetPlacement
|
|
491
|
+
}
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
return {};
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
};
|
|
500
|
+
};
|
|
501
|
+
|
|
502
|
+
function getSideOffsets(overflow, rect) {
|
|
503
|
+
return {
|
|
504
|
+
top: overflow.top - rect.height,
|
|
505
|
+
right: overflow.right - rect.width,
|
|
506
|
+
bottom: overflow.bottom - rect.height,
|
|
507
|
+
left: overflow.left - rect.width
|
|
508
|
+
};
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
function isAnySideFullyClipped(overflow) {
|
|
512
|
+
return sides.some(side => overflow[side] >= 0);
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* Provides data to hide the floating element in applicable situations, such as
|
|
517
|
+
* when it is not in the same clipping context as the reference element.
|
|
518
|
+
* @see https://floating-ui.com/docs/hide
|
|
519
|
+
*/
|
|
520
|
+
const hide = function (_temp) {
|
|
521
|
+
let {
|
|
522
|
+
strategy = 'referenceHidden',
|
|
523
|
+
...detectOverflowOptions
|
|
524
|
+
} = _temp === void 0 ? {} : _temp;
|
|
525
|
+
return {
|
|
526
|
+
name: 'hide',
|
|
527
|
+
|
|
528
|
+
async fn(middlewareArguments) {
|
|
529
|
+
const {
|
|
530
|
+
rects
|
|
531
|
+
} = middlewareArguments;
|
|
532
|
+
|
|
533
|
+
switch (strategy) {
|
|
534
|
+
case 'referenceHidden':
|
|
535
|
+
{
|
|
536
|
+
const overflow = await detectOverflow(middlewareArguments, { ...detectOverflowOptions,
|
|
537
|
+
elementContext: 'reference'
|
|
538
|
+
});
|
|
539
|
+
const offsets = getSideOffsets(overflow, rects.reference);
|
|
540
|
+
return {
|
|
541
|
+
data: {
|
|
542
|
+
referenceHiddenOffsets: offsets,
|
|
543
|
+
referenceHidden: isAnySideFullyClipped(offsets)
|
|
544
|
+
}
|
|
545
|
+
};
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
case 'escaped':
|
|
549
|
+
{
|
|
550
|
+
const overflow = await detectOverflow(middlewareArguments, { ...detectOverflowOptions,
|
|
551
|
+
altBoundary: true
|
|
552
|
+
});
|
|
553
|
+
const offsets = getSideOffsets(overflow, rects.floating);
|
|
554
|
+
return {
|
|
555
|
+
data: {
|
|
556
|
+
escapedOffsets: offsets,
|
|
557
|
+
escaped: isAnySideFullyClipped(offsets)
|
|
558
|
+
}
|
|
559
|
+
};
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
default:
|
|
563
|
+
{
|
|
564
|
+
return {};
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
};
|
|
570
|
+
};
|
|
571
|
+
|
|
572
|
+
async function convertValueToCoords(middlewareArguments, value) {
|
|
573
|
+
const {
|
|
574
|
+
placement,
|
|
575
|
+
platform,
|
|
576
|
+
elements
|
|
577
|
+
} = middlewareArguments;
|
|
578
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
579
|
+
const side = getSide(placement);
|
|
580
|
+
const alignment = getAlignment(placement);
|
|
581
|
+
const isVertical = getMainAxisFromPlacement(placement) === 'x';
|
|
582
|
+
const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
|
|
583
|
+
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
584
|
+
const rawValue = typeof value === 'function' ? value(middlewareArguments) : value; // eslint-disable-next-line prefer-const
|
|
585
|
+
|
|
586
|
+
let {
|
|
587
|
+
mainAxis,
|
|
588
|
+
crossAxis,
|
|
589
|
+
alignmentAxis
|
|
590
|
+
} = typeof rawValue === 'number' ? {
|
|
591
|
+
mainAxis: rawValue,
|
|
592
|
+
crossAxis: 0,
|
|
593
|
+
alignmentAxis: null
|
|
594
|
+
} : {
|
|
595
|
+
mainAxis: 0,
|
|
596
|
+
crossAxis: 0,
|
|
597
|
+
alignmentAxis: null,
|
|
598
|
+
...rawValue
|
|
599
|
+
};
|
|
600
|
+
|
|
601
|
+
if (alignment && typeof alignmentAxis === 'number') {
|
|
602
|
+
crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
return isVertical ? {
|
|
606
|
+
x: crossAxis * crossAxisMulti,
|
|
607
|
+
y: mainAxis * mainAxisMulti
|
|
608
|
+
} : {
|
|
609
|
+
x: mainAxis * mainAxisMulti,
|
|
610
|
+
y: crossAxis * crossAxisMulti
|
|
611
|
+
};
|
|
612
|
+
}
|
|
613
|
+
/**
|
|
614
|
+
* Displaces the floating element from its reference element.
|
|
615
|
+
* @see https://floating-ui.com/docs/offset
|
|
616
|
+
*/
|
|
617
|
+
|
|
618
|
+
const offset = function (value) {
|
|
619
|
+
if (value === void 0) {
|
|
620
|
+
value = 0;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
return {
|
|
624
|
+
name: 'offset',
|
|
625
|
+
options: value,
|
|
626
|
+
|
|
627
|
+
async fn(middlewareArguments) {
|
|
628
|
+
const {
|
|
629
|
+
x,
|
|
630
|
+
y
|
|
631
|
+
} = middlewareArguments;
|
|
632
|
+
const diffCoords = await convertValueToCoords(middlewareArguments, value);
|
|
633
|
+
return {
|
|
634
|
+
x: x + diffCoords.x,
|
|
635
|
+
y: y + diffCoords.y,
|
|
636
|
+
data: diffCoords
|
|
637
|
+
};
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
};
|
|
641
|
+
};
|
|
642
|
+
|
|
643
|
+
function getCrossAxis(axis) {
|
|
644
|
+
return axis === 'x' ? 'y' : 'x';
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* Shifts the floating element in order to keep it in view when it will overflow
|
|
649
|
+
* a clipping boundary.
|
|
650
|
+
* @see https://floating-ui.com/docs/shift
|
|
651
|
+
*/
|
|
652
|
+
const shift = function (options) {
|
|
653
|
+
if (options === void 0) {
|
|
654
|
+
options = {};
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
return {
|
|
658
|
+
name: 'shift',
|
|
659
|
+
options,
|
|
660
|
+
|
|
661
|
+
async fn(middlewareArguments) {
|
|
662
|
+
const {
|
|
663
|
+
x,
|
|
664
|
+
y,
|
|
665
|
+
placement
|
|
666
|
+
} = middlewareArguments;
|
|
667
|
+
const {
|
|
668
|
+
mainAxis: checkMainAxis = true,
|
|
669
|
+
crossAxis: checkCrossAxis = false,
|
|
670
|
+
limiter = {
|
|
671
|
+
fn: _ref => {
|
|
672
|
+
let {
|
|
673
|
+
x,
|
|
674
|
+
y
|
|
675
|
+
} = _ref;
|
|
676
|
+
return {
|
|
677
|
+
x,
|
|
678
|
+
y
|
|
679
|
+
};
|
|
680
|
+
}
|
|
681
|
+
},
|
|
682
|
+
...detectOverflowOptions
|
|
683
|
+
} = options;
|
|
684
|
+
const coords = {
|
|
685
|
+
x,
|
|
686
|
+
y
|
|
687
|
+
};
|
|
688
|
+
const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);
|
|
689
|
+
const mainAxis = getMainAxisFromPlacement(getSide(placement));
|
|
690
|
+
const crossAxis = getCrossAxis(mainAxis);
|
|
691
|
+
let mainAxisCoord = coords[mainAxis];
|
|
692
|
+
let crossAxisCoord = coords[crossAxis];
|
|
693
|
+
|
|
694
|
+
if (checkMainAxis) {
|
|
695
|
+
const minSide = mainAxis === 'y' ? 'top' : 'left';
|
|
696
|
+
const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
|
|
697
|
+
const min = mainAxisCoord + overflow[minSide];
|
|
698
|
+
const max = mainAxisCoord - overflow[maxSide];
|
|
699
|
+
mainAxisCoord = within(min, mainAxisCoord, max);
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
if (checkCrossAxis) {
|
|
703
|
+
const minSide = crossAxis === 'y' ? 'top' : 'left';
|
|
704
|
+
const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
|
|
705
|
+
const min = crossAxisCoord + overflow[minSide];
|
|
706
|
+
const max = crossAxisCoord - overflow[maxSide];
|
|
707
|
+
crossAxisCoord = within(min, crossAxisCoord, max);
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
const limitedCoords = limiter.fn({ ...middlewareArguments,
|
|
711
|
+
[mainAxis]: mainAxisCoord,
|
|
712
|
+
[crossAxis]: crossAxisCoord
|
|
713
|
+
});
|
|
714
|
+
return { ...limitedCoords,
|
|
715
|
+
data: {
|
|
716
|
+
x: limitedCoords.x - x,
|
|
717
|
+
y: limitedCoords.y - y
|
|
718
|
+
}
|
|
719
|
+
};
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
};
|
|
723
|
+
};
|
|
724
|
+
|
|
725
|
+
/**
|
|
726
|
+
* Provides data to change the size of the floating element. For instance,
|
|
727
|
+
* prevent it from overflowing its clipping boundary or match the width of the
|
|
728
|
+
* reference element.
|
|
729
|
+
* @see https://floating-ui.com/docs/size
|
|
730
|
+
*/
|
|
731
|
+
const size = function (options) {
|
|
732
|
+
if (options === void 0) {
|
|
733
|
+
options = {};
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
return {
|
|
737
|
+
name: 'size',
|
|
738
|
+
options,
|
|
739
|
+
|
|
740
|
+
async fn(middlewareArguments) {
|
|
741
|
+
const {
|
|
742
|
+
placement,
|
|
743
|
+
rects,
|
|
744
|
+
platform,
|
|
745
|
+
elements
|
|
746
|
+
} = middlewareArguments;
|
|
747
|
+
const {
|
|
748
|
+
apply = () => {},
|
|
749
|
+
...detectOverflowOptions
|
|
750
|
+
} = options;
|
|
751
|
+
const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);
|
|
752
|
+
const side = getSide(placement);
|
|
753
|
+
const alignment = getAlignment(placement);
|
|
754
|
+
let heightSide;
|
|
755
|
+
let widthSide;
|
|
756
|
+
|
|
757
|
+
if (side === 'top' || side === 'bottom') {
|
|
758
|
+
heightSide = side;
|
|
759
|
+
widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';
|
|
760
|
+
} else {
|
|
761
|
+
widthSide = side;
|
|
762
|
+
heightSide = alignment === 'end' ? 'top' : 'bottom';
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
const xMin = max$1(overflow.left, 0);
|
|
766
|
+
const xMax = max$1(overflow.right, 0);
|
|
767
|
+
const yMin = max$1(overflow.top, 0);
|
|
768
|
+
const yMax = max$1(overflow.bottom, 0);
|
|
769
|
+
const dimensions = {
|
|
770
|
+
availableHeight: rects.floating.height - (['left', 'right'].includes(placement) ? 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max$1(overflow.top, overflow.bottom)) : overflow[heightSide]),
|
|
771
|
+
availableWidth: rects.floating.width - (['top', 'bottom'].includes(placement) ? 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max$1(overflow.left, overflow.right)) : overflow[widthSide])
|
|
772
|
+
};
|
|
773
|
+
await apply({ ...middlewareArguments,
|
|
774
|
+
...dimensions
|
|
775
|
+
});
|
|
776
|
+
const nextDimensions = await platform.getDimensions(elements.floating);
|
|
777
|
+
|
|
778
|
+
if (rects.floating.width !== nextDimensions.width || rects.floating.height !== nextDimensions.height) {
|
|
779
|
+
return {
|
|
780
|
+
reset: {
|
|
781
|
+
rects: true
|
|
782
|
+
}
|
|
783
|
+
};
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
return {};
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
};
|
|
790
|
+
};
|
|
791
|
+
|
|
792
|
+
function isWindow(value) {
|
|
793
|
+
return value && value.document && value.location && value.alert && value.setInterval;
|
|
794
|
+
}
|
|
795
|
+
function getWindow(node) {
|
|
796
|
+
if (node == null) {
|
|
797
|
+
return window;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
if (!isWindow(node)) {
|
|
801
|
+
const ownerDocument = node.ownerDocument;
|
|
802
|
+
return ownerDocument ? ownerDocument.defaultView || window : window;
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
return node;
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
function getComputedStyle(element) {
|
|
809
|
+
return getWindow(element).getComputedStyle(element);
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
function getNodeName(node) {
|
|
813
|
+
return isWindow(node) ? '' : node ? (node.nodeName || '').toLowerCase() : '';
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
function getUAString() {
|
|
817
|
+
const uaData = navigator.userAgentData;
|
|
818
|
+
|
|
819
|
+
if (uaData != null && uaData.brands) {
|
|
820
|
+
return uaData.brands.map(item => item.brand + "/" + item.version).join(' ');
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
return navigator.userAgent;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
function isHTMLElement(value) {
|
|
827
|
+
return value instanceof getWindow(value).HTMLElement;
|
|
828
|
+
}
|
|
829
|
+
function isElement(value) {
|
|
830
|
+
return value instanceof getWindow(value).Element;
|
|
831
|
+
}
|
|
832
|
+
function isNode(value) {
|
|
833
|
+
return value instanceof getWindow(value).Node;
|
|
834
|
+
}
|
|
835
|
+
function isShadowRoot(node) {
|
|
836
|
+
// Browsers without `ShadowRoot` support
|
|
837
|
+
if (typeof ShadowRoot === 'undefined') {
|
|
838
|
+
return false;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
const OwnElement = getWindow(node).ShadowRoot;
|
|
842
|
+
return node instanceof OwnElement || node instanceof ShadowRoot;
|
|
843
|
+
}
|
|
844
|
+
function isOverflowElement(element) {
|
|
845
|
+
// Firefox wants us to check `-x` and `-y` variations as well
|
|
846
|
+
const {
|
|
847
|
+
overflow,
|
|
848
|
+
overflowX,
|
|
849
|
+
overflowY
|
|
850
|
+
} = getComputedStyle(element);
|
|
851
|
+
return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
|
|
852
|
+
}
|
|
853
|
+
function isTableElement(element) {
|
|
854
|
+
return ['table', 'td', 'th'].includes(getNodeName(element));
|
|
855
|
+
}
|
|
856
|
+
function isContainingBlock(element) {
|
|
857
|
+
// TODO: Try and use feature detection here instead
|
|
858
|
+
const isFirefox = /firefox/i.test(getUAString());
|
|
859
|
+
const css = getComputedStyle(element); // This is non-exhaustive but covers the most common CSS properties that
|
|
860
|
+
// create a containing block.
|
|
861
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
862
|
+
|
|
863
|
+
return css.transform !== 'none' || css.perspective !== 'none' || // @ts-ignore (TS 4.1 compat)
|
|
864
|
+
css.contain === 'paint' || ['transform', 'perspective'].includes(css.willChange) || isFirefox && css.willChange === 'filter' || isFirefox && (css.filter ? css.filter !== 'none' : false);
|
|
865
|
+
}
|
|
866
|
+
function isLayoutViewport() {
|
|
867
|
+
// Not Safari
|
|
868
|
+
return !/^((?!chrome|android).)*safari/i.test(getUAString()); // Feature detection for this fails in various ways
|
|
869
|
+
// • Always-visible scrollbar or not
|
|
870
|
+
// • Width of <html>, etc.
|
|
871
|
+
// const vV = win.visualViewport;
|
|
872
|
+
// return vV ? Math.abs(win.innerWidth / vV.scale - vV.width) < 0.5 : true;
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
const min = Math.min;
|
|
876
|
+
const max = Math.max;
|
|
877
|
+
const round = Math.round;
|
|
878
|
+
|
|
879
|
+
function getBoundingClientRect(element, includeScale, isFixedStrategy) {
|
|
880
|
+
var _win$visualViewport$o, _win$visualViewport, _win$visualViewport$o2, _win$visualViewport2;
|
|
881
|
+
|
|
882
|
+
if (includeScale === void 0) {
|
|
883
|
+
includeScale = false;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
if (isFixedStrategy === void 0) {
|
|
887
|
+
isFixedStrategy = false;
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
const clientRect = element.getBoundingClientRect();
|
|
891
|
+
let scaleX = 1;
|
|
892
|
+
let scaleY = 1;
|
|
893
|
+
|
|
894
|
+
if (includeScale && isHTMLElement(element)) {
|
|
895
|
+
scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
|
|
896
|
+
scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
const win = isElement(element) ? getWindow(element) : window;
|
|
900
|
+
const addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
|
|
901
|
+
const x = (clientRect.left + (addVisualOffsets ? (_win$visualViewport$o = (_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) != null ? _win$visualViewport$o : 0 : 0)) / scaleX;
|
|
902
|
+
const y = (clientRect.top + (addVisualOffsets ? (_win$visualViewport$o2 = (_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) != null ? _win$visualViewport$o2 : 0 : 0)) / scaleY;
|
|
903
|
+
const width = clientRect.width / scaleX;
|
|
904
|
+
const height = clientRect.height / scaleY;
|
|
905
|
+
return {
|
|
906
|
+
width,
|
|
907
|
+
height,
|
|
908
|
+
top: y,
|
|
909
|
+
right: x + width,
|
|
910
|
+
bottom: y + height,
|
|
911
|
+
left: x,
|
|
912
|
+
x,
|
|
913
|
+
y
|
|
914
|
+
};
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
function getDocumentElement(node) {
|
|
918
|
+
return ((isNode(node) ? node.ownerDocument : node.document) || window.document).documentElement;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
function getNodeScroll(element) {
|
|
922
|
+
if (isElement(element)) {
|
|
923
|
+
return {
|
|
924
|
+
scrollLeft: element.scrollLeft,
|
|
925
|
+
scrollTop: element.scrollTop
|
|
926
|
+
};
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
return {
|
|
930
|
+
scrollLeft: element.pageXOffset,
|
|
931
|
+
scrollTop: element.pageYOffset
|
|
932
|
+
};
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
function getWindowScrollBarX(element) {
|
|
936
|
+
// If <html> has a CSS width greater than the viewport, then this will be
|
|
937
|
+
// incorrect for RTL.
|
|
938
|
+
return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
function isScaled(element) {
|
|
942
|
+
const rect = getBoundingClientRect(element);
|
|
943
|
+
return round(rect.width) !== element.offsetWidth || round(rect.height) !== element.offsetHeight;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
947
|
+
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
948
|
+
const documentElement = getDocumentElement(offsetParent);
|
|
949
|
+
const rect = getBoundingClientRect(element, // @ts-ignore - checked above (TS 4.1 compat)
|
|
950
|
+
isOffsetParentAnElement && isScaled(offsetParent), strategy === 'fixed');
|
|
951
|
+
let scroll = {
|
|
952
|
+
scrollLeft: 0,
|
|
953
|
+
scrollTop: 0
|
|
954
|
+
};
|
|
955
|
+
const offsets = {
|
|
956
|
+
x: 0,
|
|
957
|
+
y: 0
|
|
958
|
+
};
|
|
959
|
+
|
|
960
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
|
|
961
|
+
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
962
|
+
scroll = getNodeScroll(offsetParent);
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
if (isHTMLElement(offsetParent)) {
|
|
966
|
+
const offsetRect = getBoundingClientRect(offsetParent, true);
|
|
967
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
968
|
+
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
969
|
+
} else if (documentElement) {
|
|
970
|
+
offsets.x = getWindowScrollBarX(documentElement);
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
return {
|
|
975
|
+
x: rect.left + scroll.scrollLeft - offsets.x,
|
|
976
|
+
y: rect.top + scroll.scrollTop - offsets.y,
|
|
977
|
+
width: rect.width,
|
|
978
|
+
height: rect.height
|
|
979
|
+
};
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
function getParentNode(node) {
|
|
983
|
+
if (getNodeName(node) === 'html') {
|
|
984
|
+
return node;
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
|
988
|
+
// @ts-ignore
|
|
989
|
+
node.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
|
990
|
+
node.parentNode || ( // DOM Element detected
|
|
991
|
+
isShadowRoot(node) ? node.host : null) || // ShadowRoot detected
|
|
992
|
+
getDocumentElement(node) // fallback
|
|
993
|
+
|
|
994
|
+
);
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
function getTrueOffsetParent(element) {
|
|
998
|
+
if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {
|
|
999
|
+
return null;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
return composedOffsetParent(element);
|
|
1003
|
+
}
|
|
1004
|
+
/**
|
|
1005
|
+
* Polyfills the old offsetParent behavior from before the spec was changed:
|
|
1006
|
+
* https://github.com/w3c/csswg-drafts/issues/159
|
|
1007
|
+
*/
|
|
1008
|
+
|
|
1009
|
+
|
|
1010
|
+
function composedOffsetParent(element) {
|
|
1011
|
+
let {
|
|
1012
|
+
offsetParent
|
|
1013
|
+
} = element;
|
|
1014
|
+
let ancestor = element;
|
|
1015
|
+
let foundInsideSlot = false;
|
|
1016
|
+
|
|
1017
|
+
while (ancestor && ancestor !== offsetParent) {
|
|
1018
|
+
const {
|
|
1019
|
+
assignedSlot
|
|
1020
|
+
} = ancestor;
|
|
1021
|
+
|
|
1022
|
+
if (assignedSlot) {
|
|
1023
|
+
let newOffsetParent = assignedSlot.offsetParent;
|
|
1024
|
+
|
|
1025
|
+
if (getComputedStyle(assignedSlot).display === 'contents') {
|
|
1026
|
+
const hadStyleAttribute = assignedSlot.hasAttribute('style');
|
|
1027
|
+
const oldDisplay = assignedSlot.style.display;
|
|
1028
|
+
assignedSlot.style.display = getComputedStyle(ancestor).display;
|
|
1029
|
+
newOffsetParent = assignedSlot.offsetParent;
|
|
1030
|
+
assignedSlot.style.display = oldDisplay;
|
|
1031
|
+
|
|
1032
|
+
if (!hadStyleAttribute) {
|
|
1033
|
+
assignedSlot.removeAttribute('style');
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
ancestor = assignedSlot;
|
|
1038
|
+
|
|
1039
|
+
if (offsetParent !== newOffsetParent) {
|
|
1040
|
+
offsetParent = newOffsetParent;
|
|
1041
|
+
foundInsideSlot = true;
|
|
1042
|
+
}
|
|
1043
|
+
} else if (isShadowRoot(ancestor) && ancestor.host && foundInsideSlot) {
|
|
1044
|
+
break;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
ancestor = isShadowRoot(ancestor) && ancestor.host || ancestor.parentNode;
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
return offsetParent;
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
function getContainingBlock(element) {
|
|
1054
|
+
let currentNode = getParentNode(element);
|
|
1055
|
+
|
|
1056
|
+
if (isShadowRoot(currentNode)) {
|
|
1057
|
+
currentNode = currentNode.host;
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
while (isHTMLElement(currentNode) && !['html', 'body'].includes(getNodeName(currentNode))) {
|
|
1061
|
+
if (isContainingBlock(currentNode)) {
|
|
1062
|
+
return currentNode;
|
|
1063
|
+
} else {
|
|
1064
|
+
const parent = currentNode.parentNode;
|
|
1065
|
+
currentNode = isShadowRoot(parent) ? parent.host : parent;
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
return null;
|
|
1070
|
+
} // Gets the closest ancestor positioned element. Handles some edge cases,
|
|
1071
|
+
// such as table ancestors and cross browser bugs.
|
|
1072
|
+
|
|
1073
|
+
|
|
1074
|
+
function getOffsetParent(element) {
|
|
1075
|
+
const window = getWindow(element);
|
|
1076
|
+
let offsetParent = getTrueOffsetParent(element);
|
|
1077
|
+
|
|
1078
|
+
while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {
|
|
1079
|
+
offsetParent = getTrueOffsetParent(offsetParent);
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {
|
|
1083
|
+
return window;
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
return offsetParent || getContainingBlock(element) || window;
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
function getDimensions(element) {
|
|
1090
|
+
if (isHTMLElement(element)) {
|
|
1091
|
+
return {
|
|
1092
|
+
width: element.offsetWidth,
|
|
1093
|
+
height: element.offsetHeight
|
|
1094
|
+
};
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
const rect = getBoundingClientRect(element);
|
|
1098
|
+
return {
|
|
1099
|
+
width: rect.width,
|
|
1100
|
+
height: rect.height
|
|
1101
|
+
};
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
1105
|
+
let {
|
|
1106
|
+
rect,
|
|
1107
|
+
offsetParent,
|
|
1108
|
+
strategy
|
|
1109
|
+
} = _ref;
|
|
1110
|
+
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
1111
|
+
const documentElement = getDocumentElement(offsetParent);
|
|
1112
|
+
|
|
1113
|
+
if (offsetParent === documentElement) {
|
|
1114
|
+
return rect;
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
let scroll = {
|
|
1118
|
+
scrollLeft: 0,
|
|
1119
|
+
scrollTop: 0
|
|
1120
|
+
};
|
|
1121
|
+
const offsets = {
|
|
1122
|
+
x: 0,
|
|
1123
|
+
y: 0
|
|
1124
|
+
};
|
|
1125
|
+
|
|
1126
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
|
|
1127
|
+
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
1128
|
+
scroll = getNodeScroll(offsetParent);
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
if (isHTMLElement(offsetParent)) {
|
|
1132
|
+
const offsetRect = getBoundingClientRect(offsetParent, true);
|
|
1133
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1134
|
+
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1135
|
+
} // This doesn't appear to be need to be negated.
|
|
1136
|
+
// else if (documentElement) {
|
|
1137
|
+
// offsets.x = getWindowScrollBarX(documentElement);
|
|
1138
|
+
// }
|
|
1139
|
+
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
return { ...rect,
|
|
1143
|
+
x: rect.x - scroll.scrollLeft + offsets.x,
|
|
1144
|
+
y: rect.y - scroll.scrollTop + offsets.y
|
|
1145
|
+
};
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
function getViewportRect(element, strategy) {
|
|
1149
|
+
const win = getWindow(element);
|
|
1150
|
+
const html = getDocumentElement(element);
|
|
1151
|
+
const visualViewport = win.visualViewport;
|
|
1152
|
+
let width = html.clientWidth;
|
|
1153
|
+
let height = html.clientHeight;
|
|
1154
|
+
let x = 0;
|
|
1155
|
+
let y = 0;
|
|
1156
|
+
|
|
1157
|
+
if (visualViewport) {
|
|
1158
|
+
width = visualViewport.width;
|
|
1159
|
+
height = visualViewport.height;
|
|
1160
|
+
const layoutViewport = isLayoutViewport();
|
|
1161
|
+
|
|
1162
|
+
if (layoutViewport || !layoutViewport && strategy === 'fixed') {
|
|
1163
|
+
x = visualViewport.offsetLeft;
|
|
1164
|
+
y = visualViewport.offsetTop;
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
return {
|
|
1169
|
+
width,
|
|
1170
|
+
height,
|
|
1171
|
+
x,
|
|
1172
|
+
y
|
|
1173
|
+
};
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
// of the `<html>` and `<body>` rect bounds if horizontally scrollable
|
|
1177
|
+
|
|
1178
|
+
function getDocumentRect(element) {
|
|
1179
|
+
var _element$ownerDocumen;
|
|
1180
|
+
|
|
1181
|
+
const html = getDocumentElement(element);
|
|
1182
|
+
const scroll = getNodeScroll(element);
|
|
1183
|
+
const body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
|
|
1184
|
+
const width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
|
|
1185
|
+
const height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
|
|
1186
|
+
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
1187
|
+
const y = -scroll.scrollTop;
|
|
1188
|
+
|
|
1189
|
+
if (getComputedStyle(body || html).direction === 'rtl') {
|
|
1190
|
+
x += max(html.clientWidth, body ? body.clientWidth : 0) - width;
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
return {
|
|
1194
|
+
width,
|
|
1195
|
+
height,
|
|
1196
|
+
x,
|
|
1197
|
+
y
|
|
1198
|
+
};
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
function getNearestOverflowAncestor(node) {
|
|
1202
|
+
const parentNode = getParentNode(node);
|
|
1203
|
+
|
|
1204
|
+
if (['html', 'body', '#document'].includes(getNodeName(parentNode))) {
|
|
1205
|
+
// @ts-ignore assume body is always available
|
|
1206
|
+
return node.ownerDocument.body;
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
1210
|
+
return parentNode;
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
return getNearestOverflowAncestor(parentNode);
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
function getOverflowAncestors(node, list) {
|
|
1217
|
+
var _node$ownerDocument;
|
|
1218
|
+
|
|
1219
|
+
if (list === void 0) {
|
|
1220
|
+
list = [];
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
1224
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.body);
|
|
1225
|
+
const win = getWindow(scrollableAncestor);
|
|
1226
|
+
const target = isBody ? [win].concat(win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []) : scrollableAncestor;
|
|
1227
|
+
const updatedList = list.concat(target);
|
|
1228
|
+
return isBody ? updatedList : // @ts-ignore: isBody tells us target will be an HTMLElement here
|
|
1229
|
+
updatedList.concat(getOverflowAncestors(target));
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
function contains(parent, child) {
|
|
1233
|
+
const rootNode = child.getRootNode == null ? void 0 : child.getRootNode(); // First, attempt with faster native method
|
|
1234
|
+
|
|
1235
|
+
if (parent.contains(child)) {
|
|
1236
|
+
return true;
|
|
1237
|
+
} // then fallback to custom implementation with Shadow DOM support
|
|
1238
|
+
else if (rootNode && isShadowRoot(rootNode)) {
|
|
1239
|
+
let next = child;
|
|
1240
|
+
|
|
1241
|
+
do {
|
|
1242
|
+
// use `===` replace node.isSameNode()
|
|
1243
|
+
if (next && parent === next) {
|
|
1244
|
+
return true;
|
|
1245
|
+
} // @ts-ignore: need a better way to handle this...
|
|
1246
|
+
|
|
1247
|
+
|
|
1248
|
+
next = next.parentNode || next.host;
|
|
1249
|
+
} while (next);
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
return false;
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
function getInnerBoundingClientRect(element, strategy) {
|
|
1256
|
+
const clientRect = getBoundingClientRect(element, false, strategy === 'fixed');
|
|
1257
|
+
const top = clientRect.top + element.clientTop;
|
|
1258
|
+
const left = clientRect.left + element.clientLeft;
|
|
1259
|
+
return {
|
|
1260
|
+
top,
|
|
1261
|
+
left,
|
|
1262
|
+
x: left,
|
|
1263
|
+
y: top,
|
|
1264
|
+
right: left + element.clientWidth,
|
|
1265
|
+
bottom: top + element.clientHeight,
|
|
1266
|
+
width: element.clientWidth,
|
|
1267
|
+
height: element.clientHeight
|
|
1268
|
+
};
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
function getClientRectFromClippingAncestor(element, clippingParent, strategy) {
|
|
1272
|
+
if (clippingParent === 'viewport') {
|
|
1273
|
+
return rectToClientRect(getViewportRect(element, strategy));
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
if (isElement(clippingParent)) {
|
|
1277
|
+
return getInnerBoundingClientRect(clippingParent, strategy);
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
return rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
|
1281
|
+
} // A "clipping ancestor" is an overflowable container with the characteristic of
|
|
1282
|
+
// clipping (or hiding) overflowing elements with a position different from
|
|
1283
|
+
// `initial`
|
|
1284
|
+
|
|
1285
|
+
|
|
1286
|
+
function getClippingAncestors(element) {
|
|
1287
|
+
const clippingAncestors = getOverflowAncestors(element);
|
|
1288
|
+
const canEscapeClipping = ['absolute', 'fixed'].includes(getComputedStyle(element).position);
|
|
1289
|
+
const clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
|
|
1290
|
+
|
|
1291
|
+
if (!isElement(clipperElement)) {
|
|
1292
|
+
return [];
|
|
1293
|
+
} // @ts-ignore isElement check ensures we return Array<Element>
|
|
1294
|
+
|
|
1295
|
+
|
|
1296
|
+
return clippingAncestors.filter(clippingAncestors => isElement(clippingAncestors) && contains(clippingAncestors, clipperElement) && getNodeName(clippingAncestors) !== 'body');
|
|
1297
|
+
} // Gets the maximum area that the element is visible in due to any number of
|
|
1298
|
+
// clipping ancestors
|
|
1299
|
+
|
|
1300
|
+
|
|
1301
|
+
function getClippingRect(_ref) {
|
|
1302
|
+
let {
|
|
1303
|
+
element,
|
|
1304
|
+
boundary,
|
|
1305
|
+
rootBoundary,
|
|
1306
|
+
strategy
|
|
1307
|
+
} = _ref;
|
|
1308
|
+
const mainClippingAncestors = boundary === 'clippingAncestors' ? getClippingAncestors(element) : [].concat(boundary);
|
|
1309
|
+
const clippingAncestors = [...mainClippingAncestors, rootBoundary];
|
|
1310
|
+
const firstClippingAncestor = clippingAncestors[0];
|
|
1311
|
+
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
|
|
1312
|
+
const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
|
|
1313
|
+
accRect.top = max(rect.top, accRect.top);
|
|
1314
|
+
accRect.right = min(rect.right, accRect.right);
|
|
1315
|
+
accRect.bottom = min(rect.bottom, accRect.bottom);
|
|
1316
|
+
accRect.left = max(rect.left, accRect.left);
|
|
1317
|
+
return accRect;
|
|
1318
|
+
}, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
|
|
1319
|
+
return {
|
|
1320
|
+
width: clippingRect.right - clippingRect.left,
|
|
1321
|
+
height: clippingRect.bottom - clippingRect.top,
|
|
1322
|
+
x: clippingRect.left,
|
|
1323
|
+
y: clippingRect.top
|
|
1324
|
+
};
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
const platform = {
|
|
1328
|
+
getClippingRect,
|
|
1329
|
+
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
1330
|
+
isElement,
|
|
1331
|
+
getDimensions,
|
|
1332
|
+
getOffsetParent,
|
|
1333
|
+
getDocumentElement,
|
|
1334
|
+
getElementRects: _ref => {
|
|
1335
|
+
let {
|
|
1336
|
+
reference,
|
|
1337
|
+
floating,
|
|
1338
|
+
strategy
|
|
1339
|
+
} = _ref;
|
|
1340
|
+
return {
|
|
1341
|
+
reference: getRectRelativeToOffsetParent(reference, getOffsetParent(floating), strategy),
|
|
1342
|
+
floating: { ...getDimensions(floating),
|
|
1343
|
+
x: 0,
|
|
1344
|
+
y: 0
|
|
1345
|
+
}
|
|
1346
|
+
};
|
|
1347
|
+
},
|
|
1348
|
+
getClientRects: element => Array.from(element.getClientRects()),
|
|
1349
|
+
isRTL: element => getComputedStyle(element).direction === 'rtl'
|
|
1350
|
+
};
|
|
1351
|
+
|
|
1352
|
+
/**
|
|
1353
|
+
* Computes the `x` and `y` coordinates that will place the floating element
|
|
1354
|
+
* next to a reference element when it is given a certain CSS positioning
|
|
1355
|
+
* strategy.
|
|
1356
|
+
*/
|
|
1357
|
+
|
|
1358
|
+
const computePosition = (reference, floating, options) => computePosition$1(reference, floating, {
|
|
1359
|
+
platform,
|
|
1360
|
+
...options
|
|
1361
|
+
});
|
|
1362
|
+
|
|
1363
|
+
const FloatingUI = (
|
|
1364
|
+
// el,
|
|
1365
|
+
// component,
|
|
1366
|
+
// options = {
|
|
1367
|
+
// placement: Bcm.Placement.bottom as PlacementTypes,
|
|
1368
|
+
// offset: 0,
|
|
1369
|
+
// arrow: false,
|
|
1370
|
+
// arrowColor: 'tw-bg-slate-700',
|
|
1371
|
+
// },
|
|
1372
|
+
// autoHidden = true,
|
|
1373
|
+
// autoSize = false,
|
|
1374
|
+
// style: any = {},
|
|
1375
|
+
args) => {
|
|
1376
|
+
const { ref, floating, placement: _placement = Bcm.Placement.bottom, offset: _offset = 0, arrow: _arrow = false, arrowColor = 'tw-bg-slate-700', autoHidden = true, autoSize = false, style = {}, } = args;
|
|
1377
|
+
// const { placement: _placement, offset: _offset, arrow: _arrow, arrowColor } = options;
|
|
1378
|
+
// let _middleware = [offset(_offset), flip(), shift({ padding: 5 }), hide({ padding: 10 })];
|
|
1379
|
+
let _middleware = [offset(_offset), flip(), shift({ padding: 5 })];
|
|
1380
|
+
if (autoHidden) {
|
|
1381
|
+
_middleware.push(hide({ padding: 10 }));
|
|
1382
|
+
}
|
|
1383
|
+
style &&
|
|
1384
|
+
Object.assign(floating.style, Object.assign(Object.assign({}, (style.height && { height: style.height })), (style.minHeight && { minHeight: style.minHeight })));
|
|
1385
|
+
if (autoSize && !(style === null || style === void 0 ? void 0 : style.height)) {
|
|
1386
|
+
_middleware.push(size({
|
|
1387
|
+
apply({ availableHeight }) {
|
|
1388
|
+
const maxHeight = `${availableHeight > window.innerHeight ? window.innerHeight - 10 : availableHeight}px`;
|
|
1389
|
+
Object.assign(floating.style, {
|
|
1390
|
+
maxHeight: `${style.maxHeight && maxHeight >= style.maxHeight ? style.maxHeight : maxHeight}`,
|
|
1391
|
+
});
|
|
1392
|
+
},
|
|
1393
|
+
padding: 5,
|
|
1394
|
+
}));
|
|
1395
|
+
}
|
|
1396
|
+
let arrowElement = document.getElementById(`${floating.id}-arrow`);
|
|
1397
|
+
if (_arrow) {
|
|
1398
|
+
if (!arrowElement) {
|
|
1399
|
+
arrowElement = document.createElement('div');
|
|
1400
|
+
arrowElement.setAttribute('id', `${floating.id}-arrow`);
|
|
1401
|
+
}
|
|
1402
|
+
arrowElement.setAttribute('class', `tw-absolute tw-w-2 tw-h-2 ${arrowColor} tw-transform tw-z-[-1] tw-opacity-0 tw-transition-opacity tw-duration-300
|
|
1403
|
+
tw-shadow
|
|
1404
|
+
`);
|
|
1405
|
+
floating.prepend(arrowElement);
|
|
1406
|
+
_middleware.push(arrow({ element: arrowElement, padding: 4 }));
|
|
1407
|
+
}
|
|
1408
|
+
computePosition(ref, floating, { placement: _placement, middleware: _middleware }).then(({ x, y, placement, middlewareData }) => {
|
|
1409
|
+
const { referenceHidden } = autoHidden ? middlewareData.hide : { referenceHidden: false };
|
|
1410
|
+
Object.assign(floating.style, {
|
|
1411
|
+
top: '0',
|
|
1412
|
+
left: '0',
|
|
1413
|
+
transform: `translate(${Math.round(x)}px,${Math.round(y)}px)`,
|
|
1414
|
+
opacity: referenceHidden ? '0' : '1',
|
|
1415
|
+
visibility: referenceHidden ? 'hidden' : 'visible',
|
|
1416
|
+
});
|
|
1417
|
+
if (referenceHidden) {
|
|
1418
|
+
const isHideEvent = new CustomEvent('bcm-floating-is-hide', { detail: { id: floating.id } });
|
|
1419
|
+
document.dispatchEvent(isHideEvent);
|
|
1420
|
+
floating.getAttribute('outside-of-the-screen') !== 'true' && floating.setAttribute('outside-of-the-screen', 'true');
|
|
1421
|
+
}
|
|
1422
|
+
else {
|
|
1423
|
+
floating.getAttribute('outside-of-the-screen') === 'true' && floating.removeAttribute('outside-of-the-screen');
|
|
1424
|
+
}
|
|
1425
|
+
if (_arrow) {
|
|
1426
|
+
const { x: arrowX, y: arrowY } = middlewareData.arrow;
|
|
1427
|
+
const staticSide = {
|
|
1428
|
+
top: 'bottom',
|
|
1429
|
+
right: 'left',
|
|
1430
|
+
bottom: 'top',
|
|
1431
|
+
left: 'right',
|
|
1432
|
+
}[placement.split('-')[0]];
|
|
1433
|
+
const arrowStyle = {
|
|
1434
|
+
top: 'rotate(45deg)',
|
|
1435
|
+
right: 'rotate(135deg)',
|
|
1436
|
+
bottom: 'rotate(-135deg)',
|
|
1437
|
+
left: 'rotate(-45deg)',
|
|
1438
|
+
}[placement.split('-')[0]];
|
|
1439
|
+
Object.assign(arrowElement.style, {
|
|
1440
|
+
left: arrowX != null ? `${arrowX}px` : '',
|
|
1441
|
+
top: arrowY != null ? `${arrowY}px` : '',
|
|
1442
|
+
right: '',
|
|
1443
|
+
bottom: '',
|
|
1444
|
+
[staticSide]: '-4px',
|
|
1445
|
+
opacity: 1,
|
|
1446
|
+
visibility: referenceHidden ? 'hidden' : 'visible',
|
|
1447
|
+
transform: arrowStyle,
|
|
1448
|
+
});
|
|
1449
|
+
}
|
|
1450
|
+
});
|
|
1451
|
+
};
|
|
1452
|
+
|
|
1453
|
+
export { FloatingUI as F };
|