@retailcrm/embed-ui-v1-components 0.9.16 → 0.9.17

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/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$1 = /* @__PURE__ */ ((APPEARANCE2) => {
578
+ var APPEARANCE$2 = /* @__PURE__ */ ((APPEARANCE2) => {
579
579
  APPEARANCE2["DEFAULT"] = "default";
580
580
  APPEARANCE2["SECTION"] = "section";
581
581
  return APPEARANCE2;
582
- })(APPEARANCE$1 || {});
583
- var SIZE$3 = /* @__PURE__ */ ((SIZE2) => {
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$3 || {});
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$1.DEFAULT));
597
- const useSize$1 = () => vue.inject(SizeKey$1, vue.computed(() => SIZE$3.MD));
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$1).SECTION ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
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$1.DEFAULT,
820
- validator: (appearance) => Object.values(APPEARANCE$1).includes(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$3.MD,
826
- validator: (size) => Object.values(SIZE$3).includes(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 SIZE$2 = /* @__PURE__ */ ((SIZE2) => {
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$2 || {});
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$2).includes(size),
2366
- default: SIZE$2.SM
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$1 = /* @__PURE__ */ ((SIZE2) => {
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$1 || {});
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$1).includes(size),
2730
- default: SIZE$1.MD
2757
+ validator: (size) => Object.values(SIZE$2).includes(size),
2758
+ default: SIZE$2.MD
2731
2759
  },
2732
2760
  /** Счетчик количества */
2733
2761
  counter: {
@@ -3080,6 +3108,26 @@ const usePreview = (workers = vue.ref([])) => {
3080
3108
  preview: (url, resize = void 0, crop = void 0) => imagePreview.preview(_workers.value, url, resize, crop)
3081
3109
  };
3082
3110
  };
3111
+ var ANIMATION = /* @__PURE__ */ ((ANIMATION2) => {
3112
+ ANIMATION2["PULSE"] = "pulse";
3113
+ ANIMATION2["SHIMMER"] = "shimmer";
3114
+ return ANIMATION2;
3115
+ })(ANIMATION || {});
3116
+ var APPEARANCE$1 = /* @__PURE__ */ ((APPEARANCE2) => {
3117
+ APPEARANCE2["CIRCLE"] = "circle";
3118
+ APPEARANCE2["RECTANGLE"] = "rectangle";
3119
+ APPEARANCE2["TEXT"] = "text";
3120
+ return APPEARANCE2;
3121
+ })(APPEARANCE$1 || {});
3122
+ var SIZE$1 = /* @__PURE__ */ ((SIZE2) => {
3123
+ SIZE2["SM"] = "sm";
3124
+ SIZE2["MD"] = "md";
3125
+ SIZE2["LG"] = "lg";
3126
+ return SIZE2;
3127
+ })(SIZE$1 || {});
3128
+ function guessDimensionStyleValue(value) {
3129
+ return typeof value === "number" || typeof value === "string" && /^\d*$/.test(value) ? `${value}px` : value;
3130
+ }
3083
3131
  var SIZE = /* @__PURE__ */ ((SIZE2) => {
3084
3132
  SIZE2["SM"] = "sm";
3085
3133
  SIZE2["MD"] = "md";
@@ -3130,8 +3178,11 @@ function detectLocale() {
3130
3178
  exports.ALIGN = ALIGN;
3131
3179
  exports.DIRECTION = DIRECTION;
3132
3180
  exports.ImageWorkersKey = ImageWorkersKey;
3133
- exports.RADIO_SWITCH_APPEARANCE = APPEARANCE$1;
3134
- exports.RADIO_SWITCH_SIZE = SIZE$3;
3181
+ exports.RADIO_SWITCH_APPEARANCE = APPEARANCE$2;
3182
+ exports.RADIO_SWITCH_SIZE = SIZE$4;
3183
+ exports.SKELETON_ANIMATION = ANIMATION;
3184
+ exports.SKELETON_APPEARANCE = APPEARANCE$1;
3185
+ exports.SKELETON_SIZE = SIZE$1;
3135
3186
  exports.TAB_APPEARANCE = APPEARANCE;
3136
3187
  exports.TAB_SIZE = SIZE;
3137
3188
  exports.UiAddButton = UiAddButton;
@@ -3197,6 +3248,8 @@ exports.UiScrollBoxType = UiScrollBoxType;
3197
3248
  exports.UiSelect = _sfc_main$3;
3198
3249
  exports.UiSelectOption = _sfc_main$2;
3199
3250
  exports.UiSelectOptionGroup = _sfc_main;
3251
+ exports.UiSkeleton = UiSkeleton;
3252
+ exports.UiSkeletonType = UiSkeletonType;
3200
3253
  exports.UiSlider = UiSlider;
3201
3254
  exports.UiSliderType = UiSliderType;
3202
3255
  exports.UiSwitch = UiSwitch;
@@ -3241,5 +3294,6 @@ exports.createEndpointRoot = createEndpointRoot;
3241
3294
  exports.formatDate = formatDate;
3242
3295
  exports.formatDateTime = formatDateTime;
3243
3296
  exports.formatTime = formatTime;
3297
+ exports.guessSkeletonDimensionStyleValue = guessDimensionStyleValue;
3244
3298
  exports.mountEndpointRoot = mountEndpointRoot;
3245
3299
  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$1 = /* @__PURE__ */ ((APPEARANCE2) => {
576
+ var APPEARANCE$2 = /* @__PURE__ */ ((APPEARANCE2) => {
577
577
  APPEARANCE2["DEFAULT"] = "default";
578
578
  APPEARANCE2["SECTION"] = "section";
579
579
  return APPEARANCE2;
580
- })(APPEARANCE$1 || {});
581
- var SIZE$3 = /* @__PURE__ */ ((SIZE2) => {
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$3 || {});
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$1.DEFAULT));
595
- const useSize$1 = () => inject(SizeKey$1, computed(() => SIZE$3.MD));
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$1).SECTION ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
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$1.DEFAULT,
818
- validator: (appearance) => Object.values(APPEARANCE$1).includes(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$3.MD,
824
- validator: (size) => Object.values(SIZE$3).includes(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 SIZE$2 = /* @__PURE__ */ ((SIZE2) => {
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$2 || {});
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$2).includes(size),
2364
- default: SIZE$2.SM
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$1 = /* @__PURE__ */ ((SIZE2) => {
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$1 || {});
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$1).includes(size),
2728
- default: SIZE$1.MD
2755
+ validator: (size) => Object.values(SIZE$2).includes(size),
2756
+ default: SIZE$2.MD
2729
2757
  },
2730
2758
  /** Счетчик количества */
2731
2759
  counter: {
@@ -3078,6 +3106,26 @@ const usePreview = (workers = ref([])) => {
3078
3106
  preview: (url, resize = void 0, crop = void 0) => preview(_workers.value, url, resize, crop)
3079
3107
  };
3080
3108
  };
3109
+ var ANIMATION = /* @__PURE__ */ ((ANIMATION2) => {
3110
+ ANIMATION2["PULSE"] = "pulse";
3111
+ ANIMATION2["SHIMMER"] = "shimmer";
3112
+ return ANIMATION2;
3113
+ })(ANIMATION || {});
3114
+ var APPEARANCE$1 = /* @__PURE__ */ ((APPEARANCE2) => {
3115
+ APPEARANCE2["CIRCLE"] = "circle";
3116
+ APPEARANCE2["RECTANGLE"] = "rectangle";
3117
+ APPEARANCE2["TEXT"] = "text";
3118
+ return APPEARANCE2;
3119
+ })(APPEARANCE$1 || {});
3120
+ var SIZE$1 = /* @__PURE__ */ ((SIZE2) => {
3121
+ SIZE2["SM"] = "sm";
3122
+ SIZE2["MD"] = "md";
3123
+ SIZE2["LG"] = "lg";
3124
+ return SIZE2;
3125
+ })(SIZE$1 || {});
3126
+ function guessDimensionStyleValue(value) {
3127
+ return typeof value === "number" || typeof value === "string" && /^\d*$/.test(value) ? `${value}px` : value;
3128
+ }
3081
3129
  var SIZE = /* @__PURE__ */ ((SIZE2) => {
3082
3130
  SIZE2["SM"] = "sm";
3083
3131
  SIZE2["MD"] = "md";
@@ -3129,8 +3177,11 @@ export {
3129
3177
  ALIGN,
3130
3178
  DIRECTION,
3131
3179
  ImageWorkersKey,
3132
- APPEARANCE$1 as RADIO_SWITCH_APPEARANCE,
3133
- SIZE$3 as RADIO_SWITCH_SIZE,
3180
+ APPEARANCE$2 as RADIO_SWITCH_APPEARANCE,
3181
+ SIZE$4 as RADIO_SWITCH_SIZE,
3182
+ ANIMATION as SKELETON_ANIMATION,
3183
+ APPEARANCE$1 as SKELETON_APPEARANCE,
3184
+ SIZE$1 as SKELETON_SIZE,
3134
3185
  APPEARANCE as TAB_APPEARANCE,
3135
3186
  SIZE as TAB_SIZE,
3136
3187
  UiAddButton,
@@ -3196,6 +3247,8 @@ export {
3196
3247
  _sfc_main$3 as UiSelect,
3197
3248
  _sfc_main$2 as UiSelectOption,
3198
3249
  _sfc_main as UiSelectOptionGroup,
3250
+ UiSkeleton,
3251
+ UiSkeletonType,
3199
3252
  UiSlider,
3200
3253
  UiSliderType,
3201
3254
  UiSwitch,
@@ -3240,6 +3293,7 @@ export {
3240
3293
  formatDate,
3241
3294
  formatDateTime,
3242
3295
  formatTime,
3296
+ guessDimensionStyleValue as guessSkeletonDimensionStyleValue,
3243
3297
  mountEndpointRoot,
3244
3298
  usePreview
3245
3299
  };
@@ -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
@@ -0,0 +1,41 @@
1
+ component: UiSkeleton
2
+ summary: >
3
+ UiSkeleton displays a placeholder block for loading content. It supports text,
4
+ rectangle and circle appearances with pulse or shimmer animation.
5
+
6
+ public_import:
7
+ from: '@retailcrm/embed-ui-v1-components/remote'
8
+ named:
9
+ - UiSkeleton
10
+
11
+ use_when:
12
+ - You need a content placeholder before actual data is loaded.
13
+ - You need line, card or avatar-like loading placeholders.
14
+
15
+ avoid_when:
16
+ - You need a spinner-like indicator instead of a content-shaped placeholder.
17
+
18
+ api:
19
+ key_props:
20
+ - name: appearance
21
+ - name: size
22
+ - name: animation
23
+ - name: width
24
+ - name: height
25
+
26
+ rendered_structure:
27
+ descriptive_only: true
28
+ root:
29
+ shape: div.ui-v1-skeleton
30
+ tag: div
31
+
32
+ geometry:
33
+ layout: inline block or block placeholder
34
+ root_display: inline-block
35
+ width_behavior: preset width by appearance and size, overridable via width prop
36
+
37
+ ai_notes:
38
+ do:
39
+ - Use text appearance for line placeholders.
40
+ - Use circle appearance for avatar placeholders.
41
+ - Override width or height only when the preset size is not enough.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@retailcrm/embed-ui-v1-components",
3
3
  "bin": "./bin/embed-ui-v1-components.mjs",
4
4
  "type": "module",
5
- "version": "0.9.16",
5
+ "version": "0.9.17",
6
6
  "license": "MIT",
7
7
  "author": "RetailDriverLLC <integration@retailcrm.ru>",
8
8
  "repository": "git@github.com:retailcrm/embed-ui.git",