@epam/ai-dial-share 1.0.0-rc.7

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.
@@ -0,0 +1,43 @@
1
+ import { FC, KeyboardEvent, RefObject } from 'react';
2
+ import { ShareLinkAccess } from '../../types/share';
3
+ /** Props for {@link AccessControl}. */
4
+ interface AccessControlProps {
5
+ /** Primary row text, e.g. "Anyone with the link". */
6
+ anyoneWithLinkTitle: string;
7
+ /** Secondary row text, e.g. "in your organization". */
8
+ anyoneWithLinkSubtitle: string;
9
+ /** Current access level(s) for the share link. */
10
+ access: ShareLinkAccess[];
11
+ /** True to show an interactive dropdown; false shows a static "Can view" label. */
12
+ canEditAccess: boolean;
13
+ /** Access-dropdown option label for view access. */
14
+ accessViewLabel: string;
15
+ /** Access-dropdown option label for edit access. */
16
+ accessEditLabel: string;
17
+ /** `aria-label` for the access-level control. */
18
+ accessAriaLabel: string;
19
+ /** Whether the access dropdown menu is open. */
20
+ isOpen: boolean;
21
+ /** Called when the dropdown open state should change. */
22
+ onOpenChange: (next: boolean) => void;
23
+ /** Called when the user selects a different access level. */
24
+ onAccessChange: (access: ShareLinkAccess[]) => void;
25
+ /** Arrow-key navigation handler for the open menu. */
26
+ onMenuKeyDown: (e: KeyboardEvent<HTMLDivElement>) => void;
27
+ /** Ref attached to the dropdown trigger button, so focus can return to it on close. */
28
+ triggerRef: RefObject<HTMLButtonElement | null>;
29
+ /** Ref attached to the menu container, so the popover's Tab-trap can find its items. */
30
+ menuRef: RefObject<HTMLDivElement | null>;
31
+ /** CSS class applied to the primary row text. Defaults to `'dial-small-semi-text'`. */
32
+ titleClassName?: string;
33
+ /** CSS class applied to the secondary row text. Defaults to `'dial-tiny-text'`. */
34
+ subtitleClassName?: string;
35
+ /** CSS class applied to the access trigger label. Defaults to `'dial-small-semi-text'`. */
36
+ accessTriggerLabelClassName?: string;
37
+ /** CSS class applied to each access menu item label. Defaults to `'dial-small-text'`. */
38
+ accessMenuItemLabelClassName?: string;
39
+ }
40
+ /** "Anyone with the link" row: icon, title/subtitle, and an optional Can view/Can edit access-level control. */
41
+ export declare const AccessControl: FC<AccessControlProps>;
42
+ export {};
43
+ //# sourceMappingURL=AccessControl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccessControl.d.ts","sourceRoot":"","sources":["../../../src/components/AccessControl/AccessControl.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,EAAE,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,uCAAuC;AACvC,UAAU,kBAAkB;IAC1B,qDAAqD;IACrD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,uDAAuD;IACvD,sBAAsB,EAAE,MAAM,CAAC;IAC/B,kDAAkD;IAClD,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,mFAAmF;IACnF,aAAa,EAAE,OAAO,CAAC;IACvB,oDAAoD;IACpD,eAAe,EAAE,MAAM,CAAC;IACxB,oDAAoD;IACpD,eAAe,EAAE,MAAM,CAAC;IACxB,iDAAiD;IACjD,eAAe,EAAE,MAAM,CAAC;IACxB,gDAAgD;IAChD,MAAM,EAAE,OAAO,CAAC;IAChB,yDAAyD;IACzD,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,6DAA6D;IAC7D,cAAc,EAAE,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,IAAI,CAAC;IACpD,sDAAsD;IACtD,aAAa,EAAE,CAAC,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAC1D,uFAAuF;IACvF,UAAU,EAAE,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IAChD,wFAAwF;IACxF,OAAO,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC1C,uFAAuF;IACvF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mFAAmF;IACnF,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2FAA2F;IAC3F,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,yFAAyF;IACzF,4BAA4B,CAAC,EAAE,MAAM,CAAC;CACvC;AAED,gHAAgH;AAChH,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAyKhD,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { FC } from 'react';
2
+ /** Props for {@link LinkView}. */
3
+ interface LinkViewProps {
4
+ /** The share URL shown in the read-only input. */
5
+ url: string;
6
+ /** Label above the URL field. */
7
+ linkLabel: string;
8
+ /** `aria-label` for the URL input. */
9
+ linkAriaLabel: string;
10
+ /** Whether the URL was just copied to the clipboard. */
11
+ isCopied: boolean;
12
+ /** Copy button default label. */
13
+ copyButtonLabel: string;
14
+ /** Copy button label after copying. */
15
+ copiedButtonLabel: string;
16
+ /** Called when the Copy button is clicked. */
17
+ onCopy: () => void;
18
+ /** CSS class applied to the section label above the URL field. Defaults to `'dial-tiny-lead-semi-text'`. */
19
+ sectionLabelClassName?: string;
20
+ }
21
+ /** Read-only URL field with a copy-to-clipboard button. */
22
+ export declare const LinkView: FC<LinkViewProps>;
23
+ export {};
24
+ //# sourceMappingURL=LinkView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinkView.d.ts","sourceRoot":"","sources":["../../../src/components/LinkView/LinkView.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAG3B,kCAAkC;AAClC,UAAU,aAAa;IACrB,kDAAkD;IAClD,GAAG,EAAE,MAAM,CAAC;IACZ,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,sCAAsC;IACtC,aAAa,EAAE,MAAM,CAAC;IACtB,wDAAwD;IACxD,QAAQ,EAAE,OAAO,CAAC;IAClB,iCAAiC;IACjC,eAAe,EAAE,MAAM,CAAC;IACxB,uCAAuC;IACvC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,8CAA8C;IAC9C,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,4GAA4G;IAC5G,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,2DAA2D;AAC3D,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAyCtC,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { FC } from 'react';
2
+ /** All user-visible strings in {@link QrCodeProps}. */
3
+ export interface QrCodeLabels {
4
+ /** Accessible label describing the QR code image. */
5
+ ariaLabel: string;
6
+ }
7
+ /** CSS custom-property color overrides for {@link QrCodeProps}. */
8
+ export interface QrCodeColors {
9
+ /** Outer frame border color. */
10
+ borderColor?: string;
11
+ /** Outer frame background color. */
12
+ backgroundColor?: string;
13
+ /** QR modules' fill color (drives the SVG's `currentColor`). */
14
+ fillColor?: string;
15
+ }
16
+ /** Typography/color utility-class overrides for {@link QrCodeProps}. */
17
+ export interface QrCodeStyles {
18
+ /** Color overrides applied as CSS custom properties to the outer frame's border/background and the QR fill. */
19
+ colors?: QrCodeColors;
20
+ }
21
+ /** Props for {@link QrCode}. */
22
+ export interface QrCodeProps {
23
+ /** The value encoded into the QR code (the share URL). */
24
+ value: string;
25
+ /** User-visible strings. */
26
+ labels: QrCodeLabels;
27
+ /** Typography/color utility-class overrides for the frame and QR fill. */
28
+ styles?: QrCodeStyles;
29
+ }
30
+ /** QR code rendering of the share link, scannable to open it on another device. */
31
+ export declare const QrCode: FC<QrCodeProps>;
32
+ //# sourceMappingURL=QrCode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QrCode.d.ts","sourceRoot":"","sources":["../../../src/components/QrCode/QrCode.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAI3B,uDAAuD;AACvD,MAAM,WAAW,YAAY;IAC3B,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,mEAAmE;AACnE,MAAM,WAAW,YAAY;IAC3B,gCAAgC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oCAAoC;IACpC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wEAAwE;AACxE,MAAM,WAAW,YAAY;IAC3B,+GAA+G;IAC/G,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED,gCAAgC;AAChC,MAAM,WAAW,WAAW;IAC1B,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd,4BAA4B;IAC5B,MAAM,EAAE,YAAY,CAAC;IACrB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED,mFAAmF;AACnF,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CA6BlC,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { FC } from 'react';
2
+ /** Props for {@link LoadingSkeleton}. */
3
+ interface LoadingSkeletonProps {
4
+ /** Accessible label for the loading status region. */
5
+ ariaLabel: string;
6
+ /** Skeleton bar/shape color. Defaults to `--shp-skeleton-color`. */
7
+ skeletonColor?: string;
8
+ }
9
+ /** Skeleton placeholder shown while the share link is being created. */
10
+ export declare const LoadingSkeleton: FC<LoadingSkeletonProps>;
11
+ export {};
12
+ //# sourceMappingURL=LoadingSkeleton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadingSkeleton.d.ts","sourceRoot":"","sources":["../../../src/components/SharePopover/LoadingSkeleton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAG3B,yCAAyC;AACzC,UAAU,oBAAoB;IAC5B,sDAAsD;IACtD,SAAS,EAAE,MAAM,CAAC;IAClB,oEAAoE;IACpE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,wEAAwE;AACxE,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CA8DpD,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { SharePopoverProps } from '../../models/share-popover-props';
2
+ declare const _default: import('react').NamedExoticComponent<SharePopoverProps>;
3
+ export default _default;
4
+ //# sourceMappingURL=SharePopover.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SharePopover.d.ts","sourceRoot":"","sources":["../../../src/components/SharePopover/SharePopover.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;;AA4T1E,wBAAkC"}
@@ -0,0 +1,25 @@
1
+ import { FC } from 'react';
2
+ import { SharePopoverView } from '../../types/share';
3
+ /** DOM id of the QR-tab button, used to restore focus to it after leaving the QR view. */
4
+ export declare const QR_BUTTON_ID = "share-popover-qr-button";
5
+ /** DOM id of the back-to-link button, used to restore focus to it after leaving the QR view. */
6
+ export declare const LINK_BUTTON_ID = "share-popover-back-button";
7
+ /** Props for {@link SharePopoverHeader}. */
8
+ interface SharePopoverHeaderProps {
9
+ /** Popover heading text. */
10
+ title: string;
11
+ /** Currently active body view. */
12
+ view: SharePopoverView;
13
+ /** QR-tab button label. */
14
+ qrButtonLabel: string;
15
+ /** Back-to-link button label. */
16
+ linkLabel: string;
17
+ /** Called with the view the user switched to. */
18
+ onViewChange: (view: SharePopoverView) => void;
19
+ /** CSS class applied to the title text. Defaults to `'dial-small-semi-text'`. */
20
+ titleClassName?: string;
21
+ }
22
+ /** Popover title bar with the Link/QR view-toggle button. */
23
+ export declare const SharePopoverHeader: FC<SharePopoverHeaderProps>;
24
+ export {};
25
+ //# sourceMappingURL=SharePopoverHeader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SharePopoverHeader.d.ts","sourceRoot":"","sources":["../../../src/components/SharePopover/SharePopoverHeader.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAGrD,0FAA0F;AAC1F,eAAO,MAAM,YAAY,4BAA4B,CAAC;AACtD,gGAAgG;AAChG,eAAO,MAAM,cAAc,8BAA8B,CAAC;AAE1D,4CAA4C;AAC5C,UAAU,uBAAuB;IAC/B,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,IAAI,EAAE,gBAAgB,CAAC;IACvB,2BAA2B;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,iDAAiD;IACjD,YAAY,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC/C,iFAAiF;IACjF,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,6DAA6D;AAC7D,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CA4B1D,CAAC"}
package/index.css ADDED
@@ -0,0 +1,2 @@
1
+ ._accessTriggerBtn_86ja7_2{background-color:var(--shp-access-trigger-bg,var(--bg-layer-raised,#fcfcfc));border-color:var(--shp-access-trigger-border,var(--stroke-secondary,#d1dbea))}@media (hover:hover){button._accessTriggerBtn_86ja7_2:hover{border-color:var(--shp-access-trigger-border-hover,var(--stroke-info,#124ace))}}button._accessTriggerBtn_86ja7_2:focus-visible{outline:1px solid var(--shp-access-trigger-border-focus,var(--stroke-info,#124ace));outline-offset:-1px;border-color:#0000}._accessTriggerBtnOpen_86ja7_26{border-color:var(--shp-access-trigger-border-focus,var(--stroke-info,#124ace))}._accessTriggerLabel_86ja7_30{color:var(--shp-access-trigger-text,var(--text-primary,#161b2d))}._title_86ja7_34{color:var(--shp-title-text,var(--text-primary,#161b2d))}._linkIconBadge_86ja7_38{background:var(--shp-link-icon-bg,var(--bg-control-accent-alpha-active,#2764d933));color:var(--shp-link-icon-text,var(--text-accent,#1d4ed8))}._anyoneWithLinkTitle_86ja7_43{color:var(--shp-anyone-title,var(--text-primary,#161b2d))}._anyoneWithLinkSubtitle_86ja7_47{color:var(--shp-anyone-subtitle,var(--text-secondary,#57647a))}._accessTriggerChevron_86ja7_51{color:var(--shp-access-chevron,var(--text-tertiary,#848e9c));transition:transform .15s}@media (prefers-reduced-motion:reduce){._accessTriggerChevron_86ja7_51{transition:none}}@media (hover:hover){._accessMenuItem_86ja7_62:hover{background:var(--shp-menu-item-hover,var(--bg-control-accent-alpha-hover,#2764d924))}}._accessMenuItem_86ja7_62:focus-visible{background:var(--shp-menu-item-hover,var(--bg-control-accent-alpha-hover,#2764d924));box-shadow:inset 0 0 0 2px var(--shp-menu-item-focus-shadow,var(--stroke-info,#124ace))}._accessMenuItemChecked_86ja7_75{background:var(--shp-menu-item-checked-bg,var(--bg-control-accent-alpha-hover,#2764d924))}@media (hover:hover){._accessMenuItemChecked_86ja7_75:hover{background:var(--shp-menu-item-checked-bg,var(--bg-control-accent-alpha-hover,#2764d924))}}._accessMenuItemLabel_86ja7_84{color:var(--shp-menu-item-label,var(--text-primary,#161b2d))}._accessMenuItemCheck_86ja7_75{color:var(--shp-menu-item-check,var(--text-accent,#1d4ed8))}._sectionLabel_86ja7_92 input{color:var(--shp-section-label,var(--text-secondary,#57647a))!important}._errorText_86ja7_96{color:var(--shp-error-text,var(--text-error,#ae2f2f))}._note_86ja7_100{color:var(--shp-note-text,var(--text-secondary,#57647a))}._divider_86ja7_104{background:var(--shp-divider,var(--stroke-tertiary,#e0e6f0))}._container_hzzl6_1{border-color:var(--qr-border,var(--stroke-tertiary,#e0e6f0));background:var(--qr-bg,var(--bg-layer-sunken,#eef1f7))}._qrColor_hzzl6_6{color:var(--qr-color,var(--text-primary,#161b2d))}
2
+ /*$vite$:1*/
package/index.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ export { default as SharePopover } from './components/SharePopover/SharePopover';
2
+ export type { SharePopoverLabels, SharePopoverProps, SharePopoverStyles, SharePopoverTypography, } from './models/share-popover-props';
3
+ export { QrCode } from './components/QrCode/QrCode';
4
+ export type { QrCodeLabels, QrCodeProps, QrCodeStyles, } from './components/QrCode/QrCode';
5
+ export type { ShareLinkData } from './models/share-link-data';
6
+ export { ShareLinkAccess, SharePopoverView } from './types/share';
7
+ //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACjF,YAAY,EACV,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,YAAY,EACV,YAAY,EACZ,WAAW,EACX,YAAY,GACb,MAAM,4BAA4B,CAAC;AACpC,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}