@esri/calcite-components 1.0.0-next.294 → 1.0.0-next.295
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/calcite/assets/calcite-icon/checkExtent16.json +1 -0
- package/dist/calcite/assets/calcite-icon/checkExtent24.json +1 -0
- package/dist/calcite/assets/calcite-icon/checkExtent32.json +1 -0
- package/dist/calcite/assets/calcite-icon/driveTime16.json +1 -0
- package/dist/calcite/assets/calcite-icon/driveTime24.json +1 -0
- package/dist/calcite/assets/calcite-icon/driveTime32.json +1 -0
- package/dist/calcite/assets/calcite-icon/driveTimeLargest16.json +1 -0
- package/dist/calcite/assets/calcite-icon/driveTimeLargest24.json +1 -0
- package/dist/calcite/assets/calcite-icon/driveTimeLargest32.json +1 -0
- package/dist/calcite/assets/calcite-icon/driveTimeSmallest16.json +1 -0
- package/dist/calcite/assets/calcite-icon/driveTimeSmallest24.json +1 -0
- package/dist/calcite/assets/calcite-icon/driveTimeSmallest32.json +1 -0
- package/dist/calcite/assets/calcite-icon/driveTimeXBar16.json +1 -0
- package/dist/calcite/assets/calcite-icon/driveTimeXBar24.json +1 -0
- package/dist/calcite/assets/calcite-icon/driveTimeXBar32.json +1 -0
- package/dist/calcite/assets/calcite-icon/groupItems16.json +1 -0
- package/dist/calcite/assets/calcite-icon/groupItems24.json +1 -0
- package/dist/calcite/assets/calcite-icon/groupItems32.json +1 -0
- package/dist/calcite/assets/calcite-icon/groupLayoutElements16.json +1 -0
- package/dist/calcite/assets/calcite-icon/groupLayoutElements24.json +1 -0
- package/dist/calcite/assets/calcite-icon/groupLayoutElements32.json +1 -0
- package/dist/calcite/assets/calcite-icon/ringsLargest16.json +1 -0
- package/dist/calcite/assets/calcite-icon/ringsLargest24.json +1 -0
- package/dist/calcite/assets/calcite-icon/ringsLargest32.json +1 -0
- package/dist/calcite/assets/calcite-icon/ringsSmallest16.json +1 -0
- package/dist/calcite/assets/calcite-icon/ringsSmallest24.json +1 -0
- package/dist/calcite/assets/calcite-icon/ringsSmallest32.json +1 -0
- package/dist/calcite/assets/calcite-icon/ringsXBar16.json +1 -0
- package/dist/calcite/assets/calcite-icon/ringsXBar24.json +1 -0
- package/dist/calcite/assets/calcite-icon/ringsXBar32.json +1 -0
- package/dist/calcite/assets/calcite-icon/ungroupItems16.json +1 -0
- package/dist/calcite/assets/calcite-icon/ungroupItems24.json +1 -0
- package/dist/calcite/assets/calcite-icon/ungroupItems32.json +1 -0
- package/dist/calcite/assets/calcite-icon/ungroupLayoutElements16.json +1 -0
- package/dist/calcite/assets/calcite-icon/ungroupLayoutElements24.json +1 -0
- package/dist/calcite/assets/calcite-icon/ungroupLayoutElements32.json +1 -0
- package/dist/calcite/calcite.esm.js +1 -1
- package/dist/calcite/calcite.js +1 -1
- package/dist/calcite/{p-dc99bb00.system.entry.js → p-00716aa8.system.entry.js} +1 -1
- package/dist/calcite/{p-413b4857.system.entry.js → p-044d603d.system.entry.js} +1 -1
- package/dist/calcite/{p-6621aee1.entry.js → p-05da7439.entry.js} +1 -1
- package/dist/calcite/{p-7c37ca39.entry.js → p-08d707c4.entry.js} +1 -1
- package/dist/calcite/{p-fba65e4a.system.entry.js → p-10708f87.system.entry.js} +1 -1
- package/dist/calcite/p-109049e6.system.entry.js +5 -0
- package/dist/calcite/{p-58e98b2d.system.entry.js → p-127e3513.system.entry.js} +1 -1
- package/dist/calcite/p-1434e37e.entry.js +5 -0
- package/dist/calcite/{p-8007a0b4.system.entry.js → p-143cffd9.system.entry.js} +1 -1
- package/dist/calcite/{p-c8e4117c.system.entry.js → p-15f3a0d7.system.entry.js} +1 -1
- package/dist/calcite/{p-de3a04c2.system.entry.js → p-16bb48f6.system.entry.js} +1 -1
- package/dist/calcite/{p-c99d8f9e.system.entry.js → p-16f2d814.system.entry.js} +1 -1
- package/dist/calcite/p-1942876c.js +5 -0
- package/dist/calcite/{p-cca94491.system.entry.js → p-1a1e9057.system.entry.js} +1 -1
- package/dist/calcite/p-1a962bdd.js +5 -0
- package/dist/calcite/p-1aa89347.system.entry.js +5 -0
- package/dist/calcite/{p-a8569c55.system.entry.js → p-1c8fe17f.system.entry.js} +1 -1
- package/dist/calcite/{p-6988c6b7.system.entry.js → p-1dd440e6.system.entry.js} +1 -1
- package/dist/calcite/{p-7a6c6382.entry.js → p-21c8ac06.entry.js} +1 -1
- package/dist/calcite/{p-6c8a562f.system.entry.js → p-243d95ab.system.entry.js} +1 -1
- package/dist/calcite/{p-3f1d1bad.entry.js → p-2451da5b.entry.js} +1 -1
- package/dist/calcite/p-26efaed7.entry.js +5 -0
- package/dist/calcite/p-288bc438.system.js +5 -0
- package/dist/calcite/{p-4185db77.entry.js → p-289bc56f.entry.js} +1 -1
- package/dist/calcite/{p-9affee61.entry.js → p-29771742.entry.js} +1 -1
- package/dist/calcite/{p-8953f712.entry.js → p-2aa3007a.entry.js} +1 -1
- package/dist/calcite/p-2e29554c.js +5 -0
- package/dist/calcite/{p-3962cd38.entry.js → p-33802886.entry.js} +1 -1
- package/dist/calcite/{p-25a31861.system.js → p-34e5baa7.system.js} +1 -1
- package/dist/calcite/p-3833285b.system.entry.js +5 -0
- package/dist/calcite/{p-e638ff0e.entry.js → p-396efb80.entry.js} +1 -1
- package/dist/calcite/p-3a592bf3.system.entry.js +5 -0
- package/dist/calcite/p-3dae9da3.js +5 -0
- package/dist/calcite/{p-bf8b70a8.entry.js → p-3e6fcede.entry.js} +1 -1
- package/dist/calcite/p-3eb1dc0f.entry.js +5 -0
- package/dist/calcite/p-41023be5.system.entry.js +5 -0
- package/dist/calcite/{p-49d5ee42.system.entry.js → p-46285b9c.system.entry.js} +1 -1
- package/dist/calcite/{p-c9ecea64.entry.js → p-48f03121.entry.js} +1 -1
- package/dist/calcite/{p-83302e1c.entry.js → p-4acfb654.entry.js} +1 -1
- package/dist/calcite/{p-bf25e278.system.entry.js → p-4d11efdb.system.entry.js} +1 -1
- package/dist/calcite/{p-b8d040e5.system.entry.js → p-4e16515a.system.entry.js} +1 -1
- package/dist/calcite/{p-c60e3a71.entry.js → p-4f1f83d2.entry.js} +1 -1
- package/dist/calcite/{p-1e875199.entry.js → p-502ea583.entry.js} +1 -1
- package/dist/calcite/p-523bc291.system.js +5 -0
- package/dist/calcite/p-54394dfe.system.entry.js +5 -0
- package/dist/calcite/p-578509a8.entry.js +5 -0
- package/dist/calcite/p-592da79d.system.entry.js +5 -0
- package/dist/calcite/p-5c0c29bc.entry.js +5 -0
- package/dist/calcite/p-5eee672a.system.entry.js +5 -0
- package/dist/calcite/{p-ba1322e6.system.entry.js → p-5f2a9710.system.entry.js} +1 -1
- package/dist/calcite/{p-36e5db45.entry.js → p-5f817b79.entry.js} +1 -1
- package/dist/calcite/p-63e60894.entry.js +5 -0
- package/dist/calcite/{p-daa110fe.system.entry.js → p-6484ffb7.system.entry.js} +1 -1
- package/dist/calcite/{p-28261aae.entry.js → p-659898bf.entry.js} +1 -1
- package/dist/calcite/{p-d11ad046.system.js → p-6d44b7d9.system.js} +1 -1
- package/dist/calcite/p-6f1cca21.system.js +5 -0
- package/dist/calcite/{p-2418cceb.entry.js → p-70efa39d.entry.js} +1 -1
- package/dist/calcite/{p-e7819705.entry.js → p-714ae4f6.entry.js} +1 -1
- package/dist/calcite/{p-3bb30b44.system.entry.js → p-74f390e1.system.entry.js} +1 -1
- package/dist/calcite/{p-d4059426.entry.js → p-75264173.entry.js} +1 -1
- package/dist/calcite/{p-76ccd204.entry.js → p-765fb8ed.entry.js} +1 -1
- package/dist/calcite/{p-cacca548.entry.js → p-78d0db7b.entry.js} +1 -1
- package/dist/calcite/{p-98789055.system.entry.js → p-7ba971b5.system.entry.js} +1 -1
- package/dist/calcite/{p-f281f1e9.entry.js → p-7bb94bfa.entry.js} +1 -1
- package/dist/calcite/{p-502736d8.system.entry.js → p-81538774.system.entry.js} +1 -1
- package/dist/calcite/p-81ab443c.entry.js +5 -0
- package/dist/calcite/p-82139130.entry.js +5 -0
- package/dist/calcite/{p-7b869bc5.entry.js → p-82c6cd9a.entry.js} +1 -1
- package/dist/calcite/{p-45257edb.js → p-8340b572.js} +1 -1
- package/dist/calcite/{p-58716826.system.entry.js → p-840f2937.system.entry.js} +2 -2
- package/dist/calcite/p-85032edc.system.entry.js +5 -0
- package/dist/calcite/{p-b41deed0.system.entry.js → p-8b2ead09.system.entry.js} +1 -1
- package/dist/calcite/p-8baa9ba4.entry.js +5 -0
- package/dist/calcite/{p-7ade2294.system.entry.js → p-8fef13ca.system.entry.js} +1 -1
- package/dist/calcite/{p-75f714c9.entry.js → p-9338b0bc.entry.js} +1 -1
- package/dist/calcite/p-9577dfd9.entry.js +5 -0
- package/dist/calcite/{p-c48b4b7e.system.entry.js → p-95b9a0f2.system.entry.js} +1 -1
- package/dist/calcite/p-968ea270.entry.js +5 -0
- package/dist/calcite/{p-83ccefba.system.entry.js → p-9abbbcbd.system.entry.js} +1 -1
- package/dist/calcite/p-9be6633a.entry.js +5 -0
- package/dist/calcite/{p-9fc0dc2c.system.entry.js → p-9f240615.system.entry.js} +1 -1
- package/dist/calcite/{p-f6f4648e.system.entry.js → p-a5269f14.system.entry.js} +1 -1
- package/dist/calcite/{p-684ccd4e.system.entry.js → p-a8dc2982.system.entry.js} +1 -1
- package/dist/calcite/{p-0100aeb0.entry.js → p-ace12b8d.entry.js} +1 -1
- package/dist/calcite/{p-7dd5c4e4.entry.js → p-aced5f01.entry.js} +1 -1
- package/dist/calcite/{p-f32e61bb.system.entry.js → p-aec398f3.system.entry.js} +1 -1
- package/dist/calcite/{p-eed43a57.system.entry.js → p-b1351c3e.system.entry.js} +1 -1
- package/dist/calcite/p-b1a96c72.system.entry.js +5 -0
- package/dist/calcite/{p-3cf93a58.system.entry.js → p-b4b1081f.system.entry.js} +1 -1
- package/dist/calcite/p-b94bf8ac.system.entry.js +5 -0
- package/dist/calcite/p-b9fa225e.entry.js +5 -0
- package/dist/calcite/p-c0e35328.entry.js +5 -0
- package/dist/calcite/p-c34c4414.system.js +5 -0
- package/dist/calcite/{p-a09634e2.entry.js → p-c3ba61ea.entry.js} +1 -1
- package/dist/calcite/{p-fe16f05e.system.entry.js → p-c4cb4fab.system.entry.js} +1 -1
- package/dist/calcite/p-c87c04a9.entry.js +5 -0
- package/dist/calcite/p-ca3bb147.entry.js +5 -0
- package/dist/calcite/{p-527146c8.system.entry.js → p-cbe9f1a2.system.entry.js} +1 -1
- package/dist/calcite/{p-a7ba0292.system.js → p-cbf6bb04.system.js} +1 -1
- package/dist/calcite/{p-507b2cc4.entry.js → p-cc788d2e.entry.js} +1 -1
- package/dist/calcite/p-cced5508.system.entry.js +5 -0
- package/dist/calcite/{p-dcf30b00.system.entry.js → p-cf03b144.system.entry.js} +1 -1
- package/dist/calcite/{p-b018fbbd.entry.js → p-d550ee4d.entry.js} +1 -1
- package/dist/calcite/{p-72fa390e.entry.js → p-d6e30c54.entry.js} +1 -1
- package/dist/calcite/{p-79cbbf2d.js → p-d6f20229.js} +1 -1
- package/dist/calcite/{p-3e438b5b.system.entry.js → p-dabb63b5.system.entry.js} +1 -1
- package/dist/calcite/{p-9fa024e6.system.entry.js → p-dd464e44.system.entry.js} +1 -1
- package/dist/calcite/p-dd5ff164.entry.js +5 -0
- package/dist/calcite/{p-38ee7306.system.entry.js → p-deb36fde.system.entry.js} +1 -1
- package/dist/calcite/{p-b4e7b593.system.entry.js → p-defcee80.system.entry.js} +1 -1
- package/dist/calcite/{p-e35e7216.system.js → p-dff7dc90.system.js} +1 -1
- package/dist/calcite/{p-09da1c54.system.entry.js → p-e33fe285.system.entry.js} +1 -1
- package/dist/calcite/p-e52495d3.system.entry.js +5 -0
- package/dist/calcite/{p-9fa5e356.entry.js → p-e5e3b591.entry.js} +1 -1
- package/dist/calcite/p-e62a9b1d.system.entry.js +5 -0
- package/dist/calcite/p-e6c84e63.entry.js +5 -0
- package/dist/calcite/{p-a5bfc29d.system.entry.js → p-e6d05ad6.system.entry.js} +1 -1
- package/dist/calcite/{p-809ddb6a.js → p-e956e279.js} +1 -1
- package/dist/calcite/{p-c399cfce.entry.js → p-eada9cef.entry.js} +1 -1
- package/dist/calcite/{p-b244a00c.entry.js → p-ecc00ef0.entry.js} +1 -1
- package/dist/calcite/{p-f93a7fce.entry.js → p-ef39847e.entry.js} +1 -1
- package/dist/calcite/{p-cd41629f.entry.js → p-efb2169a.entry.js} +1 -1
- package/dist/calcite/{p-06646eed.system.entry.js → p-f0338acf.system.entry.js} +1 -1
- package/dist/calcite/{p-3383d9b4.entry.js → p-f1c5e7cf.entry.js} +1 -1
- package/dist/calcite/{p-58eca102.entry.js → p-f278dd53.entry.js} +1 -1
- package/dist/calcite/{p-5efd7297.entry.js → p-f9c46578.entry.js} +1 -1
- package/dist/calcite/{p-10de63d7.system.entry.js → p-fc47547f.system.entry.js} +1 -1
- package/dist/calcite/p-fc643963.entry.js +5 -0
- package/dist/calcite/{p-5322b333.system.entry.js → p-fcb6db39.system.entry.js} +1 -1
- package/dist/cjs/{CalciteExpandToggle-6a9f9858.js → CalciteExpandToggle-5f60c98b.js} +1 -1
- package/dist/cjs/{CalciteHeading-363b0525.js → CalciteHeading-112c19f9.js} +1 -1
- package/dist/cjs/calcite-accordion_2.cjs.entry.js +1 -1
- package/dist/cjs/calcite-action-bar.cjs.entry.js +2 -2
- package/dist/cjs/calcite-action-group.cjs.entry.js +1 -1
- package/dist/cjs/calcite-action-menu.cjs.entry.js +1 -1
- package/dist/cjs/calcite-action-pad.cjs.entry.js +2 -2
- package/dist/cjs/calcite-action.cjs.entry.js +1 -1
- package/dist/cjs/calcite-alert.cjs.entry.js +1 -1
- package/dist/cjs/calcite-avatar.cjs.entry.js +1 -1
- package/dist/cjs/calcite-block_2.cjs.entry.js +2 -2
- package/dist/cjs/calcite-button.cjs.entry.js +3 -3
- package/dist/cjs/calcite-card.cjs.entry.js +1 -1
- package/dist/cjs/calcite-checkbox.cjs.entry.js +36 -85
- package/dist/cjs/calcite-chip.cjs.entry.js +1 -1
- package/dist/cjs/calcite-color-picker_3.cjs.entry.js +25 -26
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +81 -22
- package/dist/cjs/calcite-date-picker_4.cjs.entry.js +28 -10
- package/dist/cjs/calcite-dropdown_3.cjs.entry.js +1 -1
- package/dist/cjs/calcite-fab.cjs.entry.js +1 -1
- package/dist/cjs/calcite-filter.cjs.entry.js +34 -8
- package/dist/cjs/calcite-flow.cjs.entry.js +1 -1
- package/dist/cjs/calcite-graph_2.cjs.entry.js +12 -4
- package/dist/cjs/calcite-handle.cjs.entry.js +1 -1
- package/dist/cjs/calcite-icon.cjs.entry.js +1 -1
- package/dist/cjs/calcite-inline-editable.cjs.entry.js +51 -42
- package/dist/cjs/calcite-input-date-picker.cjs.entry.js +68 -15
- package/dist/cjs/calcite-input-message.cjs.entry.js +1 -1
- package/dist/cjs/calcite-input-time-picker_2.cjs.entry.js +13 -4
- package/dist/cjs/calcite-input.cjs.entry.js +75 -56
- package/dist/cjs/calcite-label.cjs.entry.js +1 -1
- package/dist/cjs/calcite-link.cjs.entry.js +1 -1
- package/dist/cjs/calcite-list_3.cjs.entry.js +2 -2
- package/dist/cjs/calcite-loader.cjs.entry.js +1 -1
- package/dist/cjs/calcite-modal.cjs.entry.js +1 -1
- package/dist/cjs/calcite-notice.cjs.entry.js +1 -1
- package/dist/cjs/calcite-option_3.cjs.entry.js +31 -5
- package/dist/cjs/calcite-pagination.cjs.entry.js +1 -1
- package/dist/cjs/calcite-panel.cjs.entry.js +3 -3
- package/dist/cjs/calcite-pick-list_3.cjs.entry.js +3 -3
- package/dist/cjs/calcite-popover_2.cjs.entry.js +3 -3
- package/dist/cjs/calcite-progress.cjs.entry.js +1 -1
- package/dist/cjs/calcite-radio-button-group.cjs.entry.js +1 -1
- package/dist/cjs/calcite-radio-group_2.cjs.entry.js +20 -24
- package/dist/cjs/calcite-radio_2.cjs.entry.js +81 -75
- package/dist/cjs/calcite-rating.cjs.entry.js +13 -4
- package/dist/cjs/calcite-scrim.cjs.entry.js +1 -1
- package/dist/cjs/calcite-shell_3.cjs.entry.js +5 -4
- package/dist/cjs/calcite-sortable-list.cjs.entry.js +1 -1
- package/dist/cjs/calcite-split-button.cjs.entry.js +1 -1
- package/dist/cjs/calcite-stepper_2.cjs.entry.js +1 -1
- package/dist/cjs/calcite-switch.cjs.entry.js +25 -49
- package/dist/cjs/calcite-tab_4.cjs.entry.js +1 -1
- package/dist/cjs/calcite-tile-select_2.cjs.entry.js +1 -3
- package/dist/cjs/calcite-tile.cjs.entry.js +1 -1
- package/dist/cjs/calcite-tip_3.cjs.entry.js +2 -2
- package/dist/cjs/calcite-tooltip_2.cjs.entry.js +1 -1
- package/dist/cjs/calcite-tree_2.cjs.entry.js +16 -9
- package/dist/cjs/calcite-value-list_2.cjs.entry.js +2 -2
- package/dist/cjs/calcite.cjs.js +2 -2
- package/dist/cjs/form-a5b44a1f.js +179 -0
- package/dist/cjs/{index-cee0daa9.js → index-6b5d2de5.js} +8 -365
- package/dist/cjs/{label-549c3d9d.js → label-8e3552b2.js} +33 -4
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{resources-38563593.js → resources-3f7b51c8.js} +1 -1
- package/dist/cjs/{resources-f9c141d2.js → resources-cd25dbae.js} +1 -1
- package/dist/collection/components/calcite-button/calcite-button.css +20 -14
- package/dist/collection/components/calcite-checkbox/calcite-checkbox.css +22 -11
- package/dist/collection/components/calcite-checkbox/calcite-checkbox.js +63 -112
- package/dist/collection/components/calcite-color-picker/calcite-color-picker.js +13 -10
- package/dist/collection/components/calcite-color-picker-hex-input/calcite-color-picker-hex-input.js +11 -15
- package/dist/collection/components/calcite-combobox/calcite-combobox.css +15 -0
- package/dist/collection/components/calcite-combobox/calcite-combobox.js +139 -19
- package/dist/collection/components/calcite-date-picker/calcite-date-picker.js +45 -15
- package/dist/collection/components/calcite-filter/calcite-filter.js +79 -8
- package/dist/collection/components/calcite-icon/assets/calcite-icon/checkExtent16.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/checkExtent24.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/checkExtent32.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/driveTime16.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/driveTime24.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/driveTime32.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/driveTimeLargest16.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/driveTimeLargest24.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/driveTimeLargest32.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/driveTimeSmallest16.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/driveTimeSmallest24.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/driveTimeSmallest32.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/driveTimeXBar16.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/driveTimeXBar24.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/driveTimeXBar32.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/groupItems16.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/groupItems24.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/groupItems32.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/groupLayoutElements16.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/groupLayoutElements24.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/groupLayoutElements32.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/ringsLargest16.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/ringsLargest24.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/ringsLargest32.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/ringsSmallest16.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/ringsSmallest24.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/ringsSmallest32.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/ringsXBar16.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/ringsXBar24.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/ringsXBar32.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/ungroupItems16.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/ungroupItems24.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/ungroupItems32.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/ungroupLayoutElements16.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/ungroupLayoutElements24.json +1 -0
- package/dist/collection/components/calcite-icon/assets/calcite-icon/ungroupLayoutElements32.json +1 -0
- package/dist/collection/components/calcite-inline-editable/calcite-inline-editable.css +8 -54
- package/dist/collection/components/calcite-inline-editable/calcite-inline-editable.js +43 -32
- package/dist/collection/components/calcite-inline-editable/resources.js +7 -7
- package/dist/collection/components/calcite-input/calcite-input.css +102 -68
- package/dist/collection/components/calcite-input/calcite-input.js +104 -54
- package/dist/collection/components/calcite-input/resources.js +14 -12
- package/dist/collection/components/calcite-input-date-picker/calcite-input-date-picker.css +15 -0
- package/dist/collection/components/calcite-input-date-picker/calcite-input-date-picker.js +163 -40
- package/dist/collection/components/calcite-input-time-picker/calcite-input-time-picker.css +15 -0
- package/dist/collection/components/calcite-input-time-picker/calcite-input-time-picker.js +34 -3
- package/dist/collection/components/calcite-panel/calcite-panel.css +2 -2
- package/dist/collection/components/calcite-popover/calcite-popover.css +1 -0
- package/dist/collection/components/calcite-radio-button/calcite-radio-button.css +18 -1
- package/dist/collection/components/calcite-radio-button/calcite-radio-button.js +83 -84
- package/dist/collection/components/calcite-radio-button/resources.js +1 -1
- package/dist/collection/components/calcite-radio-group/calcite-radio-group.css +15 -0
- package/dist/collection/components/calcite-radio-group/calcite-radio-group.js +58 -22
- package/dist/collection/components/calcite-rating/calcite-rating.css +15 -0
- package/dist/collection/components/calcite-rating/calcite-rating.js +49 -1
- package/dist/collection/components/calcite-select/calcite-select.css +15 -0
- package/dist/collection/components/calcite-select/calcite-select.js +89 -3
- package/dist/collection/components/calcite-shell/calcite-shell.css +11 -11
- package/dist/collection/components/calcite-shell-panel/calcite-shell-panel.css +38 -21
- package/dist/collection/components/calcite-shell-panel/calcite-shell-panel.js +2 -2
- package/dist/collection/components/calcite-shell-panel/resources.js +1 -0
- package/dist/collection/components/calcite-slider/calcite-slider.css +15 -0
- package/dist/collection/components/calcite-slider/calcite-slider.js +45 -1
- package/dist/collection/components/calcite-switch/calcite-switch.css +15 -0
- package/dist/collection/components/calcite-switch/calcite-switch.js +28 -64
- package/dist/collection/components/calcite-tile-select/calcite-tile-select.js +4 -7
- package/dist/collection/components/calcite-tree-item/calcite-tree-item.js +15 -8
- package/dist/collection/utils/form.js +167 -14
- package/dist/collection/utils/label.js +33 -4
- package/dist/components/calcite-button2.js +1 -1
- package/dist/components/calcite-checkbox2.js +37 -87
- package/dist/components/calcite-color-picker-hex-input2.js +11 -15
- package/dist/components/calcite-color-picker.js +13 -10
- package/dist/components/calcite-combobox.js +82 -20
- package/dist/components/calcite-date-picker2.js +25 -7
- package/dist/components/calcite-filter2.js +35 -7
- package/dist/components/calcite-inline-editable.js +52 -42
- package/dist/components/calcite-input-date-picker.js +68 -12
- package/dist/components/calcite-input-time-picker.js +12 -2
- package/dist/components/calcite-input2.js +79 -57
- package/dist/components/calcite-panel.js +1 -1
- package/dist/components/calcite-popover2.js +1 -1
- package/dist/components/calcite-radio-button.js +83 -76
- package/dist/components/calcite-radio-group.js +20 -22
- package/dist/components/calcite-rating.js +13 -2
- package/dist/components/calcite-select.js +32 -3
- package/dist/components/calcite-shell-panel.js +4 -3
- package/dist/components/calcite-shell.js +1 -1
- package/dist/components/calcite-slider.js +12 -2
- package/dist/components/calcite-switch2.js +25 -51
- package/dist/components/calcite-tile-select.js +1 -3
- package/dist/components/calcite-tree-item.js +15 -8
- package/dist/components/form.js +169 -15
- package/dist/components/label.js +33 -4
- package/dist/custom-elements/index.js +785 -441
- package/dist/esm/{CalciteExpandToggle-235a6bfd.js → CalciteExpandToggle-677f2f8b.js} +1 -1
- package/dist/esm/{CalciteHeading-dea3bd05.js → CalciteHeading-1d6cd311.js} +1 -1
- package/dist/esm/calcite-accordion_2.entry.js +1 -1
- package/dist/esm/calcite-action-bar.entry.js +2 -2
- package/dist/esm/calcite-action-group.entry.js +1 -1
- package/dist/esm/calcite-action-menu.entry.js +1 -1
- package/dist/esm/calcite-action-pad.entry.js +2 -2
- package/dist/esm/calcite-action.entry.js +1 -1
- package/dist/esm/calcite-alert.entry.js +1 -1
- package/dist/esm/calcite-avatar.entry.js +1 -1
- package/dist/esm/calcite-block_2.entry.js +2 -2
- package/dist/esm/calcite-button.entry.js +3 -3
- package/dist/esm/calcite-card.entry.js +1 -1
- package/dist/esm/calcite-checkbox.entry.js +36 -85
- package/dist/esm/calcite-chip.entry.js +1 -1
- package/dist/esm/calcite-color-picker_3.entry.js +25 -26
- package/dist/esm/calcite-combobox_3.entry.js +81 -22
- package/dist/esm/calcite-date-picker_4.entry.js +28 -10
- package/dist/esm/calcite-dropdown_3.entry.js +1 -1
- package/dist/esm/calcite-fab.entry.js +1 -1
- package/dist/esm/calcite-filter.entry.js +34 -8
- package/dist/esm/calcite-flow.entry.js +1 -1
- package/dist/esm/calcite-graph_2.entry.js +12 -4
- package/dist/esm/calcite-handle.entry.js +1 -1
- package/dist/esm/calcite-icon.entry.js +1 -1
- package/dist/esm/calcite-inline-editable.entry.js +51 -42
- package/dist/esm/calcite-input-date-picker.entry.js +68 -15
- package/dist/esm/calcite-input-message.entry.js +1 -1
- package/dist/esm/calcite-input-time-picker_2.entry.js +13 -4
- package/dist/esm/calcite-input.entry.js +76 -57
- package/dist/esm/calcite-label.entry.js +1 -1
- package/dist/esm/calcite-link.entry.js +1 -1
- package/dist/esm/calcite-list_3.entry.js +2 -2
- package/dist/esm/calcite-loader.entry.js +1 -1
- package/dist/esm/calcite-modal.entry.js +1 -1
- package/dist/esm/calcite-notice.entry.js +1 -1
- package/dist/esm/calcite-option_3.entry.js +31 -5
- package/dist/esm/calcite-pagination.entry.js +1 -1
- package/dist/esm/calcite-panel.entry.js +3 -3
- package/dist/esm/calcite-pick-list_3.entry.js +3 -3
- package/dist/esm/calcite-popover_2.entry.js +3 -3
- package/dist/esm/calcite-progress.entry.js +1 -1
- package/dist/esm/calcite-radio-button-group.entry.js +1 -1
- package/dist/esm/calcite-radio-group_2.entry.js +20 -24
- package/dist/esm/calcite-radio_2.entry.js +82 -76
- package/dist/esm/calcite-rating.entry.js +13 -4
- package/dist/esm/calcite-scrim.entry.js +1 -1
- package/dist/esm/calcite-shell_3.entry.js +5 -4
- package/dist/esm/calcite-sortable-list.entry.js +1 -1
- package/dist/esm/calcite-split-button.entry.js +1 -1
- package/dist/esm/calcite-stepper_2.entry.js +1 -1
- package/dist/esm/calcite-switch.entry.js +26 -50
- package/dist/esm/calcite-tab_4.entry.js +1 -1
- package/dist/esm/calcite-tile-select_2.entry.js +1 -3
- package/dist/esm/calcite-tile.entry.js +1 -1
- package/dist/esm/calcite-tip_3.entry.js +2 -2
- package/dist/esm/calcite-tooltip_2.entry.js +1 -1
- package/dist/esm/calcite-tree_2.entry.js +16 -9
- package/dist/esm/calcite-value-list_2.entry.js +2 -2
- package/dist/esm/calcite.js +2 -2
- package/dist/esm/form-160b0fb5.js +174 -0
- package/dist/esm/{index-66803519.js → index-9de00868.js} +8 -365
- package/dist/esm/{label-bb61bdef.js → label-5559055d.js} +33 -4
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{resources-8dd80c84.js → resources-16a2a25a.js} +1 -1
- package/dist/esm/{resources-c59a1a15.js → resources-bece7a88.js} +1 -1
- package/dist/esm-es5/{CalciteExpandToggle-235a6bfd.js → CalciteExpandToggle-677f2f8b.js} +1 -1
- package/dist/esm-es5/{CalciteHeading-dea3bd05.js → CalciteHeading-1d6cd311.js} +1 -1
- package/dist/esm-es5/calcite-accordion_2.entry.js +1 -1
- package/dist/esm-es5/calcite-action-bar.entry.js +1 -1
- package/dist/esm-es5/calcite-action-group.entry.js +1 -1
- package/dist/esm-es5/calcite-action-menu.entry.js +1 -1
- package/dist/esm-es5/calcite-action-pad.entry.js +1 -1
- package/dist/esm-es5/calcite-action.entry.js +1 -1
- package/dist/esm-es5/calcite-alert.entry.js +1 -1
- package/dist/esm-es5/calcite-avatar.entry.js +1 -1
- package/dist/esm-es5/calcite-block_2.entry.js +1 -1
- package/dist/esm-es5/calcite-button.entry.js +1 -1
- package/dist/esm-es5/calcite-card.entry.js +1 -1
- package/dist/esm-es5/calcite-checkbox.entry.js +2 -2
- package/dist/esm-es5/calcite-chip.entry.js +1 -1
- package/dist/esm-es5/calcite-color-picker_3.entry.js +1 -1
- package/dist/esm-es5/calcite-combobox_3.entry.js +1 -1
- package/dist/esm-es5/calcite-date-picker_4.entry.js +1 -1
- package/dist/esm-es5/calcite-dropdown_3.entry.js +1 -1
- package/dist/esm-es5/calcite-fab.entry.js +1 -1
- package/dist/esm-es5/calcite-filter.entry.js +2 -2
- package/dist/esm-es5/calcite-flow.entry.js +1 -1
- package/dist/esm-es5/calcite-graph_2.entry.js +1 -1
- package/dist/esm-es5/calcite-handle.entry.js +1 -1
- package/dist/esm-es5/calcite-icon.entry.js +1 -1
- package/dist/esm-es5/calcite-inline-editable.entry.js +2 -2
- package/dist/esm-es5/calcite-input-date-picker.entry.js +2 -2
- package/dist/esm-es5/calcite-input-message.entry.js +1 -1
- package/dist/esm-es5/calcite-input-time-picker_2.entry.js +1 -1
- package/dist/esm-es5/calcite-input.entry.js +2 -2
- package/dist/esm-es5/calcite-label.entry.js +1 -1
- package/dist/esm-es5/calcite-link.entry.js +1 -1
- package/dist/esm-es5/calcite-list_3.entry.js +1 -1
- package/dist/esm-es5/calcite-loader.entry.js +1 -1
- package/dist/esm-es5/calcite-modal.entry.js +1 -1
- package/dist/esm-es5/calcite-notice.entry.js +1 -1
- package/dist/esm-es5/calcite-option_3.entry.js +2 -2
- package/dist/esm-es5/calcite-pagination.entry.js +1 -1
- package/dist/esm-es5/calcite-panel.entry.js +1 -1
- package/dist/esm-es5/calcite-pick-list_3.entry.js +1 -1
- package/dist/esm-es5/calcite-popover_2.entry.js +1 -1
- package/dist/esm-es5/calcite-progress.entry.js +1 -1
- package/dist/esm-es5/calcite-radio-button-group.entry.js +1 -1
- package/dist/esm-es5/calcite-radio-group_2.entry.js +1 -1
- package/dist/esm-es5/calcite-radio_2.entry.js +2 -2
- package/dist/esm-es5/calcite-rating.entry.js +1 -1
- package/dist/esm-es5/calcite-scrim.entry.js +1 -1
- package/dist/esm-es5/calcite-shell_3.entry.js +1 -1
- package/dist/esm-es5/calcite-sortable-list.entry.js +1 -1
- package/dist/esm-es5/calcite-split-button.entry.js +1 -1
- package/dist/esm-es5/calcite-stepper_2.entry.js +1 -1
- package/dist/esm-es5/calcite-switch.entry.js +2 -2
- package/dist/esm-es5/calcite-tab_4.entry.js +1 -1
- package/dist/esm-es5/calcite-tile-select_2.entry.js +1 -1
- package/dist/esm-es5/calcite-tile.entry.js +1 -1
- package/dist/esm-es5/calcite-tip_3.entry.js +1 -1
- package/dist/esm-es5/calcite-tooltip_2.entry.js +1 -1
- package/dist/esm-es5/calcite-tree_2.entry.js +1 -1
- package/dist/esm-es5/calcite-value-list_2.entry.js +1 -1
- package/dist/esm-es5/calcite.js +1 -1
- package/dist/esm-es5/form-160b0fb5.js +5 -0
- package/dist/esm-es5/index-9de00868.js +5 -0
- package/dist/esm-es5/label-5559055d.js +5 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{resources-8dd80c84.js → resources-16a2a25a.js} +1 -1
- package/dist/esm-es5/{resources-c59a1a15.js → resources-bece7a88.js} +1 -1
- package/dist/extras/docs-json.json +320 -59
- package/dist/types/components/calcite-checkbox/calcite-checkbox.d.ts +22 -23
- package/dist/types/components/calcite-color-picker/calcite-color-picker.d.ts +1 -1
- package/dist/types/components/calcite-combobox/calcite-combobox.d.ts +21 -3
- package/dist/types/components/calcite-date-picker/calcite-date-picker.d.ts +20 -8
- package/dist/types/components/calcite-filter/calcite-filter.d.ts +19 -0
- package/dist/types/components/calcite-inline-editable/calcite-inline-editable.d.ts +5 -6
- package/dist/types/components/calcite-input/calcite-input.d.ts +14 -8
- package/dist/types/components/calcite-input/resources.d.ts +2 -0
- package/dist/types/components/calcite-input-date-picker/calcite-input-date-picker.d.ts +37 -8
- package/dist/types/components/calcite-input-time-picker/calcite-input-time-picker.d.ts +11 -2
- package/dist/types/components/calcite-radio-button/calcite-radio-button.d.ts +14 -15
- package/dist/types/components/calcite-radio-group/calcite-radio-group.d.ts +13 -4
- package/dist/types/components/calcite-rating/calcite-rating.d.ts +12 -1
- package/dist/types/components/calcite-select/calcite-select.d.ts +19 -1
- package/dist/types/components/calcite-shell-panel/resources.d.ts +1 -0
- package/dist/types/components/calcite-slider/calcite-slider.d.ts +10 -1
- package/dist/types/components/calcite-switch/calcite-switch.d.ts +10 -9
- package/dist/types/components/calcite-tile-select/calcite-tile-select.d.ts +1 -1
- package/dist/types/components/calcite-tree-item/calcite-tree-item.d.ts +2 -0
- package/dist/types/components.d.ts +171 -18
- package/dist/types/utils/form.d.ts +112 -1
- package/dist/types/utils/label.d.ts +5 -0
- package/hydrate/index.js +811 -451
- package/package.json +8 -9
- package/readme.md +2 -2
- package/CHANGELOG.md +0 -1506
- package/dist/calcite/p-05107123.entry.js +0 -5
- package/dist/calcite/p-05d1dfc6.js +0 -5
- package/dist/calcite/p-0d4e82ab.system.entry.js +0 -5
- package/dist/calcite/p-10759c71.system.entry.js +0 -5
- package/dist/calcite/p-11113310.entry.js +0 -5
- package/dist/calcite/p-12e1c83f.system.entry.js +0 -5
- package/dist/calcite/p-1421e818.entry.js +0 -5
- package/dist/calcite/p-17e666d6.system.entry.js +0 -5
- package/dist/calcite/p-22ecf6df.entry.js +0 -5
- package/dist/calcite/p-2ba00b89.js +0 -5
- package/dist/calcite/p-2ecafa35.system.entry.js +0 -5
- package/dist/calcite/p-329e1831.system.entry.js +0 -5
- package/dist/calcite/p-3994ac99.system.entry.js +0 -5
- package/dist/calcite/p-42128a12.entry.js +0 -5
- package/dist/calcite/p-47313747.system.js +0 -5
- package/dist/calcite/p-4c7e3915.system.entry.js +0 -5
- package/dist/calcite/p-4ecd0331.entry.js +0 -5
- package/dist/calcite/p-5e6d76dc.entry.js +0 -5
- package/dist/calcite/p-777c833f.system.entry.js +0 -5
- package/dist/calcite/p-8711a0ae.system.entry.js +0 -5
- package/dist/calcite/p-89cdfa96.system.js +0 -5
- package/dist/calcite/p-8bc3e126.entry.js +0 -5
- package/dist/calcite/p-948aca0d.system.entry.js +0 -5
- package/dist/calcite/p-99ff3a2f.entry.js +0 -5
- package/dist/calcite/p-9fe349b9.entry.js +0 -5
- package/dist/calcite/p-a2cc027e.entry.js +0 -5
- package/dist/calcite/p-b42d730f.entry.js +0 -5
- package/dist/calcite/p-b4960d06.system.js +0 -5
- package/dist/calcite/p-bbe2337b.system.entry.js +0 -5
- package/dist/calcite/p-bbedf98c.entry.js +0 -5
- package/dist/calcite/p-be52c734.entry.js +0 -5
- package/dist/calcite/p-cb7b6425.entry.js +0 -5
- package/dist/calcite/p-d35e423d.js +0 -5
- package/dist/calcite/p-df9b4b76.entry.js +0 -5
- package/dist/calcite/p-e24b6c4a.system.entry.js +0 -5
- package/dist/calcite/p-e382c4e9.entry.js +0 -5
- package/dist/calcite/p-e40dd6fe.system.entry.js +0 -5
- package/dist/calcite/p-e5805bf1.entry.js +0 -5
- package/dist/calcite/p-eccb140e.entry.js +0 -5
- package/dist/calcite/p-f5bb39bb.js +0 -5
- package/dist/calcite/p-fb1da0f5.system.js +0 -5
- package/dist/cjs/form-00fb301c.js +0 -22
- package/dist/esm/form-cee9f632.js +0 -20
- package/dist/esm-es5/form-cee9f632.js +0 -5
- package/dist/esm-es5/index-66803519.js +0 -5
- package/dist/esm-es5/label-bb61bdef.js +0 -5
|
@@ -27,11 +27,7 @@ function _interopNamespace(e) {
|
|
|
27
27
|
const NAMESPACE = 'calcite';
|
|
28
28
|
|
|
29
29
|
let scopeId;
|
|
30
|
-
let contentRef;
|
|
31
30
|
let hostTagName;
|
|
32
|
-
let useNativeShadowDom = false;
|
|
33
|
-
let checkSlotFallbackVisibility = false;
|
|
34
|
-
let checkSlotRelocate = false;
|
|
35
31
|
let isSvgMode = false;
|
|
36
32
|
let queuePending = false;
|
|
37
33
|
const win = typeof window !== 'undefined' ? window : {};
|
|
@@ -183,9 +179,6 @@ const attachStyles = (hostRef) => {
|
|
|
183
179
|
// DOM WRITE!!
|
|
184
180
|
elm['s-sc'] = scopeId;
|
|
185
181
|
elm.classList.add(scopeId + '-h');
|
|
186
|
-
if (flags & 2 /* scopedCssEncapsulation */) {
|
|
187
|
-
elm.classList.add(scopeId + '-s');
|
|
188
|
-
}
|
|
189
182
|
}
|
|
190
183
|
endAttachStyles();
|
|
191
184
|
};
|
|
@@ -224,7 +217,6 @@ const isComplexType = (o) => {
|
|
|
224
217
|
const h = (nodeName, vnodeData, ...children) => {
|
|
225
218
|
let child = null;
|
|
226
219
|
let key = null;
|
|
227
|
-
let slotName = null;
|
|
228
220
|
let simple = false;
|
|
229
221
|
let lastSimple = false;
|
|
230
222
|
let vNodeChildren = [];
|
|
@@ -256,9 +248,6 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
256
248
|
if (vnodeData.key) {
|
|
257
249
|
key = vnodeData.key;
|
|
258
250
|
}
|
|
259
|
-
if (vnodeData.name) {
|
|
260
|
-
slotName = vnodeData.name;
|
|
261
|
-
}
|
|
262
251
|
{
|
|
263
252
|
const classData = vnodeData.className || vnodeData.class;
|
|
264
253
|
if (classData) {
|
|
@@ -283,9 +272,6 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
283
272
|
{
|
|
284
273
|
vnode.$key$ = key;
|
|
285
274
|
}
|
|
286
|
-
{
|
|
287
|
-
vnode.$name$ = slotName;
|
|
288
|
-
}
|
|
289
275
|
return vnode;
|
|
290
276
|
};
|
|
291
277
|
const newVNode = (tag, text) => {
|
|
@@ -302,9 +288,6 @@ const newVNode = (tag, text) => {
|
|
|
302
288
|
{
|
|
303
289
|
vnode.$key$ = null;
|
|
304
290
|
}
|
|
305
|
-
{
|
|
306
|
-
vnode.$name$ = null;
|
|
307
|
-
}
|
|
308
291
|
return vnode;
|
|
309
292
|
};
|
|
310
293
|
const Host = {};
|
|
@@ -517,39 +500,16 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
517
500
|
let i = 0;
|
|
518
501
|
let elm;
|
|
519
502
|
let childNode;
|
|
520
|
-
let oldVNode;
|
|
521
|
-
if (!useNativeShadowDom) {
|
|
522
|
-
// remember for later we need to check to relocate nodes
|
|
523
|
-
checkSlotRelocate = true;
|
|
524
|
-
if (newVNode.$tag$ === 'slot') {
|
|
525
|
-
if (scopeId) {
|
|
526
|
-
// scoped css needs to add its scoped id to the parent element
|
|
527
|
-
parentElm.classList.add(scopeId + '-s');
|
|
528
|
-
}
|
|
529
|
-
newVNode.$flags$ |= newVNode.$children$
|
|
530
|
-
? // slot element has fallback content
|
|
531
|
-
2 /* isSlotFallback */
|
|
532
|
-
: // slot element does not have fallback content
|
|
533
|
-
1 /* isSlotReference */;
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
503
|
if (newVNode.$text$ !== null) {
|
|
537
504
|
// create text node
|
|
538
505
|
elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
|
|
539
506
|
}
|
|
540
|
-
else if (newVNode.$flags$ & 1 /* isSlotReference */) {
|
|
541
|
-
// create a slot reference node
|
|
542
|
-
elm = newVNode.$elm$ =
|
|
543
|
-
doc.createTextNode('');
|
|
544
|
-
}
|
|
545
507
|
else {
|
|
546
508
|
if (!isSvgMode) {
|
|
547
509
|
isSvgMode = newVNode.$tag$ === 'svg';
|
|
548
510
|
}
|
|
549
511
|
// create element
|
|
550
|
-
elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$
|
|
551
|
-
? 'slot-fb'
|
|
552
|
-
: newVNode.$tag$)
|
|
512
|
+
elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$tag$)
|
|
553
513
|
);
|
|
554
514
|
if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
|
|
555
515
|
isSvgMode = false;
|
|
@@ -566,7 +526,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
566
526
|
if (newVNode.$children$) {
|
|
567
527
|
for (i = 0; i < newVNode.$children$.length; ++i) {
|
|
568
528
|
// create the node
|
|
569
|
-
childNode = createElm(oldParentVNode, newVNode, i
|
|
529
|
+
childNode = createElm(oldParentVNode, newVNode, i);
|
|
570
530
|
// return node could have been null
|
|
571
531
|
if (childNode) {
|
|
572
532
|
// append our new node
|
|
@@ -585,62 +545,20 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
585
545
|
}
|
|
586
546
|
}
|
|
587
547
|
}
|
|
588
|
-
{
|
|
589
|
-
elm['s-hn'] = hostTagName;
|
|
590
|
-
if (newVNode.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
|
|
591
|
-
// remember the content reference comment
|
|
592
|
-
elm['s-sr'] = true;
|
|
593
|
-
// remember the content reference comment
|
|
594
|
-
elm['s-cr'] = contentRef;
|
|
595
|
-
// remember the slot name, or empty string for default slot
|
|
596
|
-
elm['s-sn'] = newVNode.$name$ || '';
|
|
597
|
-
// check if we've got an old vnode for this slot
|
|
598
|
-
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
599
|
-
if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {
|
|
600
|
-
// we've got an old slot vnode and the wrapper is being replaced
|
|
601
|
-
// so let's move the old slot content back to it's original location
|
|
602
|
-
putBackInOriginalLocation(oldParentVNode.$elm$, false);
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
548
|
return elm;
|
|
607
549
|
};
|
|
608
|
-
const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
609
|
-
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
610
|
-
const oldSlotChildNodes = parentElm.childNodes;
|
|
611
|
-
for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
|
|
612
|
-
const childNode = oldSlotChildNodes[i];
|
|
613
|
-
if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {
|
|
614
|
-
// // this child node in the old element is from another component
|
|
615
|
-
// // remove this node from the old slot's parent
|
|
616
|
-
// childNode.remove();
|
|
617
|
-
// and relocate it back to it's original location
|
|
618
|
-
parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));
|
|
619
|
-
// remove the old original location comment entirely
|
|
620
|
-
// later on the patch function will know what to do
|
|
621
|
-
// and move this to the correct spot in need be
|
|
622
|
-
childNode['s-ol'].remove();
|
|
623
|
-
childNode['s-ol'] = undefined;
|
|
624
|
-
checkSlotRelocate = true;
|
|
625
|
-
}
|
|
626
|
-
if (recursive) {
|
|
627
|
-
putBackInOriginalLocation(childNode, recursive);
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
631
|
-
};
|
|
632
550
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
633
|
-
let containerElm = (
|
|
551
|
+
let containerElm = (parentElm);
|
|
634
552
|
let childNode;
|
|
635
553
|
if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
|
|
636
554
|
containerElm = containerElm.shadowRoot;
|
|
637
555
|
}
|
|
638
556
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
639
557
|
if (vnodes[startIdx]) {
|
|
640
|
-
childNode = createElm(null, parentVNode, startIdx
|
|
558
|
+
childNode = createElm(null, parentVNode, startIdx);
|
|
641
559
|
if (childNode) {
|
|
642
560
|
vnodes[startIdx].$elm$ = childNode;
|
|
643
|
-
containerElm.insertBefore(childNode,
|
|
561
|
+
containerElm.insertBefore(childNode, before);
|
|
644
562
|
}
|
|
645
563
|
}
|
|
646
564
|
}
|
|
@@ -650,20 +568,6 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
650
568
|
if ((vnode = vnodes[startIdx])) {
|
|
651
569
|
elm = vnode.$elm$;
|
|
652
570
|
callNodeRefs(vnode);
|
|
653
|
-
{
|
|
654
|
-
// we're removing this element
|
|
655
|
-
// so it's possible we need to show slot fallback content now
|
|
656
|
-
checkSlotFallbackVisibility = true;
|
|
657
|
-
if (elm['s-ol']) {
|
|
658
|
-
// remove the original location comment
|
|
659
|
-
elm['s-ol'].remove();
|
|
660
|
-
}
|
|
661
|
-
else {
|
|
662
|
-
// it's possible that child nodes of the node
|
|
663
|
-
// that's being removed are slot nodes
|
|
664
|
-
putBackInOriginalLocation(elm, true);
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
571
|
// remove the vnode's element from the dom
|
|
668
572
|
elm.remove();
|
|
669
573
|
}
|
|
@@ -707,20 +611,12 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
707
611
|
newEndVnode = newCh[--newEndIdx];
|
|
708
612
|
}
|
|
709
613
|
else if (isSameVnode(oldStartVnode, newEndVnode)) {
|
|
710
|
-
// Vnode moved right
|
|
711
|
-
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
712
|
-
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
713
|
-
}
|
|
714
614
|
patch(oldStartVnode, newEndVnode);
|
|
715
615
|
parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
716
616
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
717
617
|
newEndVnode = newCh[--newEndIdx];
|
|
718
618
|
}
|
|
719
619
|
else if (isSameVnode(oldEndVnode, newStartVnode)) {
|
|
720
|
-
// Vnode moved left
|
|
721
|
-
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
722
|
-
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
723
|
-
}
|
|
724
620
|
patch(oldEndVnode, newStartVnode);
|
|
725
621
|
parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
726
622
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
@@ -740,7 +636,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
740
636
|
if (idxInOld >= 0) {
|
|
741
637
|
elmToMove = oldCh[idxInOld];
|
|
742
638
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
743
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld
|
|
639
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld);
|
|
744
640
|
}
|
|
745
641
|
else {
|
|
746
642
|
patch(elmToMove, newStartVnode);
|
|
@@ -751,12 +647,12 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
751
647
|
}
|
|
752
648
|
else {
|
|
753
649
|
// new element
|
|
754
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx
|
|
650
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
|
|
755
651
|
newStartVnode = newCh[++newStartIdx];
|
|
756
652
|
}
|
|
757
653
|
if (node) {
|
|
758
654
|
{
|
|
759
|
-
|
|
655
|
+
oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$);
|
|
760
656
|
}
|
|
761
657
|
}
|
|
762
658
|
}
|
|
@@ -772,30 +668,18 @@ const isSameVnode = (vnode1, vnode2) => {
|
|
|
772
668
|
// compare if two vnode to see if they're "technically" the same
|
|
773
669
|
// need to have the same element tag, and same key to be the same
|
|
774
670
|
if (vnode1.$tag$ === vnode2.$tag$) {
|
|
775
|
-
if (vnode1.$tag$ === 'slot') {
|
|
776
|
-
return vnode1.$name$ === vnode2.$name$;
|
|
777
|
-
}
|
|
778
671
|
{
|
|
779
672
|
return vnode1.$key$ === vnode2.$key$;
|
|
780
673
|
}
|
|
781
674
|
}
|
|
782
675
|
return false;
|
|
783
676
|
};
|
|
784
|
-
const referenceNode = (node) => {
|
|
785
|
-
// this node was relocated to a new location in the dom
|
|
786
|
-
// because of some other component's slot
|
|
787
|
-
// but we still have an html comment in place of where
|
|
788
|
-
// it's original location was according to it's original vdom
|
|
789
|
-
return (node && node['s-ol']) || node;
|
|
790
|
-
};
|
|
791
|
-
const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
|
|
792
677
|
const patch = (oldVNode, newVNode) => {
|
|
793
678
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
794
679
|
const oldChildren = oldVNode.$children$;
|
|
795
680
|
const newChildren = newVNode.$children$;
|
|
796
681
|
const tag = newVNode.$tag$;
|
|
797
682
|
const text = newVNode.$text$;
|
|
798
|
-
let defaultHolder;
|
|
799
683
|
if (text === null) {
|
|
800
684
|
{
|
|
801
685
|
// test if we're rendering an svg element, or still rendering nodes inside of one
|
|
@@ -834,147 +718,12 @@ const patch = (oldVNode, newVNode) => {
|
|
|
834
718
|
isSvgMode = false;
|
|
835
719
|
}
|
|
836
720
|
}
|
|
837
|
-
else if ((defaultHolder = elm['s-cr'])) {
|
|
838
|
-
// this element has slotted content
|
|
839
|
-
defaultHolder.parentNode.textContent = text;
|
|
840
|
-
}
|
|
841
721
|
else if (oldVNode.$text$ !== text) {
|
|
842
722
|
// update the text content for the text only vnode
|
|
843
723
|
// and also only if the text is different than before
|
|
844
724
|
elm.data = text;
|
|
845
725
|
}
|
|
846
726
|
};
|
|
847
|
-
const updateFallbackSlotVisibility = (elm) => {
|
|
848
|
-
// tslint:disable-next-line: prefer-const
|
|
849
|
-
let childNodes = elm.childNodes;
|
|
850
|
-
let childNode;
|
|
851
|
-
let i;
|
|
852
|
-
let ilen;
|
|
853
|
-
let j;
|
|
854
|
-
let slotNameAttr;
|
|
855
|
-
let nodeType;
|
|
856
|
-
for (i = 0, ilen = childNodes.length; i < ilen; i++) {
|
|
857
|
-
childNode = childNodes[i];
|
|
858
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
859
|
-
if (childNode['s-sr']) {
|
|
860
|
-
// this is a slot fallback node
|
|
861
|
-
// get the slot name for this slot reference node
|
|
862
|
-
slotNameAttr = childNode['s-sn'];
|
|
863
|
-
// by default always show a fallback slot node
|
|
864
|
-
// then hide it if there are other slots in the light dom
|
|
865
|
-
childNode.hidden = false;
|
|
866
|
-
for (j = 0; j < ilen; j++) {
|
|
867
|
-
nodeType = childNodes[j].nodeType;
|
|
868
|
-
if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
|
|
869
|
-
// this sibling node is from a different component OR is a named fallback slot node
|
|
870
|
-
if (nodeType === 1 /* ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
|
|
871
|
-
childNode.hidden = true;
|
|
872
|
-
break;
|
|
873
|
-
}
|
|
874
|
-
}
|
|
875
|
-
else {
|
|
876
|
-
// this is a default fallback slot node
|
|
877
|
-
// any element or text node (with content)
|
|
878
|
-
// should hide the default fallback slot node
|
|
879
|
-
if (nodeType === 1 /* ElementNode */ ||
|
|
880
|
-
(nodeType === 3 /* TextNode */ && childNodes[j].textContent.trim() !== '')) {
|
|
881
|
-
childNode.hidden = true;
|
|
882
|
-
break;
|
|
883
|
-
}
|
|
884
|
-
}
|
|
885
|
-
}
|
|
886
|
-
}
|
|
887
|
-
// keep drilling down
|
|
888
|
-
updateFallbackSlotVisibility(childNode);
|
|
889
|
-
}
|
|
890
|
-
}
|
|
891
|
-
};
|
|
892
|
-
const relocateNodes = [];
|
|
893
|
-
const relocateSlotContent = (elm) => {
|
|
894
|
-
// tslint:disable-next-line: prefer-const
|
|
895
|
-
let childNode;
|
|
896
|
-
let node;
|
|
897
|
-
let hostContentNodes;
|
|
898
|
-
let slotNameAttr;
|
|
899
|
-
let relocateNodeData;
|
|
900
|
-
let j;
|
|
901
|
-
let i = 0;
|
|
902
|
-
let childNodes = elm.childNodes;
|
|
903
|
-
let ilen = childNodes.length;
|
|
904
|
-
for (; i < ilen; i++) {
|
|
905
|
-
childNode = childNodes[i];
|
|
906
|
-
if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
|
|
907
|
-
// first got the content reference comment node
|
|
908
|
-
// then we got it's parent, which is where all the host content is in now
|
|
909
|
-
hostContentNodes = node.parentNode.childNodes;
|
|
910
|
-
slotNameAttr = childNode['s-sn'];
|
|
911
|
-
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
912
|
-
node = hostContentNodes[j];
|
|
913
|
-
if (!node['s-cn'] && !node['s-nr'] && node['s-hn'] !== childNode['s-hn']) {
|
|
914
|
-
// let's do some relocating to its new home
|
|
915
|
-
// but never relocate a content reference node
|
|
916
|
-
// that is suppose to always represent the original content location
|
|
917
|
-
if (isNodeLocatedInSlot(node, slotNameAttr)) {
|
|
918
|
-
// it's possible we've already decided to relocate this node
|
|
919
|
-
relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
920
|
-
// made some changes to slots
|
|
921
|
-
// let's make sure we also double check
|
|
922
|
-
// fallbacks are correctly hidden or shown
|
|
923
|
-
checkSlotFallbackVisibility = true;
|
|
924
|
-
node['s-sn'] = node['s-sn'] || slotNameAttr;
|
|
925
|
-
if (relocateNodeData) {
|
|
926
|
-
// previously we never found a slot home for this node
|
|
927
|
-
// but turns out we did, so let's remember it now
|
|
928
|
-
relocateNodeData.$slotRefNode$ = childNode;
|
|
929
|
-
}
|
|
930
|
-
else {
|
|
931
|
-
// add to our list of nodes to relocate
|
|
932
|
-
relocateNodes.push({
|
|
933
|
-
$slotRefNode$: childNode,
|
|
934
|
-
$nodeToRelocate$: node,
|
|
935
|
-
});
|
|
936
|
-
}
|
|
937
|
-
if (node['s-sr']) {
|
|
938
|
-
relocateNodes.map((relocateNode) => {
|
|
939
|
-
if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) {
|
|
940
|
-
relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
941
|
-
if (relocateNodeData && !relocateNode.$slotRefNode$) {
|
|
942
|
-
relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
|
|
943
|
-
}
|
|
944
|
-
}
|
|
945
|
-
});
|
|
946
|
-
}
|
|
947
|
-
}
|
|
948
|
-
else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
|
|
949
|
-
// so far this element does not have a slot home, not setting slotRefNode on purpose
|
|
950
|
-
// if we never find a home for this element then we'll need to hide it
|
|
951
|
-
relocateNodes.push({
|
|
952
|
-
$nodeToRelocate$: node,
|
|
953
|
-
});
|
|
954
|
-
}
|
|
955
|
-
}
|
|
956
|
-
}
|
|
957
|
-
}
|
|
958
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
959
|
-
relocateSlotContent(childNode);
|
|
960
|
-
}
|
|
961
|
-
}
|
|
962
|
-
};
|
|
963
|
-
const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
|
|
964
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
965
|
-
if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
|
|
966
|
-
return true;
|
|
967
|
-
}
|
|
968
|
-
if (nodeToRelocate.getAttribute('slot') === slotNameAttr) {
|
|
969
|
-
return true;
|
|
970
|
-
}
|
|
971
|
-
return false;
|
|
972
|
-
}
|
|
973
|
-
if (nodeToRelocate['s-sn'] === slotNameAttr) {
|
|
974
|
-
return true;
|
|
975
|
-
}
|
|
976
|
-
return slotNameAttr === '';
|
|
977
|
-
};
|
|
978
727
|
const callNodeRefs = (vNode) => {
|
|
979
728
|
{
|
|
980
729
|
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
@@ -998,90 +747,8 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
998
747
|
{
|
|
999
748
|
scopeId = hostElm['s-sc'];
|
|
1000
749
|
}
|
|
1001
|
-
{
|
|
1002
|
-
contentRef = hostElm['s-cr'];
|
|
1003
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1004
|
-
// always reset
|
|
1005
|
-
checkSlotFallbackVisibility = false;
|
|
1006
|
-
}
|
|
1007
750
|
// synchronous patch
|
|
1008
751
|
patch(oldVNode, rootVnode);
|
|
1009
|
-
{
|
|
1010
|
-
// while we're moving nodes around existing nodes, temporarily disable
|
|
1011
|
-
// the disconnectCallback from working
|
|
1012
|
-
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
1013
|
-
if (checkSlotRelocate) {
|
|
1014
|
-
relocateSlotContent(rootVnode.$elm$);
|
|
1015
|
-
let relocateData;
|
|
1016
|
-
let nodeToRelocate;
|
|
1017
|
-
let orgLocationNode;
|
|
1018
|
-
let parentNodeRef;
|
|
1019
|
-
let insertBeforeNode;
|
|
1020
|
-
let refNode;
|
|
1021
|
-
let i = 0;
|
|
1022
|
-
for (; i < relocateNodes.length; i++) {
|
|
1023
|
-
relocateData = relocateNodes[i];
|
|
1024
|
-
nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
1025
|
-
if (!nodeToRelocate['s-ol']) {
|
|
1026
|
-
// add a reference node marking this node's original location
|
|
1027
|
-
// keep a reference to this node for later lookups
|
|
1028
|
-
orgLocationNode =
|
|
1029
|
-
doc.createTextNode('');
|
|
1030
|
-
orgLocationNode['s-nr'] = nodeToRelocate;
|
|
1031
|
-
nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
|
|
1032
|
-
}
|
|
1033
|
-
}
|
|
1034
|
-
for (i = 0; i < relocateNodes.length; i++) {
|
|
1035
|
-
relocateData = relocateNodes[i];
|
|
1036
|
-
nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
1037
|
-
if (relocateData.$slotRefNode$) {
|
|
1038
|
-
// by default we're just going to insert it directly
|
|
1039
|
-
// after the slot reference node
|
|
1040
|
-
parentNodeRef = relocateData.$slotRefNode$.parentNode;
|
|
1041
|
-
insertBeforeNode = relocateData.$slotRefNode$.nextSibling;
|
|
1042
|
-
orgLocationNode = nodeToRelocate['s-ol'];
|
|
1043
|
-
while ((orgLocationNode = orgLocationNode.previousSibling)) {
|
|
1044
|
-
refNode = orgLocationNode['s-nr'];
|
|
1045
|
-
if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {
|
|
1046
|
-
refNode = refNode.nextSibling;
|
|
1047
|
-
if (!refNode || !refNode['s-nr']) {
|
|
1048
|
-
insertBeforeNode = refNode;
|
|
1049
|
-
break;
|
|
1050
|
-
}
|
|
1051
|
-
}
|
|
1052
|
-
}
|
|
1053
|
-
if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
|
|
1054
|
-
nodeToRelocate.nextSibling !== insertBeforeNode) {
|
|
1055
|
-
// we've checked that it's worth while to relocate
|
|
1056
|
-
// since that the node to relocate
|
|
1057
|
-
// has a different next sibling or parent relocated
|
|
1058
|
-
if (nodeToRelocate !== insertBeforeNode) {
|
|
1059
|
-
if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {
|
|
1060
|
-
// probably a component in the index.html that doesn't have it's hostname set
|
|
1061
|
-
nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
|
|
1062
|
-
}
|
|
1063
|
-
// add it back to the dom but in its new home
|
|
1064
|
-
parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode);
|
|
1065
|
-
}
|
|
1066
|
-
}
|
|
1067
|
-
}
|
|
1068
|
-
else {
|
|
1069
|
-
// this node doesn't have a slot home to go to, so let's hide it
|
|
1070
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1071
|
-
nodeToRelocate.hidden = true;
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
|
-
}
|
|
1075
|
-
}
|
|
1076
|
-
if (checkSlotFallbackVisibility) {
|
|
1077
|
-
updateFallbackSlotVisibility(rootVnode.$elm$);
|
|
1078
|
-
}
|
|
1079
|
-
// done moving nodes around
|
|
1080
|
-
// allow the disconnect callback to work again
|
|
1081
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
1082
|
-
// always reset
|
|
1083
|
-
relocateNodes.length = 0;
|
|
1084
|
-
}
|
|
1085
752
|
};
|
|
1086
753
|
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
1087
754
|
const createEvent = (ref, name, flags) => {
|
|
@@ -1465,10 +1132,6 @@ const clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes
|
|
|
1465
1132
|
// remove the content ref comment since it's not needed for shadow
|
|
1466
1133
|
node.remove();
|
|
1467
1134
|
}
|
|
1468
|
-
else {
|
|
1469
|
-
hostElm['s-cr'] = node;
|
|
1470
|
-
node['s-cn'] = true;
|
|
1471
|
-
}
|
|
1472
1135
|
}
|
|
1473
1136
|
}
|
|
1474
1137
|
}
|
|
@@ -1780,15 +1443,6 @@ const connectedCallback = (elm) => {
|
|
|
1780
1443
|
initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
|
|
1781
1444
|
}
|
|
1782
1445
|
}
|
|
1783
|
-
if (!hostId) {
|
|
1784
|
-
// initUpdate
|
|
1785
|
-
// if the slot polyfill is required we'll need to put some nodes
|
|
1786
|
-
// in here to act as original content anchors as we move nodes around
|
|
1787
|
-
// host element has been connected to the DOM
|
|
1788
|
-
if ((cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */))) {
|
|
1789
|
-
setContentReference(elm);
|
|
1790
|
-
}
|
|
1791
|
-
}
|
|
1792
1446
|
{
|
|
1793
1447
|
// find the first ancestor component (if there is one) and register
|
|
1794
1448
|
// this component as one of the actively loading child components for its ancestor
|
|
@@ -1833,17 +1487,6 @@ const connectedCallback = (elm) => {
|
|
|
1833
1487
|
endConnected();
|
|
1834
1488
|
}
|
|
1835
1489
|
};
|
|
1836
|
-
const setContentReference = (elm) => {
|
|
1837
|
-
// only required when we're NOT using native shadow dom (slot)
|
|
1838
|
-
// or this browser doesn't support native shadow dom
|
|
1839
|
-
// and this host element was NOT created with SSR
|
|
1840
|
-
// let's pick out the inner content for slot projection
|
|
1841
|
-
// create a node to represent where the original
|
|
1842
|
-
// content was first placed, which is useful later on
|
|
1843
|
-
const contentRefElm = (elm['s-cr'] = doc.createComment(''));
|
|
1844
|
-
contentRefElm['s-cn'] = true;
|
|
1845
|
-
elm.insertBefore(contentRefElm, elm.firstChild);
|
|
1846
|
-
};
|
|
1847
1490
|
const disconnectedCallback = (elm) => {
|
|
1848
1491
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1849
1492
|
const hostRef = getHostRef(elm);
|
|
@@ -6,14 +6,43 @@
|
|
|
6
6
|
|
|
7
7
|
const dom = require('./dom-19822169.js');
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Exported for testing purposes only
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
10
13
|
const labelClickEvent = "calciteInternalLabelClick";
|
|
14
|
+
const labelTagName = "calcite-label";
|
|
11
15
|
const onLabelClickMap = new WeakMap();
|
|
12
16
|
const findLabelForComponent = (componentEl) => {
|
|
13
|
-
const id = componentEl
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
const { id } = componentEl;
|
|
18
|
+
const forLabel = id && dom.queryElementRoots(componentEl, `${labelTagName}[for="${id}"]`);
|
|
19
|
+
if (forLabel) {
|
|
20
|
+
return forLabel;
|
|
21
|
+
}
|
|
22
|
+
const parentLabel = dom.closestElementCrossShadowBoundary(componentEl, labelTagName);
|
|
23
|
+
if (!parentLabel ||
|
|
24
|
+
// labelable components within other custom elements are not considered labelable
|
|
25
|
+
hasAncestorCustomElements(parentLabel, componentEl)) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
return parentLabel;
|
|
16
29
|
};
|
|
30
|
+
function hasAncestorCustomElements(label, componentEl) {
|
|
31
|
+
let traversedElements;
|
|
32
|
+
const customElementAncestorCheckEventType = "custom-element-ancestor-check";
|
|
33
|
+
const listener = (event) => {
|
|
34
|
+
event.stopImmediatePropagation();
|
|
35
|
+
const composedPath = event.composedPath();
|
|
36
|
+
traversedElements = composedPath.slice(composedPath.indexOf(componentEl), composedPath.indexOf(label));
|
|
37
|
+
};
|
|
38
|
+
label.addEventListener(customElementAncestorCheckEventType, listener, { once: true });
|
|
39
|
+
componentEl.dispatchEvent(new CustomEvent(customElementAncestorCheckEventType, { composed: true, bubbles: true }));
|
|
40
|
+
label.removeEventListener(customElementAncestorCheckEventType, listener);
|
|
41
|
+
const ancestorCustomElements = traversedElements
|
|
42
|
+
.filter((el) => el !== componentEl && el !== label)
|
|
43
|
+
.filter((el) => { var _a; return (_a = el.tagName) === null || _a === void 0 ? void 0 : _a.includes("-"); });
|
|
44
|
+
return ancestorCustomElements.length > 0;
|
|
45
|
+
}
|
|
17
46
|
/**
|
|
18
47
|
* Helper to set up label interactions on connectedCallback.
|
|
19
48
|
*/
|