@retailcrm/embed-ui-v1-components 0.5.16 → 0.5.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.css CHANGED
@@ -666,6 +666,99 @@
666
666
  margin-left: -2px;
667
667
  margin-top: -2px;
668
668
  }
669
+ .ui-v1-popper {
670
+ width: max-content;
671
+ border-radius: var(--ui-v1-popper-roundings, 4px);
672
+ box-shadow: 0 4px 12px rgba(30, 34, 72, 0.2);
673
+ color: #1E2248;
674
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Roboto", sans-serif;
675
+ font-size: 14px;
676
+ font-weight: 400;
677
+ line-height: 1.42857143;
678
+ z-index: var(--ui-v1-popper-z-index, 10000);
679
+ position: absolute;
680
+ top: 0;
681
+ left: 0;
682
+ }
683
+ .ui-v1-popper,
684
+ .ui-v1-popper *,
685
+ .ui-v1-popper *::before,
686
+ .ui-v1-popper *::after {
687
+ box-sizing: border-box;
688
+ }
689
+ .ui-v1-popper.ui-v1-popper_hidden {
690
+ visibility: hidden;
691
+ opacity: 0;
692
+ transition: opacity 0.15s, visibility 0.15s;
693
+ }
694
+ .ui-v1-popper.ui-v1-popper_shown {
695
+ visibility: visible;
696
+ opacity: 1;
697
+ transition: opacity 0.15s;
698
+ }
699
+ .ui-v1-popper__arrow {
700
+ position: absolute;
701
+ background: var(--ui-v1-popper-background, #FFFFFF);
702
+ width: var(--ui-v1-popper-arrow-size, 24px);
703
+ height: var(--ui-v1-popper-arrow-size, 24px);
704
+ border-radius: var(--ui-v1-popper-arrow-roundings, 4px);
705
+ box-shadow: 0 16px 32px rgba(30, 34, 72, 0.16);
706
+ transform: rotate(45deg);
707
+ z-index: -1;
708
+ }
709
+ .ui-v1-popper__content {
710
+ width: var(--ui-v1-popper-width, auto);
711
+ max-width: var(--ui-v1-popper-width-max, max-content);
712
+ min-width: var(--ui-v1-popper-width-min, var(--ui-v1-popper-arrow-size, 24px));
713
+ height: var(--ui-v1-popper-height, auto);
714
+ max-height: var(--ui-v1-popper-height-max, max-content);
715
+ min-height: var(--ui-v1-popper-height-min, var(--ui-v1-popper-arrow-size, 24px));
716
+ padding: var(--ui-v1-popper-padding, 0);
717
+ background: var(--ui-v1-popper-background, #FFFFFF);
718
+ border-radius: inherit;
719
+ position: relative;
720
+ }
721
+ .ui-v1-tooltip {
722
+ --ui-v1-popper-width: var(--ui-v1-tooltip-width, fit-content);
723
+ --ui-v1-popper-width-max: var(--ui-v1-tooltip-width-max, 160px);
724
+ --ui-v1-popper-padding: 2px 8px;
725
+ --ui-v1-popper-roundings: 4px;
726
+ --ui-v1-popper-arrow-size: 12px;
727
+ --ui-v1-popper-background: #1E2248;
728
+ color: #FFFFFF;
729
+ outline: none;
730
+ word-break: break-word;
731
+ }
732
+ .ui-v1-copy-button {
733
+ display: inline-block;
734
+ vertical-align: top;
735
+ position: relative;
736
+ }
737
+ .ui-v1-copy-button__tooltip {
738
+ display: flex;
739
+ align-items: center;
740
+ }
741
+ .ui-v1-copy-button__icon {
742
+ flex-shrink: 0;
743
+ width: 16px;
744
+ height: 16px;
745
+ color: #22C993;
746
+ margin-left: -2px;
747
+ margin-right: 4px;
748
+ }
749
+ .ui-v1-copy-button__text {
750
+ white-space: nowrap;
751
+ text-overflow: ellipsis;
752
+ overflow: hidden;
753
+ min-width: 0;
754
+ }
755
+ .ui-v1-copy-button__area {
756
+ position: absolute;
757
+ left: -9999px;
758
+ opacity: 0;
759
+ width: 10px;
760
+ height: 10px;
761
+ }
669
762
  .ui-v1-error {
670
763
  color: #FF5353;
671
764
  font-size: 14px;
package/dist/host.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { Alignment } from '@floating-ui/dom';
1
2
  import { Component } from 'vue';
2
3
  import { ComponentOptionsMixin } from 'vue';
3
4
  import { ComponentPropsOptions } from 'vue';
@@ -14,7 +15,9 @@ import { Plugin as Plugin_2 } from 'vue';
14
15
  import { PropType } from 'vue';
15
16
  import { PublicProps } from 'vue';
16
17
  import { Ref } from 'vue';
18
+ import { Side } from '@floating-ui/dom';
17
19
  import { SlotsType } from 'vue';
20
+ import { Strategy } from '@floating-ui/dom';
18
21
 
19
22
  declare const __VLS_component: DefineComponent_2<ExtractPropTypes< {
20
23
  /** Атрибут id корневого элемента модального окна. Должен быть уникальным на странице */
@@ -140,15 +143,17 @@ onClosed?: ((...args: any[]) => any) | undefined;
140
143
  }>, {
141
144
  id: string;
142
145
  appearance: APPEARANCE_3;
146
+ disposeTimeout: string | number | null;
143
147
  opened: boolean;
144
148
  closable: boolean;
145
- disposeTimeout: string | number | null;
146
149
  scrolling: SCROLLING_2;
147
150
  fullscreen: boolean;
148
151
  responsive: boolean;
149
152
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
150
153
 
151
- declare const __VLS_component_2: DefineComponent_2<ExtractPropTypes< {
154
+ declare const __VLS_component_2: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
155
+
156
+ declare const __VLS_component_3: DefineComponent_2<ExtractPropTypes< {
152
157
  size: {
153
158
  type: PropType<SIZE_6 | `${SIZE_6}`>;
154
159
  default: SIZE_6;
@@ -163,6 +168,7 @@ size: "sm" | "md" | SIZE_6;
163
168
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
164
169
 
165
170
  declare function __VLS_template(): {
171
+ attrs: Partial<{}>;
166
172
  slots: {
167
173
  icon?(_: {
168
174
  overlapped: boolean;
@@ -184,21 +190,33 @@ declare function __VLS_template(): {
184
190
  }): any;
185
191
  };
186
192
  refs: {};
187
- attrs: Partial<{}>;
193
+ rootEl: any;
188
194
  };
189
195
 
190
196
  declare function __VLS_template_2(): {
197
+ attrs: Partial<{}>;
191
198
  slots: {
192
199
  default?(_: {}): any;
193
200
  };
194
201
  refs: {};
202
+ rootEl: any;
203
+ };
204
+
205
+ declare function __VLS_template_3(): {
195
206
  attrs: Partial<{}>;
207
+ slots: {
208
+ default?(_: {}): any;
209
+ };
210
+ refs: {};
211
+ rootEl: any;
196
212
  };
197
213
 
198
214
  declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
199
215
 
200
216
  declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
201
217
 
218
+ declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
219
+
202
220
  declare type __VLS_WithTemplateSlots<T, S> = T & {
203
221
  new (): {
204
222
  $slots: S;
@@ -211,6 +229,14 @@ declare type __VLS_WithTemplateSlots_2<T, S> = T & {
211
229
  };
212
230
  };
213
231
 
232
+ declare type __VLS_WithTemplateSlots_3<T, S> = T & {
233
+ new (): {
234
+ $slots: S;
235
+ };
236
+ };
237
+
238
+ declare type Adaptation = 'flip' | 'shift';
239
+
214
240
  declare enum ALIGN {
215
241
  LEFT = "left",
216
242
  RIGHT = "right"
@@ -240,6 +266,11 @@ declare enum APPEARANCE_3 {
240
266
 
241
267
  declare type DefineComponent<PropsOrPropOptions = object, M extends MethodOptions = MethodOptions, E extends EmitsOptions = EmitsOptions, EE extends string = string, PP = PublicProps, Props = ResolveProps<PropsOrPropOptions, E>, Defaults = ExtractDefaultPropTypes<PropsOrPropOptions>, S extends SlotsType = SlotsType, LC extends Record<string, Component> = Record<string, Component>, Directives extends Record<string, Directive> = Record<string, Directive>, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, MakeDefaultsOptional extends boolean = true, TypeRefs extends Record<string, unknown> = Record<string, unknown>, TypeEl extends Element = Element> = DefineComponent_2<PropsOrPropOptions, Record<string, never>, Record<string, never>, Record<string, never>, M, ComponentOptionsMixin, ComponentOptionsMixin, E, EE, PP, Props, Defaults, S, LC, Directives, Exposed, Provide, MakeDefaultsOptional, TypeRefs, TypeEl>;
242
268
 
269
+ declare type Delay = {
270
+ show?: number;
271
+ hide?: number;
272
+ };
273
+
243
274
  declare type Dimensions = `${number}x${number}` | `${number}x-` | `-x${number}`;
244
275
 
245
276
  declare enum DIRECTION {
@@ -247,6 +278,13 @@ declare enum DIRECTION {
247
278
  RIGHT = "right"
248
279
  }
249
280
 
281
+ declare type FloatingOptions = {
282
+ placement?: PlacementLiteral | PlacementOptions;
283
+ offsetMainAxis?: number | string;
284
+ offsetCrossAxis?: number | string;
285
+ strategy?: Strategy;
286
+ };
287
+
250
288
  export declare const I18nPlugin: Plugin_2;
251
289
 
252
290
  export declare const ImageWorkersKey: InjectionKey<Ref<string[]>>;
@@ -257,6 +295,14 @@ export declare const ModalPlugin: Plugin_2;
257
295
 
258
296
  declare type Numeric = number | string;
259
297
 
298
+ declare type PlacementLiteral = `${Side}-${Alignment}` | Side;
299
+
300
+ declare type PlacementOptions = {
301
+ side: Side;
302
+ alignment?: Alignment | 'center';
303
+ adaptation?: Adaptation[];
304
+ };
305
+
260
306
  declare type Primitive = boolean | number | string | null | undefined;
261
307
 
262
308
  declare type ResolveProps<PropsOrPropOptions, E extends EmitsOptions> = Readonly<PropsOrPropOptions extends ComponentPropsOptions ? ExtractPropTypes<PropsOrPropOptions> : PropsOrPropOptions> & (Record<string, never> extends E ? Record<string, never> : EmitsToProps<E>);
@@ -272,6 +318,17 @@ declare enum SCROLLING_2 {
272
318
  NATIVE = "native"
273
319
  }
274
320
 
321
+ declare type ShowingOptions = {
322
+ shown?: boolean;
323
+ targetTriggers?: Trigger[] | TriggerSchema;
324
+ popperTriggers?: Trigger[] | TriggerSchema;
325
+ globalTriggers?: Array<'miss-click' | 'reference-hidden'>;
326
+ delay?: Numeric | Delay;
327
+ disposeTimeout?: Numeric | null;
328
+ disabled?: boolean;
329
+ container?: string | null;
330
+ };
331
+
275
332
  declare enum SIZE {
276
333
  XS = "xs",
277
334
  SM = "sm",
@@ -320,6 +377,15 @@ declare enum STATUS {
320
377
  FREE = "free"
321
378
  }
322
379
 
380
+ declare type TooltipOptions = Omit<UiPopperProperties, 'target' | 'targetTriggers' | 'popperTriggers' | 'globalTriggers'>;
381
+
382
+ declare type Trigger<T extends string = never> = 'hover' | 'focus' | 'click' | 'touch' | T;
383
+
384
+ declare type TriggerSchema<S extends string = never, H extends string = never> = {
385
+ show?: Trigger<S>[];
386
+ hide?: Trigger<H>[];
387
+ };
388
+
323
389
  export declare const UiAvatar: DefineComponent<
324
390
  UiAvatarProperties
325
391
  >;
@@ -392,6 +458,14 @@ declare type UiCheckboxProperties = {
392
458
  disabled?: boolean;
393
459
  };
394
460
 
461
+ export declare const UiCopyButton: DefineComponent<UiCopyButtonProperties>;
462
+
463
+ declare type UiCopyButtonProperties = {
464
+ text: string;
465
+ size: SIZE_2;
466
+ tooltipOptions?: TooltipOptions;
467
+ };
468
+
395
469
  export declare const UiDate: DefineComponent<
396
470
  UiDateProperties
397
471
  >;
@@ -482,6 +556,26 @@ declare type UiModalWindowSurfaceProperties = {
482
556
  scrolling?: SCROLLING_2 | `${SCROLLING_2}`;
483
557
  };
484
558
 
559
+ export declare const UiPopper: DefineComponent<
560
+ UiPopperProperties & { target: Ref<HTMLElement | null> },
561
+ UiPopperMethods
562
+ >;
563
+
564
+ export declare const UiPopperConnector: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
565
+
566
+ declare type UiPopperMethods = {
567
+ adjust(): Promise<void>;
568
+ dispose(): void;
569
+ show(immediately?: boolean): void;
570
+ hide(immediately?: boolean, reason?: ('generic' | 'by-miss-click')): void;
571
+ };
572
+
573
+ declare type UiPopperProperties = FloatingOptions & ShowingOptions & {
574
+ withArrow?: boolean;
575
+ };
576
+
577
+ export declare const UiPopperTarget: DefineComponent<{ tag?: string }>;
578
+
485
579
  export declare const UiRadio: DefineComponent<UiRadioProperties, UiRadioMethods>;
486
580
 
487
581
  declare type UiRadioMethods = {
@@ -527,7 +621,7 @@ declare type UiTagProperties = {
527
621
  ticker?: boolean;
528
622
  };
529
623
 
530
- export declare const UiToolbar: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
624
+ export declare const UiToolbar: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
531
625
 
532
626
  export declare const UiToolbarButton: DefineComponent<
533
627
  UiToolbarButtonProperties,
@@ -540,6 +634,11 @@ export declare const UiToolbarLink: DefineComponent<UiToolbarLinkProperties>;
540
634
 
541
635
  declare type UiToolbarLinkProperties = Omit<UiLinkProperties, 'size'>;
542
636
 
637
+ export declare const UiTooltip: DefineComponent<
638
+ UiPopperProperties & { target: Ref<HTMLElement | null> },
639
+ UiPopperMethods
640
+ >;
641
+
543
642
  export declare const UiTransition: DefineComponent<UiTransitionProps>;
544
643
 
545
644
  declare type UiTransitionProps = {
@@ -568,3 +667,10 @@ export declare class VueI18n {
568
667
  }
569
668
 
570
669
  export { }
670
+
671
+
672
+ declare global {
673
+ interface Window {
674
+ MSStream: unknown;
675
+ }
676
+ }