@astryx-vue/lab 0.3.0 → 0.3.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/dist/index.d.ts +2 -2
- package/dist/index.js +15 -6
- package/package.json +3 -3
- package/styles/mobile-tokenizer.css +14 -0
package/dist/index.d.ts
CHANGED
|
@@ -68,11 +68,11 @@ type __VLS_Slots$4 = {} & {
|
|
|
68
68
|
};
|
|
69
69
|
declare const __VLS_base$4: import("vue").DefineComponent<CircularProgressProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CircularProgressProps> & Readonly<{}>, {
|
|
70
70
|
value: number;
|
|
71
|
+
size: CircularProgressSize;
|
|
71
72
|
max: number;
|
|
72
73
|
isLabelHidden: boolean;
|
|
73
74
|
hasValueLabel: boolean;
|
|
74
75
|
formatValueLabel: (value: number, max: number) => string;
|
|
75
|
-
size: CircularProgressSize;
|
|
76
76
|
variant: keyof CircularProgressVariantMap;
|
|
77
77
|
isIndeterminate: boolean;
|
|
78
78
|
isDisabled: boolean;
|
|
@@ -753,9 +753,9 @@ type __VLS_Slots = {} & {
|
|
|
753
753
|
};
|
|
754
754
|
declare const __VLS_base: import("vue").DefineComponent<StatProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<StatProps> & Readonly<{}>, {
|
|
755
755
|
value: string;
|
|
756
|
-
size: StatSize;
|
|
757
756
|
delta: StatDelta;
|
|
758
757
|
description: string;
|
|
758
|
+
size: StatSize;
|
|
759
759
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
760
760
|
declare const __VLS_export$3: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
761
761
|
declare const _default$7: typeof __VLS_export$3;
|
package/dist/index.js
CHANGED
|
@@ -3043,7 +3043,7 @@ function useSheetSearch(options) {
|
|
|
3043
3043
|
const _hoisted_1$5 = [
|
|
3044
3044
|
"aria-expanded",
|
|
3045
3045
|
"aria-label",
|
|
3046
|
-
"disabled"
|
|
3046
|
+
"aria-disabled"
|
|
3047
3047
|
];
|
|
3048
3048
|
const _hoisted_2$5 = {
|
|
3049
3049
|
key: 1,
|
|
@@ -3065,7 +3065,7 @@ const _hoisted_7$1 = { class: "astryx-mobile-tokenizer__create-label" };
|
|
|
3065
3065
|
const _hoisted_8$1 = [
|
|
3066
3066
|
"aria-checked",
|
|
3067
3067
|
"aria-label",
|
|
3068
|
-
"disabled",
|
|
3068
|
+
"aria-disabled",
|
|
3069
3069
|
"onClick"
|
|
3070
3070
|
];
|
|
3071
3071
|
const _hoisted_9$1 = { class: "astryx-mobile-tokenizer__row-label" };
|
|
@@ -3179,6 +3179,7 @@ const _sfc_main$5 = /*@__PURE__*/ defineComponent({
|
|
|
3179
3179
|
});
|
|
3180
3180
|
}
|
|
3181
3181
|
function openSheet() {
|
|
3182
|
+
if (props.isDisabled) return;
|
|
3182
3183
|
selectedAtOpen.value = [...selected.value];
|
|
3183
3184
|
sheet.resetWindow();
|
|
3184
3185
|
isOpen.value = true;
|
|
@@ -3200,6 +3201,14 @@ const _sfc_main$5 = /*@__PURE__*/ defineComponent({
|
|
|
3200
3201
|
query.value = "";
|
|
3201
3202
|
sheet.resetWindow();
|
|
3202
3203
|
}
|
|
3204
|
+
function isRowDisabled(item) {
|
|
3205
|
+
return !selectedIds.value.has(item.id) && isAtMax.value;
|
|
3206
|
+
}
|
|
3207
|
+
function handleRowClick(item) {
|
|
3208
|
+
if (isRowDisabled(item)) return;
|
|
3209
|
+
if (selectedIds.value.has(item.id)) handleRemove(item);
|
|
3210
|
+
else handleAdd(item);
|
|
3211
|
+
}
|
|
3203
3212
|
function handleDone() {
|
|
3204
3213
|
query.value = "";
|
|
3205
3214
|
handleOpenChange(false);
|
|
@@ -3223,7 +3232,7 @@ const _sfc_main$5 = /*@__PURE__*/ defineComponent({
|
|
|
3223
3232
|
"aria-haspopup": "dialog",
|
|
3224
3233
|
"aria-expanded": isOpen.value,
|
|
3225
3234
|
"aria-label": __props.label,
|
|
3226
|
-
disabled: __props.isDisabled,
|
|
3235
|
+
"aria-disabled": __props.isDisabled || void 0,
|
|
3227
3236
|
onClick: openSheet
|
|
3228
3237
|
}, [selected.value.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(selected.value, (item) => {
|
|
3229
3238
|
return openBlock(), createBlock(unref(Token), {
|
|
@@ -3293,15 +3302,15 @@ const _sfc_main$5 = /*@__PURE__*/ defineComponent({
|
|
|
3293
3302
|
class: "astryx-mobile-tokenizer__row",
|
|
3294
3303
|
"aria-checked": selectedIds.value.has(item.id),
|
|
3295
3304
|
"aria-label": item.label,
|
|
3296
|
-
disabled:
|
|
3297
|
-
onClick: ($event) =>
|
|
3305
|
+
"aria-disabled": isRowDisabled(item) || void 0,
|
|
3306
|
+
onClick: ($event) => handleRowClick(item)
|
|
3298
3307
|
}, [createElementVNode("span", _hoisted_9$1, [createVNode(unref(Text), { type: "body" }, {
|
|
3299
3308
|
default: withCtx(() => [createTextVNode(toDisplayString(item.label), 1)]),
|
|
3300
3309
|
_: 2
|
|
3301
3310
|
}, 1024)]), createVNode(unref(CheckboxIndicator), {
|
|
3302
3311
|
state: selectedIds.value.has(item.id) ? "checked" : "unchecked",
|
|
3303
3312
|
size: "md",
|
|
3304
|
-
"is-disabled":
|
|
3313
|
+
"is-disabled": isRowDisabled(item)
|
|
3305
3314
|
}, null, 8, ["state", "is-disabled"])], 8, _hoisted_8$1);
|
|
3306
3315
|
}), 128))], 40, _hoisted_5$3),
|
|
3307
3316
|
query.value.trim() === "" ? (openBlock(), createElementBlock("div", _hoisted_10$1, [createVNode(unref(Button), {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryx-vue/lab",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.1",
|
|
5
5
|
"description": "Astryx lab components for Vue 3 — experimental components that may change. Ships only under the canary dist-tag.",
|
|
6
6
|
"author": "ShenQingchuan",
|
|
7
7
|
"license": "MIT",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
],
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"vue": "^3.5.0",
|
|
56
|
-
"@astryx-vue/core": "^0.7.
|
|
56
|
+
"@astryx-vue/core": "^0.7.11"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@types/node": "26.6.4",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"unplugin-vue": "8.0.0",
|
|
65
65
|
"vue": "3.5.43",
|
|
66
66
|
"vue-tsc": "3.3.12",
|
|
67
|
-
"@astryx-vue/core": "^0.7.
|
|
67
|
+
"@astryx-vue/core": "^0.7.11"
|
|
68
68
|
},
|
|
69
69
|
"scripts": {
|
|
70
70
|
"build": "tsdown",
|
|
@@ -143,4 +143,18 @@
|
|
|
143
143
|
.astryx-mobile-tokenizer__empty {
|
|
144
144
|
flex-grow: 1;
|
|
145
145
|
}
|
|
146
|
+
|
|
147
|
+
@media (forced-colors: active) {
|
|
148
|
+
.astryx-mobile-tokenizer__trigger[aria-disabled='true'] {
|
|
149
|
+
border-color: GrayText;
|
|
150
|
+
color: GrayText;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.astryx-mobile-tokenizer__trigger[aria-disabled='true'] .astryx-mobile-tokenizer__trigger-placeholder,
|
|
154
|
+
.astryx-mobile-tokenizer__trigger[aria-disabled='true'] .astryx-token,
|
|
155
|
+
.astryx-mobile-tokenizer__row[aria-disabled='true'],
|
|
156
|
+
.astryx-mobile-tokenizer__row[aria-disabled='true'] .astryx-text {
|
|
157
|
+
color: GrayText;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
146
160
|
}
|