ranui 0.1.10-alpha.7 → 0.2.0-alpha.0
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 +369 -0
- 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-DukaD6uL.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-Ch67dWa_.js +302 -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 +88 -0
- package/dist/components/dropdown/index.d.ts +32 -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 +25 -0
- package/dist/components/input/index.d.ts +229 -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 +39 -0
- package/dist/components/player/index.d.ts +277 -0
- package/dist/components/popover/content/index.d.ts +12 -0
- package/dist/components/popover/index.d.ts +95 -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 +135 -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-C5362qTy.js +82 -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-DmoEnao5.js +165 -0
- package/dist/icon.js +4 -4
- package/dist/{index-KS2nvVcO.js → image-6GayFDqX.js} +58 -71
- package/dist/image.js +3 -2
- package/dist/index.cjs +35 -0
- package/dist/index.d.ts +277 -116
- package/dist/index.iife.js +306 -0
- package/dist/index.js +78 -38
- package/dist/input-DoraIb3x.js +198 -0
- package/dist/input.js +2 -3
- package/dist/katex-es-Bpesphgp.js +23682 -0
- package/dist/katex-es-Cnq5Pk8K.cjs +261 -0
- package/dist/link-BW-gvrpN.js +77 -0
- package/dist/link.js +6 -0
- package/dist/loading-Mko22ncl.js +206 -0
- package/dist/loading.js +4 -6
- package/dist/math-B5PpSnFR.js +52 -0
- package/dist/math.js +2 -4
- package/dist/message-CQENvkoi.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-CvfmwWUa.js +13536 -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-BCvHwLZb.js +213 -0
- package/dist/popover.js +3 -5
- package/dist/progress-BWkNf2J5.js +123 -0
- package/dist/progress.js +3 -5
- package/dist/radar-CWsawt2g.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-BmhCUTLb.js +433 -0
- package/dist/select.js +3 -8
- package/dist/signal-XHfNsQNW.js +57 -0
- package/dist/skeleton-DPv9nFhL.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-C9swK-hm.js +185 -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 +9 -9
- package/dist/typings.d.ts +163 -116
- 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 +326 -0
- package/docs/DESIGN.md +182 -0
- package/docs/style-tokens-public.md +880 -0
- package/package.json +138 -74
- package/typings.d.ts +163 -116
- package/dist/_commonjs-dynamic-modules-DLbDWi6a.js +0 -12
- package/dist/add-user-BN1JlY7e.js +0 -4
- package/dist/arrow-down-Beig7FXI.js +0 -652
- 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-BZR0HaP2.js +0 -40
- package/dist/index-Bl6-5Hp8.js +0 -63701
- package/dist/index-C0Xh8vJ3.js +0 -146
- package/dist/index-C4Sv0T51.js +0 -495
- package/dist/index-CGEx9VOA.js +0 -17106
- package/dist/index-CILRcFIV.js +0 -100
- package/dist/index-CQTJoWhb.js +0 -19
- package/dist/index-CWNtaUwu.js +0 -308
- package/dist/index-CjSKJE6S.js +0 -158
- package/dist/index-Ck9TOxFh.js +0 -279
- package/dist/index-CryFK9u4.js +0 -320
- package/dist/index-D4twPONc.js +0 -187
- package/dist/index-D83djTVa.js +0 -659
- package/dist/index-DAxs7Dd2.js +0 -119
- package/dist/index-DBecKjmY.js +0 -279
- package/dist/index-DC5EA657.js +0 -91
- package/dist/index-DHTzB_6b.js +0 -9575
- package/dist/index-DL-1C2RQ.js +0 -496
- package/dist/index-DN-kAx-A.js +0 -72
- package/dist/index-TlwIh-o2.js +0 -306
- package/dist/index-WfFw4LJT.js +0 -490
- package/dist/index-lLO-8KJ1.js +0 -204
- package/dist/index-oD-_YELB.js +0 -511
- package/dist/index-qvcQTV5_.js +0 -105
- 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 -176
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { EventManager } from '@/utils/builder';
|
|
2
|
+
import { RanElement } from '@/utils/index';
|
|
3
|
+
export declare class Section extends RanElement {
|
|
4
|
+
_shadowDom: ShadowRoot;
|
|
5
|
+
_headerEl: HTMLDivElement;
|
|
6
|
+
_headingEl: HTMLDivElement;
|
|
7
|
+
_subtitleEl: HTMLDivElement;
|
|
8
|
+
_events: EventManager;
|
|
9
|
+
static get observedAttributes(): string[];
|
|
10
|
+
constructor();
|
|
11
|
+
get heading(): string;
|
|
12
|
+
set heading(value: string);
|
|
13
|
+
get subtitle(): string;
|
|
14
|
+
set subtitle(value: string);
|
|
15
|
+
get sheet(): string;
|
|
16
|
+
set sheet(value: string);
|
|
17
|
+
private _syncHeading;
|
|
18
|
+
private _syncSubtitle;
|
|
19
|
+
connectedCallback(): void;
|
|
20
|
+
disconnectedCallback(): void;
|
|
21
|
+
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
22
|
+
}
|
|
23
|
+
export default Section;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { RanElement } from '@/utils/index';
|
|
2
|
+
export declare class DropdownItem extends RanElement {
|
|
3
|
+
ionDropdownItem: HTMLElement;
|
|
4
|
+
_slot: HTMLSlotElement;
|
|
5
|
+
_shadowDom: ShadowRoot;
|
|
6
|
+
ionDropdownItemContent: HTMLElement;
|
|
7
|
+
static get observedAttributes(): string[];
|
|
8
|
+
constructor();
|
|
9
|
+
get value(): string;
|
|
10
|
+
set value(value: string);
|
|
11
|
+
get active(): string;
|
|
12
|
+
set active(value: string);
|
|
13
|
+
get title(): string;
|
|
14
|
+
set title(value: string);
|
|
15
|
+
get sheet(): string;
|
|
16
|
+
set sheet(value: string);
|
|
17
|
+
handlerExternalCss: () => void;
|
|
18
|
+
connectedCallback(): void;
|
|
19
|
+
attributeChangedCallback(name: string, _: string, newValue: string): void;
|
|
20
|
+
}
|
|
21
|
+
export default DropdownItem;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { RanElement } from '@/utils/index';
|
|
2
|
+
import '@/components/select/option';
|
|
3
|
+
import '@/components/dropdown';
|
|
4
|
+
import '@/components/select/dropdown-item';
|
|
5
|
+
import '@/components/input';
|
|
6
|
+
import type { Input } from '@/components/input';
|
|
7
|
+
import { EventManager } from '@/utils/builder';
|
|
8
|
+
interface Option {
|
|
9
|
+
label: string | number;
|
|
10
|
+
value: string | number;
|
|
11
|
+
}
|
|
12
|
+
export declare class Select extends RanElement {
|
|
13
|
+
static formAssociated: boolean;
|
|
14
|
+
_internals?: ElementInternals;
|
|
15
|
+
_events: EventManager;
|
|
16
|
+
removeTimeId?: NodeJS.Timeout;
|
|
17
|
+
_listboxId: string;
|
|
18
|
+
_activeIndex: number;
|
|
19
|
+
_slot: HTMLSlotElement;
|
|
20
|
+
_shadowDom: ShadowRoot;
|
|
21
|
+
_select: HTMLDivElement;
|
|
22
|
+
_selection: HTMLDivElement;
|
|
23
|
+
_search: Input;
|
|
24
|
+
_icon: HTMLElement;
|
|
25
|
+
_selectDropdown?: HTMLDivElement;
|
|
26
|
+
_selectionDropdown?: HTMLElement;
|
|
27
|
+
_selectDropDownInTimeId?: NodeJS.Timeout;
|
|
28
|
+
_selectDropDownOutTimeId?: NodeJS.Timeout;
|
|
29
|
+
_optionList: Option[];
|
|
30
|
+
_optionLabelMapValue: Map<string, string>;
|
|
31
|
+
_optionValueMapLabel: Map<string, string>;
|
|
32
|
+
_activeOption?: HTMLElement;
|
|
33
|
+
_text: HTMLSpanElement;
|
|
34
|
+
_selector: HTMLDivElement;
|
|
35
|
+
onSearch?: (this: HTMLElement, ev: Event) => unknown;
|
|
36
|
+
static get observedAttributes(): string[];
|
|
37
|
+
constructor();
|
|
38
|
+
get value(): string;
|
|
39
|
+
set value(value: string);
|
|
40
|
+
syncFormValue: () => void;
|
|
41
|
+
get defaultValue(): string;
|
|
42
|
+
set defaultValue(value: string);
|
|
43
|
+
get showSearch(): string;
|
|
44
|
+
set showSearch(value: string);
|
|
45
|
+
get type(): string;
|
|
46
|
+
set type(value: string);
|
|
47
|
+
get placement(): string;
|
|
48
|
+
set placement(value: string);
|
|
49
|
+
get sheet(): string;
|
|
50
|
+
set sheet(value: string);
|
|
51
|
+
get getPopupContainerId(): string;
|
|
52
|
+
set getPopupContainerId(value: string);
|
|
53
|
+
get dropdownclass(): string;
|
|
54
|
+
set dropdownclass(value: string);
|
|
55
|
+
get trigger(): string;
|
|
56
|
+
set trigger(value: string);
|
|
57
|
+
get disabled(): boolean;
|
|
58
|
+
set disabled(value: boolean | string | undefined | null);
|
|
59
|
+
initAria: () => void;
|
|
60
|
+
updateAriaExpanded: (isExpanded: boolean) => void;
|
|
61
|
+
getDropdownOptions: () => HTMLElement[];
|
|
62
|
+
syncActiveState: () => void;
|
|
63
|
+
setActiveOptionByIndex: (targetIndex: number) => void;
|
|
64
|
+
selectOptionElement: (optionElement: HTMLElement | null, shouldDispatch?: boolean) => void;
|
|
65
|
+
isDropdownOpen: () => boolean;
|
|
66
|
+
keydownSelect: (e: KeyboardEvent) => void;
|
|
67
|
+
handlerExternalCss(): void;
|
|
68
|
+
/**
|
|
69
|
+
* @description: 移除 select dropdown
|
|
70
|
+
* @return {*}
|
|
71
|
+
*/
|
|
72
|
+
setSelectDropdownDisplayNone: () => void;
|
|
73
|
+
/**
|
|
74
|
+
* @description: 添加 select dropdown
|
|
75
|
+
* @return {*}
|
|
76
|
+
*/
|
|
77
|
+
setSelectDropdownDisplayBlock: () => void;
|
|
78
|
+
placementPosition: () => void;
|
|
79
|
+
/**
|
|
80
|
+
* The dropdown is mounted on document.body and positioned once on open, so it
|
|
81
|
+
* detaches from the trigger when the page (or any scroll container) scrolls —
|
|
82
|
+
* e.g. a select inside a sticky header. Re-run placement on scroll/resize
|
|
83
|
+
* while it is open. Capture-phase scroll catches nested scroll containers too.
|
|
84
|
+
*/
|
|
85
|
+
_repositionBound: boolean;
|
|
86
|
+
_repositionDropdown: () => void;
|
|
87
|
+
_attachReposition: () => void;
|
|
88
|
+
_detachReposition: () => void;
|
|
89
|
+
/**
|
|
90
|
+
* @description: 设置下拉框
|
|
91
|
+
* @return {*}
|
|
92
|
+
*/
|
|
93
|
+
selectMouseDown: (e: Event) => void;
|
|
94
|
+
removeDropDownTimeId: (e: Event) => void;
|
|
95
|
+
/**
|
|
96
|
+
* @description: 焦点移除的情况,需要移除 select 下拉框
|
|
97
|
+
* @return {*}
|
|
98
|
+
*/
|
|
99
|
+
selectBlur: (e: Event) => void;
|
|
100
|
+
/**
|
|
101
|
+
* @description: 选中一个选项的情况
|
|
102
|
+
* @param {MouseEvent} e
|
|
103
|
+
* @return {*}
|
|
104
|
+
*/
|
|
105
|
+
clickOption: (e: MouseEvent) => void;
|
|
106
|
+
/**
|
|
107
|
+
* @description: 初始化创建选项下拉框
|
|
108
|
+
* @return {*}
|
|
109
|
+
*/
|
|
110
|
+
createOption: () => void;
|
|
111
|
+
/**
|
|
112
|
+
* @description: 移除选项下拉框
|
|
113
|
+
* @return {*}
|
|
114
|
+
*/
|
|
115
|
+
removeSelectDropdown: () => void;
|
|
116
|
+
/**
|
|
117
|
+
* @description: 当 select 中有 option 元素的时候,给 dropdown 添加元素
|
|
118
|
+
* @return {*}
|
|
119
|
+
*/
|
|
120
|
+
addOptionToSlot: () => void;
|
|
121
|
+
createSelectDropdownContent: (options?: Option[]) => void;
|
|
122
|
+
setDefaultValue: () => void;
|
|
123
|
+
changeSearch: (e: Event) => void;
|
|
124
|
+
clickRemoveSelect: (e: Event) => void;
|
|
125
|
+
connectedCallback(): void;
|
|
126
|
+
disconnectedCallback(): void;
|
|
127
|
+
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
128
|
+
/**
|
|
129
|
+
* Reflect a programmatic `value` change to the closed-state label. Lets
|
|
130
|
+
* `select.value = 'x'` (or setAttribute('value', 'x')) update the displayed
|
|
131
|
+
* selection without the consumer having to "nudge" the active option.
|
|
132
|
+
*/
|
|
133
|
+
syncSelectedFromValue: (value: string) => void;
|
|
134
|
+
}
|
|
135
|
+
export default Select;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { RanElement } from '@/utils/index';
|
|
2
|
+
export declare class Option extends RanElement {
|
|
3
|
+
_option: HTMLDivElement;
|
|
4
|
+
_optionContent: HTMLDivElement;
|
|
5
|
+
_shadowDom: ShadowRoot;
|
|
6
|
+
_slot: HTMLSlotElement;
|
|
7
|
+
static get observedAttributes(): string[];
|
|
8
|
+
constructor();
|
|
9
|
+
get value(): string | null;
|
|
10
|
+
set value(value: string | null);
|
|
11
|
+
get sheet(): string | null;
|
|
12
|
+
set sheet(value: string | null);
|
|
13
|
+
get disabled(): boolean | string | undefined | null;
|
|
14
|
+
set disabled(value: boolean | string | undefined | null);
|
|
15
|
+
handlerExternalCss(): void;
|
|
16
|
+
connectedCallback(): void;
|
|
17
|
+
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
18
|
+
}
|
|
19
|
+
export default Option;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RanElement } from '@/utils/index';
|
|
2
|
+
export declare class Skeleton extends RanElement {
|
|
3
|
+
_div: HTMLElement;
|
|
4
|
+
_shadowDom: ShadowRoot;
|
|
5
|
+
static get observedAttributes(): string[];
|
|
6
|
+
constructor();
|
|
7
|
+
get sheet(): string;
|
|
8
|
+
set sheet(value: string);
|
|
9
|
+
handlerExternalCss: () => void;
|
|
10
|
+
connectedCallback(): void;
|
|
11
|
+
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
12
|
+
}
|
|
13
|
+
export default Skeleton;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { RanElement } from '@/utils/index';
|
|
2
|
+
import { EventManager } from '@/utils/builder';
|
|
3
|
+
export declare class Tabs extends RanElement {
|
|
4
|
+
static get observedAttributes(): string[];
|
|
5
|
+
_events: EventManager;
|
|
6
|
+
_container: HTMLDivElement;
|
|
7
|
+
_header: HTMLDivElement;
|
|
8
|
+
_nav: HTMLDivElement;
|
|
9
|
+
_line: HTMLDivElement;
|
|
10
|
+
_content: HTMLDivElement;
|
|
11
|
+
_wrap: HTMLDivElement;
|
|
12
|
+
_slot: HTMLSlotElement;
|
|
13
|
+
_shadowDom: ShadowRoot;
|
|
14
|
+
_tabsId: number;
|
|
15
|
+
tabHeaderKeyMapIndex: Record<string, number>;
|
|
16
|
+
constructor();
|
|
17
|
+
get align(): string;
|
|
18
|
+
set align(value: string);
|
|
19
|
+
get type(): string;
|
|
20
|
+
set type(value: string);
|
|
21
|
+
get active(): string | null;
|
|
22
|
+
set active(value: string | null);
|
|
23
|
+
get effect(): string | null;
|
|
24
|
+
set effect(value: string | null);
|
|
25
|
+
get sheet(): string;
|
|
26
|
+
set sheet(value: string);
|
|
27
|
+
handlerExternalCss: () => void;
|
|
28
|
+
initTabHeaderKeyMapIndex: (key: string, index: number) => void;
|
|
29
|
+
createTabHeader(tabPane: Element, index: number): HTMLElement;
|
|
30
|
+
initTabLineAlignCenter: () => void;
|
|
31
|
+
initTabLineAlignEnd: () => void;
|
|
32
|
+
setTabLine: (key: string) => void;
|
|
33
|
+
setTabContent: (key: string) => void;
|
|
34
|
+
clickTabHead: (e: Event) => void;
|
|
35
|
+
/** Select a tab by key: move the indicator, slide content, update classes + ARIA. */
|
|
36
|
+
activateKey: (key: string) => void;
|
|
37
|
+
/** The header's focusable/semantic element — the r-button's inner `_btn`. */
|
|
38
|
+
tabFocusable: (header: Element) => HTMLElement;
|
|
39
|
+
tabIdFor: (key: string) => string;
|
|
40
|
+
panelIdFor: (key: string) => string;
|
|
41
|
+
/**
|
|
42
|
+
* Wire the WAI-ARIA tabs relationships: each header becomes role="tab" (on the
|
|
43
|
+
* button's inner focusable element, so it isn't a nested role="button"), with
|
|
44
|
+
* aria-selected + a roving tabindex (only the active tab is tabbable); each pane
|
|
45
|
+
* becomes role="tabpanel" labelled by its tab. Called on slot changes and every
|
|
46
|
+
* selection change.
|
|
47
|
+
*/
|
|
48
|
+
syncTabsAria: () => void;
|
|
49
|
+
/** Roving arrow-key navigation over the tablist, with automatic activation. */
|
|
50
|
+
onNavKeydown: (e: KeyboardEvent) => void;
|
|
51
|
+
updateAttribute: (key: string, attribute: string, value?: string | null) => void;
|
|
52
|
+
initActive: () => void;
|
|
53
|
+
listenSlotChange: () => void;
|
|
54
|
+
connectedCallback(): void;
|
|
55
|
+
disconnectedCallback(): void;
|
|
56
|
+
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
57
|
+
}
|
|
58
|
+
export default Tabs;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { EventManager } from '@/utils/builder';
|
|
2
|
+
import { RanElement } from '@/utils/index';
|
|
3
|
+
interface ExtendParentNode {
|
|
4
|
+
updateAttribute: (key: string, attribute: string, value?: string | null) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare class TabPane extends RanElement {
|
|
7
|
+
static get observedAttributes(): string[];
|
|
8
|
+
_events: EventManager;
|
|
9
|
+
_div: HTMLElement;
|
|
10
|
+
parent: (ParentNode & ExtendParentNode) | undefined | null;
|
|
11
|
+
_shadowDom: ShadowRoot;
|
|
12
|
+
constructor();
|
|
13
|
+
get label(): string;
|
|
14
|
+
set label(value: string);
|
|
15
|
+
get icon(): string | null;
|
|
16
|
+
set icon(value: string | null);
|
|
17
|
+
get iconSize(): string | null;
|
|
18
|
+
set iconSize(value: string | null);
|
|
19
|
+
get key(): string | null;
|
|
20
|
+
set key(value: string | null);
|
|
21
|
+
get disabled(): string | null;
|
|
22
|
+
set disabled(value: string | null);
|
|
23
|
+
get effect(): string | null;
|
|
24
|
+
set effect(value: string | null);
|
|
25
|
+
get sheet(): string | null;
|
|
26
|
+
set sheet(value: string | null);
|
|
27
|
+
handlerExternalCss: () => void;
|
|
28
|
+
initAttribute: () => void;
|
|
29
|
+
connectedCallback(): void;
|
|
30
|
+
disconnectedCallback(): void;
|
|
31
|
+
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
32
|
+
}
|
|
33
|
+
export default TabPane;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { c as w, d as p, l as o, m as i, s as h, u as a, v as d } from "./utils-D4pPF77E.js";
|
|
2
|
+
import { i as n, p as l } from "./factory-BdsO0dEW.js";
|
|
3
|
+
import { a as c, n as f } from "./ssr-DSGwPtEd.js";
|
|
4
|
+
var m = '.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-up-in{0%{transform:scaleY(.8);transform-origin:100% 100%;opacity:0}to{transform:scaleY(1);transform-origin:100% 100%;opacity:1}}@keyframes ranui-dropdown-up-out{0%{transform:scaleY(1);transform-origin:100% 100%;opacity:1}to{transform:scaleY(.8);transform-origin:100% 100%;opacity:0}}@keyframes ranui-dropdown-down-in{0%{transform:scaleY(.8);transform-origin:0% 0%;opacity:0}to{transform:scaleY(1);transform-origin:0% 0%;opacity:1}}@keyframes ranui-dropdown-down-out{0%{transform:scaleY(1);transform-origin:0% 0%;opacity:1}to{transform:scaleY(.8);transform-origin:0% 0%;opacity:0}}@keyframes ranui-dropdown-left-in{0%{transform:scaleX(.8);transform-origin:100% 0%;opacity:0}to{transform:scaleX(1);transform-origin:100% 0%;opacity:1}}@keyframes ranui-dropdown-left-out{0%{transform:scaleX(1);transform-origin:100% 0%;opacity:1}to{transform:scaleX(.8);transform-origin:100% 0%;opacity:0}}@keyframes ranui-dropdown-right-in{0%{transform:scaleX(.8);transform-origin:0% 0%;opacity:0}to{transform:scaleX(1);transform-origin:0% 0%;opacity:1}}@keyframes ranui-dropdown-right-out{0%{transform:scaleX(1);transform-origin:0% 0%;opacity:1}to{transform:scaleX(.8);transform-origin:0% 0%;opacity:0}}.ran-dropdown-down-in{animation:ranui-dropdown-down-in .1s;animation-fill-mode:forwards}.ran-dropdown-down-out{animation:ranui-dropdown-down-out .1s;animation-fill-mode:forwards}.ran-dropdown-up-in{animation:ranui-dropdown-up-in .1s;animation-fill-mode:forwards}.ran-dropdown-up-out{animation:ranui-dropdown-up-out .1s;animation-fill-mode:forwards}.ran-dropdown-left-in{animation:ranui-dropdown-left-in .1s;animation-fill-mode:forwards}.ran-dropdown-left-out{animation:ranui-dropdown-left-out .1s;animation-fill-mode:forwards}.ran-dropdown-right-in{animation:ranui-dropdown-right-in .1s;animation-fill-mode:forwards}.ran-dropdown-right-out{animation:ranui-dropdown-right-out .1s;animation-fill-mode:forwards}:host{text-align:var(--ran-dropdown-host-text-align, left);z-index:var(--ran-dropdown-host-z-index, var(--ran-z-dropdown, 1100))}.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, 0);color:var(--ran-dropdown-color, var(--ran-color-text, 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, var(--ran-skin-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, var(--ran-color-bg-elevated, #ffffff));border-radius:var(--ran-dropdown-border-radius, var(--ran-radius-md, 12px));outline:var(--ran-dropdown-outline, none);box-shadow:var(--ran-dropdown-box-shadow, var(--ran-shadow-menu, var(--ran-shadow-elevated, 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, auto);width:var(--ran-dropdown-width, 100%);height:var(--ran-dropdown-height, 100%);min-height:var(--ran-dropdown-min-height, 100%);min-width:var(--ran-dropdown-min-width, 100%)}.ranui-dropdown-container{position:var(--ran-dropdown-container-position, relative);display:var(--ran-dropdown-container-display, block);width:var(--ran-dropdown-container-width, 100%);height:var(--ran-dropdown-container-height, 100%);box-sizing:var(--ran-dropdown-container-box-sizing, border-box)}.ranui-dropdown-container .top{transform:translate(calc(var(--ran-dropdown-arrow-anchor-width, var(--ran-dropdown-min-width, 100%)) / 2 - calc(var(--ran-dropdown-arrow-width, 16px) / 2))) translateY(calc(-1 * var(--ran-dropdown-arrow-height, var(--ran-dropdown-arrow-width, 16px)) + var(--ran-dropdown-arrow-overlap, 2px))) rotate(0);top:0}.ranui-dropdown-container .bottom{transform:translate(calc(var(--ran-dropdown-arrow-anchor-width, var(--ran-dropdown-min-width, 100%)) / 2 - calc(var(--ran-dropdown-arrow-width, 16px) / 2))) translateY(var(--ran-dropdown-arrow-overlap, 2px)) rotate(180deg);top:max(0px,calc(var(--ran-dropdown-min-height, 100%) - calc(var(--ran-dropdown-arrow-width, 16px) / 4)))}.ranui-dropdown-container .left{transform:translate(calc(0px - var(--ran-dropdown-arrow-width, 16px))) translateY(calc(var(--ran-dropdown-arrow-width, 16px) / 2 + var(--ran-dropdown-arrow-overlap, 2px))) rotate(270deg);top:max(0px,calc(var(--ran-dropdown-arrow-anchor-height, var(--ran-dropdown-min-height, 100%)) / 2 - var(--ran-dropdown-arrow-width, 16px)))}.ranui-dropdown-container .right{left:100%;transform:translate(0) translateY(calc(var(--ran-dropdown-arrow-anchor-height, var(--ran-dropdown-min-height, 100%)) / 2 - calc(var(--ran-dropdown-arrow-width, 16px) / 2) + var(--ran-dropdown-arrow-overlap, 2px))) rotate(90deg);top:0}.ranui-dropdown-arrow{position:var(--ran-dropdown-arrow-position, absolute);box-sizing:var(--ran-dropdown-arrow-box-sizing, border-box);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, var(--ran-dropdown-arrow-width, 16px));height:var(--ran-dropdown-arrow-height, var(--ran-dropdown-arrow-width, 16px));overflow:var(--ran-dropdown-arrow-overflow, hidden)}.ranui-dropdown-arrow:before{background:var(--ran-dropdown-arrow-before-background, var(--ran-color-bg-elevated, #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, var(--ran-dropdown-arrow-width, 16px));height:var(--ran-dropdown-arrow-before-height, calc(var(--ran-dropdown-arrow-width, 16px) / 2));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, var(--ran-color-bg-elevated, #fff))}', e = 300, x = /* @__PURE__ */ (function(r) {
|
|
5
|
+
return r.TOP = "top", r.BOTTOM = "bottom", r.LEFT = "left", r.RIGHT = "right", r;
|
|
6
|
+
})({}), v = class extends f {
|
|
7
|
+
dropdown;
|
|
8
|
+
_slot;
|
|
9
|
+
_shadowDom;
|
|
10
|
+
arrowIcon;
|
|
11
|
+
container;
|
|
12
|
+
static get observedAttributes() {
|
|
13
|
+
return [
|
|
14
|
+
"transit",
|
|
15
|
+
"arrow",
|
|
16
|
+
"sheet"
|
|
17
|
+
];
|
|
18
|
+
}
|
|
19
|
+
constructor() {
|
|
20
|
+
super(), this._shadowDom = w(this, m);
|
|
21
|
+
const r = h(this._shadowDom, ".ranui-dropdown-container", () => n().class("ranui-dropdown-container").children(n().style("-webkit-tap-highlight-color", "transparent").style("outline", "0").class("ranui-dropdown").part("dropdown").children(l().class("slot"))).build());
|
|
22
|
+
this.container = r, this.dropdown = r.querySelector(".ranui-dropdown"), this._slot = r.querySelector(".slot");
|
|
23
|
+
}
|
|
24
|
+
get transit() {
|
|
25
|
+
return o(this, "transit");
|
|
26
|
+
}
|
|
27
|
+
set transit(r) {
|
|
28
|
+
a(this, "transit", r, { removeEmpty: !0 });
|
|
29
|
+
}
|
|
30
|
+
get arrow() {
|
|
31
|
+
return o(this, "arrow");
|
|
32
|
+
}
|
|
33
|
+
set arrow(r) {
|
|
34
|
+
a(this, "arrow", r, { removeEmpty: !0 });
|
|
35
|
+
}
|
|
36
|
+
get show() {
|
|
37
|
+
return o(this, "show");
|
|
38
|
+
}
|
|
39
|
+
set show(r) {
|
|
40
|
+
a(this, "show", r, { removeEmpty: !0 });
|
|
41
|
+
}
|
|
42
|
+
get sheet() {
|
|
43
|
+
return o(this, "sheet");
|
|
44
|
+
}
|
|
45
|
+
set sheet(r) {
|
|
46
|
+
a(this, "sheet", r);
|
|
47
|
+
}
|
|
48
|
+
handlerExternalCss = () => {
|
|
49
|
+
p(this, this._shadowDom, "sheet", null, this.sheet);
|
|
50
|
+
};
|
|
51
|
+
handlerTransit = () => {
|
|
52
|
+
this.transit && this.dropdown && (i(this.dropdown, this.transit), setTimeout(() => {
|
|
53
|
+
d(this.dropdown, this.transit);
|
|
54
|
+
}, e));
|
|
55
|
+
};
|
|
56
|
+
handlerArrow = () => {
|
|
57
|
+
const r = (this.arrow || "").trim();
|
|
58
|
+
if (!r) {
|
|
59
|
+
this.arrowIcon && this.container.contains(this.arrowIcon) && this.container.removeChild(this.arrowIcon), this.arrowIcon = void 0;
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
!this.arrowIcon && this.container && (this.arrowIcon = n().class("ranui-dropdown-arrow").build(), this.container.appendChild(this.arrowIcon)), this.arrowIcon && (this.arrowIcon.className = `ranui-dropdown-arrow ${r}`);
|
|
63
|
+
};
|
|
64
|
+
stopPropagation = (r) => {
|
|
65
|
+
r.stopPropagation();
|
|
66
|
+
};
|
|
67
|
+
connectedCallback() {
|
|
68
|
+
this.handlerExternalCss(), this.handlerTransit(), this.handlerArrow();
|
|
69
|
+
}
|
|
70
|
+
disconnectedCallback() {
|
|
71
|
+
}
|
|
72
|
+
attributeChangedCallback(r, s, t) {
|
|
73
|
+
r === "transit" && t && (i(this.dropdown, this.transit), setTimeout(() => {
|
|
74
|
+
d(this.dropdown, this.transit);
|
|
75
|
+
}, e)), r === "arrow" && this.handlerArrow(), r === "sheet" && s !== t && this.handlerExternalCss();
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
c("r-dropdown", v);
|
|
79
|
+
export {
|
|
80
|
+
v as n,
|
|
81
|
+
x as t
|
|
82
|
+
};
|
package/dist/dropdown.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var o = class {
|
|
2
|
+
ac;
|
|
3
|
+
constructor() {
|
|
4
|
+
this.ac = new AbortController();
|
|
5
|
+
}
|
|
6
|
+
get signal() {
|
|
7
|
+
return this.ac.signal;
|
|
8
|
+
}
|
|
9
|
+
on(t, a, s, n) {
|
|
10
|
+
return t.addEventListener(a, s, {
|
|
11
|
+
...n,
|
|
12
|
+
signal: this.ac.signal
|
|
13
|
+
}), this;
|
|
14
|
+
}
|
|
15
|
+
delegate(t, a, s, n, i) {
|
|
16
|
+
return t.addEventListener(s, (e) => {
|
|
17
|
+
const r = e.target?.closest(a);
|
|
18
|
+
r && t.contains(r) && n(e, r);
|
|
19
|
+
}, {
|
|
20
|
+
...i,
|
|
21
|
+
signal: this.ac.signal
|
|
22
|
+
}), this;
|
|
23
|
+
}
|
|
24
|
+
abort() {
|
|
25
|
+
this.ac.abort(), this.ac = new AbortController();
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
o as t
|
|
30
|
+
};
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { c as l, n as d } from "./mocks-CMGoftIc.js";
|
|
2
|
+
var p = () => ({ current: null }), o = class h {
|
|
3
|
+
el;
|
|
4
|
+
constructor(t) {
|
|
5
|
+
this.el = l ? new d(t) : document.createElement(t);
|
|
6
|
+
}
|
|
7
|
+
id(t) {
|
|
8
|
+
return this.el.setAttribute("id", t), this;
|
|
9
|
+
}
|
|
10
|
+
class(t) {
|
|
11
|
+
return l ? this.el.attributes.set("class", t) : this.el.className = t, this;
|
|
12
|
+
}
|
|
13
|
+
addClass(...t) {
|
|
14
|
+
return t.forEach((e) => this.el.classList.add(e)), this;
|
|
15
|
+
}
|
|
16
|
+
removeClass(...t) {
|
|
17
|
+
return t.forEach((e) => this.el.classList.remove(e)), this;
|
|
18
|
+
}
|
|
19
|
+
attr(t, e) {
|
|
20
|
+
return this.el.setAttribute(t, e), this;
|
|
21
|
+
}
|
|
22
|
+
attrs(t) {
|
|
23
|
+
return Object.entries(t).forEach(([e, r]) => {
|
|
24
|
+
r != null && this.el.setAttribute(e, String(r));
|
|
25
|
+
}), this;
|
|
26
|
+
}
|
|
27
|
+
boolAttr(t, e, r = "") {
|
|
28
|
+
return e ? this.el.setAttribute(t, r) : this.el.removeAttribute(t), this;
|
|
29
|
+
}
|
|
30
|
+
part(t) {
|
|
31
|
+
return this.el.setAttribute("part", t), this;
|
|
32
|
+
}
|
|
33
|
+
data(t, e) {
|
|
34
|
+
return this.attr(`data-${t}`, e);
|
|
35
|
+
}
|
|
36
|
+
style(t, e) {
|
|
37
|
+
return typeof t == "string" ? this.el.style.setProperty(t, e ?? "") : Object.entries(t).forEach(([r, a]) => this.el.style.setProperty(r, a)), this;
|
|
38
|
+
}
|
|
39
|
+
cssVar(t, e) {
|
|
40
|
+
const r = t.startsWith("--") ? t : `--${t}`;
|
|
41
|
+
return this.style(r, e);
|
|
42
|
+
}
|
|
43
|
+
aria(t, e) {
|
|
44
|
+
return this.attr(`aria-${t}`, e);
|
|
45
|
+
}
|
|
46
|
+
role(t) {
|
|
47
|
+
return this.attr("role", t);
|
|
48
|
+
}
|
|
49
|
+
tabIndex(t) {
|
|
50
|
+
return this.attr("tabindex", String(t));
|
|
51
|
+
}
|
|
52
|
+
label(t) {
|
|
53
|
+
return this.aria("label", t);
|
|
54
|
+
}
|
|
55
|
+
labelledBy(t) {
|
|
56
|
+
return this.aria("labelledby", t);
|
|
57
|
+
}
|
|
58
|
+
describedBy(t) {
|
|
59
|
+
return this.aria("describedby", t);
|
|
60
|
+
}
|
|
61
|
+
ariaHidden(t = !0) {
|
|
62
|
+
return this.aria("hidden", String(t));
|
|
63
|
+
}
|
|
64
|
+
on(t, e, r) {
|
|
65
|
+
return this.el.addEventListener(t, e, r), this;
|
|
66
|
+
}
|
|
67
|
+
listen(t, e, r, a) {
|
|
68
|
+
return t.on(this.el, e, r, a), this;
|
|
69
|
+
}
|
|
70
|
+
delegate(t, e, r, a, n) {
|
|
71
|
+
return t.delegate(this.el, e, r, a, n), this;
|
|
72
|
+
}
|
|
73
|
+
children(...t) {
|
|
74
|
+
const e = (r) => r.reduce((a, n) => Array.isArray(n) ? a.concat(e(n)) : a.concat(n), []);
|
|
75
|
+
return e(t).forEach((r) => {
|
|
76
|
+
r != null && (r instanceof h ? this.el.appendChild(r.build()) : typeof r == "string" ? l ? this.el.appendChild(r) : this.el.appendChild(document.createTextNode(r)) : this.el.appendChild(r));
|
|
77
|
+
}), this;
|
|
78
|
+
}
|
|
79
|
+
replaceChildren(...t) {
|
|
80
|
+
if (l) {
|
|
81
|
+
const e = this.el;
|
|
82
|
+
e.childrenList = [];
|
|
83
|
+
} else this.el.replaceChildren();
|
|
84
|
+
return this.children(...t);
|
|
85
|
+
}
|
|
86
|
+
text(t) {
|
|
87
|
+
return this.el.textContent = t, this;
|
|
88
|
+
}
|
|
89
|
+
ref(t) {
|
|
90
|
+
return t.current = this.el, this;
|
|
91
|
+
}
|
|
92
|
+
shadow(t = { mode: "closed" }) {
|
|
93
|
+
const e = this.el.attachShadow(t);
|
|
94
|
+
return new u(this.el, e, t);
|
|
95
|
+
}
|
|
96
|
+
build() {
|
|
97
|
+
return this.el;
|
|
98
|
+
}
|
|
99
|
+
serialize() {
|
|
100
|
+
if (l) return this.el.serialize();
|
|
101
|
+
const t = document.createElement("div");
|
|
102
|
+
return t.appendChild(this.el.cloneNode(!0)), t.innerHTML;
|
|
103
|
+
}
|
|
104
|
+
}, u = class {
|
|
105
|
+
root;
|
|
106
|
+
hostEl;
|
|
107
|
+
options;
|
|
108
|
+
constructor(i, t, e) {
|
|
109
|
+
this.hostEl = i, this.root = t, this.options = e;
|
|
110
|
+
}
|
|
111
|
+
children(...i) {
|
|
112
|
+
const t = (e) => e.reduce((r, a) => Array.isArray(a) ? r.concat(t(a)) : r.concat(a), []);
|
|
113
|
+
return t(i).forEach((e) => {
|
|
114
|
+
e != null && (e instanceof o ? this.root.appendChild(e.build()) : typeof e == "string" ? l ? this.root.appendChild(e) : this.root.appendChild(document.createTextNode(e)) : this.root.appendChild(e));
|
|
115
|
+
}), this;
|
|
116
|
+
}
|
|
117
|
+
adoptSheet(...i) {
|
|
118
|
+
return this.root.adoptedStyleSheets = [...this.root.adoptedStyleSheets, ...i], this;
|
|
119
|
+
}
|
|
120
|
+
css(i) {
|
|
121
|
+
if (l)
|
|
122
|
+
return this.root.adoptedStyleSheets.push(i), this;
|
|
123
|
+
if (typeof CSSStyleSheet < "u") try {
|
|
124
|
+
const e = new CSSStyleSheet();
|
|
125
|
+
return e.replaceSync(i), this.root.adoptedStyleSheets = [...this.root.adoptedStyleSheets, e], this;
|
|
126
|
+
} catch {
|
|
127
|
+
}
|
|
128
|
+
const t = document.createElement("style");
|
|
129
|
+
return t.textContent = i, this.root.appendChild(t), this;
|
|
130
|
+
}
|
|
131
|
+
done() {
|
|
132
|
+
return {
|
|
133
|
+
host: this.hostEl,
|
|
134
|
+
shadow: this.root
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
serialize() {
|
|
138
|
+
return l ? this.root.serialize() : this.root.innerHTML;
|
|
139
|
+
}
|
|
140
|
+
}, s = (i) => new o(i), f = () => s("div"), S = () => s("span"), y = () => s("slot"), b = () => s("button"), v = () => s("input"), C = () => s("style"), E = () => s("label"), w = () => s("ul"), A = () => s("li"), g = () => s("section"), L = () => s("article"), B = () => s("nav"), m = () => s("header"), x = () => s("footer"), H = () => s("main"), N = (i = "open", t = !1) => {
|
|
141
|
+
const e = s("template");
|
|
142
|
+
return e.attr("shadowrootmode", i), t && e.attr("shadowrootdelegatesfocus", ""), e;
|
|
143
|
+
};
|
|
144
|
+
export {
|
|
145
|
+
s as _,
|
|
146
|
+
x as a,
|
|
147
|
+
p as b,
|
|
148
|
+
E as c,
|
|
149
|
+
B as d,
|
|
150
|
+
g as f,
|
|
151
|
+
w as g,
|
|
152
|
+
C as h,
|
|
153
|
+
f as i,
|
|
154
|
+
A as l,
|
|
155
|
+
S as m,
|
|
156
|
+
b as n,
|
|
157
|
+
m as o,
|
|
158
|
+
y as p,
|
|
159
|
+
N as r,
|
|
160
|
+
v as s,
|
|
161
|
+
L as t,
|
|
162
|
+
H as u,
|
|
163
|
+
o as v,
|
|
164
|
+
u as y
|
|
165
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { c as a, d as o, l as i, s as n, u as h } from "./utils-D4pPF77E.js";
|
|
2
|
+
import { _ as l, p as u } from "./factory-BdsO0dEW.js";
|
|
3
|
+
import { a as m, n as c } from "./ssr-DSGwPtEd.js";
|
|
4
|
+
var f = ".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}", d = class extends c {
|
|
5
|
+
_form;
|
|
6
|
+
_shadowDom;
|
|
7
|
+
static get observedAttributes() {
|
|
8
|
+
return ["sheet"];
|
|
9
|
+
}
|
|
10
|
+
constructor() {
|
|
11
|
+
super(), this._shadowDom = a(this, f), this._form = n(this._shadowDom, ".r-form", () => l("form").class("r-form").children(u().attr("name", "r-form_content")).build());
|
|
12
|
+
}
|
|
13
|
+
get value() {
|
|
14
|
+
return this.getAttribute("value");
|
|
15
|
+
}
|
|
16
|
+
set value(t) {
|
|
17
|
+
t != null && this.setAttribute("value", t);
|
|
18
|
+
}
|
|
19
|
+
get sheet() {
|
|
20
|
+
return i(this, "sheet");
|
|
21
|
+
}
|
|
22
|
+
set sheet(t) {
|
|
23
|
+
h(this, "sheet", t);
|
|
24
|
+
}
|
|
25
|
+
handlerExternalCss = () => {
|
|
26
|
+
o(this, this._shadowDom, "sheet", null, this.sheet);
|
|
27
|
+
};
|
|
28
|
+
connectedCallback() {
|
|
29
|
+
this.handlerExternalCss();
|
|
30
|
+
const t = {}, e = new FormData(this._form);
|
|
31
|
+
e.forEach((r, s) => {
|
|
32
|
+
t[s] || (t[s] = e.getAll(s).length > 1 ? e.getAll(s) : e.get(s));
|
|
33
|
+
}), this._form.addEventListener("submit", () => {
|
|
34
|
+
this.value = JSON.stringify(t);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
attributeChangedCallback(t, e, r) {
|
|
38
|
+
e !== r && t === "sheet" && this.handlerExternalCss();
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
m("r-form", d);
|
|
42
|
+
export {
|
|
43
|
+
d as t
|
|
44
|
+
};
|