@vectara/vectara-ui 9.13.0 → 9.14.0
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.
|
@@ -69,6 +69,7 @@ import { SPINNER_COLOR, SPINNER_SIZE } from "./spinner/types";
|
|
|
69
69
|
import { Stat, VuiStatList } from "./statList/StatList";
|
|
70
70
|
import { VuiStatus } from "./status/Status";
|
|
71
71
|
import { VuiSteps, StepStatus, StepSize, VuiStepProps } from "./steps/Steps";
|
|
72
|
+
import { SKELETON_COLOR, VuiSkeleton } from "./skeleton/Skeleton";
|
|
72
73
|
import { VuiSummary } from "./summary/Summary";
|
|
73
74
|
import { VuiSummaryCitation } from "./summary/SummaryCitation";
|
|
74
75
|
import { VuiTable } from "./table/Table";
|
|
@@ -86,4 +87,4 @@ import { VuiTooltip } from "./tooltip/Tooltip";
|
|
|
86
87
|
import { VuiTopicButton } from "./topicButton/TopicButton";
|
|
87
88
|
import { copyToClipboard } from "../utils/copyToClipboard";
|
|
88
89
|
export type { AnchorSide, AppContentPadding, ButtonColor, CalloutColor, ChatLanguage, ChatStyle, ChatTurn, CodeLanguage, InfoListType, InfoTableColumnAlign, InfoTableRow, InfoTableRowType, LinkProps, MenuItem, OptionListItem, Pagination, RadioButtonConfig, SearchResult, SearchSuggestion, Sections, SectionItem, Stat, StepStatus, StepSize, TabSize, Tree, TreeItem, VuiStepProps };
|
|
89
|
-
export { BADGE_COLOR, BUTTON_COLOR, BUTTON_SIZE, CALLOUT_COLOR, CALLOUT_SIZE, ICON_COLOR, ICON_SIZE, ICON_TYPE, PROGRESS_BAR_COLOR, SPACER_SIZE, SPINNER_COLOR, SPINNER_SIZE, TAB_SIZE, TEXT_COLOR, TEXT_SIZE, TITLE_SIZE, addNotification, copyToClipboard, VuiAccordion, VuiAccountButton, VuiAppContent, VuiAppHeader, VuiAppLayout, VuiAppSideNav, VuiAppSideNavLink, VuiBadge, VuiButtonPrimary, VuiButtonSecondary, VuiButtonTertiary, VuiIconButton, VuiCallout, VuiCard, VuiChat, VuiCheckbox, VuiCode, VuiContextProvider, VuiCopyButton, VuiDatePicker, VuiDateRangePicker, VuiDrawer, VuiErrorBoundary, VuiFlexContainer, VuiFlexItem, VuiFormGroup, VuiGrid, VuiHorizontalRule, VuiIcon, VuiInfoList, VuiInfoMenu, VuiInfoTable, VuiInProgress, VuiItemsInput, VuiLabel, VuiLink, VuiLinkInternal, VuiList, VuiMenu, VuiMenuItem, VuiModal, VuiNotifications, VuiNumberInput, VuiOptionsButton, VuiOptionsList, VuiOptionsListItem, VuiPagination, VuiPanel, VuiPasswordInput, VuiPopover, VuiPortal, VuiProgressBar, VuiPrompt, VuiRadioButton, VuiScreenBlock, VuiSearchInput, VuiSearchResult, VuiSearchSelect, VuiSelect, VuiSetting, VuiSpacer, VuiSpinner, VuiStatList, VuiStatus, VuiSteps, VuiSummary, VuiSummaryCitation, VuiSuperRadioGroup, VuiTable, VuiTab, VuiTabbedRoutes, VuiTabs, VuiText, VuiTextArea, VuiTextColor, VuiTextInput, VuiTimeline, VuiTimelineItem, VuiTitle, VuiToggle, VuiTooltip, VuiTopicButton };
|
|
90
|
+
export { BADGE_COLOR, BUTTON_COLOR, BUTTON_SIZE, CALLOUT_COLOR, CALLOUT_SIZE, ICON_COLOR, ICON_SIZE, ICON_TYPE, PROGRESS_BAR_COLOR, SPACER_SIZE, SPINNER_COLOR, SKELETON_COLOR, SPINNER_SIZE, TAB_SIZE, TEXT_COLOR, TEXT_SIZE, TITLE_SIZE, addNotification, copyToClipboard, VuiAccordion, VuiAccountButton, VuiAppContent, VuiAppHeader, VuiAppLayout, VuiAppSideNav, VuiAppSideNavLink, VuiBadge, VuiButtonPrimary, VuiButtonSecondary, VuiButtonTertiary, VuiIconButton, VuiCallout, VuiCard, VuiChat, VuiCheckbox, VuiCode, VuiContextProvider, VuiCopyButton, VuiDatePicker, VuiDateRangePicker, VuiDrawer, VuiErrorBoundary, VuiFlexContainer, VuiFlexItem, VuiFormGroup, VuiGrid, VuiHorizontalRule, VuiIcon, VuiInfoList, VuiInfoMenu, VuiInfoTable, VuiInProgress, VuiItemsInput, VuiLabel, VuiLink, VuiLinkInternal, VuiList, VuiMenu, VuiMenuItem, VuiModal, VuiNotifications, VuiNumberInput, VuiOptionsButton, VuiOptionsList, VuiOptionsListItem, VuiPagination, VuiPanel, VuiPasswordInput, VuiPopover, VuiPortal, VuiProgressBar, VuiPrompt, VuiRadioButton, VuiScreenBlock, VuiSearchInput, VuiSearchResult, VuiSearchSelect, VuiSelect, VuiSetting, VuiSpacer, VuiSpinner, VuiStatList, VuiStatus, VuiSteps, VuiSummary, VuiSkeleton, VuiSummaryCitation, VuiSuperRadioGroup, VuiTable, VuiTab, VuiTabbedRoutes, VuiTabs, VuiText, VuiTextArea, VuiTextColor, VuiTextInput, VuiTimeline, VuiTimelineItem, VuiTitle, VuiToggle, VuiTooltip, VuiTopicButton };
|
package/lib/components/index.js
CHANGED
|
@@ -62,6 +62,7 @@ import { SPINNER_COLOR, SPINNER_SIZE } from "./spinner/types";
|
|
|
62
62
|
import { VuiStatList } from "./statList/StatList";
|
|
63
63
|
import { VuiStatus } from "./status/Status";
|
|
64
64
|
import { VuiSteps } from "./steps/Steps";
|
|
65
|
+
import { SKELETON_COLOR, VuiSkeleton } from "./skeleton/Skeleton";
|
|
65
66
|
import { VuiSummary } from "./summary/Summary";
|
|
66
67
|
import { VuiSummaryCitation } from "./summary/SummaryCitation";
|
|
67
68
|
import { VuiTable } from "./table/Table";
|
|
@@ -78,4 +79,4 @@ import { VuiToggle } from "./toggle/Toggle";
|
|
|
78
79
|
import { VuiTooltip } from "./tooltip/Tooltip";
|
|
79
80
|
import { VuiTopicButton } from "./topicButton/TopicButton";
|
|
80
81
|
import { copyToClipboard } from "../utils/copyToClipboard";
|
|
81
|
-
export { BADGE_COLOR, BUTTON_COLOR, BUTTON_SIZE, CALLOUT_COLOR, CALLOUT_SIZE, ICON_COLOR, ICON_SIZE, ICON_TYPE, PROGRESS_BAR_COLOR, SPACER_SIZE, SPINNER_COLOR, SPINNER_SIZE, TAB_SIZE, TEXT_COLOR, TEXT_SIZE, TITLE_SIZE, addNotification, copyToClipboard, VuiAccordion, VuiAccountButton, VuiAppContent, VuiAppHeader, VuiAppLayout, VuiAppSideNav, VuiAppSideNavLink, VuiBadge, VuiButtonPrimary, VuiButtonSecondary, VuiButtonTertiary, VuiIconButton, VuiCallout, VuiCard, VuiChat, VuiCheckbox, VuiCode, VuiContextProvider, VuiCopyButton, VuiDatePicker, VuiDateRangePicker, VuiDrawer, VuiErrorBoundary, VuiFlexContainer, VuiFlexItem, VuiFormGroup, VuiGrid, VuiHorizontalRule, VuiIcon, VuiInfoList, VuiInfoMenu, VuiInfoTable, VuiInProgress, VuiItemsInput, VuiLabel, VuiLink, VuiLinkInternal, VuiList, VuiMenu, VuiMenuItem, VuiModal, VuiNotifications, VuiNumberInput, VuiOptionsButton, VuiOptionsList, VuiOptionsListItem, VuiPagination, VuiPanel, VuiPasswordInput, VuiPopover, VuiPortal, VuiProgressBar, VuiPrompt, VuiRadioButton, VuiScreenBlock, VuiSearchInput, VuiSearchResult, VuiSearchSelect, VuiSelect, VuiSetting, VuiSpacer, VuiSpinner, VuiStatList, VuiStatus, VuiSteps, VuiSummary, VuiSummaryCitation, VuiSuperRadioGroup, VuiTable, VuiTab, VuiTabbedRoutes, VuiTabs, VuiText, VuiTextArea, VuiTextColor, VuiTextInput, VuiTimeline, VuiTimelineItem, VuiTitle, VuiToggle, VuiTooltip, VuiTopicButton };
|
|
82
|
+
export { BADGE_COLOR, BUTTON_COLOR, BUTTON_SIZE, CALLOUT_COLOR, CALLOUT_SIZE, ICON_COLOR, ICON_SIZE, ICON_TYPE, PROGRESS_BAR_COLOR, SPACER_SIZE, SPINNER_COLOR, SKELETON_COLOR, SPINNER_SIZE, TAB_SIZE, TEXT_COLOR, TEXT_SIZE, TITLE_SIZE, addNotification, copyToClipboard, VuiAccordion, VuiAccountButton, VuiAppContent, VuiAppHeader, VuiAppLayout, VuiAppSideNav, VuiAppSideNavLink, VuiBadge, VuiButtonPrimary, VuiButtonSecondary, VuiButtonTertiary, VuiIconButton, VuiCallout, VuiCard, VuiChat, VuiCheckbox, VuiCode, VuiContextProvider, VuiCopyButton, VuiDatePicker, VuiDateRangePicker, VuiDrawer, VuiErrorBoundary, VuiFlexContainer, VuiFlexItem, VuiFormGroup, VuiGrid, VuiHorizontalRule, VuiIcon, VuiInfoList, VuiInfoMenu, VuiInfoTable, VuiInProgress, VuiItemsInput, VuiLabel, VuiLink, VuiLinkInternal, VuiList, VuiMenu, VuiMenuItem, VuiModal, VuiNotifications, VuiNumberInput, VuiOptionsButton, VuiOptionsList, VuiOptionsListItem, VuiPagination, VuiPanel, VuiPasswordInput, VuiPopover, VuiPortal, VuiProgressBar, VuiPrompt, VuiRadioButton, VuiScreenBlock, VuiSearchInput, VuiSearchResult, VuiSearchSelect, VuiSelect, VuiSetting, VuiSpacer, VuiSpinner, VuiStatList, VuiStatus, VuiSteps, VuiSummary, VuiSkeleton, VuiSummaryCitation, VuiSuperRadioGroup, VuiTable, VuiTab, VuiTabbedRoutes, VuiTabs, VuiText, VuiTextArea, VuiTextColor, VuiTextInput, VuiTimeline, VuiTimelineItem, VuiTitle, VuiToggle, VuiTooltip, VuiTopicButton };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const SKELETON_COLOR: readonly ["accent", "primary", "danger", "warning", "success", "neutral", "subdued"];
|
|
2
|
+
type Props = {
|
|
3
|
+
rows?: number;
|
|
4
|
+
color?: (typeof SKELETON_COLOR)[number];
|
|
5
|
+
active?: boolean;
|
|
6
|
+
height?: string | number;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const VuiSkeleton: ({ rows, color, active, height, className }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
export const SKELETON_COLOR = ["accent", "primary", "danger", "warning", "success", "neutral", "subdued"];
|
|
4
|
+
export const VuiSkeleton = ({ rows = 2.75, color = "subdued", active = true, height = "1rem", className }) => {
|
|
5
|
+
const classes = classNames(className, "vuiSkeleton__row", `vuiSkeleton--${color}`, {
|
|
6
|
+
"vuiSkeleton--active": active
|
|
7
|
+
});
|
|
8
|
+
const fullRows = Math.floor(rows);
|
|
9
|
+
const partialRowWidth = rows % 1;
|
|
10
|
+
const renderRows = () => {
|
|
11
|
+
const rowElements = [];
|
|
12
|
+
// Render full rows
|
|
13
|
+
for (let i = 0; i < fullRows; i++) {
|
|
14
|
+
rowElements.push(_jsx("div", { className: classes, style: { height } }, `full-${i}`));
|
|
15
|
+
}
|
|
16
|
+
// Render partial row if there's a decimal component
|
|
17
|
+
if (partialRowWidth > 0) {
|
|
18
|
+
rowElements.push(_jsx("div", { className: classes, style: { width: `${partialRowWidth * 100}%`, height } }, "partial"));
|
|
19
|
+
}
|
|
20
|
+
return rowElements;
|
|
21
|
+
};
|
|
22
|
+
return (_jsx(_Fragment, { children: renderRows() }));
|
|
23
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
.vuiSkeleton__row {
|
|
4
|
+
display: block;
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 1rem;
|
|
7
|
+
border-radius: 4px;
|
|
8
|
+
margin-bottom: 0.5rem;
|
|
9
|
+
position: relative;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
|
|
12
|
+
&:last-child {
|
|
13
|
+
margin-bottom: 0;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@keyframes vuiSkeletonShimmer {
|
|
18
|
+
0% {
|
|
19
|
+
transform: translateX(-100%);
|
|
20
|
+
}
|
|
21
|
+
100% {
|
|
22
|
+
transform: translateX(100%);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.vuiSkeleton__row.vuiSkeleton--active {
|
|
27
|
+
&::after {
|
|
28
|
+
content: "";
|
|
29
|
+
position: absolute;
|
|
30
|
+
top: 0;
|
|
31
|
+
left: 0;
|
|
32
|
+
width: 100%;
|
|
33
|
+
height: 100%;
|
|
34
|
+
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
|
|
35
|
+
animation: vuiSkeletonShimmer 2s ease-in-out infinite;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Color variants
|
|
40
|
+
$color: (
|
|
41
|
+
accent: (
|
|
42
|
+
"backgroundColor": $colorAccentLighterShade
|
|
43
|
+
),
|
|
44
|
+
primary: (
|
|
45
|
+
"backgroundColor": $colorPrimaryLighterShade
|
|
46
|
+
),
|
|
47
|
+
success: (
|
|
48
|
+
"backgroundColor": $colorSuccessLighterShade
|
|
49
|
+
),
|
|
50
|
+
danger: (
|
|
51
|
+
"backgroundColor": $colorDangerLighterShade
|
|
52
|
+
),
|
|
53
|
+
warning: (
|
|
54
|
+
"backgroundColor": $colorWarningLighterShade
|
|
55
|
+
),
|
|
56
|
+
neutral: (
|
|
57
|
+
"backgroundColor": $colorMediumShade
|
|
58
|
+
),
|
|
59
|
+
subdued: (
|
|
60
|
+
"backgroundColor": $colorLightShade
|
|
61
|
+
)
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
@each $colorName, $colorValue in $color {
|
|
65
|
+
.vuiSkeleton__row.vuiSkeleton--#{$colorName} {
|
|
66
|
+
background-color: #{map.get($colorValue, "backgroundColor")};
|
|
67
|
+
}
|
|
68
|
+
}
|
package/lib/styles/index.css
CHANGED
|
@@ -405,17 +405,19 @@ fieldset {
|
|
|
405
405
|
overflow: hidden;
|
|
406
406
|
text-overflow: ellipsis;
|
|
407
407
|
white-space: nowrap;
|
|
408
|
-
text-decoration: none;
|
|
409
|
-
border-radius: 4px;
|
|
410
|
-
line-height: 1.1;
|
|
411
|
-
border-top: 1px solid #ffffff;
|
|
412
|
-
border-bottom: 1px solid #ffffff;
|
|
413
408
|
}
|
|
414
409
|
.vuiAppSideNavLink * {
|
|
415
410
|
overflow: hidden;
|
|
416
411
|
text-overflow: ellipsis;
|
|
417
412
|
white-space: nowrap;
|
|
418
413
|
}
|
|
414
|
+
.vuiAppSideNavLink {
|
|
415
|
+
text-decoration: none;
|
|
416
|
+
border-radius: 4px;
|
|
417
|
+
line-height: 1.1;
|
|
418
|
+
border-top: 1px solid #ffffff;
|
|
419
|
+
border-bottom: 1px solid #ffffff;
|
|
420
|
+
}
|
|
419
421
|
.vuiAppSideNavLink:hover {
|
|
420
422
|
background-color: #f1f4f6;
|
|
421
423
|
color: #045dda;
|
|
@@ -1385,6 +1387,19 @@ fieldset {
|
|
|
1385
1387
|
width: 9px;
|
|
1386
1388
|
}
|
|
1387
1389
|
|
|
1390
|
+
/* sr-only utility class for accessibility */
|
|
1391
|
+
.react-datepicker__sr-only {
|
|
1392
|
+
position: absolute;
|
|
1393
|
+
width: 1px;
|
|
1394
|
+
height: 1px;
|
|
1395
|
+
padding: 0;
|
|
1396
|
+
margin: -1px;
|
|
1397
|
+
overflow: hidden;
|
|
1398
|
+
clip: rect(0, 0, 0, 0);
|
|
1399
|
+
white-space: nowrap;
|
|
1400
|
+
border: 0;
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1388
1403
|
.react-datepicker-wrapper {
|
|
1389
1404
|
display: inline-block;
|
|
1390
1405
|
padding: 0;
|
|
@@ -3913,6 +3928,66 @@ h2.react-datepicker__current-month {
|
|
|
3913
3928
|
height: 100px;
|
|
3914
3929
|
}
|
|
3915
3930
|
|
|
3931
|
+
.vuiSkeleton__row {
|
|
3932
|
+
display: block;
|
|
3933
|
+
width: 100%;
|
|
3934
|
+
height: 1rem;
|
|
3935
|
+
border-radius: 4px;
|
|
3936
|
+
margin-bottom: 0.5rem;
|
|
3937
|
+
position: relative;
|
|
3938
|
+
overflow: hidden;
|
|
3939
|
+
}
|
|
3940
|
+
.vuiSkeleton__row:last-child {
|
|
3941
|
+
margin-bottom: 0;
|
|
3942
|
+
}
|
|
3943
|
+
|
|
3944
|
+
@keyframes vuiSkeletonShimmer {
|
|
3945
|
+
0% {
|
|
3946
|
+
transform: translateX(-100%);
|
|
3947
|
+
}
|
|
3948
|
+
100% {
|
|
3949
|
+
transform: translateX(100%);
|
|
3950
|
+
}
|
|
3951
|
+
}
|
|
3952
|
+
.vuiSkeleton__row.vuiSkeleton--active::after {
|
|
3953
|
+
content: "";
|
|
3954
|
+
position: absolute;
|
|
3955
|
+
top: 0;
|
|
3956
|
+
left: 0;
|
|
3957
|
+
width: 100%;
|
|
3958
|
+
height: 100%;
|
|
3959
|
+
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
|
|
3960
|
+
animation: vuiSkeletonShimmer 2s ease-in-out infinite;
|
|
3961
|
+
}
|
|
3962
|
+
|
|
3963
|
+
.vuiSkeleton__row.vuiSkeleton--accent {
|
|
3964
|
+
background-color: #eee7ff;
|
|
3965
|
+
}
|
|
3966
|
+
|
|
3967
|
+
.vuiSkeleton__row.vuiSkeleton--primary {
|
|
3968
|
+
background-color: #f1f7ff;
|
|
3969
|
+
}
|
|
3970
|
+
|
|
3971
|
+
.vuiSkeleton__row.vuiSkeleton--success {
|
|
3972
|
+
background-color: #e2f2e0;
|
|
3973
|
+
}
|
|
3974
|
+
|
|
3975
|
+
.vuiSkeleton__row.vuiSkeleton--danger {
|
|
3976
|
+
background-color: #fff1f1;
|
|
3977
|
+
}
|
|
3978
|
+
|
|
3979
|
+
.vuiSkeleton__row.vuiSkeleton--warning {
|
|
3980
|
+
background-color: #ffeed4;
|
|
3981
|
+
}
|
|
3982
|
+
|
|
3983
|
+
.vuiSkeleton__row.vuiSkeleton--neutral {
|
|
3984
|
+
background-color: #cbd1de;
|
|
3985
|
+
}
|
|
3986
|
+
|
|
3987
|
+
.vuiSkeleton__row.vuiSkeleton--subdued {
|
|
3988
|
+
background-color: #f1f4f6;
|
|
3989
|
+
}
|
|
3990
|
+
|
|
3916
3991
|
.vuiStatName {
|
|
3917
3992
|
width: 120px;
|
|
3918
3993
|
word-break: break-word;
|