ranui 0.1.10-alpha.9 → 0.2.0-alpha.1
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/README.md +397 -0
- package/README.zh-CN.md +216 -37
- package/dist/assets/image/failImage.d.ts +2 -0
- package/dist/bin/generate-component-api.d.ts +1 -0
- package/dist/bin/generate-style-docs.d.ts +1 -0
- package/dist/build/config.bundle.d.ts +2 -0
- package/dist/build/config.d.ts +3 -0
- package/dist/build/config.es.d.ts +2 -0
- package/dist/build/config.umd.d.ts +1 -0
- package/dist/builder.d.ts +11 -0
- package/dist/builder.js +39 -0
- package/dist/button-BstLjXNe.js +117 -0
- package/dist/button.js +3 -5
- package/dist/card-DQUJoDUQ.js +60 -0
- package/dist/card.js +5 -0
- package/dist/checkbox-iHZQb-yQ.js +94 -0
- package/dist/checkbox.js +3 -5
- package/dist/colorpicker-CGh8pRqo.js +315 -0
- package/dist/colorpicker.js +3 -9
- package/dist/components/button/index.d.ts +44 -0
- package/dist/components/card/index.d.ts +21 -0
- package/dist/components/checkbox/index.d.ts +35 -0
- package/dist/components/colorpicker/index.d.ts +99 -0
- package/dist/components/dropdown/index.d.ts +30 -0
- package/dist/components/form/index.d.ts +15 -0
- package/dist/components/icon/index.d.ts +58 -0
- package/dist/components/image/index.d.ts +31 -0
- package/dist/components/input/index.d.ts +222 -0
- package/dist/components/link/index.d.ts +21 -0
- package/dist/components/loading/index.d.ts +76 -0
- package/dist/components/math/index.d.ts +16 -0
- package/dist/components/message/container.d.ts +8 -0
- package/dist/components/message/index.d.ts +32 -0
- package/dist/components/modal/index.d.ts +100 -0
- package/dist/components/player/core/constants.d.ts +5 -0
- package/dist/components/player/core/controller.d.ts +33 -0
- package/dist/components/player/core/events.d.ts +10 -0
- package/dist/components/player/core/fullscreen.d.ts +5 -0
- package/dist/components/player/core/levels.d.ts +20 -0
- package/dist/components/player/core/media.d.ts +50 -0
- package/dist/components/player/core/playback.d.ts +14 -0
- package/dist/components/player/core/progress.d.ts +2 -0
- package/dist/components/player/core/state.d.ts +27 -0
- package/dist/components/player/core/view.d.ts +38 -0
- package/dist/components/player/index.d.ts +276 -0
- package/dist/components/popover/content/index.d.ts +12 -0
- package/dist/components/popover/index.d.ts +93 -0
- package/dist/components/progress/index.d.ts +40 -0
- package/dist/components/radar/index.d.ts +52 -0
- package/dist/components/route/index.d.ts +26 -0
- package/dist/components/router/index.d.ts +24 -0
- package/dist/components/scratch/index.d.ts +19 -0
- package/dist/components/section/index.d.ts +23 -0
- package/dist/components/select/dropdown-item/index.d.ts +21 -0
- package/dist/components/select/index.d.ts +150 -0
- package/dist/components/select/option/index.d.ts +19 -0
- package/dist/components/skeleton/index.d.ts +13 -0
- package/dist/components/tab/index.d.ts +58 -0
- package/dist/components/tabpane/index.d.ts +33 -0
- package/dist/demo/i18n.d.ts +4 -0
- package/dist/demo/index.d.ts +3 -0
- package/dist/demo/register-icons.d.ts +1 -0
- package/dist/dropdown-RqHMRhFE.js +76 -0
- package/dist/dropdown.js +6 -0
- package/dist/events-C59wGdni.js +30 -0
- package/dist/factory-BdsO0dEW.js +165 -0
- package/dist/form-05Lxxl3D.js +44 -0
- package/dist/form.js +5 -0
- package/dist/icon-Blm7AbyY.js +167 -0
- package/dist/icon.js +4 -4
- package/dist/{index-KS2nvVcO.js → image-DKm6z7YQ.js} +60 -71
- package/dist/image.js +3 -2
- package/dist/index.cjs +35 -0
- package/dist/index.d.ts +277 -114
- package/dist/index.iife.js +306 -0
- package/dist/index.js +78 -38
- package/dist/input-Dskw1bAl.js +186 -0
- package/dist/input.js +2 -3
- package/dist/katex-es-BTpuCxxV.cjs +261 -0
- package/dist/katex-es-CKRwcaiU.js +23682 -0
- package/dist/link-BW-gvrpN.js +77 -0
- package/dist/link.js +6 -0
- package/dist/loading-C4QUpm70.js +206 -0
- package/dist/loading.js +4 -6
- package/dist/math-Dv4nXSoI.js +52 -0
- package/dist/math.js +2 -4
- package/dist/message-De5e1txT.js +137 -0
- package/dist/message.js +3 -4
- package/dist/mocks-CMGoftIc.js +179 -0
- package/dist/modal-DruDj3AB.js +350 -0
- package/dist/modal.js +3 -2
- package/dist/player-CqTAmg_E.js +13534 -0
- package/dist/player.js +3 -6
- package/dist/playwright.config.d.ts +2 -0
- package/dist/plugins/load-svg.d.ts +9 -0
- package/dist/popover-BY32HNMl.js +206 -0
- package/dist/popover.js +3 -5
- package/dist/progress-gZo0knzu.js +123 -0
- package/dist/progress.js +3 -5
- package/dist/radar-19P5Mtld.js +181 -0
- package/dist/radar.js +3 -4
- package/dist/ranui.css +1 -0
- package/dist/route-BY_E6-2C.js +88 -0
- package/dist/route.js +6 -0
- package/dist/router-BDcv4F-2.js +79 -0
- package/dist/router.js +6 -0
- package/dist/scratch-Dbd9G6Q6.js +60 -0
- package/dist/scratch.js +4 -0
- package/dist/section-CNTvgdQ-.js +63 -0
- package/dist/section.js +5 -0
- package/dist/select-BVdUtQX5.js +454 -0
- package/dist/select.js +3 -8
- package/dist/signal-XHfNsQNW.js +57 -0
- package/dist/skeleton-BAdJ6vyA.js +32 -0
- package/dist/skeleton.js +3 -2
- package/dist/ssg.js +21 -0
- package/dist/ssr-DSGwPtEd.js +34 -0
- package/dist/ssr-stream.d.ts +1 -0
- package/dist/ssr-stream.js +87 -0
- package/dist/ssr.d.ts +1 -0
- package/dist/ssr.js +7 -0
- package/dist/style.d.ts +1 -0
- package/dist/style.js +0 -0
- package/dist/tab-DH2owP2V.js +184 -0
- package/dist/tab.js +3 -4
- package/dist/tabpane-B_M-Jokw.js +87 -0
- package/dist/tabpane.js +3 -2
- package/dist/test/e2e/button.spec.d.ts +1 -0
- package/dist/test/e2e/checkbox.spec.d.ts +1 -0
- package/dist/test/e2e/helpers.d.ts +13 -0
- package/dist/test/e2e/icon.spec.d.ts +1 -0
- package/dist/test/e2e/image.spec.d.ts +1 -0
- package/dist/test/e2e/input.spec.d.ts +1 -0
- package/dist/test/e2e/loading.spec.d.ts +1 -0
- package/dist/test/e2e/message.spec.d.ts +1 -0
- package/dist/test/e2e/modal.spec.d.ts +1 -0
- package/dist/test/e2e/popover.spec.d.ts +1 -0
- package/dist/test/e2e/progress.spec.d.ts +1 -0
- package/dist/test/e2e/radar.spec.d.ts +1 -0
- package/dist/test/e2e/select.spec.d.ts +1 -0
- package/dist/test/e2e/skeleton.spec.d.ts +1 -0
- package/dist/test/e2e/tab.spec.d.ts +1 -0
- package/dist/test/e2e/visual/colorpicker.spec.d.ts +1 -0
- package/dist/test/e2e/visual/components.spec.d.ts +1 -0
- package/dist/test/e2e/visual/player.spec.d.ts +1 -0
- package/dist/test/integration/composition.test.d.ts +23 -0
- package/dist/test/setup.d.ts +0 -0
- package/dist/test/ssr/builder.core.ssr.test.d.ts +1 -0
- package/dist/test/ssr/builder.factory.ssr.test.d.ts +1 -0
- package/dist/test/ssr/builder.mocks.test.d.ts +1 -0
- package/dist/test/ssr/components/button.test.d.ts +1 -0
- package/dist/test/ssr/css-vars.test.d.ts +1 -0
- package/dist/test/ssr/registry.test.d.ts +1 -0
- package/dist/test/ssr/router.ssg.test.d.ts +2 -0
- package/dist/test/ssr/snapshots/button.test.d.ts +1 -0
- package/dist/test/ssr/stream.test.d.ts +2 -0
- package/dist/test/ssr/theme.tokens.ssr.test.d.ts +1 -0
- package/dist/test/unit/builder.core.browser.test.d.ts +1 -0
- package/dist/test/unit/builder.escape.test.d.ts +1 -0
- package/dist/test/unit/builder.selectors.test.d.ts +1 -0
- package/dist/test/unit/button.contract.test.d.ts +1 -0
- package/dist/test/unit/card.contract.test.d.ts +1 -0
- package/dist/test/unit/checkbox.contract.test.d.ts +1 -0
- package/dist/test/unit/colorpicker.color.utils.test.d.ts +1 -0
- package/dist/test/unit/colorpicker.contract.test.d.ts +1 -0
- package/dist/test/unit/colorpicker.methods.test.d.ts +1 -0
- package/dist/test/unit/component.helpers.test.d.ts +1 -0
- package/dist/test/unit/dropdown-item.contract.test.d.ts +1 -0
- package/dist/test/unit/dropdown.contract.test.d.ts +1 -0
- package/dist/test/unit/form.contract.test.d.ts +1 -0
- package/dist/test/unit/helpers/component.d.ts +3 -0
- package/dist/test/unit/helpers/dom.d.ts +2 -0
- package/dist/test/unit/icon.contract.test.d.ts +1 -0
- package/dist/test/unit/image.contract.test.d.ts +1 -0
- package/dist/test/unit/input.contract.test.d.ts +1 -0
- package/dist/test/unit/link.contract.test.d.ts +1 -0
- package/dist/test/unit/loading.contract.test.d.ts +1 -0
- package/dist/test/unit/math.contract.test.d.ts +1 -0
- package/dist/test/unit/message.component.test.d.ts +1 -0
- package/dist/test/unit/message.container.test.d.ts +1 -0
- package/dist/test/unit/modal.contract.test.d.ts +1 -0
- package/dist/test/unit/option.contract.test.d.ts +1 -0
- package/dist/test/unit/package-exports.source.test.d.ts +1 -0
- package/dist/test/unit/player-controls.test.d.ts +1 -0
- package/dist/test/unit/player-core.test.d.ts +1 -0
- package/dist/test/unit/player-event-handlers.test.d.ts +1 -0
- package/dist/test/unit/player-events.test.d.ts +1 -0
- package/dist/test/unit/player-fullscreen.test.d.ts +1 -0
- package/dist/test/unit/player-interactions.test.d.ts +1 -0
- package/dist/test/unit/player-levels.test.d.ts +1 -0
- package/dist/test/unit/player-media.test.d.ts +1 -0
- package/dist/test/unit/player-playback.test.d.ts +1 -0
- package/dist/test/unit/player.contract.test.d.ts +1 -0
- package/dist/test/unit/popover-accessibility.test.d.ts +1 -0
- package/dist/test/unit/popover.contract.test.d.ts +2 -0
- package/dist/test/unit/progress.contract.test.d.ts +1 -0
- package/dist/test/unit/radar.contract.test.d.ts +1 -0
- package/dist/test/unit/route.contract.test.d.ts +1 -0
- package/dist/test/unit/router.contract.test.d.ts +2 -0
- package/dist/test/unit/scratch.contract.test.d.ts +1 -0
- package/dist/test/unit/select-accessibility.test.d.ts +1 -0
- package/dist/test/unit/select-option.contract.test.d.ts +1 -0
- package/dist/test/unit/select.contract.test.d.ts +1 -0
- package/dist/test/unit/skeleton.contract.test.d.ts +1 -0
- package/dist/test/unit/ssr.test.d.ts +1 -0
- package/dist/test/unit/tab.contract.test.d.ts +2 -0
- package/dist/test/unit/theme.semantic-tokens.test.d.ts +1 -0
- package/dist/test/unit/theme.skin-tokens.test.d.ts +1 -0
- package/dist/test/unit/utils.dom.test.d.ts +1 -0
- package/dist/test/unit/utils.error.test.d.ts +1 -0
- package/dist/test/unit/utils.i18n.test.d.ts +1 -0
- package/dist/test/unit/utils.image.test.d.ts +1 -0
- package/dist/test/unit/utils.math.test.d.ts +1 -0
- package/dist/test/unit/utils.router.test.d.ts +1 -0
- package/dist/test/unit/utils.signal.test.d.ts +1 -0
- package/dist/test/unit/utils.ssr-stream.test.d.ts +1 -0
- package/dist/test/unit/utils.style.test.d.ts +1 -0
- package/dist/test/unit/utils.theme.test.d.ts +1 -0
- package/dist/test/unit/utils.tween.test.d.ts +1 -0
- package/dist/tsconfig.json +8 -8
- package/dist/typings.d.ts +163 -114
- package/dist/utils/builder/core.d.ts +70 -0
- package/dist/utils/builder/env.d.ts +1 -0
- package/dist/utils/builder/escape.d.ts +2 -0
- package/dist/utils/builder/events.d.ts +55 -0
- package/dist/utils/builder/factory.d.ts +18 -0
- package/dist/utils/builder/index.d.ts +9 -0
- package/dist/utils/builder/mocks.d.ts +62 -0
- package/dist/utils/builder/selectors.d.ts +4 -0
- package/dist/utils/builder/signal.d.ts +87 -0
- package/dist/utils/color.d.ts +52 -0
- package/dist/utils/component.d.ts +16 -0
- package/dist/utils/dom.d.ts +39 -0
- package/dist/utils/error.d.ts +6 -0
- package/dist/utils/i18n/index.d.ts +53 -0
- package/dist/utils/i18n.js +88 -0
- package/dist/utils/image.d.ts +39 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/math.d.ts +26 -0
- package/dist/utils/router/index.d.ts +128 -0
- package/dist/utils/router.js +197 -0
- package/dist/utils/ssg.d.ts +49 -0
- package/dist/utils/ssr-registry.d.ts +8 -0
- package/dist/utils/ssr-stream.d.ts +23 -0
- package/dist/utils/ssr.d.ts +17 -0
- package/dist/utils/style.d.ts +12 -0
- package/dist/utils/theme.d.ts +9 -0
- package/dist/utils/tween.d.ts +21 -0
- package/dist/utils/video.d.ts +40 -0
- package/dist/utils-D4pPF77E.js +689 -0
- package/dist/vite.config.d.ts +6 -0
- package/dist/vitest.config.d.ts +2 -0
- package/dist/vitest.config.ssr.d.ts +2 -0
- package/docs/COMPONENTS.md +324 -0
- package/docs/DESIGN.md +198 -0
- package/docs/style-tokens-public.md +880 -0
- package/package.json +137 -78
- package/typings.d.ts +163 -114
- package/dist/_commonjs-dynamic-modules-DLbDWi6a.js +0 -12
- package/dist/add-user-BN1JlY7e.js +0 -4
- package/dist/arrow-down-B_hCY3Wt.js +0 -662
- package/dist/book-nTEFXU2x.js +0 -4
- package/dist/check-circle-fill-B_pd8ZSs.js +0 -4
- package/dist/check-circle-szyAJiap.js +0 -4
- package/dist/close-CFnkhudp.js +0 -4
- package/dist/close-circle-CwmuN2C6.js +0 -4
- package/dist/close-circle-fill-jSqPPw9i.js +0 -4
- package/dist/colz-DJZvo_8B.js +0 -232
- package/dist/docx-CHkPTdGU.js +0 -3665
- package/dist/drop-4j4abxje.js +0 -36
- package/dist/eye-D_mEt17f.js +0 -4
- package/dist/eye-close-BVr3NJtg.js +0 -4
- package/dist/home-BUQ4USMk.js +0 -4
- package/dist/iconShadowless.js +0 -6
- package/dist/index-15M0olqa.js +0 -204
- package/dist/index-1v568_nq.js +0 -140
- package/dist/index-B897keW5.js +0 -279
- package/dist/index-BZR0HaP2.js +0 -40
- package/dist/index-B_GuEcTd.js +0 -9575
- package/dist/index-Bc2Bcl8D.js +0 -63701
- package/dist/index-C4Sv0T51.js +0 -495
- package/dist/index-C6RcMHoH.js +0 -187
- package/dist/index-C9z10IgG.js +0 -103
- package/dist/index-CFjEuvBW.js +0 -308
- package/dist/index-CGEx9VOA.js +0 -17106
- package/dist/index-CGYfjKUV.js +0 -72
- package/dist/index-CQTJoWhb.js +0 -19
- package/dist/index-CiWwvEMM.js +0 -511
- package/dist/index-CkM9ENTf.js +0 -496
- package/dist/index-CtVOgBDk.js +0 -659
- package/dist/index-D4qUro5V.js +0 -279
- package/dist/index-D4y9c1Dj.js +0 -310
- package/dist/index-DAxs7Dd2.js +0 -119
- package/dist/index-DC5EA657.js +0 -91
- package/dist/index-DJZmDHz-.js +0 -146
- package/dist/index-D_CA5VDZ.js +0 -158
- package/dist/index-WfFw4LJT.js +0 -490
- package/dist/index-mhFL9MJp.js +0 -320
- package/dist/info-circle-COnL5bTJ.js +0 -4
- package/dist/info-circle-fill-CFeVMdci.js +0 -4
- package/dist/inputShadowless.js +0 -6
- package/dist/jszip.min-Dhs3nUkD.js +0 -2346
- package/dist/katex-es-B5r5vt3m.js +0 -14628
- package/dist/loading-Dcc5RApI.js +0 -4
- package/dist/loading-scene-BMc2wqKm.js +0 -4
- package/dist/lock-Cr7BnmWN.js +0 -4
- package/dist/message-D36_Zo2l.js +0 -4
- package/dist/pdf-Cx0VWKFo.js +0 -118
- package/dist/power-off-lQRbiBak.js +0 -4
- package/dist/preview-CJbz9GjO.js +0 -4
- package/dist/preview.js +0 -7
- package/dist/selectShadowless.js +0 -564
- package/dist/setting-DemlgzVC.js +0 -4
- package/dist/shadowless.js +0 -8
- package/dist/sprite-CH2zLtZy.js +0 -141
- package/dist/style.css +0 -1
- package/dist/team-tl4NJXPC.js +0 -4
- package/dist/umd/index.umd.cjs +0 -60
- package/dist/umd/shadowless/shadowless.umd.cjs +0 -1
- package/dist/umd/shadowless/style.css +0 -1
- package/dist/umd/style.css +0 -1
- package/dist/unlock-CeU74z9n.js +0 -4
- package/dist/user-B-eVXwuk.js +0 -4
- package/dist/warning-circle-DDUgEDIv.js +0 -4
- package/dist/warning-circle-fill-lODUKz0i.js +0 -4
- package/readme.md +0 -195
package/dist/index-C9z10IgG.js
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import { c as create, a as addClassToElement, r as removeClassToElement } from "./arrow-down-B_hCY3Wt.js";
|
|
5
|
-
import { c as createCustomError, H as HTMLElementSSR } from "./index-DC5EA657.js";
|
|
6
|
-
const f7170ee498e0dd32cbdcb63fba8f75cc = '.remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transparent}.remove-wap-active-focus:active,.remove-wap-active-focus:focus{outline:0;-webkit-tap-highlight-color:transparent}@keyframes ranui-dropdown-down-in{0%{transform:scaleY(.8);transform-origin:100% 100%;opacity:0}to{transform:scaleY(1);transform-origin:100% 100%;opacity:1}}@keyframes ranui-dropdown-down-out{0%{transform:scaleY(1);transform-origin:100% 100%;opacity:1}to{transform:scaleY(.8);transform-origin:100% 100%;opacity:0}}@keyframes ranui-dropdown-up-in{0%{transform:scaleY(.8);transform-origin:0% 0%;opacity:0}to{transform:scaleY(1);transform-origin:0% 0%;opacity:1}}@keyframes ranui-dropdown-up-out{0%{transform:scaleY(1);transform-origin:0% 0%;opacity:1}to{transform:scaleY(.8);transform-origin:0% 0%;opacity:0}}.ran-dropdown-down-in{animation:ranui-dropdown-up-in .2s;animation-fill-mode:forwards}.ran-dropdown-down-out{animation:ranui-dropdown-up-out .2s;animation-fill-mode:forwards}.ran-dropdown-up-in{animation:ranui-dropdown-down-in .2s;animation-fill-mode:forwards}.ran-dropdown-up-out{animation:ranui-dropdown-down-out .2s;animation-fill-mode:forwards}:host{text-align:var(--ran-dropdown-host-text-align, left);z-index:10}.ranui-dropdown{transform-origin:var(--ran-x, 50%) var(--ran-y, 50%);box-sizing:var(--ran-dropdown-box-sizing, border-box);margin:var(--ran-dropdown-margin, 0);padding:var(--ran-dropdown-padding, 4px);color:var(--ran-dropdown-color, rgba(0, 0, 0, .88));font-size:var(--ran-dropdown-font-size, 14px);list-style:var(--ran-dropdown-list-style, none);font-family:var(--ran-dropdown-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");z-index:var(--ran-dropdown-z-index, 1050);overflow:var(--ran-dropdown-overflow, hidden);font-variant:var(--ran-dropdown-font-variant, initial);background:var(--ran-dropdown-background, #ffffff);border-radius:var(--ran-dropdown-border-radius, 8px);outline:var(--ran-dropdown-outline, none);box-shadow:var(--ran-dropdown-box-shadow, 0 6px 16px 0 rgba(0, 0, 0, .08), 0 3px 6px -4px rgba(0, 0, 0, .12), 0 9px 28px 8px rgba(0, 0, 0, .05));cursor:var(--ran-dropdown-cursor, pointer);width:var(--ran-dropdown-width, 100%)}.ranui-dropdown-container{position:var(--ran-dropdown-container-position, relative);display:var(--ran-dropdown-container-display, inline-block);width:var(--ran-dropdown-container-width, 100%);min-width:var(--ran-popover-width)}.ranui-dropdown-container .top{transform:translate(calc(var(--ran-popover-width) / 2 - 8px)) translateY(-16px) rotate(0);top:0}.ranui-dropdown-container .bottom{transform:translate(calc(var(--ran-popover-width) / 2 - 8px)) translateY(0) rotate(180deg);top:calc(var(--ran-popover-height) - 4px,0px)}.ranui-dropdown-arrow{position:var(--ran-dropdown-arrow-position, absolute);z-index:var(--ran-dropdown-arrow-z-index, 1);display:var(--ran-dropdown-arrow-display, block);pointer-events:var(--ran-dropdown-arrow-pointer-events, none);width:var(--ran-dropdown-arrow-width, 16px);height:var(--ran-dropdown-arrow-height, 16px);overflow:var(--ran-dropdown-arrow-overflow, hidden)}.ranui-dropdown-arrow:before{background:var(--ran-dropdown-arrow-before-background, #fff);position:var(--ran-dropdown-arrow-before-position, absolute);bottom:var(--ran-dropdown-arrow-before-bottom, 0);inset-inline-start:0;width:var(--ran-dropdown-arrow-before-width, 16px);height:var(--ran-dropdown-arrow-before-height, 8px );clip-path:path("M 0 8 A 4 4 0 0 0 2.82842712474619 6.82842712474619 L 6.585786437626905 3.0710678118654755 A 2 2 0 0 1 9.414213562373096 3.0710678118654755 L 13.17157287525381 6.82842712474619 A 4 4 0 0 0 16 8 Z");content:var(--ran-dropdown-arrow-before-content, "")}.ranui-dropdown-arrow:after{content:var(--ran-dropdown-arrow-after-content, "");position:var(--ran-dropdown-arrow-after-position, absolute);width:var(--ran-dropdown-arrow-after-width, 9px);height:var(--ran-dropdown-arrow-after-height, 9px);bottom:var(--ran-dropdown-arrow-after-bottom, 0);inset-inline:0;margin:var(--ran-dropdown-arrow-after-margin, auto);border-radius:var(--ran-dropdown-arrow-after-border-radius, 0 0 2px 0);transform:var(--ran-dropdown-arrow-after-transform, translateY(50%) rotate(-135deg));box-shadow:var(--ran-dropdown-arrow-after-box-shadow, 2px 2px 5px rgba(0, 0, 0, .05));z-index:var(--ran-dropdown-arrow-after-z-index, 0);background:var(--ran-dropdown-arrow-after-background, transparent)}';
|
|
7
|
-
const animationTime = 300;
|
|
8
|
-
class Dropdown extends HTMLElementSSR() {
|
|
9
|
-
constructor() {
|
|
10
|
-
super();
|
|
11
|
-
__publicField(this, "dropdown");
|
|
12
|
-
__publicField(this, "_slot");
|
|
13
|
-
__publicField(this, "_shadowDom");
|
|
14
|
-
__publicField(this, "arrowIcon");
|
|
15
|
-
__publicField(this, "container");
|
|
16
|
-
__publicField(this, "handlerTransit", () => {
|
|
17
|
-
if (this.transit) {
|
|
18
|
-
addClassToElement(this.dropdown.element, this.transit);
|
|
19
|
-
setTimeout(() => {
|
|
20
|
-
removeClassToElement(this.dropdown.element, this.transit);
|
|
21
|
-
}, animationTime);
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
__publicField(this, "handlerArrow", () => {
|
|
25
|
-
if (!this.arrow) return;
|
|
26
|
-
if (!this.arrowIcon) {
|
|
27
|
-
this.arrowIcon = create("div").setAttribute("class", `ranui-dropdown-arrow ${this.arrow}`);
|
|
28
|
-
this.container.addChild([this.arrowIcon]);
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
__publicField(this, "stopPropagation", (e) => {
|
|
32
|
-
e.stopPropagation();
|
|
33
|
-
});
|
|
34
|
-
this._slot = create("slot").setAttribute("class", "slot");
|
|
35
|
-
this.dropdown = create("div").setStyle("-webkit-tap-highlight-color", "transparent").setStyle("outline", "0").setAttribute("class", "ranui-dropdown").setAttribute("part", "ranui-dropdown").addChild([this._slot]);
|
|
36
|
-
this.container = create("div").setAttribute("class", "ranui-dropdown-container").addChild([this.dropdown]);
|
|
37
|
-
const shadowRoot = this.attachShadow({ mode: "closed" });
|
|
38
|
-
const F7170EE498E0DD32CBDCB63FBA8F75CC = document.createElement("style");
|
|
39
|
-
F7170EE498E0DD32CBDCB63FBA8F75CC.textContent = f7170ee498e0dd32cbdcb63fba8f75cc;
|
|
40
|
-
shadowRoot.appendChild(F7170EE498E0DD32CBDCB63FBA8F75CC);
|
|
41
|
-
this._shadowDom = shadowRoot;
|
|
42
|
-
shadowRoot.appendChild(this.container.element);
|
|
43
|
-
}
|
|
44
|
-
static get observedAttributes() {
|
|
45
|
-
return ["transit", "arrow"];
|
|
46
|
-
}
|
|
47
|
-
get transit() {
|
|
48
|
-
return this.getAttribute("transit") || "";
|
|
49
|
-
}
|
|
50
|
-
set transit(value) {
|
|
51
|
-
if (value) {
|
|
52
|
-
this.setAttribute("transit", value);
|
|
53
|
-
} else {
|
|
54
|
-
this.removeAttribute("transit");
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
get arrow() {
|
|
58
|
-
return this.getAttribute("arrow") || "";
|
|
59
|
-
}
|
|
60
|
-
set arrow(value) {
|
|
61
|
-
if (value) {
|
|
62
|
-
this.setAttribute("arrow", value);
|
|
63
|
-
} else {
|
|
64
|
-
this.removeAttribute("arrow");
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
get show() {
|
|
68
|
-
return this.getAttribute("show") || "";
|
|
69
|
-
}
|
|
70
|
-
set show(value) {
|
|
71
|
-
if (value) {
|
|
72
|
-
this.setAttribute("show", value);
|
|
73
|
-
} else {
|
|
74
|
-
this.removeAttribute("show");
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
connectedCallback() {
|
|
78
|
-
this.handlerTransit();
|
|
79
|
-
this.handlerArrow();
|
|
80
|
-
}
|
|
81
|
-
disconnectedCallback() {
|
|
82
|
-
}
|
|
83
|
-
attributeChangedCallback(name, oldValue, newValue) {
|
|
84
|
-
if (name === "transit" && newValue) {
|
|
85
|
-
addClassToElement(this.dropdown.element, this.transit);
|
|
86
|
-
setTimeout(() => {
|
|
87
|
-
removeClassToElement(this.dropdown.element, this.transit);
|
|
88
|
-
}, animationTime);
|
|
89
|
-
}
|
|
90
|
-
if (name === "arrow") {
|
|
91
|
-
this.handlerArrow();
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
function Custom() {
|
|
96
|
-
if (typeof document !== "undefined" && !customElements.get("r-dropdown")) {
|
|
97
|
-
customElements.define("r-dropdown", Dropdown);
|
|
98
|
-
return Dropdown;
|
|
99
|
-
} else {
|
|
100
|
-
return createCustomError("document is undefined or r-dropdown is exist");
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
Custom();
|
package/dist/index-CFjEuvBW.js
DELETED
|
@@ -1,308 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import { d as createDocumentFragment, a as addClassToElement } from "./arrow-down-B_hCY3Wt.js";
|
|
5
|
-
import { i as isDisabled, r as removeClassToElementChild } from "./index-DC5EA657.js";
|
|
6
|
-
const f7170ee498e0dd32cbdcb63fba8f75cc = '.remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transparent}.remove-wap-active-focus:active,.remove-wap-active-focus:focus{outline:0;-webkit-tap-highlight-color:transparent}.ran-tab ::slotted(r-tab){box-sizing:border-box;width:100%;height:100%;padding:10px;flex-shrink:0;overflow:auto;text-align:start}.ran-tab-header{position:relative;overflow:hidden;scroll-behavior:smooth}.ran-tab-header-nav{display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:center}.ran-tab-header-nav::-webkit-scrollbar{display:none}.ran-tab-header-nav-item{flex-shrink:0}.ran-tab-header-nav .active{color:var(--active-color, #1890ff)}.ran-tab-header-line{position:absolute;width:0;margin-top:-2px;height:2px;border-radius:2px;background:var(--line-color, #1890ff);transition:.2s}.ran-tab-content{overflow:hidden}.ran-tab-content-wrap{display:flex;width:100%;height:100%;transition:.2s}:host([type="line"]) .ran-tab-header-nav-item{border:solid 1px transparent}:host([type="line"]) .ran-tab-header-nav .active{color:var(--line-color, #1890ff);border:solid 1px transparent;border-color:var(--border-color, rgba(0, 0, 0, .2)) var(--border-color, rgba(0, 0, 0, .2)) transparent;border-radius:var(--border-radius, .25em) var(--border-radius, .25em) 0 0}:host([type="line"]) .ran-tab-header-line{transition:none;visibility:hidden}:host([type="line"]) .ran-tab-header-line:after,:host([type="line"]) .ran-tab-header-line:before{content:"";position:absolute;visibility:visible;width:9999px;height:1px;bottom:0;background:var(--border-color, rgba(0, 0, 0, .2))}:host([type="line"]) .ran-tab-header-line:after{left:100%}:host([type="line"]) .ran-tab-header-line:before{right:100%}:host([align="center"]) .ran-tab-header-nav{justify-content:center}:host([align="center"]) .ran-tab-header-line{left:50%}:host([align="end"]) .ran-tab-header-nav{justify-content:flex-end}';
|
|
7
|
-
function CustomElement() {
|
|
8
|
-
if (typeof window !== "undefined" && !customElements.get("r-tabs")) {
|
|
9
|
-
class Tabs extends HTMLElement {
|
|
10
|
-
constructor() {
|
|
11
|
-
super();
|
|
12
|
-
__publicField(this, "_container");
|
|
13
|
-
__publicField(this, "_header");
|
|
14
|
-
__publicField(this, "_nav");
|
|
15
|
-
__publicField(this, "_line");
|
|
16
|
-
__publicField(this, "_content");
|
|
17
|
-
__publicField(this, "_wrap");
|
|
18
|
-
__publicField(this, "_slot");
|
|
19
|
-
__publicField(this, "tabHeaderKeyMapIndex");
|
|
20
|
-
/**
|
|
21
|
-
* @description: 构建 tabPane 组件 key 值和 index 的映射,同时判断一个 tabs 下的 tabPane key 值不能重复
|
|
22
|
-
* @param {string} key
|
|
23
|
-
* @param {number} index
|
|
24
|
-
*/
|
|
25
|
-
__publicField(this, "initTabHeaderKeyMapIndex", (key, index2) => {
|
|
26
|
-
const value = this.tabHeaderKeyMapIndex[key];
|
|
27
|
-
if (value) {
|
|
28
|
-
throw new Error("tab 组件的 key 值存在重复,或者某个 tab 组件缺少 key 属性");
|
|
29
|
-
} else {
|
|
30
|
-
this.tabHeaderKeyMapIndex[key] = index2;
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
/**
|
|
34
|
-
* @description: 初始化 tabLine 的位置,主要是当 tabs 的 align 属性为 center 时需要处理
|
|
35
|
-
*/
|
|
36
|
-
__publicField(this, "initTabLineAlignCenter", () => {
|
|
37
|
-
const { length } = this._nav.children;
|
|
38
|
-
let left = 0;
|
|
39
|
-
for (let i = 0; i < length; i++) {
|
|
40
|
-
const { width = 0 } = this._nav.children[i].getBoundingClientRect();
|
|
41
|
-
left += width;
|
|
42
|
-
}
|
|
43
|
-
this._line.style.setProperty("left", `calc(50% - ${left / 2}px)`);
|
|
44
|
-
});
|
|
45
|
-
/**
|
|
46
|
-
* @description: 初始化tabLine的位置,主要是当tabs的align属性为end时需要处理
|
|
47
|
-
*/
|
|
48
|
-
__publicField(this, "initTabLineAlignEnd", () => {
|
|
49
|
-
const { length } = this._nav.children;
|
|
50
|
-
let left = 0;
|
|
51
|
-
for (let i = 0; i < length; i++) {
|
|
52
|
-
const { width = 0 } = this._nav.children[i].getBoundingClientRect();
|
|
53
|
-
left += width;
|
|
54
|
-
}
|
|
55
|
-
this._line.style.setProperty("left", `calc(100% - ${left}px)`);
|
|
56
|
-
});
|
|
57
|
-
/**
|
|
58
|
-
* @description: 通过key值设置tabLine的位置
|
|
59
|
-
* @param {string} key
|
|
60
|
-
*/
|
|
61
|
-
__publicField(this, "setTabLine", (key) => {
|
|
62
|
-
if (key) {
|
|
63
|
-
const index2 = this.tabHeaderKeyMapIndex[key];
|
|
64
|
-
const TabHeader = this._nav.children[index2];
|
|
65
|
-
const { width = 0 } = TabHeader.getBoundingClientRect();
|
|
66
|
-
this._line.style.setProperty("width", `${width}px`);
|
|
67
|
-
let distance = 0;
|
|
68
|
-
for (let i = 0; i < index2; i++) {
|
|
69
|
-
const item = this._nav.children[i];
|
|
70
|
-
const { width: width2 = 0 } = item.getBoundingClientRect();
|
|
71
|
-
distance += width2;
|
|
72
|
-
}
|
|
73
|
-
this._line.style.setProperty("transform", `translateX(${distance}px)`);
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
/**
|
|
77
|
-
* @description: 通过传入的key值设置tabContent
|
|
78
|
-
*/
|
|
79
|
-
__publicField(this, "setTabContent", (key) => {
|
|
80
|
-
if (key) {
|
|
81
|
-
const index2 = this.tabHeaderKeyMapIndex[key];
|
|
82
|
-
this._wrap.style.setProperty("transform", `translateX(${index2 * -100}%)`);
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
/**
|
|
86
|
-
* @description: 根据点击设置 tabLine 的位置
|
|
87
|
-
* @param {Event} e
|
|
88
|
-
* @param {number} index
|
|
89
|
-
* @param {number} width
|
|
90
|
-
*/
|
|
91
|
-
__publicField(this, "clickTabHead", (e) => {
|
|
92
|
-
const tabHeader = e.target;
|
|
93
|
-
const key = tabHeader.getAttribute("r-key");
|
|
94
|
-
const disabled = isDisabled(tabHeader);
|
|
95
|
-
if (!disabled && key) {
|
|
96
|
-
this.setAttribute("active", key);
|
|
97
|
-
this.setTabLine(key);
|
|
98
|
-
this.setTabContent(key);
|
|
99
|
-
removeClassToElementChild(this._nav, "active");
|
|
100
|
-
addClassToElement(tabHeader, "active");
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
/**
|
|
104
|
-
* @description: tabPane 设置属性,需要在 tabs 上展示时触发
|
|
105
|
-
* @param {string} key
|
|
106
|
-
* @param {string} value
|
|
107
|
-
*/
|
|
108
|
-
__publicField(this, "updateAttribute", (key, attribute, value = "") => {
|
|
109
|
-
var _a, _b;
|
|
110
|
-
const index2 = this.tabHeaderKeyMapIndex[key];
|
|
111
|
-
if (key && value && this._nav.children[index2]) {
|
|
112
|
-
(_a = this._nav.children[index2]) == null ? void 0 : _a.setAttribute(attribute, value);
|
|
113
|
-
} else {
|
|
114
|
-
(_b = this._nav.children[index2]) == null ? void 0 : _b.removeAttribute(attribute);
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
/**
|
|
118
|
-
* @description: 初始化 tabs 的 active 属性和 tabLine,tabContent
|
|
119
|
-
*/
|
|
120
|
-
__publicField(this, "initActive", () => {
|
|
121
|
-
const tabHeaderList = [...this._nav.children];
|
|
122
|
-
const initTabList = tabHeaderList.filter((item) => !isDisabled(item));
|
|
123
|
-
let initTabHeader;
|
|
124
|
-
if (this.active != null) {
|
|
125
|
-
initTabHeader = initTabList.find((item) => item.getAttribute("r-key") === this.active);
|
|
126
|
-
initTabHeader == null ? void 0 : initTabHeader.setAttribute("r-key", this.active);
|
|
127
|
-
}
|
|
128
|
-
if (!initTabHeader) {
|
|
129
|
-
initTabHeader = initTabList.shift();
|
|
130
|
-
}
|
|
131
|
-
if (!initTabHeader) return;
|
|
132
|
-
const index2 = tabHeaderList.findIndex((item) => item === initTabHeader);
|
|
133
|
-
const key = (initTabHeader == null ? void 0 : initTabHeader.getAttribute("r-key")) || `${index2}`;
|
|
134
|
-
if (key != null) {
|
|
135
|
-
this.setAttribute("active", `${key}`);
|
|
136
|
-
addClassToElement(initTabHeader, "active");
|
|
137
|
-
this.setTabContent(key);
|
|
138
|
-
setTimeout(() => {
|
|
139
|
-
this.setTabLine(key);
|
|
140
|
-
}, 200);
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
/**
|
|
144
|
-
* @description: 监听 slot 组件的添加/删除/替换操作,进行 tabs 初始化
|
|
145
|
-
* @return {*}
|
|
146
|
-
*/
|
|
147
|
-
__publicField(this, "listenSlotChange", () => {
|
|
148
|
-
const slots = this._slot.assignedElements();
|
|
149
|
-
slots.forEach((item, index2) => {
|
|
150
|
-
const tabPane = this.createTabHeader(item, index2);
|
|
151
|
-
this._nav.appendChild(tabPane);
|
|
152
|
-
tabPane.addEventListener("click", this.clickTabHead);
|
|
153
|
-
});
|
|
154
|
-
this.initActive();
|
|
155
|
-
if (this.align) {
|
|
156
|
-
if (this.align === "center") this.initTabLineAlignCenter();
|
|
157
|
-
if (this.align === "end") this.initTabLineAlignEnd();
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
/**
|
|
161
|
-
* @description: 初始化 tab
|
|
162
|
-
*/
|
|
163
|
-
__publicField(this, "initTab", () => {
|
|
164
|
-
this._slot.addEventListener("slotchange", this.listenSlotChange);
|
|
165
|
-
});
|
|
166
|
-
/**
|
|
167
|
-
* @description: 卸载 tab
|
|
168
|
-
*/
|
|
169
|
-
__publicField(this, "unloadTab", () => {
|
|
170
|
-
this._slot.removeEventListener("slotchange", this.listenSlotChange);
|
|
171
|
-
});
|
|
172
|
-
this._container = document.createElement("div");
|
|
173
|
-
this._container.setAttribute("class", "ran-tab");
|
|
174
|
-
this._header = document.createElement("div");
|
|
175
|
-
this._header.setAttribute("class", "ran-tab-header");
|
|
176
|
-
this._nav = document.createElement("div");
|
|
177
|
-
this._nav.setAttribute("class", "ran-tab-header-nav");
|
|
178
|
-
this._line = document.createElement("div");
|
|
179
|
-
this._line.setAttribute("class", "ran-tab-header-line");
|
|
180
|
-
this._content = document.createElement("div");
|
|
181
|
-
this._content.setAttribute("class", "ran-tab-content");
|
|
182
|
-
this._wrap = document.createElement("div");
|
|
183
|
-
this._wrap.setAttribute("class", "ran-tab-content-wrap");
|
|
184
|
-
this._slot = document.createElement("slot");
|
|
185
|
-
this._wrap.appendChild(this._slot);
|
|
186
|
-
this._content.appendChild(this._wrap);
|
|
187
|
-
this._header.appendChild(createDocumentFragment([this._nav, this._line]));
|
|
188
|
-
this._container.appendChild(createDocumentFragment([this._header, this._content]));
|
|
189
|
-
this.tabHeaderKeyMapIndex = {};
|
|
190
|
-
const shadowRoot = this.attachShadow({ mode: "closed" });
|
|
191
|
-
const F7170EE498E0DD32CBDCB63FBA8F75CC = document.createElement("style");
|
|
192
|
-
F7170EE498E0DD32CBDCB63FBA8F75CC.textContent = f7170ee498e0dd32cbdcb63fba8f75cc;
|
|
193
|
-
shadowRoot.appendChild(F7170EE498E0DD32CBDCB63FBA8F75CC);
|
|
194
|
-
shadowRoot.appendChild(this._container);
|
|
195
|
-
}
|
|
196
|
-
static get observedAttributes() {
|
|
197
|
-
return ["active", "forceRender", "type", "align", "effect"];
|
|
198
|
-
}
|
|
199
|
-
get align() {
|
|
200
|
-
return this.getAttribute("align") || "start";
|
|
201
|
-
}
|
|
202
|
-
set align(value) {
|
|
203
|
-
this.setAttribute("align", value);
|
|
204
|
-
}
|
|
205
|
-
set type(value) {
|
|
206
|
-
this.setAttribute("type", value);
|
|
207
|
-
}
|
|
208
|
-
get type() {
|
|
209
|
-
return this.getAttribute("type") || "flat";
|
|
210
|
-
}
|
|
211
|
-
get active() {
|
|
212
|
-
return this.getAttribute("active");
|
|
213
|
-
}
|
|
214
|
-
set active(value) {
|
|
215
|
-
if (value) {
|
|
216
|
-
this.setAttribute("active", value);
|
|
217
|
-
this.setTabLine(value);
|
|
218
|
-
this.setTabContent(value);
|
|
219
|
-
} else {
|
|
220
|
-
this.removeAttribute("active");
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
get effect() {
|
|
224
|
-
return this.getAttribute("effect");
|
|
225
|
-
}
|
|
226
|
-
set effect(value) {
|
|
227
|
-
if (!value || value === "false") {
|
|
228
|
-
this.removeAttribute("effect");
|
|
229
|
-
} else {
|
|
230
|
-
this.setAttribute("effect", value);
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
/**
|
|
234
|
-
* @description: 根据传入的 tabPane 生成 tabs 的头部
|
|
235
|
-
* @param {Element} tabPane
|
|
236
|
-
* @param {number} index
|
|
237
|
-
* @return {Element}
|
|
238
|
-
*/
|
|
239
|
-
createTabHeader(tabPane, index2) {
|
|
240
|
-
const label = tabPane.getAttribute("label") || "";
|
|
241
|
-
const icon = tabPane.getAttribute("icon") || "";
|
|
242
|
-
const iconSize = tabPane.getAttribute("iconSize") || "";
|
|
243
|
-
const key = tabPane.getAttribute("r-key") || `${index2}`;
|
|
244
|
-
const type = tabPane.getAttribute("type") || "text";
|
|
245
|
-
this.initTabHeaderKeyMapIndex(key, index2);
|
|
246
|
-
const tabHeader = document.createElement("r-button");
|
|
247
|
-
tabHeader.setAttribute("class", "tab-header-nav-item");
|
|
248
|
-
tabHeader.setAttribute("type", type);
|
|
249
|
-
icon && tabHeader.setAttribute("icon", icon);
|
|
250
|
-
iconSize && tabHeader.setAttribute("iconSize", iconSize);
|
|
251
|
-
isDisabled(tabPane) && tabHeader.setAttribute("disabled", "");
|
|
252
|
-
tabHeader.setAttribute("r-key", key);
|
|
253
|
-
if (this.effect) {
|
|
254
|
-
tabPane.setAttribute("effect", this.effect);
|
|
255
|
-
this._line.style.setProperty("display", "none");
|
|
256
|
-
}
|
|
257
|
-
tabPane.setAttribute("r-key", key);
|
|
258
|
-
tabHeader.innerHTML = label;
|
|
259
|
-
return tabHeader;
|
|
260
|
-
}
|
|
261
|
-
connectedCallback() {
|
|
262
|
-
this.initTab();
|
|
263
|
-
}
|
|
264
|
-
disconnectCallback() {
|
|
265
|
-
this.unloadTab();
|
|
266
|
-
}
|
|
267
|
-
attributeChangedCallback(name, oldValue, newValue) {
|
|
268
|
-
if (oldValue !== newValue) {
|
|
269
|
-
this.dispatchEvent(
|
|
270
|
-
new CustomEvent("change", {
|
|
271
|
-
detail: {
|
|
272
|
-
active: this.active
|
|
273
|
-
}
|
|
274
|
-
})
|
|
275
|
-
);
|
|
276
|
-
if (name === "align") {
|
|
277
|
-
if (newValue === "center") this.initTabLineAlignCenter();
|
|
278
|
-
if (newValue === "end") this.initTabLineAlignEnd();
|
|
279
|
-
}
|
|
280
|
-
if (name === "effect") {
|
|
281
|
-
const tabHeaderList = [...this._nav.children];
|
|
282
|
-
tabHeaderList.forEach((item) => {
|
|
283
|
-
if (!this.effect || this.effect === "false") {
|
|
284
|
-
item.removeAttribute("effect");
|
|
285
|
-
} else {
|
|
286
|
-
item.setAttribute("effect", newValue);
|
|
287
|
-
}
|
|
288
|
-
});
|
|
289
|
-
}
|
|
290
|
-
if (name === "active") {
|
|
291
|
-
this.setAttribute(name, newValue);
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
customElements.define("r-tabs", Tabs);
|
|
297
|
-
return Tabs;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
const index = CustomElement();
|
|
301
|
-
const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
302
|
-
__proto__: null,
|
|
303
|
-
default: index
|
|
304
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
305
|
-
export {
|
|
306
|
-
index as a,
|
|
307
|
-
index$1 as i
|
|
308
|
-
};
|