ranui 0.2.0-alpha.7 → 0.2.1-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 +1 -1
- package/README.zh-CN.md +1 -1
- package/dist/arrow-down-Bi5kqUrX.js +12 -0
- package/dist/builder.d.ts +2 -2
- package/dist/builder.js +32 -28
- package/dist/builtin-D9djWkCE.js +409 -0
- package/dist/{button-Be_uHDZG.js → button-BfYw0fes.js} +1 -1
- package/dist/button.js +1 -1
- package/dist/{card-BVvXX6KM.js → card-CqJa4Q_v.js} +1 -1
- package/dist/card.js +1 -1
- package/dist/{checkbox-BtoX9X2Z.js → checkbox-CThC9-vy.js} +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{colorpicker-Dukms7ET.js → colorpicker-XNxDRcQ-.js} +5 -6
- package/dist/colorpicker.js +1 -1
- package/dist/components/colorpicker/index.d.ts +3 -3
- package/dist/components/icon/builtin.d.ts +9 -0
- package/dist/components/icon/index.d.ts +8 -0
- package/dist/components/route/index.d.ts +10 -4
- package/dist/components/router/index.d.ts +3 -0
- package/dist/{dropdown-BYS1Trdu.js → dropdown-CCvsambb.js} +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/factory-DCrO37si.js +334 -0
- package/dist/{form-BsB5JhS4.js → form-Ceq3uJzz.js} +1 -1
- package/dist/form.js +1 -1
- package/dist/{icon-pfolda2m.js → icon-C_ENrJ3F.js} +50 -13
- package/dist/icon.js +4 -3
- package/dist/icons.js +5 -0
- package/dist/iife/button.iife.js +1 -1
- package/dist/iife/card.iife.js +1 -1
- package/dist/iife/checkbox.iife.js +1 -1
- package/dist/iife/colorpicker.iife.js +2 -2
- package/dist/iife/dropdown.iife.js +1 -1
- package/dist/iife/form.iife.js +1 -1
- package/dist/iife/icon.iife.js +1 -1
- package/dist/iife/image.iife.js +1 -1
- package/dist/iife/input.iife.js +1 -1
- package/dist/iife/loading.iife.js +1 -1
- package/dist/iife/math.iife.js +14 -14
- package/dist/iife/message.iife.js +1 -1
- package/dist/iife/modal.iife.js +1 -1
- package/dist/iife/player.iife.js +8 -8
- package/dist/iife/popover.iife.js +1 -1
- package/dist/iife/progress.iife.js +1 -1
- package/dist/iife/radar.iife.js +1 -1
- package/dist/iife/route.iife.js +1 -1
- package/dist/iife/router.iife.js +1 -1
- package/dist/iife/scratch.iife.js +1 -1
- package/dist/iife/section.iife.js +1 -1
- package/dist/iife/select.iife.js +2 -2
- package/dist/iife/skeleton.iife.js +1 -1
- package/dist/iife/tab.iife.js +1 -1
- package/dist/iife/tabpane.iife.js +1 -1
- package/dist/{image-BXpKQ9sU.js → image-B7MBI5n_.js} +1 -1
- package/dist/image.js +1 -1
- package/dist/index.cjs +256 -23
- package/dist/index.d.ts +3 -1
- package/dist/index.iife.js +266 -33
- package/dist/index.js +69 -65
- package/dist/{input-BMMM60e6.js → input-RNqdEHPf.js} +2 -2
- package/dist/input.js +1 -1
- package/dist/{loading-BScjyeVm.js → loading-B9MFI03l.js} +1 -1
- package/dist/loading.js +1 -1
- package/dist/{math-IjzOAwnA.js → math-CudIwEXZ.js} +1 -1
- package/dist/math.js +1 -1
- package/dist/{message-CLpuP8HY.js → message-DW7qWpEm.js} +34 -49
- package/dist/message.js +1 -1
- package/dist/{modal-DOTpABRe.js → modal-CrvGKL2B.js} +1 -1
- package/dist/modal.js +1 -1
- package/dist/{player-5olrw-qB.js → player-BKQaaT7o.js} +2 -2
- package/dist/player.js +1 -1
- package/dist/{popover-DRUQjdPs.js → popover-CvYIVgUS.js} +2 -2
- package/dist/popover.js +1 -1
- package/dist/{progress-BIEXYYd2.js → progress-C6jctsFH.js} +1 -1
- package/dist/progress.js +1 -1
- package/dist/{radar-DAF95_Mj.js → radar-BUb4EzmG.js} +1 -1
- package/dist/radar.js +1 -1
- package/dist/route-Djrf9UR_.js +116 -0
- package/dist/route.js +1 -1
- package/dist/{router-B9rCrWXm.js → router-BU2KhtxV.js} +22 -17
- package/dist/router.js +1 -1
- package/dist/{scratch-QlPyy1f4.js → scratch-CO4I2dIa.js} +1 -1
- package/dist/scratch.js +1 -1
- package/dist/{section-D0qMm9KM.js → section-CsUkp8bv.js} +1 -1
- package/dist/section.js +1 -1
- package/dist/{select-aAaWoveE.js → select-Dn26ajJZ.js} +8 -15
- package/dist/select.js +1 -1
- package/dist/{skeleton-CFqQmKyt.js → skeleton-BuMLhvzQ.js} +1 -1
- package/dist/skeleton.js +1 -1
- package/dist/{tab-CiF2YPck.js → tab-40fDkuox.js} +1 -1
- package/dist/tab.js +1 -1
- package/dist/{tabpane-B-m3xwqu.js → tabpane-F4Pd7JtC.js} +1 -1
- package/dist/tabpane.js +1 -1
- package/dist/test/unit/icon.builtin.test.d.ts +1 -0
- package/dist/test/unit/utils.colorpicker.reconnect.test.d.ts +1 -0
- package/dist/test/unit/utils.route.lazy.test.d.ts +1 -0
- package/dist/test/unit/utils.router.match.test.d.ts +1 -0
- package/dist/test/unit/utils.signal.owner.test.d.ts +1 -0
- package/dist/utils/builder/core.d.ts +20 -13
- package/dist/utils/builder/factory.d.ts +1 -1
- package/dist/utils/builder/index.d.ts +2 -2
- package/dist/utils/builder/signal.d.ts +93 -64
- package/dist/utils/router/index.d.ts +13 -3
- package/dist/utils/router.js +95 -54
- package/dist/utils/theme.d.ts +1 -1
- package/dist/warning-circle-fill-Cz0qu7AH.js +23 -0
- package/docs/BUILDER.md +230 -0
- package/docs/COMPONENTS.md +21 -3
- package/package.json +25 -3
- package/dist/factory-BdsO0dEW.js +0 -165
- package/dist/route-MQZpn2BP.js +0 -88
- package/dist/signal-CSSZxlK5.js +0 -57
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as i, a as b, n as l, o as d, s as a, t as h } from "./utils-DBfrRFoE.js";
|
|
2
2
|
import { t as v } from "./events-C59wGdni.js";
|
|
3
|
-
import { _ as u, i as s, p as f } from "./factory-
|
|
3
|
+
import { _ as u, i as s, p as f } from "./factory-DCrO37si.js";
|
|
4
4
|
import { a as g, n as p } from "./ssr-DSGwPtEd.js";
|
|
5
5
|
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}:host{box-sizing:var(--ran-btn-box-sizing, border-box);position:var(--ran-btn-position, relative);display:var(--ran-btn-display, inline-flex);background-image:var(--ran-btn-background-image, none);box-shadow:var(--ran-btn-box-shadow, var(--ran-skin-raised-shadow, 0 2px #00000004));cursor:var(--ran-btn-cursor, pointer);-webkit-user-select:var(--ran-btn-user-select, none);user-select:var(--ran-btn-user-select, none);touch-action:var(--ran-btn-touch-action, manipulation);overflow:var(--ran-btn-overflow, hidden);pointer-events:var(--ran-btn-pointer-events, auto)}:host .ran-btn{box-sizing:var(--ran-btn-contain-box-sizing, border-box);position:var(--ran-btn-contain-position, relative);display:var(--ran-btn-contain-display, block);background-image:var(--ran-btn-contain-background-image, none);cursor:var(--ran-btn-contain-cursor, pointer);transition:var(--ran-btn-contain-transition, opacity var(--ran-motion-duration-base, .2s) cubic-bezier(.645, .045, .355, 1));-webkit-user-select:var(--ran-btn-contain-user-select, none);user-select:var(--ran-btn-contain-user-select, none);touch-action:var(--ran-btn-contain-touch-action, manipulation);border-radius:var(--ran-btn-content-border-radius, var(--ran-radius-sm, 6px));background:var(--ran-btn-contain-background, var(--ran-color-bg-elevated, #fff))}:host,:host(:active),:host(:focus){outline:0;-webkit-tap-highlight-color:transparent}:host .ran-btn,:host(:active) .ran-btn,:host(:focus) .ran-btn{outline:var(--ran-btn-contain-outline, 0)}:host(:focus-visible){outline:var(--ran-btn-focus-outline, 2px solid var(--ran-color-primary));outline-offset:var(--ran-btn-focus-outline-offset, 2px)}:host([type="primary"]) .ran-btn-content{background-color:var(--ran-btn-content-background-color, var(--ran-color-primary, #006bff));background-image:var(--ran-btn-content-background-image, none);border-color:var(--ran-btn-content-border-color, var(--ran-color-primary, #006bff));color:var(--ran-btn-content-color, #fff)}:host([type="primary"]:not([disabled])) .ran-btn:after{background-image:var(--ran-btn-after-background-image, radial-gradient(circle, #fff 10%, transparent 10.01%))}:host([type="primary"]:not([disabled]):active) .ran-btn-content{background-color:var(--ran-btn-content-active-background-color, var(--ran-color-primary-active, #005ff2));border-color:var(--ran-btn-content-active-border-color, var(--ran-color-primary-active, #005ff2))}:host([type="contrast"]) .ran-btn-content{background-color:var(--ran-btn-content-background-color, var(--ran-color-contrast-bg, #171717));background-image:var(--ran-btn-content-background-image, none);border-color:var(--ran-btn-content-border-color, var(--ran-color-contrast-bg, #171717));color:var(--ran-btn-content-color, var(--ran-color-contrast-text, #fff))}:host([type="contrast"]:not([disabled])) .ran-btn:after{background-image:var(--ran-btn-after-background-image, radial-gradient(circle, var(--ran-color-contrast-text, #fff) 10%, transparent 10.01%))}:host([type="contrast"]:not([disabled]):active) .ran-btn-content{background-color:var(--ran-btn-content-active-background-color, var(--ran-color-contrast-bg-active, #4d4d4d));border-color:var(--ran-btn-content-active-border-color, var(--ran-color-contrast-bg-active, #4d4d4d))}@media(min-width:1024px){:host(:not([disabled]):hover) .ran-btn-content{border-color:var(--ran-btn-content-hover-border-color, var(--ran-color-border-hover, #c9c9c9));color:var(--ran-btn-content-hover-color, var(--ran-color-text, #171717))}:host([type="primary"]:not([disabled]):hover) .ran-btn-content{background-color:var(--ran-btn-content-hover-background-color, var(--ran-color-primary-hover, #0059ec));border-color:var(--ran-btn-content-hover-border-color, var(--ran-color-primary-hover, #0059ec));color:var(--ran-btn-content-hover-color, #fff)}:host([type="contrast"]:not([disabled]):hover) .ran-btn-content{background-color:var(--ran-btn-content-hover-background-color, var(--ran-color-contrast-bg-hover, #383838));border-color:var(--ran-btn-content-hover-border-color, var(--ran-color-contrast-bg-hover, #383838));color:var(--ran-btn-content-hover-color, var(--ran-color-contrast-text, #fff))}:host([type="warning"]:not([disabled]):hover) .ran-btn-content{border-color:var(--ran-btn-content-warning-border-color, var(--ran-color-danger, #ff4d4f));background-color:var(--ran-btn-content-warning-background-color, var(--ran-color-danger, #ff4d4f));color:var(--ran-btn-content-warning-color, #fff)}}:host([type="warning"]) .ran-btn-content{border-color:var(--ran-btn-content-warning-border-color, var(--ran-color-danger, #ff4d4f));background-color:var(--ran-btn-content-warning-background-color, var(--ran-color-danger, #ff4d4f));background-image:var(--ran-btn-content-background-image, none);color:var(--ran-btn-content-warning-color, #fff)}:host([type="warning"]:not([disabled])) .ran-btn:after{background-image:var(--ran-btn-after-background-image, radial-gradient(circle, #fff 10%, transparent 10.01%))}:host([type="text"]) .ran-btn-content{border:var(--ran-btn-content-text-border, none)}:host([disabled]){cursor:var(--ran-btn-disabled-cursor, not-allowed);pointer-events:var(--ran-btn-disabled-pointer-events, all);opacity:var(--ran-btn-disabled-opacity, .6)}:host([disabled]) .ran-btn{cursor:var(--ran-btn-disabled-container-cursor, not-allowed);pointer-events:var(--ran-btn-disabled-container-pointer-events, all);opacity:var(--ran-btn-disabled-container-opacity, .6)}:host(:not([disabled]):active) .ran-btn:after{transform:var(--ran-btn-after-transform, translate(-50%, -50%) scale(0));opacity:var(--ran-btn-after-opacity, .3);transition:var(--ran-btn-after-transition, 0s)}@media(min-width:1024px){:host(:not([disabled],[effect])) .ran-btn:after{content:"";display:block;position:absolute;width:100%;height:100%;left:var(--ran-x, 0);top:var(--ran-y, 0);pointer-events:none;background-image:radial-gradient(circle,var(--ran-gray-alpha-400, #00000014) 10%,transparent 10.01%);background-repeat:no-repeat;background-position:50%;transform:translate(-50%,-50%) scale(10);opacity:0;transition:transform .3s,opacity .8s}}:host .slot{display:var(--ran-btn-slot-display, block)}.ran-btn-content{display:var(--ran-btn-content-display, flex);justify-content:var(--ran-btn-content-display, space-between);align-items:var(--ran-btn-content-align-items, center);padding:var(--ran-btn-content-padding, 4px 15px);border:var(--ran-btn-content-border, 1px solid transparent);border-image-source:var(--ran-btn-content-border-image-source, none);border-image-slice:var(--ran-btn-content-border-image-slice, 8);border-image-width:var(--ran-btn-content-border-image-width, 4px);border-image-outset:0;border-image-repeat:stretch;border-radius:var(--ran-btn-content-border-radius, var(--ran-radius-sm, 6px));border-color:var(--ran-btn-content-border-color, var(--ran-color-border, #eaeaea));color:var(--ran-btn-content-color, var(--ran-color-text, #000000d9));line-height:var(--ran-btn-content-line-height, 22px);font-size:var(--ran-btn-content-font-size, 14px);font-weight:var(--ran-btn-content-font-weight, 400);font-family:var(--ran-btn-content-font-family, var(--ran-skin-font-family, inherit));white-space:var(--ran-btn-content-white-space, nowrap);text-align:var(--ran-btn-content-text-align, center);box-sizing:var(--ran-btn-content-box-sizing, border-box)}.ran-btn-content .icon{margin-right:var(--ran-btn-icon-margin-right, 2px)}', y = class extends p {
|
|
6
6
|
_btn;
|
package/dist/button.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as n, i as a, n as d, r as i, t as c } from "./utils-DBfrRFoE.js";
|
|
2
|
-
import { i as t, p as o } from "./factory-
|
|
2
|
+
import { i as t, p as o } from "./factory-DCrO37si.js";
|
|
3
3
|
import { a as l, n as h } from "./ssr-DSGwPtEd.js";
|
|
4
4
|
var p = ".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}:host{display:var(--ran-card-display, block);box-sizing:border-box;min-height:var(--ran-card-min-height, 0)}:host([hoverable]:hover) .ran-card{border-color:var(--ran-card-hover-border-color, var(--ran-color-border-hover, #c9c9c9));box-shadow:var(--ran-card-hover-shadow, var(--ran-shadow-elevated, 0 1px 2px rgba(0, 0, 0, .04)))}.ran-card{display:grid;align-content:start;gap:var(--ran-card-gap, 14px);height:100%;min-width:0;padding:var(--ran-card-padding, 16px);border-width:var(--ran-skin-border-width, 1px);border-style:var(--ran-skin-border-style, solid);border-color:var(--ran-card-border-color, var(--ran-color-border, #eaeaea));border-radius:var(--ran-card-radius, var(--ran-radius-md));background:var(--ran-card-background, var(--ran-color-bg));box-shadow:var(--ran-card-shadow, none);box-sizing:border-box}.ran-card-header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.ran-card-title-area{flex:1;min-width:0}.ran-card-title{margin:0;color:var(--ran-card-title-color, var(--ran-color-text));font-size:var(--ran-card-title-font-size, 16px);font-weight:var(--ran-card-title-font-weight, 600);line-height:1.3}.ran-card-title:empty{display:none}.ran-card-description{margin:4px 0 0;color:var(--ran-card-description-color, var(--ran-color-text-secondary));font-size:var(--ran-card-description-font-size, 14px);line-height:1.5}.ran-card-description:empty{display:none}.ran-card-body,.ran-card-footer{min-width:0}:host(:not([title]):not([description])) .ran-card-header{display:none}", b = class extends h {
|
|
5
5
|
_shadowDom;
|
package/dist/card.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as o, c as i, f as s, i as h, n as b, o as t, r as d, s as l, t as k } from "./utils-DBfrRFoE.js";
|
|
2
2
|
import { t as x } from "./events-C59wGdni.js";
|
|
3
|
-
import { i as a, m as c, p as u, s as p } from "./factory-
|
|
3
|
+
import { i as a, m as c, p as u, s as p } from "./factory-DCrO37si.js";
|
|
4
4
|
import { a as v, n as f } from "./ssr-DSGwPtEd.js";
|
|
5
5
|
var g = '.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}:host{position:var(--ran-checkbox-host-position, relative);display:var(--ran-checkbox-host-display, inline-flex);margin:var(--ran-checkbox-host-margin, 0);padding:var(--ran-checkbox-host-padding, 0);box-sizing:var(--ran-checkbox-host-box-sizing, border-box);list-style:var(--ran-checkbox-host-list-style, none)}:host([disabled]){opacity:var(--ran-checkbox-disabled-opacity, .6)}:host([disabled]) .ran-checkbox-input{cursor:var(--ran-checkbox-disabled-cursor, not-allowed);pointer-events:var(--ran-checkbox-disabled-pointer-events, all)}:host([disabled]) .ran-checkbox-inner{background-color:var(--ran-checkbox-checked-background-color, var(--ran-color-bg-muted, #f2f2f2));border:1px solid var(--ran-color-border, #eaeaea)}:host([disabled]) .ran-checkbox-inner:after{cursor:not-allowed;pointer-events:none;opacity:var(--ran-checkbox-checked-after-opacity, 1)}:host([disabled]) .ran-checkbox-checked .ran-checkbox-inner{background-color:var(--ran-checkbox-checked-background-color, var(--ran-color-bg-muted, #f2f2f2))}:host([disabled]) .ran-checkbox-checked .ran-checkbox-inner:after{opacity:var(--ran-checkbox-checked-after-opacity, 0)}.ran-checkbox-wrapper{display:inline-flex;align-items:center;gap:var(--ran-checkbox-label-gap, 8px);cursor:pointer;line-height:1}.ran-checkbox-label{color:var(--ran-checkbox-label-color, var(--ran-color-text, rgba(0, 0, 0, .88)));font-size:var(--ran-checkbox-label-font-size, 14px);font-family:var(--ran-checkbox-label-font-family, var(--ran-skin-font-family, inherit));line-height:var(--ran-checkbox-label-line-height, 1.5);-webkit-user-select:none;user-select:none}.ran-checkbox{position:var(--ran-checkbox-position, relative);display:var(--ran-checkbox-display, block);box-sizing:var(--ran-checkbox-box-sizing, border-box);margin:var(--ran-checkbox-margin, 0);width:var(--ran-checkbox-width, 16px);height:var(--ran-checkbox-height, 16px);padding:var(--ran-checkbox-padding, 0);color:var(--ran-checkbox-color, var(--ran-color-text, rgba(0, 0, 0, .88)));font-size:var(--ran-checkbox-font-size, 14px);line-height:var(--ran-checkbox-line-height, 1);list-style:var(--ran-checkbox-list-style, none);font-family:var(--ran-checkbox-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"));white-space:var(--ran-checkbox-white-space, nowrap);cursor:var(--ran-checkbox-cursor, pointer);border-radius:var(--ran-checkbox-border-radius, 4px)}.ran-checkbox-input{position:var(--ran-checkbox-input-position, absolute);inset:var(--ran-checkbox-input-inset, 0);z-index:var(--ran-checkbox-input-z-index, 1);cursor:var(--ran-checkbox-input-cursor, pointer);opacity:var(--ran-checkbox-input-opacity, 0);margin:var(--ran-checkbox-input-margin, 0)}.ran-checkbox-inner{box-sizing:var(--ran-checkbox-inner-box-sizing, border-box);display:var(--ran-checkbox-inner-display, block);width:var(--ran-checkbox-inner-width, 16px);height:var(--ran-checkbox-inner-height, 16px);direction:var(--ran-checkbox-inner-direction, ltr);background-color:var(--ran-checkbox-inner-background-color, var(--ran-color-bg-elevated, #fff));border:var(--ran-checkbox-inner-border, 1px solid var(--ran-color-border, #eaeaea));border-image-source:var(--ran-checkbox-inner-border-image-source, none);border-image-slice:var(--ran-checkbox-inner-border-image-slice, 8);border-image-width:var(--ran-checkbox-inner-border-image-width, 4px);border-image-outset:0;border-image-repeat:stretch;border-radius:var(--ran-checkbox-inner-border-radius, 4px);border-collapse:var(--ran-checkbox-inner-border-collapse, separate)}.ran-checkbox-inner:after{box-sizing:var(--ran-checkbox-inner-after-box-sizing, border-box);position:var(--ran-checkbox-inner-after-position, absolute);top:var(--ran-checkbox-inner-after-top, 50%);inset-inline-start:var(--ran-checkbox-inner-after-inset-inline-start, 25%);display:var(--ran-checkbox-inner-after-display, table);width:var(--ran-checkbox-inner-after-width, calc(16px / 14 * 5));height:var(--ran-checkbox-inner-after-height, calc(16px / 14 * 8));border:var(--ran-checkbox-inner-after-border, 2px solid #fff);border-top:var(--ran-checkbox-inner-after-border-top, 0);border-inline-start:var(--ran-checkbox-inner-after-border-inline-start, 0);opacity:var(--ran-checkbox-inner-after-opacity, 0);content:var(--ran-checkbox-inner-after-content, "");transition:var(--ran-checkbox-inner-after-transition, transform .1s cubic-bezier(.71, -.46, .88, .6), opacity .1s);transform:var(--ran-checkbox-inner-after-transform, rotate(45deg) scale(1) translate(-50%, -50%))}.ran-checkbox-checked .ran-checkbox-inner{background-color:var(--ran-checkbox-checked-background-color, var(--ran-color-primary, #006bff));background-image:var(--ran-checkbox-checked-background-image, none);border:var(--ran-checkbox-checked-border, 1px solid var(--ran-color-primary, #006bff))}.ran-checkbox-checked .ran-checkbox-inner:after{opacity:var(--ran-checkbox-checked-after-opacity, 1)}.ran-checkbox:focus-within .ran-checkbox-inner{box-shadow:var(--ran-checkbox-focus-box-shadow, 0 0 0 2px var(--ran-blue-400, #cae7ff));border-color:var(--ran-checkbox-focus-border-color, var(--ran-color-primary, #006bff))}', m = class extends f {
|
|
6
6
|
static formAssociated = !0;
|
package/dist/checkbox.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { a as v, h as l, i as x, n as m, r as P, s as h, t as y } from "./utils-DBfrRFoE.js";
|
|
2
2
|
import { t as w } from "./events-C59wGdni.js";
|
|
3
|
-
import {
|
|
4
|
-
import { _ as u, h as A, i as n } from "./factory-BdsO0dEW.js";
|
|
3
|
+
import { C as p, O as S, _ as u, h as A, i as n } from "./factory-DCrO37si.js";
|
|
5
4
|
import { a as $, n as _ } from "./ssr-DSGwPtEd.js";
|
|
6
|
-
import "./input-
|
|
7
|
-
import "./select-
|
|
8
|
-
import "./popover-
|
|
5
|
+
import "./input-RNqdEHPf.js";
|
|
6
|
+
import "./select-Dn26ajJZ.js";
|
|
7
|
+
import "./popover-CvYIVgUS.js";
|
|
9
8
|
var D = (e) => {
|
|
10
9
|
const { r: t, g: i, b: r } = I(e);
|
|
11
10
|
return f(t, i, r);
|
|
@@ -300,7 +299,7 @@ var D = (e) => {
|
|
|
300
299
|
this.colorPickerInner = n().class("ran-color-picker-inner").children(A().text(H).build(), o).build(), this.popoverContent.appendChild(this.colorPickerInner), this.setupEffects(), this.syncValueInput();
|
|
301
300
|
};
|
|
302
301
|
connectedCallback() {
|
|
303
|
-
this.handlerExternalCss(), this.setAttribute("class", "ran-colorpicker"), this._events.on(this, "click", this.blockWhenDisabled, { capture: !0 }), this._events.on(this, "keydown", this.blockWhenDisabled, { capture: !0 }), this._events.on(this.popoverBlock, "click", this.openColorPicker), this._events.on(this.colorpicker, "keydown", this.onSwatchKeydown), this._events.on(document, "mousemove", this.onPointerMove), this._events.on(document, "mouseup", this.onPointerUp), this.syncDisabledState(), this.value && this.updateColorValue(this.value);
|
|
302
|
+
this.handlerExternalCss(), this.setAttribute("class", "ran-colorpicker"), this._events.on(this, "click", this.blockWhenDisabled, { capture: !0 }), this._events.on(this, "keydown", this.blockWhenDisabled, { capture: !0 }), this._events.on(this.popoverBlock, "click", this.openColorPicker), this._events.on(this.colorpicker, "keydown", this.onSwatchKeydown), this._events.on(document, "mousemove", this.onPointerMove), this._events.on(document, "mouseup", this.onPointerUp), this.syncDisabledState(), this.value && this.updateColorValue(this.value), this.colorPickerInner && this._effectDisposers.length === 0 && this.setupEffects();
|
|
304
303
|
}
|
|
305
304
|
disconnectedCallback() {
|
|
306
305
|
this._events.abort(), this.disposeEffects();
|
package/dist/colorpicker.js
CHANGED
|
@@ -76,13 +76,13 @@ export declare class ColorPicker extends RanElement {
|
|
|
76
76
|
emitChange: () => void;
|
|
77
77
|
palettePointerDown: (e: MouseEvent) => void;
|
|
78
78
|
updatePaletteFromEvent: (e: MouseEvent) => void;
|
|
79
|
-
sliderPointerDown: (kind:
|
|
80
|
-
updateSliderFromEvent: (kind:
|
|
79
|
+
sliderPointerDown: (kind: 'hue' | 'alpha') => (e: MouseEvent) => void;
|
|
80
|
+
updateSliderFromEvent: (kind: 'hue' | 'alpha', e: MouseEvent) => void;
|
|
81
81
|
onPointerMove: (e: Event) => void;
|
|
82
82
|
/** Make a slider a focusable, described `role="slider"`; valuenow is kept live in setupEffects. */
|
|
83
83
|
initSliderA11y: (el: HTMLElement, label: string, max: number) => void;
|
|
84
84
|
/** Arrow keys adjust the hue/alpha slider (Shift = coarse step, Home/End = ends). */
|
|
85
|
-
sliderKeydown: (kind:
|
|
85
|
+
sliderKeydown: (kind: 'hue' | 'alpha') => (e: KeyboardEvent) => void;
|
|
86
86
|
onPointerUp: () => void;
|
|
87
87
|
/** Open the picker from the keyboard: Enter/Space act like a click on the swatch. */
|
|
88
88
|
onSwatchKeydown: (e: KeyboardEvent) => void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Registered names available after {@link registerBuiltinIcons} runs. */
|
|
2
|
+
export declare const BUILTIN_ICON_NAMES: string[];
|
|
3
|
+
/**
|
|
4
|
+
* Register every icon ranui ships (see `RAN_ICON_NAMES`) so `<r-icon name="…">`
|
|
5
|
+
* renders it. Idempotent; call once, in the browser, before the first `<r-icon>`
|
|
6
|
+
* connects. Import cost: the bundled SVG strings (~15 KB). To register only a
|
|
7
|
+
* subset, import the specific SVGs yourself and call `registerIcons` instead.
|
|
8
|
+
*/
|
|
9
|
+
export declare const registerBuiltinIcons: () => void;
|
|
@@ -4,6 +4,14 @@ import { EventManager } from '@/utils/builder';
|
|
|
4
4
|
export declare const registerIcon: (name: string, source: unknown) => void;
|
|
5
5
|
/** Batch register icons. */
|
|
6
6
|
export declare const registerIcons: (icons: Record<string, unknown>) => void;
|
|
7
|
+
/**
|
|
8
|
+
* Names of the SVGs ranui ships in `assets/icons/`. This tuple is the source of
|
|
9
|
+
* truth for {@link RanIconName}; a unit test asserts it stays in sync with the
|
|
10
|
+
* asset folder, so adding/removing an SVG without updating this list fails CI.
|
|
11
|
+
*/
|
|
12
|
+
export declare const RAN_ICON_NAMES: readonly ['add-user', 'arrow-down', 'book', 'check-circle', 'check-circle-fill', 'close', 'close-circle', 'close-circle-fill', 'drop', 'eye', 'eye-close', 'github', 'globe', 'home', 'info-circle', 'info-circle-fill', 'issue', 'loading', 'loading-scene', 'lock', 'menu', 'message', 'more', 'plus', 'power-off', 'preview', 'search', 'setting', 'sort', 'team', 'unlock', 'user', 'warning-circle', 'warning-circle-fill', 'without-content'];
|
|
13
|
+
/** A name from ranui's bundled icon set (see {@link registerBuiltinIcons}). */
|
|
14
|
+
export type RanIconName = (typeof RAN_ICON_NAMES)[number];
|
|
7
15
|
export declare class Icon extends RanElement {
|
|
8
16
|
private readonly isDev;
|
|
9
17
|
_events: EventManager;
|
|
@@ -5,19 +5,25 @@ export declare class Route extends RanElement {
|
|
|
5
5
|
_events: EventManager;
|
|
6
6
|
_shadowDom: ShadowRoot;
|
|
7
7
|
_params: Record<string, string>;
|
|
8
|
+
private _mounted;
|
|
9
|
+
private _module;
|
|
10
|
+
private _disposePage;
|
|
11
|
+
private _pageHost;
|
|
12
|
+
private _mountToken;
|
|
8
13
|
constructor();
|
|
9
14
|
get path(): string;
|
|
10
15
|
set path(v: string);
|
|
11
16
|
get exact(): boolean;
|
|
17
|
+
/** Module specifier for lazy, code-split, mount/unmount page rendering. */
|
|
18
|
+
get src(): string;
|
|
19
|
+
set src(v: string);
|
|
12
20
|
get params(): Record<string, string>;
|
|
13
21
|
get sheet(): string;
|
|
14
22
|
set sheet(v: string);
|
|
15
23
|
handlerExternalCss: () => void;
|
|
16
|
-
_matchPath(currentPath: string): {
|
|
17
|
-
matched: boolean;
|
|
18
|
-
params: Record<string, string>;
|
|
19
|
-
};
|
|
20
24
|
_update(currentPath: string): void;
|
|
25
|
+
private _mount;
|
|
26
|
+
private _unmount;
|
|
21
27
|
_preSerialize(): void;
|
|
22
28
|
connectedCallback(): void;
|
|
23
29
|
disconnectedCallback(): void;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { EventManager } from '@/utils/builder';
|
|
2
2
|
import { RanElement } from '@/utils/index';
|
|
3
|
+
import { type RouterCore } from '@/utils/router';
|
|
3
4
|
export declare class Router extends RanElement {
|
|
4
5
|
static get observedAttributes(): string[];
|
|
5
6
|
_events: EventManager;
|
|
6
7
|
_shadowDom: ShadowRoot;
|
|
7
8
|
_slot: HTMLSlotElement;
|
|
8
9
|
_currentPath: string;
|
|
10
|
+
/** Bound RouterCore (when createRouter() was used) — navigation delegates to it. */
|
|
11
|
+
_core: RouterCore | null;
|
|
9
12
|
constructor();
|
|
10
13
|
get mode(): 'history' | 'hash';
|
|
11
14
|
get base(): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as w, c as i, f as d, i as o, n as p, r as a, t as h } from "./utils-DBfrRFoE.js";
|
|
2
|
-
import { i as n, p as l } from "./factory-
|
|
2
|
+
import { i as n, p as l } from "./factory-DCrO37si.js";
|
|
3
3
|
import { a as c, n as f } from "./ssr-DSGwPtEd.js";
|
|
4
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
5
|
return r.TOP = "top", r.BOTTOM = "bottom", r.LEFT = "left", r.RIGHT = "right", r;
|
package/dist/dropdown.js
CHANGED
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
import { c as u, n as H } from "./mocks-CMGoftIc.js";
|
|
2
|
+
var f = 0, C = 1, d = 2, o = null, i = null, c = 0, h = /* @__PURE__ */ new Set(), v = !1;
|
|
3
|
+
function T(e, t) {
|
|
4
|
+
const r = t?.equals ?? Object.is, s = {
|
|
5
|
+
value: e,
|
|
6
|
+
observers: /* @__PURE__ */ new Set()
|
|
7
|
+
};
|
|
8
|
+
return [() => (m(s), s.value), (p) => {
|
|
9
|
+
const w = typeof p == "function" ? p(s.value) : p;
|
|
10
|
+
if (!r(s.value, w)) {
|
|
11
|
+
s.value = w;
|
|
12
|
+
for (const z of s.observers) b(z, d);
|
|
13
|
+
c === 0 && O();
|
|
14
|
+
}
|
|
15
|
+
}];
|
|
16
|
+
}
|
|
17
|
+
function j(e, t) {
|
|
18
|
+
const r = g(e, !1, t?.equals);
|
|
19
|
+
return E(r), () => (r.disposed || (y(r), m(r)), r.value);
|
|
20
|
+
}
|
|
21
|
+
function k(e) {
|
|
22
|
+
const t = g(e, !0);
|
|
23
|
+
return E(t), A(t), () => S(t);
|
|
24
|
+
}
|
|
25
|
+
function I(e) {
|
|
26
|
+
c++;
|
|
27
|
+
try {
|
|
28
|
+
e();
|
|
29
|
+
} finally {
|
|
30
|
+
c--, c === 0 && O();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function R(e) {
|
|
34
|
+
const t = o;
|
|
35
|
+
o = null;
|
|
36
|
+
try {
|
|
37
|
+
return e();
|
|
38
|
+
} finally {
|
|
39
|
+
o = t;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function M(e) {
|
|
43
|
+
const t = {
|
|
44
|
+
owned: [],
|
|
45
|
+
cleanups: [],
|
|
46
|
+
owner: i
|
|
47
|
+
}, r = i, s = o;
|
|
48
|
+
i = t, o = null;
|
|
49
|
+
try {
|
|
50
|
+
return e(() => q(t));
|
|
51
|
+
} finally {
|
|
52
|
+
i = r, o = s;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function $(e) {
|
|
56
|
+
i && i.cleanups.push(e);
|
|
57
|
+
}
|
|
58
|
+
function P() {
|
|
59
|
+
return i;
|
|
60
|
+
}
|
|
61
|
+
function V(e, t) {
|
|
62
|
+
const r = i, s = o;
|
|
63
|
+
i = e, o = null;
|
|
64
|
+
try {
|
|
65
|
+
return t();
|
|
66
|
+
} finally {
|
|
67
|
+
i = r, o = s;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function g(e, t, r) {
|
|
71
|
+
return {
|
|
72
|
+
fn: e,
|
|
73
|
+
sources: /* @__PURE__ */ new Set(),
|
|
74
|
+
isEffect: t,
|
|
75
|
+
running: !1,
|
|
76
|
+
disposed: !1,
|
|
77
|
+
state: d,
|
|
78
|
+
observers: /* @__PURE__ */ new Set(),
|
|
79
|
+
value: void 0,
|
|
80
|
+
equals: r ?? Object.is,
|
|
81
|
+
owned: [],
|
|
82
|
+
cleanups: [],
|
|
83
|
+
owner: i
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
function E(e) {
|
|
87
|
+
i && i.owned.push(e);
|
|
88
|
+
}
|
|
89
|
+
function m(e) {
|
|
90
|
+
o && (o.sources.add(e), e.observers.add(o));
|
|
91
|
+
}
|
|
92
|
+
function b(e, t) {
|
|
93
|
+
if (e.disposed || e.state >= t) return;
|
|
94
|
+
const r = e.state === f;
|
|
95
|
+
if (e.state = t, e.isEffect) h.add(e);
|
|
96
|
+
else if (r) for (const s of e.observers) b(s, C);
|
|
97
|
+
}
|
|
98
|
+
function O() {
|
|
99
|
+
if (!(c > 0 || v)) {
|
|
100
|
+
v = !0;
|
|
101
|
+
try {
|
|
102
|
+
for (; h.size > 0; ) {
|
|
103
|
+
const e = [...h];
|
|
104
|
+
h.clear();
|
|
105
|
+
for (const t of e) t.disposed || y(t);
|
|
106
|
+
}
|
|
107
|
+
} finally {
|
|
108
|
+
v = !1;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
function y(e) {
|
|
113
|
+
if (!(e.disposed || e.state === f)) {
|
|
114
|
+
if (e.state === C)
|
|
115
|
+
for (const t of e.sources) "fn" in t && y(t);
|
|
116
|
+
e.state === d && A(e), e.state = f;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
function A(e) {
|
|
120
|
+
if (e.running) throw new Error("ranui reactivity: cyclic dependency detected (a computation triggered itself).");
|
|
121
|
+
L(e);
|
|
122
|
+
const t = o, r = i;
|
|
123
|
+
o = e, i = e, e.running = !0, e.state = f;
|
|
124
|
+
try {
|
|
125
|
+
const s = e.fn();
|
|
126
|
+
if (e.isEffect)
|
|
127
|
+
typeof s == "function" && e.cleanups.push(s);
|
|
128
|
+
else {
|
|
129
|
+
const n = e.value;
|
|
130
|
+
if (e.value = s, e.observers.size > 0 && !e.equals(n, s)) for (const l of e.observers) b(l, d);
|
|
131
|
+
}
|
|
132
|
+
} finally {
|
|
133
|
+
e.running = !1, o = t, i = r;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
function L(e) {
|
|
137
|
+
for (const t of e.owned) S(t);
|
|
138
|
+
e.owned.length = 0;
|
|
139
|
+
for (const t of e.cleanups) t();
|
|
140
|
+
e.cleanups.length = 0;
|
|
141
|
+
for (const t of e.sources) t.observers.delete(e);
|
|
142
|
+
e.sources.clear();
|
|
143
|
+
}
|
|
144
|
+
function S(e) {
|
|
145
|
+
e.disposed || (e.disposed = !0, L(e), e.observers.clear());
|
|
146
|
+
}
|
|
147
|
+
function q(e) {
|
|
148
|
+
for (const t of e.owned) S(t);
|
|
149
|
+
e.owned.length = 0;
|
|
150
|
+
for (const t of e.cleanups) t();
|
|
151
|
+
e.cleanups.length = 0;
|
|
152
|
+
}
|
|
153
|
+
var W = () => ({ current: null }), B = class N {
|
|
154
|
+
el;
|
|
155
|
+
constructor(t) {
|
|
156
|
+
this.el = u ? new H(t) : document.createElement(t);
|
|
157
|
+
}
|
|
158
|
+
id(t) {
|
|
159
|
+
return this.el.setAttribute("id", t), this;
|
|
160
|
+
}
|
|
161
|
+
bind(t, r) {
|
|
162
|
+
typeof t == "function" ? k(() => r(t())) : r(t);
|
|
163
|
+
}
|
|
164
|
+
class(t) {
|
|
165
|
+
return this.bind(t, (r) => {
|
|
166
|
+
u ? this.el.attributes.set("class", r) : this.el.className = r;
|
|
167
|
+
}), this;
|
|
168
|
+
}
|
|
169
|
+
addClass(...t) {
|
|
170
|
+
return t.forEach((r) => this.el.classList.add(r)), this;
|
|
171
|
+
}
|
|
172
|
+
removeClass(...t) {
|
|
173
|
+
return t.forEach((r) => this.el.classList.remove(r)), this;
|
|
174
|
+
}
|
|
175
|
+
attr(t, r) {
|
|
176
|
+
return this.bind(r, (s) => this.el.setAttribute(t, s)), this;
|
|
177
|
+
}
|
|
178
|
+
attrs(t) {
|
|
179
|
+
return Object.entries(t).forEach(([r, s]) => {
|
|
180
|
+
s != null && this.el.setAttribute(r, String(s));
|
|
181
|
+
}), this;
|
|
182
|
+
}
|
|
183
|
+
boolAttr(t, r, s = "") {
|
|
184
|
+
return this.bind(r, (n) => {
|
|
185
|
+
n ? this.el.setAttribute(t, s) : this.el.removeAttribute(t);
|
|
186
|
+
}), this;
|
|
187
|
+
}
|
|
188
|
+
part(t) {
|
|
189
|
+
return this.attr("part", t);
|
|
190
|
+
}
|
|
191
|
+
data(t, r) {
|
|
192
|
+
return this.attr(`data-${t}`, r);
|
|
193
|
+
}
|
|
194
|
+
style(t, r) {
|
|
195
|
+
return typeof t == "string" ? this.bind(r ?? "", (s) => this.el.style.setProperty(t, s)) : Object.entries(t).forEach(([s, n]) => this.el.style.setProperty(s, n)), this;
|
|
196
|
+
}
|
|
197
|
+
cssVar(t, r) {
|
|
198
|
+
const s = t.startsWith("--") ? t : `--${t}`;
|
|
199
|
+
return this.style(s, r);
|
|
200
|
+
}
|
|
201
|
+
aria(t, r) {
|
|
202
|
+
return this.attr(`aria-${t}`, r);
|
|
203
|
+
}
|
|
204
|
+
role(t) {
|
|
205
|
+
return this.attr("role", t);
|
|
206
|
+
}
|
|
207
|
+
tabIndex(t) {
|
|
208
|
+
return this.attr("tabindex", String(t));
|
|
209
|
+
}
|
|
210
|
+
label(t) {
|
|
211
|
+
return this.aria("label", t);
|
|
212
|
+
}
|
|
213
|
+
labelledBy(t) {
|
|
214
|
+
return this.aria("labelledby", t);
|
|
215
|
+
}
|
|
216
|
+
describedBy(t) {
|
|
217
|
+
return this.aria("describedby", t);
|
|
218
|
+
}
|
|
219
|
+
ariaHidden(t = !0) {
|
|
220
|
+
return this.aria("hidden", String(t));
|
|
221
|
+
}
|
|
222
|
+
on(t, r, s) {
|
|
223
|
+
return this.el.addEventListener(t, r, s), this;
|
|
224
|
+
}
|
|
225
|
+
listen(t, r, s, n) {
|
|
226
|
+
return t.on(this.el, r, s, n), this;
|
|
227
|
+
}
|
|
228
|
+
delegate(t, r, s, n, l) {
|
|
229
|
+
return t.delegate(this.el, r, s, n, l), this;
|
|
230
|
+
}
|
|
231
|
+
children(...t) {
|
|
232
|
+
const r = (s) => s.reduce((n, l) => Array.isArray(l) ? n.concat(r(l)) : n.concat(l), []);
|
|
233
|
+
return r(t).forEach((s) => {
|
|
234
|
+
s != null && (s instanceof N ? this.el.appendChild(s.build()) : typeof s == "string" ? u ? this.el.appendChild(s) : this.el.appendChild(document.createTextNode(s)) : this.el.appendChild(s));
|
|
235
|
+
}), this;
|
|
236
|
+
}
|
|
237
|
+
replaceChildren(...t) {
|
|
238
|
+
if (u) {
|
|
239
|
+
const r = this.el;
|
|
240
|
+
r.childrenList = [];
|
|
241
|
+
} else this.el.replaceChildren();
|
|
242
|
+
return this.children(...t);
|
|
243
|
+
}
|
|
244
|
+
text(t) {
|
|
245
|
+
return this.bind(t, (r) => {
|
|
246
|
+
this.el.textContent = r;
|
|
247
|
+
}), this;
|
|
248
|
+
}
|
|
249
|
+
ref(t) {
|
|
250
|
+
return t.current = this.el, this;
|
|
251
|
+
}
|
|
252
|
+
shadow(t = { mode: "closed" }) {
|
|
253
|
+
const r = this.el.attachShadow(t);
|
|
254
|
+
return new x(this.el, r, t);
|
|
255
|
+
}
|
|
256
|
+
build() {
|
|
257
|
+
return this.el;
|
|
258
|
+
}
|
|
259
|
+
serialize() {
|
|
260
|
+
if (u) return this.el.serialize();
|
|
261
|
+
const t = document.createElement("div");
|
|
262
|
+
return t.appendChild(this.el.cloneNode(!0)), t.innerHTML;
|
|
263
|
+
}
|
|
264
|
+
}, x = class {
|
|
265
|
+
root;
|
|
266
|
+
hostEl;
|
|
267
|
+
options;
|
|
268
|
+
constructor(e, t, r) {
|
|
269
|
+
this.hostEl = e, this.root = t, this.options = r;
|
|
270
|
+
}
|
|
271
|
+
children(...e) {
|
|
272
|
+
const t = (r) => r.reduce((s, n) => Array.isArray(n) ? s.concat(t(n)) : s.concat(n), []);
|
|
273
|
+
return t(e).forEach((r) => {
|
|
274
|
+
r != null && (r instanceof B ? this.root.appendChild(r.build()) : typeof r == "string" ? u ? this.root.appendChild(r) : this.root.appendChild(document.createTextNode(r)) : this.root.appendChild(r));
|
|
275
|
+
}), this;
|
|
276
|
+
}
|
|
277
|
+
adoptSheet(...e) {
|
|
278
|
+
return this.root.adoptedStyleSheets = [...this.root.adoptedStyleSheets, ...e], this;
|
|
279
|
+
}
|
|
280
|
+
css(e) {
|
|
281
|
+
if (u)
|
|
282
|
+
return this.root.adoptedStyleSheets.push(e), this;
|
|
283
|
+
if (typeof CSSStyleSheet < "u") try {
|
|
284
|
+
const r = new CSSStyleSheet();
|
|
285
|
+
return r.replaceSync(e), this.root.adoptedStyleSheets = [...this.root.adoptedStyleSheets, r], this;
|
|
286
|
+
} catch {
|
|
287
|
+
}
|
|
288
|
+
const t = document.createElement("style");
|
|
289
|
+
return t.textContent = e, this.root.appendChild(t), this;
|
|
290
|
+
}
|
|
291
|
+
done() {
|
|
292
|
+
return {
|
|
293
|
+
host: this.hostEl,
|
|
294
|
+
shadow: this.root
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
serialize() {
|
|
298
|
+
return u ? this.root.serialize() : this.root.innerHTML;
|
|
299
|
+
}
|
|
300
|
+
}, a = (e) => new B(e), F = () => a("div"), K = () => a("span"), U = () => a("slot"), Y = () => a("button"), G = () => a("input"), J = () => a("style"), Q = () => a("label"), X = () => a("ul"), Z = () => a("li"), _ = () => a("section"), tt = () => a("article"), et = () => a("nav"), rt = () => a("header"), st = () => a("footer"), nt = () => a("main"), it = (e = "open", t = !1) => {
|
|
301
|
+
const r = a("template");
|
|
302
|
+
return r.attr("shadowrootmode", e), t && r.attr("shadowrootdelegatesfocus", ""), r;
|
|
303
|
+
};
|
|
304
|
+
export {
|
|
305
|
+
k as C,
|
|
306
|
+
V as D,
|
|
307
|
+
$ as E,
|
|
308
|
+
T as O,
|
|
309
|
+
j as S,
|
|
310
|
+
P as T,
|
|
311
|
+
a as _,
|
|
312
|
+
st as a,
|
|
313
|
+
W as b,
|
|
314
|
+
Q as c,
|
|
315
|
+
et as d,
|
|
316
|
+
_ as f,
|
|
317
|
+
X as g,
|
|
318
|
+
J as h,
|
|
319
|
+
F as i,
|
|
320
|
+
R as k,
|
|
321
|
+
Z as l,
|
|
322
|
+
K as m,
|
|
323
|
+
Y as n,
|
|
324
|
+
rt as o,
|
|
325
|
+
U as p,
|
|
326
|
+
it as r,
|
|
327
|
+
G as s,
|
|
328
|
+
tt as t,
|
|
329
|
+
nt as u,
|
|
330
|
+
B as v,
|
|
331
|
+
M as w,
|
|
332
|
+
I as x,
|
|
333
|
+
x as y
|
|
334
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a, i as o, n as i, r as n, t as h } from "./utils-DBfrRFoE.js";
|
|
2
|
-
import { _ as l, p as m } from "./factory-
|
|
2
|
+
import { _ as l, p as m } from "./factory-DCrO37si.js";
|
|
3
3
|
import { a as u, n as f } from "./ssr-DSGwPtEd.js";
|
|
4
4
|
var c = ".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 f {
|
|
5
5
|
_form;
|
package/dist/form.js
CHANGED