@retailcrm/embed-ui-v1-components 0.9.16 → 0.9.18
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/host.cjs +414 -278
- package/dist/host.css +85 -0
- package/dist/host.d.ts +78 -6
- package/dist/host.js +414 -278
- package/dist/remote.cjs +80 -22
- package/dist/remote.d.ts +96 -2
- package/dist/remote.js +80 -22
- package/docs/COMPONENTS.md +1 -0
- package/docs/profiles/UiSkeleton.yml +41 -0
- package/package.json +1 -1
package/dist/remote.cjs
CHANGED
|
@@ -575,17 +575,17 @@ function render$1(_ctx, _cache) {
|
|
|
575
575
|
])]);
|
|
576
576
|
}
|
|
577
577
|
const IconCheckmarkCircle = { render: render$1 };
|
|
578
|
-
var APPEARANCE$
|
|
578
|
+
var APPEARANCE$2 = /* @__PURE__ */ ((APPEARANCE2) => {
|
|
579
579
|
APPEARANCE2["DEFAULT"] = "default";
|
|
580
580
|
APPEARANCE2["SECTION"] = "section";
|
|
581
581
|
return APPEARANCE2;
|
|
582
|
-
})(APPEARANCE$
|
|
583
|
-
var SIZE$
|
|
582
|
+
})(APPEARANCE$2 || {});
|
|
583
|
+
var SIZE$4 = /* @__PURE__ */ ((SIZE2) => {
|
|
584
584
|
SIZE2["SM"] = "sm";
|
|
585
585
|
SIZE2["MD"] = "md";
|
|
586
586
|
SIZE2["LG"] = "lg";
|
|
587
587
|
return SIZE2;
|
|
588
|
-
})(SIZE$
|
|
588
|
+
})(SIZE$4 || {});
|
|
589
589
|
const AppearanceKey = Symbol("UiRadioSwitchAppearance");
|
|
590
590
|
const SizeKey$1 = Symbol("UiRadioSwitchSize");
|
|
591
591
|
const RegistryKey$1 = Symbol("UiRadioSwitchRegistry");
|
|
@@ -593,8 +593,8 @@ const UpdateKey = Symbol("UiRadioSwitchUpdate");
|
|
|
593
593
|
const FocusableIdKey$1 = Symbol("UiRadioSwitchFocusableId");
|
|
594
594
|
const SetFocusableIdKey$1 = Symbol("UiRadioSwitchSetFocusableId");
|
|
595
595
|
const MoveFocusKey$1 = Symbol("UiRadioSwitchMoveFocus");
|
|
596
|
-
const useAppearance = () => vue.inject(AppearanceKey, vue.computed(() => APPEARANCE$
|
|
597
|
-
const useSize$1 = () => vue.inject(SizeKey$1, vue.computed(() => SIZE$
|
|
596
|
+
const useAppearance = () => vue.inject(AppearanceKey, vue.computed(() => APPEARANCE$2.DEFAULT));
|
|
597
|
+
const useSize$1 = () => vue.inject(SizeKey$1, vue.computed(() => SIZE$4.MD));
|
|
598
598
|
const useRegistry$1 = () => vue.inject(RegistryKey$1, {
|
|
599
599
|
register: () => {
|
|
600
600
|
},
|
|
@@ -773,7 +773,7 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
|
|
|
773
773
|
])
|
|
774
774
|
])) : vue.createCommentVNode("", true)
|
|
775
775
|
]),
|
|
776
|
-
vue.unref(appearance) === vue.unref(APPEARANCE$
|
|
776
|
+
vue.unref(appearance) === vue.unref(APPEARANCE$2).SECTION ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
777
777
|
_ctx.$slots.description || __props.description ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
|
|
778
778
|
vue.renderSlot(_ctx.$slots, "description", {}, () => [
|
|
779
779
|
vue.createTextVNode(vue.toDisplayString(__props.description), 1)
|
|
@@ -816,14 +816,14 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
816
816
|
/** Внешний вид */
|
|
817
817
|
appearance: {
|
|
818
818
|
type: String,
|
|
819
|
-
default: APPEARANCE$
|
|
820
|
-
validator: (appearance) => Object.values(APPEARANCE$
|
|
819
|
+
default: APPEARANCE$2.DEFAULT,
|
|
820
|
+
validator: (appearance) => Object.values(APPEARANCE$2).includes(appearance)
|
|
821
821
|
},
|
|
822
822
|
/** Размер */
|
|
823
823
|
size: {
|
|
824
824
|
type: String,
|
|
825
|
-
default: SIZE$
|
|
826
|
-
validator: (size) => Object.values(SIZE$
|
|
825
|
+
default: SIZE$4.MD,
|
|
826
|
+
validator: (size) => Object.values(SIZE$4).includes(size)
|
|
827
827
|
},
|
|
828
828
|
/** Растягивание контейнера в зависимости от контента */
|
|
829
829
|
rubber: {
|
|
@@ -959,6 +959,11 @@ const UiScrollBox = remote.defineRemoteComponent(
|
|
|
959
959
|
"ps-y-reach-end"
|
|
960
960
|
]
|
|
961
961
|
);
|
|
962
|
+
const UiSkeletonType = "UiSkeleton";
|
|
963
|
+
const UiSkeleton = remote.defineRemoteComponent(
|
|
964
|
+
UiSkeletonType,
|
|
965
|
+
["click", "focus", "blur"]
|
|
966
|
+
);
|
|
962
967
|
const UiSliderType = "UiSlider";
|
|
963
968
|
const UiSlider = remote.defineRemoteComponent(
|
|
964
969
|
UiSliderType,
|
|
@@ -1569,14 +1574,30 @@ const UiTag = remote.defineRemoteComponent(
|
|
|
1569
1574
|
UiTagType,
|
|
1570
1575
|
["click", "focus", "blur", "remove"]
|
|
1571
1576
|
);
|
|
1572
|
-
var
|
|
1577
|
+
var WIDTH = /* @__PURE__ */ ((WIDTH2) => {
|
|
1578
|
+
WIDTH2["FIT"] = "fit";
|
|
1579
|
+
WIDTH2["FLUID"] = "fluid";
|
|
1580
|
+
return WIDTH2;
|
|
1581
|
+
})(WIDTH || {});
|
|
1582
|
+
const NUMERIC_PATTERN = /^(?:\d+|\d*\.\d+)$/;
|
|
1583
|
+
const UNIT_PATTERN = /^(?:\d+|\d*\.\d+)(?:%|cap|ch|cm|dvb|dvh|dvi|dvw|em|ex|ic|in|lh|lvb|lvh|lvi|lvw|mm|pc|pt|px|Q|rem|rlh|svb|svh|svi|svw|vb|vh|vi|vmax|vmin|vw)$/i;
|
|
1584
|
+
const isWidthNumeric = (value) => {
|
|
1585
|
+
return typeof value === "number" ? Number.isFinite(value) && value >= 0 : typeof value === "string" && NUMERIC_PATTERN.test(value.trim());
|
|
1586
|
+
};
|
|
1587
|
+
const isWidthToken = (value) => {
|
|
1588
|
+
return typeof value === "string" && Object.values(WIDTH).includes(value);
|
|
1589
|
+
};
|
|
1590
|
+
const isWidth = (value) => {
|
|
1591
|
+
return value === null || value === void 0 || isWidthToken(value) || isWidthNumeric(value) || typeof value === "string" && UNIT_PATTERN.test(value.trim());
|
|
1592
|
+
};
|
|
1593
|
+
var SIZE$3 = /* @__PURE__ */ ((SIZE2) => {
|
|
1573
1594
|
SIZE2["XS"] = "xs";
|
|
1574
1595
|
SIZE2["SM"] = "sm";
|
|
1575
1596
|
SIZE2["MD"] = "md";
|
|
1576
1597
|
SIZE2["LG"] = "lg";
|
|
1577
1598
|
SIZE2["XL"] = "xl";
|
|
1578
1599
|
return SIZE2;
|
|
1579
|
-
})(SIZE$
|
|
1600
|
+
})(SIZE$3 || {});
|
|
1580
1601
|
const events = [
|
|
1581
1602
|
"input",
|
|
1582
1603
|
"keydown",
|
|
@@ -2362,8 +2383,14 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2362
2383
|
/** Размер поля ввода */
|
|
2363
2384
|
textboxSize: {
|
|
2364
2385
|
type: String,
|
|
2365
|
-
validator: (size) => Object.values(SIZE$
|
|
2366
|
-
default: SIZE$
|
|
2386
|
+
validator: (size) => Object.values(SIZE$3).includes(size),
|
|
2387
|
+
default: SIZE$3.SM
|
|
2388
|
+
},
|
|
2389
|
+
/** Ширина селекта. fit — по содержимому, fluid — на всю ширину контейнера */
|
|
2390
|
+
width: {
|
|
2391
|
+
type: [Number, String],
|
|
2392
|
+
validator: isWidth,
|
|
2393
|
+
default: WIDTH.FIT
|
|
2367
2394
|
},
|
|
2368
2395
|
/** Наличие множественного выбора среди элементов выпадающего списка */
|
|
2369
2396
|
multiple: {
|
|
@@ -2632,13 +2659,14 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2632
2659
|
"placeholder-only": __props.placeholderOnly,
|
|
2633
2660
|
placeholder: __props.placeholder,
|
|
2634
2661
|
"textbox-size": __props.textboxSize,
|
|
2662
|
+
width: __props.width,
|
|
2635
2663
|
"active-descendant": activeOptionId.value
|
|
2636
2664
|
}, _ctx.$attrs, {
|
|
2637
2665
|
onInput,
|
|
2638
2666
|
onKeydown: onKeyDown,
|
|
2639
2667
|
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => state.value = $event),
|
|
2640
2668
|
"onUpdate:expanded": _cache[1] || (_cache[1] = ($event) => state.expanded = $event)
|
|
2641
|
-
}), null, 16, ["id", "value", "multiple", "selection", "filter", "filterable", "clearable", "expanded", "invalid", "disabled", "readonly", "placeholder-only", "placeholder", "textbox-size", "active-descendant"]),
|
|
2669
|
+
}), null, 16, ["id", "value", "multiple", "selection", "filter", "filterable", "clearable", "expanded", "invalid", "disabled", "readonly", "placeholder-only", "placeholder", "textbox-size", "width", "active-descendant"]),
|
|
2642
2670
|
vue.createVNode(vue.unref(UiSelectPopper), {
|
|
2643
2671
|
id: resolvedId.value,
|
|
2644
2672
|
ref_key: "popper",
|
|
@@ -2685,13 +2713,13 @@ function render(_ctx, _cache) {
|
|
|
2685
2713
|
])]);
|
|
2686
2714
|
}
|
|
2687
2715
|
const IconAddCircleOutlined = { render };
|
|
2688
|
-
var SIZE$
|
|
2716
|
+
var SIZE$2 = /* @__PURE__ */ ((SIZE2) => {
|
|
2689
2717
|
SIZE2["XS"] = "xs";
|
|
2690
2718
|
SIZE2["SM"] = "sm";
|
|
2691
2719
|
SIZE2["MD"] = "md";
|
|
2692
2720
|
SIZE2["LG"] = "lg";
|
|
2693
2721
|
return SIZE2;
|
|
2694
|
-
})(SIZE$
|
|
2722
|
+
})(SIZE$2 || {});
|
|
2695
2723
|
const _hoisted_1 = ["id", "aria-selected", "aria-current"];
|
|
2696
2724
|
const _hoisted_2 = ["innerHTML"];
|
|
2697
2725
|
const _hoisted_3 = ["innerHTML"];
|
|
@@ -2726,8 +2754,8 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2726
2754
|
/** Размер шрифта, иконок и внутренних отступов компонента */
|
|
2727
2755
|
size: {
|
|
2728
2756
|
type: String,
|
|
2729
|
-
validator: (size) => Object.values(SIZE$
|
|
2730
|
-
default: SIZE$
|
|
2757
|
+
validator: (size) => Object.values(SIZE$2).includes(size),
|
|
2758
|
+
default: SIZE$2.MD
|
|
2731
2759
|
},
|
|
2732
2760
|
/** Счетчик количества */
|
|
2733
2761
|
counter: {
|
|
@@ -3010,6 +3038,7 @@ const createEndpointRoot = async (channel) => {
|
|
|
3010
3038
|
"UiAvatarList",
|
|
3011
3039
|
"UiAlert",
|
|
3012
3040
|
"UiButton",
|
|
3041
|
+
"UiCalendar",
|
|
3013
3042
|
"UiCheckbox",
|
|
3014
3043
|
"UiCollapse",
|
|
3015
3044
|
"UiCollapseBox",
|
|
@@ -3029,6 +3058,7 @@ const createEndpointRoot = async (channel) => {
|
|
|
3029
3058
|
"UiModalWindowSurface",
|
|
3030
3059
|
"UiNumberStepper",
|
|
3031
3060
|
"UiPageHeader",
|
|
3061
|
+
"UiPageHeaderLayout",
|
|
3032
3062
|
"UiPageHeaderTitle",
|
|
3033
3063
|
"UiPopper",
|
|
3034
3064
|
"UiPopperConnector",
|
|
@@ -3037,6 +3067,7 @@ const createEndpointRoot = async (channel) => {
|
|
|
3037
3067
|
"UiRadioSwitchOptionShell",
|
|
3038
3068
|
"UiRadioSwitchRoot",
|
|
3039
3069
|
"UiScrollBox",
|
|
3070
|
+
"UiSkeleton",
|
|
3040
3071
|
"UiSlider",
|
|
3041
3072
|
"UiSwitch",
|
|
3042
3073
|
"UiTab",
|
|
@@ -3057,6 +3088,7 @@ const createEndpointRoot = async (channel) => {
|
|
|
3057
3088
|
"UiTimePicker",
|
|
3058
3089
|
"UiToggleButton",
|
|
3059
3090
|
"UiToggleGroupRoot",
|
|
3091
|
+
// UiToolbar is host-only: remote trees can render toolbar items, but cannot create the toolbar container.
|
|
3060
3092
|
"UiToolbarButton",
|
|
3061
3093
|
"UiToolbarLink",
|
|
3062
3094
|
"UiTooltip",
|
|
@@ -3080,6 +3112,26 @@ const usePreview = (workers = vue.ref([])) => {
|
|
|
3080
3112
|
preview: (url, resize = void 0, crop = void 0) => imagePreview.preview(_workers.value, url, resize, crop)
|
|
3081
3113
|
};
|
|
3082
3114
|
};
|
|
3115
|
+
var ANIMATION = /* @__PURE__ */ ((ANIMATION2) => {
|
|
3116
|
+
ANIMATION2["PULSE"] = "pulse";
|
|
3117
|
+
ANIMATION2["SHIMMER"] = "shimmer";
|
|
3118
|
+
return ANIMATION2;
|
|
3119
|
+
})(ANIMATION || {});
|
|
3120
|
+
var APPEARANCE$1 = /* @__PURE__ */ ((APPEARANCE2) => {
|
|
3121
|
+
APPEARANCE2["CIRCLE"] = "circle";
|
|
3122
|
+
APPEARANCE2["RECTANGLE"] = "rectangle";
|
|
3123
|
+
APPEARANCE2["TEXT"] = "text";
|
|
3124
|
+
return APPEARANCE2;
|
|
3125
|
+
})(APPEARANCE$1 || {});
|
|
3126
|
+
var SIZE$1 = /* @__PURE__ */ ((SIZE2) => {
|
|
3127
|
+
SIZE2["SM"] = "sm";
|
|
3128
|
+
SIZE2["MD"] = "md";
|
|
3129
|
+
SIZE2["LG"] = "lg";
|
|
3130
|
+
return SIZE2;
|
|
3131
|
+
})(SIZE$1 || {});
|
|
3132
|
+
function guessDimensionStyleValue(value) {
|
|
3133
|
+
return typeof value === "number" || typeof value === "string" && /^\d*$/.test(value) ? `${value}px` : value;
|
|
3134
|
+
}
|
|
3083
3135
|
var SIZE = /* @__PURE__ */ ((SIZE2) => {
|
|
3084
3136
|
SIZE2["SM"] = "sm";
|
|
3085
3137
|
SIZE2["MD"] = "md";
|
|
@@ -3130,8 +3182,11 @@ function detectLocale() {
|
|
|
3130
3182
|
exports.ALIGN = ALIGN;
|
|
3131
3183
|
exports.DIRECTION = DIRECTION;
|
|
3132
3184
|
exports.ImageWorkersKey = ImageWorkersKey;
|
|
3133
|
-
exports.RADIO_SWITCH_APPEARANCE = APPEARANCE$
|
|
3134
|
-
exports.RADIO_SWITCH_SIZE = SIZE$
|
|
3185
|
+
exports.RADIO_SWITCH_APPEARANCE = APPEARANCE$2;
|
|
3186
|
+
exports.RADIO_SWITCH_SIZE = SIZE$4;
|
|
3187
|
+
exports.SKELETON_ANIMATION = ANIMATION;
|
|
3188
|
+
exports.SKELETON_APPEARANCE = APPEARANCE$1;
|
|
3189
|
+
exports.SKELETON_SIZE = SIZE$1;
|
|
3135
3190
|
exports.TAB_APPEARANCE = APPEARANCE;
|
|
3136
3191
|
exports.TAB_SIZE = SIZE;
|
|
3137
3192
|
exports.UiAddButton = UiAddButton;
|
|
@@ -3197,6 +3252,8 @@ exports.UiScrollBoxType = UiScrollBoxType;
|
|
|
3197
3252
|
exports.UiSelect = _sfc_main$3;
|
|
3198
3253
|
exports.UiSelectOption = _sfc_main$2;
|
|
3199
3254
|
exports.UiSelectOptionGroup = _sfc_main;
|
|
3255
|
+
exports.UiSkeleton = UiSkeleton;
|
|
3256
|
+
exports.UiSkeletonType = UiSkeletonType;
|
|
3200
3257
|
exports.UiSlider = UiSlider;
|
|
3201
3258
|
exports.UiSliderType = UiSliderType;
|
|
3202
3259
|
exports.UiSwitch = UiSwitch;
|
|
@@ -3241,5 +3298,6 @@ exports.createEndpointRoot = createEndpointRoot;
|
|
|
3241
3298
|
exports.formatDate = formatDate;
|
|
3242
3299
|
exports.formatDateTime = formatDateTime;
|
|
3243
3300
|
exports.formatTime = formatTime;
|
|
3301
|
+
exports.guessSkeletonDimensionStyleValue = guessDimensionStyleValue;
|
|
3244
3302
|
exports.mountEndpointRoot = mountEndpointRoot;
|
|
3245
3303
|
exports.usePreview = usePreview;
|
package/dist/remote.d.ts
CHANGED
|
@@ -617,6 +617,12 @@ declare const __VLS_component_5: DefineComponent<ExtractPropTypes<{
|
|
|
617
617
|
validator: (size: string) => boolean;
|
|
618
618
|
default: SIZE_4;
|
|
619
619
|
};
|
|
620
|
+
/** Ширина селекта. fit — по содержимому, fluid — на всю ширину контейнера */
|
|
621
|
+
width: {
|
|
622
|
+
type: PropType<WidthValue>;
|
|
623
|
+
validator: (value: unknown) => value is WidthValue | null | undefined;
|
|
624
|
+
default: WIDTH;
|
|
625
|
+
};
|
|
620
626
|
/** Наличие множественного выбора среди элементов выпадающего списка */
|
|
621
627
|
multiple: {
|
|
622
628
|
type: BooleanConstructor;
|
|
@@ -727,6 +733,12 @@ declare const __VLS_component_5: DefineComponent<ExtractPropTypes<{
|
|
|
727
733
|
validator: (size: string) => boolean;
|
|
728
734
|
default: SIZE_4;
|
|
729
735
|
};
|
|
736
|
+
/** Ширина селекта. fit — по содержимому, fluid — на всю ширину контейнера */
|
|
737
|
+
width: {
|
|
738
|
+
type: PropType<WidthValue>;
|
|
739
|
+
validator: (value: unknown) => value is WidthValue | null | undefined;
|
|
740
|
+
default: WIDTH;
|
|
741
|
+
};
|
|
730
742
|
/** Наличие множественного выбора среди элементов выпадающего списка */
|
|
731
743
|
multiple: {
|
|
732
744
|
type: BooleanConstructor;
|
|
@@ -751,6 +763,7 @@ declare const __VLS_component_5: DefineComponent<ExtractPropTypes<{
|
|
|
751
763
|
id: string;
|
|
752
764
|
placeholder: string;
|
|
753
765
|
disabled: boolean;
|
|
766
|
+
width: WidthValue;
|
|
754
767
|
expanded: boolean;
|
|
755
768
|
targetTriggers: TriggerSchema | Trigger[];
|
|
756
769
|
popperTriggers: TriggerSchema | Trigger[];
|
|
@@ -829,7 +842,7 @@ declare const __VLS_component_5: DefineComponent<ExtractPropTypes<{
|
|
|
829
842
|
R,
|
|
830
843
|
R,
|
|
831
844
|
OnCleanup
|
|
832
|
-
]) => any : (...args: [
|
|
845
|
+
]) => any : (... /** @type { [typeof __VLS_components.UiPopperConnector, typeof __VLS_components.UiPopperConnector, ] } */args: [
|
|
833
846
|
any,
|
|
834
847
|
any,
|
|
835
848
|
OnCleanup
|
|
@@ -1173,7 +1186,7 @@ declare function __VLS_template_5(): {
|
|
|
1173
1186
|
R,
|
|
1174
1187
|
R,
|
|
1175
1188
|
OnCleanup
|
|
1176
|
-
]) => any : (...args: [
|
|
1189
|
+
]) => any : (... /** @type { [typeof __VLS_components.UiPopperConnector, typeof __VLS_components.UiPopperConnector, ] } */args: [
|
|
1177
1190
|
any,
|
|
1178
1191
|
any,
|
|
1179
1192
|
OnCleanup
|
|
@@ -1412,6 +1425,7 @@ export declare type Group<T, GroupData> = {
|
|
|
1412
1425
|
rows: readonly T[];
|
|
1413
1426
|
};
|
|
1414
1427
|
export declare type GroupBy<T, GroupData> = (rows: readonly T[]) => Group<T, GroupData>[];
|
|
1428
|
+
export declare function guessSkeletonDimensionStyleValue(value: Numeric | null): string | null;
|
|
1415
1429
|
export declare const ImageWorkersKey: InjectionKey<Ref<string[]>>;
|
|
1416
1430
|
declare enum INPUTMODE {
|
|
1417
1431
|
DECIMAL = "decimal",
|
|
@@ -1554,6 +1568,20 @@ declare enum SIZE_8 {
|
|
|
1554
1568
|
MD = "md",
|
|
1555
1569
|
LG = "lg"
|
|
1556
1570
|
}
|
|
1571
|
+
export declare enum SKELETON_ANIMATION {
|
|
1572
|
+
PULSE = "pulse",
|
|
1573
|
+
SHIMMER = "shimmer"
|
|
1574
|
+
}
|
|
1575
|
+
export declare enum SKELETON_APPEARANCE {
|
|
1576
|
+
CIRCLE = "circle",
|
|
1577
|
+
RECTANGLE = "rectangle",
|
|
1578
|
+
TEXT = "text"
|
|
1579
|
+
}
|
|
1580
|
+
export declare enum SKELETON_SIZE {
|
|
1581
|
+
SM = "sm",
|
|
1582
|
+
MD = "md",
|
|
1583
|
+
LG = "lg"
|
|
1584
|
+
}
|
|
1557
1585
|
declare enum STATUS {
|
|
1558
1586
|
NONE = "",
|
|
1559
1587
|
BUSY = "busy",
|
|
@@ -3674,6 +3702,66 @@ declare type UiSelectPopperProperties = {
|
|
|
3674
3702
|
multiple?: boolean;
|
|
3675
3703
|
ticker?: boolean;
|
|
3676
3704
|
};
|
|
3705
|
+
export declare const UiSkeleton: {
|
|
3706
|
+
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes<RemoteProperties<UiSkeletonProperties>>>, {
|
|
3707
|
+
[x: string]: unknown;
|
|
3708
|
+
}, {
|
|
3709
|
+
[x: string]: never;
|
|
3710
|
+
}, {
|
|
3711
|
+
[x: string]: never;
|
|
3712
|
+
}, MethodOptions, {
|
|
3713
|
+
click: (event: SerializedEvent) => boolean;
|
|
3714
|
+
focus: (event: SerializedFocusEvent) => boolean;
|
|
3715
|
+
blur: (event: SerializedEvent) => boolean;
|
|
3716
|
+
}, ComponentOptionsMixin, {}, PublicProps, {}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
3717
|
+
P: {};
|
|
3718
|
+
B: {};
|
|
3719
|
+
D: {};
|
|
3720
|
+
C: ComputedOptions;
|
|
3721
|
+
M: MethodOptions;
|
|
3722
|
+
Defaults: {};
|
|
3723
|
+
} & {
|
|
3724
|
+
P: {};
|
|
3725
|
+
B: {};
|
|
3726
|
+
D: {};
|
|
3727
|
+
C: {};
|
|
3728
|
+
M: {};
|
|
3729
|
+
Defaults: {};
|
|
3730
|
+
}, Readonly<ExtractPropTypes<RemoteProperties<UiSkeletonProperties>>>, {
|
|
3731
|
+
[x: string]: unknown;
|
|
3732
|
+
}, {
|
|
3733
|
+
[x: string]: never;
|
|
3734
|
+
}, ComputedOptions & {
|
|
3735
|
+
[x: string]: never;
|
|
3736
|
+
}, MethodOptions, {}>;
|
|
3737
|
+
__isFragment?: never;
|
|
3738
|
+
__isTeleport?: never;
|
|
3739
|
+
__isSuspense?: never;
|
|
3740
|
+
} & ComponentOptionsBase<Readonly<ExtractPropTypes<RemoteProperties<UiSkeletonProperties>>>, {
|
|
3741
|
+
[x: string]: unknown;
|
|
3742
|
+
}, {
|
|
3743
|
+
[x: string]: never;
|
|
3744
|
+
}, {
|
|
3745
|
+
[x: string]: never;
|
|
3746
|
+
}, MethodOptions, {
|
|
3747
|
+
click: (event: SerializedEvent) => boolean;
|
|
3748
|
+
focus: (event: SerializedFocusEvent) => boolean;
|
|
3749
|
+
blur: (event: SerializedEvent) => boolean;
|
|
3750
|
+
}, ComponentOptionsMixin, {}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
3751
|
+
$slots: {
|
|
3752
|
+
[x: string]: never;
|
|
3753
|
+
} & {
|
|
3754
|
+
default?: (...args: never[]) => unknown;
|
|
3755
|
+
};
|
|
3756
|
+
});
|
|
3757
|
+
export declare type UiSkeletonProperties = {
|
|
3758
|
+
appearance?: SKELETON_APPEARANCE | `${SKELETON_APPEARANCE}`;
|
|
3759
|
+
size?: SKELETON_SIZE | `${SKELETON_SIZE}`;
|
|
3760
|
+
animation?: SKELETON_ANIMATION | `${SKELETON_ANIMATION}`;
|
|
3761
|
+
width?: Numeric | null;
|
|
3762
|
+
height?: Numeric | null;
|
|
3763
|
+
};
|
|
3764
|
+
export declare const UiSkeletonType: SchemaType_2<"UiSkeleton", RemoteProperties<UiSkeletonProperties>, Record<string, never>>;
|
|
3677
3765
|
export declare const UiSlider: {
|
|
3678
3766
|
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes<RemoteProperties<UiSliderProperties>>>, {
|
|
3679
3767
|
[x: string]: unknown;
|
|
@@ -4609,6 +4697,7 @@ declare type UiTextboxProperties = {
|
|
|
4609
4697
|
/** Максимальное количество знаков после запятой (для inputmode="decimal"). '*' — без ограничений */
|
|
4610
4698
|
decimals?: number | `${number}` | '*';
|
|
4611
4699
|
size?: SIZE_4 | `${SIZE_4}`;
|
|
4700
|
+
width?: WidthValue;
|
|
4612
4701
|
placeholder?: string;
|
|
4613
4702
|
prefix?: string;
|
|
4614
4703
|
suffix?: string;
|
|
@@ -5258,6 +5347,11 @@ declare type ViolationPayload = {
|
|
|
5258
5347
|
value: number | null;
|
|
5259
5348
|
codes: VIOLATION[];
|
|
5260
5349
|
};
|
|
5350
|
+
declare enum WIDTH {
|
|
5351
|
+
FIT = "fit",
|
|
5352
|
+
FLUID = "fluid"
|
|
5353
|
+
}
|
|
5354
|
+
declare type WidthValue = Numeric | WIDTH | `${WIDTH}`;
|
|
5261
5355
|
declare const YANDEX_MAP_PLUGIN: {
|
|
5262
5356
|
readonly LOCATOR: "locator";
|
|
5263
5357
|
};
|
package/dist/remote.js
CHANGED
|
@@ -573,17 +573,17 @@ function render$1(_ctx, _cache) {
|
|
|
573
573
|
])]);
|
|
574
574
|
}
|
|
575
575
|
const IconCheckmarkCircle = { render: render$1 };
|
|
576
|
-
var APPEARANCE$
|
|
576
|
+
var APPEARANCE$2 = /* @__PURE__ */ ((APPEARANCE2) => {
|
|
577
577
|
APPEARANCE2["DEFAULT"] = "default";
|
|
578
578
|
APPEARANCE2["SECTION"] = "section";
|
|
579
579
|
return APPEARANCE2;
|
|
580
|
-
})(APPEARANCE$
|
|
581
|
-
var SIZE$
|
|
580
|
+
})(APPEARANCE$2 || {});
|
|
581
|
+
var SIZE$4 = /* @__PURE__ */ ((SIZE2) => {
|
|
582
582
|
SIZE2["SM"] = "sm";
|
|
583
583
|
SIZE2["MD"] = "md";
|
|
584
584
|
SIZE2["LG"] = "lg";
|
|
585
585
|
return SIZE2;
|
|
586
|
-
})(SIZE$
|
|
586
|
+
})(SIZE$4 || {});
|
|
587
587
|
const AppearanceKey = Symbol("UiRadioSwitchAppearance");
|
|
588
588
|
const SizeKey$1 = Symbol("UiRadioSwitchSize");
|
|
589
589
|
const RegistryKey$1 = Symbol("UiRadioSwitchRegistry");
|
|
@@ -591,8 +591,8 @@ const UpdateKey = Symbol("UiRadioSwitchUpdate");
|
|
|
591
591
|
const FocusableIdKey$1 = Symbol("UiRadioSwitchFocusableId");
|
|
592
592
|
const SetFocusableIdKey$1 = Symbol("UiRadioSwitchSetFocusableId");
|
|
593
593
|
const MoveFocusKey$1 = Symbol("UiRadioSwitchMoveFocus");
|
|
594
|
-
const useAppearance = () => inject(AppearanceKey, computed(() => APPEARANCE$
|
|
595
|
-
const useSize$1 = () => inject(SizeKey$1, computed(() => SIZE$
|
|
594
|
+
const useAppearance = () => inject(AppearanceKey, computed(() => APPEARANCE$2.DEFAULT));
|
|
595
|
+
const useSize$1 = () => inject(SizeKey$1, computed(() => SIZE$4.MD));
|
|
596
596
|
const useRegistry$1 = () => inject(RegistryKey$1, {
|
|
597
597
|
register: () => {
|
|
598
598
|
},
|
|
@@ -771,7 +771,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
771
771
|
])
|
|
772
772
|
])) : createCommentVNode("", true)
|
|
773
773
|
]),
|
|
774
|
-
unref(appearance) === unref(APPEARANCE$
|
|
774
|
+
unref(appearance) === unref(APPEARANCE$2).SECTION ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
775
775
|
_ctx.$slots.description || __props.description ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
776
776
|
renderSlot(_ctx.$slots, "description", {}, () => [
|
|
777
777
|
createTextVNode(toDisplayString(__props.description), 1)
|
|
@@ -814,14 +814,14 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
814
814
|
/** Внешний вид */
|
|
815
815
|
appearance: {
|
|
816
816
|
type: String,
|
|
817
|
-
default: APPEARANCE$
|
|
818
|
-
validator: (appearance) => Object.values(APPEARANCE$
|
|
817
|
+
default: APPEARANCE$2.DEFAULT,
|
|
818
|
+
validator: (appearance) => Object.values(APPEARANCE$2).includes(appearance)
|
|
819
819
|
},
|
|
820
820
|
/** Размер */
|
|
821
821
|
size: {
|
|
822
822
|
type: String,
|
|
823
|
-
default: SIZE$
|
|
824
|
-
validator: (size) => Object.values(SIZE$
|
|
823
|
+
default: SIZE$4.MD,
|
|
824
|
+
validator: (size) => Object.values(SIZE$4).includes(size)
|
|
825
825
|
},
|
|
826
826
|
/** Растягивание контейнера в зависимости от контента */
|
|
827
827
|
rubber: {
|
|
@@ -957,6 +957,11 @@ const UiScrollBox = defineRemoteComponent(
|
|
|
957
957
|
"ps-y-reach-end"
|
|
958
958
|
]
|
|
959
959
|
);
|
|
960
|
+
const UiSkeletonType = "UiSkeleton";
|
|
961
|
+
const UiSkeleton = defineRemoteComponent(
|
|
962
|
+
UiSkeletonType,
|
|
963
|
+
["click", "focus", "blur"]
|
|
964
|
+
);
|
|
960
965
|
const UiSliderType = "UiSlider";
|
|
961
966
|
const UiSlider = defineRemoteComponent(
|
|
962
967
|
UiSliderType,
|
|
@@ -1567,14 +1572,30 @@ const UiTag = defineRemoteComponent(
|
|
|
1567
1572
|
UiTagType,
|
|
1568
1573
|
["click", "focus", "blur", "remove"]
|
|
1569
1574
|
);
|
|
1570
|
-
var
|
|
1575
|
+
var WIDTH = /* @__PURE__ */ ((WIDTH2) => {
|
|
1576
|
+
WIDTH2["FIT"] = "fit";
|
|
1577
|
+
WIDTH2["FLUID"] = "fluid";
|
|
1578
|
+
return WIDTH2;
|
|
1579
|
+
})(WIDTH || {});
|
|
1580
|
+
const NUMERIC_PATTERN = /^(?:\d+|\d*\.\d+)$/;
|
|
1581
|
+
const UNIT_PATTERN = /^(?:\d+|\d*\.\d+)(?:%|cap|ch|cm|dvb|dvh|dvi|dvw|em|ex|ic|in|lh|lvb|lvh|lvi|lvw|mm|pc|pt|px|Q|rem|rlh|svb|svh|svi|svw|vb|vh|vi|vmax|vmin|vw)$/i;
|
|
1582
|
+
const isWidthNumeric = (value) => {
|
|
1583
|
+
return typeof value === "number" ? Number.isFinite(value) && value >= 0 : typeof value === "string" && NUMERIC_PATTERN.test(value.trim());
|
|
1584
|
+
};
|
|
1585
|
+
const isWidthToken = (value) => {
|
|
1586
|
+
return typeof value === "string" && Object.values(WIDTH).includes(value);
|
|
1587
|
+
};
|
|
1588
|
+
const isWidth = (value) => {
|
|
1589
|
+
return value === null || value === void 0 || isWidthToken(value) || isWidthNumeric(value) || typeof value === "string" && UNIT_PATTERN.test(value.trim());
|
|
1590
|
+
};
|
|
1591
|
+
var SIZE$3 = /* @__PURE__ */ ((SIZE2) => {
|
|
1571
1592
|
SIZE2["XS"] = "xs";
|
|
1572
1593
|
SIZE2["SM"] = "sm";
|
|
1573
1594
|
SIZE2["MD"] = "md";
|
|
1574
1595
|
SIZE2["LG"] = "lg";
|
|
1575
1596
|
SIZE2["XL"] = "xl";
|
|
1576
1597
|
return SIZE2;
|
|
1577
|
-
})(SIZE$
|
|
1598
|
+
})(SIZE$3 || {});
|
|
1578
1599
|
const events = [
|
|
1579
1600
|
"input",
|
|
1580
1601
|
"keydown",
|
|
@@ -2360,8 +2381,14 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2360
2381
|
/** Размер поля ввода */
|
|
2361
2382
|
textboxSize: {
|
|
2362
2383
|
type: String,
|
|
2363
|
-
validator: (size) => Object.values(SIZE$
|
|
2364
|
-
default: SIZE$
|
|
2384
|
+
validator: (size) => Object.values(SIZE$3).includes(size),
|
|
2385
|
+
default: SIZE$3.SM
|
|
2386
|
+
},
|
|
2387
|
+
/** Ширина селекта. fit — по содержимому, fluid — на всю ширину контейнера */
|
|
2388
|
+
width: {
|
|
2389
|
+
type: [Number, String],
|
|
2390
|
+
validator: isWidth,
|
|
2391
|
+
default: WIDTH.FIT
|
|
2365
2392
|
},
|
|
2366
2393
|
/** Наличие множественного выбора среди элементов выпадающего списка */
|
|
2367
2394
|
multiple: {
|
|
@@ -2630,13 +2657,14 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2630
2657
|
"placeholder-only": __props.placeholderOnly,
|
|
2631
2658
|
placeholder: __props.placeholder,
|
|
2632
2659
|
"textbox-size": __props.textboxSize,
|
|
2660
|
+
width: __props.width,
|
|
2633
2661
|
"active-descendant": activeOptionId.value
|
|
2634
2662
|
}, _ctx.$attrs, {
|
|
2635
2663
|
onInput,
|
|
2636
2664
|
onKeydown: onKeyDown,
|
|
2637
2665
|
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => state.value = $event),
|
|
2638
2666
|
"onUpdate:expanded": _cache[1] || (_cache[1] = ($event) => state.expanded = $event)
|
|
2639
|
-
}), null, 16, ["id", "value", "multiple", "selection", "filter", "filterable", "clearable", "expanded", "invalid", "disabled", "readonly", "placeholder-only", "placeholder", "textbox-size", "active-descendant"]),
|
|
2667
|
+
}), null, 16, ["id", "value", "multiple", "selection", "filter", "filterable", "clearable", "expanded", "invalid", "disabled", "readonly", "placeholder-only", "placeholder", "textbox-size", "width", "active-descendant"]),
|
|
2640
2668
|
createVNode(unref(UiSelectPopper), {
|
|
2641
2669
|
id: resolvedId.value,
|
|
2642
2670
|
ref_key: "popper",
|
|
@@ -2683,13 +2711,13 @@ function render(_ctx, _cache) {
|
|
|
2683
2711
|
])]);
|
|
2684
2712
|
}
|
|
2685
2713
|
const IconAddCircleOutlined = { render };
|
|
2686
|
-
var SIZE$
|
|
2714
|
+
var SIZE$2 = /* @__PURE__ */ ((SIZE2) => {
|
|
2687
2715
|
SIZE2["XS"] = "xs";
|
|
2688
2716
|
SIZE2["SM"] = "sm";
|
|
2689
2717
|
SIZE2["MD"] = "md";
|
|
2690
2718
|
SIZE2["LG"] = "lg";
|
|
2691
2719
|
return SIZE2;
|
|
2692
|
-
})(SIZE$
|
|
2720
|
+
})(SIZE$2 || {});
|
|
2693
2721
|
const _hoisted_1 = ["id", "aria-selected", "aria-current"];
|
|
2694
2722
|
const _hoisted_2 = ["innerHTML"];
|
|
2695
2723
|
const _hoisted_3 = ["innerHTML"];
|
|
@@ -2724,8 +2752,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
2724
2752
|
/** Размер шрифта, иконок и внутренних отступов компонента */
|
|
2725
2753
|
size: {
|
|
2726
2754
|
type: String,
|
|
2727
|
-
validator: (size) => Object.values(SIZE$
|
|
2728
|
-
default: SIZE$
|
|
2755
|
+
validator: (size) => Object.values(SIZE$2).includes(size),
|
|
2756
|
+
default: SIZE$2.MD
|
|
2729
2757
|
},
|
|
2730
2758
|
/** Счетчик количества */
|
|
2731
2759
|
counter: {
|
|
@@ -3008,6 +3036,7 @@ const createEndpointRoot = async (channel) => {
|
|
|
3008
3036
|
"UiAvatarList",
|
|
3009
3037
|
"UiAlert",
|
|
3010
3038
|
"UiButton",
|
|
3039
|
+
"UiCalendar",
|
|
3011
3040
|
"UiCheckbox",
|
|
3012
3041
|
"UiCollapse",
|
|
3013
3042
|
"UiCollapseBox",
|
|
@@ -3027,6 +3056,7 @@ const createEndpointRoot = async (channel) => {
|
|
|
3027
3056
|
"UiModalWindowSurface",
|
|
3028
3057
|
"UiNumberStepper",
|
|
3029
3058
|
"UiPageHeader",
|
|
3059
|
+
"UiPageHeaderLayout",
|
|
3030
3060
|
"UiPageHeaderTitle",
|
|
3031
3061
|
"UiPopper",
|
|
3032
3062
|
"UiPopperConnector",
|
|
@@ -3035,6 +3065,7 @@ const createEndpointRoot = async (channel) => {
|
|
|
3035
3065
|
"UiRadioSwitchOptionShell",
|
|
3036
3066
|
"UiRadioSwitchRoot",
|
|
3037
3067
|
"UiScrollBox",
|
|
3068
|
+
"UiSkeleton",
|
|
3038
3069
|
"UiSlider",
|
|
3039
3070
|
"UiSwitch",
|
|
3040
3071
|
"UiTab",
|
|
@@ -3055,6 +3086,7 @@ const createEndpointRoot = async (channel) => {
|
|
|
3055
3086
|
"UiTimePicker",
|
|
3056
3087
|
"UiToggleButton",
|
|
3057
3088
|
"UiToggleGroupRoot",
|
|
3089
|
+
// UiToolbar is host-only: remote trees can render toolbar items, but cannot create the toolbar container.
|
|
3058
3090
|
"UiToolbarButton",
|
|
3059
3091
|
"UiToolbarLink",
|
|
3060
3092
|
"UiTooltip",
|
|
@@ -3078,6 +3110,26 @@ const usePreview = (workers = ref([])) => {
|
|
|
3078
3110
|
preview: (url, resize = void 0, crop = void 0) => preview(_workers.value, url, resize, crop)
|
|
3079
3111
|
};
|
|
3080
3112
|
};
|
|
3113
|
+
var ANIMATION = /* @__PURE__ */ ((ANIMATION2) => {
|
|
3114
|
+
ANIMATION2["PULSE"] = "pulse";
|
|
3115
|
+
ANIMATION2["SHIMMER"] = "shimmer";
|
|
3116
|
+
return ANIMATION2;
|
|
3117
|
+
})(ANIMATION || {});
|
|
3118
|
+
var APPEARANCE$1 = /* @__PURE__ */ ((APPEARANCE2) => {
|
|
3119
|
+
APPEARANCE2["CIRCLE"] = "circle";
|
|
3120
|
+
APPEARANCE2["RECTANGLE"] = "rectangle";
|
|
3121
|
+
APPEARANCE2["TEXT"] = "text";
|
|
3122
|
+
return APPEARANCE2;
|
|
3123
|
+
})(APPEARANCE$1 || {});
|
|
3124
|
+
var SIZE$1 = /* @__PURE__ */ ((SIZE2) => {
|
|
3125
|
+
SIZE2["SM"] = "sm";
|
|
3126
|
+
SIZE2["MD"] = "md";
|
|
3127
|
+
SIZE2["LG"] = "lg";
|
|
3128
|
+
return SIZE2;
|
|
3129
|
+
})(SIZE$1 || {});
|
|
3130
|
+
function guessDimensionStyleValue(value) {
|
|
3131
|
+
return typeof value === "number" || typeof value === "string" && /^\d*$/.test(value) ? `${value}px` : value;
|
|
3132
|
+
}
|
|
3081
3133
|
var SIZE = /* @__PURE__ */ ((SIZE2) => {
|
|
3082
3134
|
SIZE2["SM"] = "sm";
|
|
3083
3135
|
SIZE2["MD"] = "md";
|
|
@@ -3129,8 +3181,11 @@ export {
|
|
|
3129
3181
|
ALIGN,
|
|
3130
3182
|
DIRECTION,
|
|
3131
3183
|
ImageWorkersKey,
|
|
3132
|
-
APPEARANCE$
|
|
3133
|
-
SIZE$
|
|
3184
|
+
APPEARANCE$2 as RADIO_SWITCH_APPEARANCE,
|
|
3185
|
+
SIZE$4 as RADIO_SWITCH_SIZE,
|
|
3186
|
+
ANIMATION as SKELETON_ANIMATION,
|
|
3187
|
+
APPEARANCE$1 as SKELETON_APPEARANCE,
|
|
3188
|
+
SIZE$1 as SKELETON_SIZE,
|
|
3134
3189
|
APPEARANCE as TAB_APPEARANCE,
|
|
3135
3190
|
SIZE as TAB_SIZE,
|
|
3136
3191
|
UiAddButton,
|
|
@@ -3196,6 +3251,8 @@ export {
|
|
|
3196
3251
|
_sfc_main$3 as UiSelect,
|
|
3197
3252
|
_sfc_main$2 as UiSelectOption,
|
|
3198
3253
|
_sfc_main as UiSelectOptionGroup,
|
|
3254
|
+
UiSkeleton,
|
|
3255
|
+
UiSkeletonType,
|
|
3199
3256
|
UiSlider,
|
|
3200
3257
|
UiSliderType,
|
|
3201
3258
|
UiSwitch,
|
|
@@ -3240,6 +3297,7 @@ export {
|
|
|
3240
3297
|
formatDate,
|
|
3241
3298
|
formatDateTime,
|
|
3242
3299
|
formatTime,
|
|
3300
|
+
guessDimensionStyleValue as guessSkeletonDimensionStyleValue,
|
|
3243
3301
|
mountEndpointRoot,
|
|
3244
3302
|
usePreview
|
|
3245
3303
|
};
|
package/docs/COMPONENTS.md
CHANGED
|
@@ -57,6 +57,7 @@ Detailed AI-friendly profiles are collected in [`PROFILES.md`](./PROFILES.md).
|
|
|
57
57
|
- [`UiInfobox`](./profiles/UiInfobox.yml): highlighted explanatory block
|
|
58
58
|
- [`UiError`](./profiles/UiError.yml): compact error state
|
|
59
59
|
- [`UiLoader`](./profiles/UiLoader.yml): loading indicator
|
|
60
|
+
- [`UiSkeleton`](./profiles/UiSkeleton.yml): content placeholder for loading state
|
|
60
61
|
- [`UiTag`](./profiles/UiTag.yml): labels and statuses
|
|
61
62
|
|
|
62
63
|
## Overlays And Modal Patterns
|