@vectara/vectara-ui 18.4.0 → 19.1.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.
Files changed (81) hide show
  1. package/lib/components/card/SimpleCard.d.ts +1 -1
  2. package/lib/components/card/_index.scss +5 -30
  3. package/lib/components/chart/BarChart.d.ts +20 -0
  4. package/lib/components/chart/BarChart.js +28 -0
  5. package/lib/components/chart/ComposedChart.d.ts +21 -0
  6. package/lib/components/chart/ComposedChart.js +29 -0
  7. package/lib/components/chart/LineChart.d.ts +22 -0
  8. package/lib/components/chart/LineChart.js +42 -0
  9. package/lib/components/chart/PieChart.d.ts +15 -0
  10. package/lib/components/chart/PieChart.js +36 -0
  11. package/lib/components/chart/ScatterChart.d.ts +18 -0
  12. package/lib/components/chart/ScatterChart.js +34 -0
  13. package/lib/components/chart/Sparkline.d.ts +13 -0
  14. package/lib/components/chart/Sparkline.js +23 -0
  15. package/lib/components/chart/TreeMap.d.ts +13 -0
  16. package/lib/components/chart/TreeMap.js +51 -0
  17. package/lib/components/chart/_index.scss +19 -0
  18. package/lib/components/chart/chartTheme.d.ts +21 -0
  19. package/lib/components/chart/chartTheme.js +13 -0
  20. package/lib/components/chart/palette.d.ts +5 -0
  21. package/lib/components/chart/palette.js +29 -0
  22. package/lib/components/composer/Composer.d.ts +41 -0
  23. package/lib/components/composer/Composer.js +148 -0
  24. package/lib/components/composer/_index.scss +4 -0
  25. package/lib/components/composer/useComposerHistory.d.ts +34 -0
  26. package/lib/components/composer/useComposerHistory.js +127 -0
  27. package/lib/components/context/Theme.d.ts +32 -0
  28. package/lib/components/context/Theme.js +116 -3
  29. package/lib/components/fileDropTarget/FileDropTarget.d.ts +8 -0
  30. package/lib/components/fileDropTarget/FileDropTarget.js +69 -0
  31. package/lib/components/fileDropTarget/_index.scss +34 -0
  32. package/lib/components/index.d.ts +13 -2
  33. package/lib/components/index.js +12 -1
  34. package/lib/components/patch/VuiPatch.d.ts +10 -0
  35. package/lib/components/patch/VuiPatch.js +32 -0
  36. package/lib/components/patch/_index.scss +30 -0
  37. package/lib/styles/index.css +143 -27
  38. package/package.json +4 -3
  39. package/src/docs/Docs.tsx +10 -0
  40. package/src/docs/pages/barChart/Basic.tsx +21 -0
  41. package/src/docs/pages/barChart/Horizontal.tsx +20 -0
  42. package/src/docs/pages/barChart/Stacked.tsx +23 -0
  43. package/src/docs/pages/barChart/index.tsx +29 -0
  44. package/src/docs/pages/card/SimpleCard.tsx +72 -6
  45. package/src/docs/pages/colorPalette/CategoricalColors.tsx +89 -0
  46. package/src/docs/pages/colorPalette/ChartColors.tsx +68 -0
  47. package/src/docs/pages/colorPalette/NeutralColors.tsx +42 -0
  48. package/src/docs/pages/colorPalette/SemanticColors.tsx +64 -0
  49. package/src/docs/pages/colorPalette/Swatch.tsx +59 -0
  50. package/src/docs/pages/colorPalette/TextAndBorderColors.tsx +37 -0
  51. package/src/docs/pages/colorPalette/Usage.tsx +72 -0
  52. package/src/docs/pages/colorPalette/index.tsx +50 -0
  53. package/src/docs/pages/composedChart/Basic.tsx +25 -0
  54. package/src/docs/pages/composedChart/index.tsx +15 -0
  55. package/src/docs/pages/composer/Composer.tsx +130 -0
  56. package/src/docs/pages/composer/index.tsx +11 -0
  57. package/src/docs/pages/fileDropTarget/FileDropTarget.tsx +80 -0
  58. package/src/docs/pages/fileDropTarget/index.tsx +11 -0
  59. package/src/docs/pages/lineChart/Area.tsx +25 -0
  60. package/src/docs/pages/lineChart/Basic.tsx +23 -0
  61. package/src/docs/pages/lineChart/Curved.tsx +25 -0
  62. package/src/docs/pages/lineChart/StackedArea.tsx +27 -0
  63. package/src/docs/pages/lineChart/index.tsx +36 -0
  64. package/src/docs/pages/patch/Icons.tsx +16 -0
  65. package/src/docs/pages/patch/Sizes.tsx +20 -0
  66. package/src/docs/pages/patch/index.tsx +22 -0
  67. package/src/docs/pages/pieChart/Basic.tsx +13 -0
  68. package/src/docs/pages/pieChart/Donut.tsx +12 -0
  69. package/src/docs/pages/pieChart/ManyValues.tsx +51 -0
  70. package/src/docs/pages/pieChart/Unlabeled.tsx +15 -0
  71. package/src/docs/pages/pieChart/index.tsx +36 -0
  72. package/src/docs/pages/scatterChart/Basic.tsx +31 -0
  73. package/src/docs/pages/scatterChart/Dense.tsx +144 -0
  74. package/src/docs/pages/scatterChart/index.tsx +22 -0
  75. package/src/docs/pages/sparkline/Basic.tsx +7 -0
  76. package/src/docs/pages/sparkline/Inline.tsx +21 -0
  77. package/src/docs/pages/sparkline/index.tsx +22 -0
  78. package/src/docs/pages/treeMap/Basic.tsx +14 -0
  79. package/src/docs/pages/treeMap/Nested.tsx +88 -0
  80. package/src/docs/pages/treeMap/index.tsx +22 -0
  81. package/src/docs/pages.tsx +20 -3
@@ -16,12 +16,21 @@ import { VuiButtonTertiary } from "./button/ButtonTertiary";
16
16
  import { VuiIconButton } from "./button/IconButton";
17
17
  import { VuiCallout } from "./callout/Callout";
18
18
  import { VuiCard, VuiSimpleCard } from "./card";
19
+ import { BarChartSeries, VuiBarChart } from "./chart/BarChart";
20
+ import { LineChartSeries, LineChartVariant, VuiLineChart } from "./chart/LineChart";
21
+ import { VuiPieChart } from "./chart/PieChart";
22
+ import { VuiSparkline } from "./chart/Sparkline";
23
+ import { VuiTreeMap } from "./chart/TreeMap";
24
+ import { ScatterSeries, VuiScatterChart } from "./chart/ScatterChart";
25
+ import { ComposedSeries, VuiComposedChart } from "./chart/ComposedChart";
26
+ import { CHART_PALETTE } from "./chart/palette";
19
27
  import { CALLOUT_COLOR, CALLOUT_SIZE, CalloutColor } from "./callout/types";
20
28
  import { ChatTurn, ChatStyle, ChatLanguage } from "./chat/types";
21
29
  import { VuiChat } from "./chat/Chat";
22
30
  import { VuiChip } from "./chip/Chip";
23
31
  import { VuiCode } from "./code/Code";
24
32
  import { CodeLanguage } from "./code/types";
33
+ import { VuiComposer, ComposerFileError, ComposerShortcutApi, ComposerShortcutHandler, ComposerSubmission } from "./composer/Composer";
25
34
  import { VuiComplexConfigurationButton } from "./complexConfigurationButton/ComplexConfigurationButton";
26
35
  import { VuiContextProvider } from "./context/Context";
27
36
  import { VuiCopyButton } from "./copyButton/CopyButton";
@@ -30,6 +39,7 @@ import { VuiDateRangePicker } from "./datePicker/DateRangePicker";
30
39
  import { VuiDrawer } from "./drawer/Drawer";
31
40
  import { DURATION_BAR_COLOR, VuiDurationBar } from "./durationBar/DurationBar";
32
41
  import { VuiErrorBoundary } from "./errorBoundary/ErrorBoundary";
42
+ import { VuiFileDropTarget } from "./fileDropTarget/FileDropTarget";
33
43
  import { VuiFlexContainer } from "./flex/FlexContainer";
34
44
  import { VuiFlexItem } from "./flex/FlexItem";
35
45
  import { CheckboxConfig, CodeEditorColorConfig, CodeEditorError, RadioButtonConfig, generateTokensProvider, VuiCheckbox, VuiCodeEditor, VuiItemsInput, VuiLabel, VuiNumberInput, VuiRadioButton, VuiSelect, VuiSuperCheckboxGroup, VuiSuperRadioGroup, VuiTextInput, VuiTextArea, VuiPasswordInput } from "./form";
@@ -63,6 +73,7 @@ import { VuiOptionsListItem } from "./optionsList/OptionsListItem";
63
73
  import { OptionListItem } from "./optionsList/types";
64
74
  import { VuiPagination, Pagination } from "./pagination/Pagination";
65
75
  import { VuiPanel } from "./panel/Panel";
76
+ import { PATCH_COLOR, PatchColor, VuiPatch } from "./patch/VuiPatch";
66
77
  import { VuiPopover, AnchorSide } from "./popover/Popover";
67
78
  import { VuiPortal } from "./portal/Portal";
68
79
  import { PROGRESS_BAR_COLOR, VuiProgressBar } from "./progressBar/ProgressBar";
@@ -105,5 +116,5 @@ import { VuiInfoTooltip } from "./tooltip/InfoTooltip";
105
116
  import { VuiTopicButton } from "./topicButton/TopicButton";
106
117
  import { copyToClipboard } from "../utils/copyToClipboard";
107
118
  import { toRgb, toRgba } from "./context/Theme";
108
- export type { AnchorSide, AppContentPadding, ButtonColor, CalloutColor, ChatLanguage, ChatStyle, ChatTurn, CheckboxConfig, CodeEditorColorConfig, CodeEditorError, CodeLanguage, InfoListItemType, InfoListType, InfoTableColumnAlign, InfoTableRow, InfoTableRowType, KvTableAlign, KvTableItem, KvTableItems, KvTablePadding, LinkProps, MenuItem, OptionListItem, Pagination, RadioButtonConfig, SearchResult, SearchSuggestion, Sections, SectionItem, SpansRow, Stat, StepStatus, StepSize, Steps, StepsVertical, StepVerticalStatus, TabNavigatorRoute, TabSize, Tree, TreeItem };
109
- export { BADGE_COLOR, BUTTON_COLOR, BUTTON_SIZE, CALLOUT_COLOR, CALLOUT_SIZE, DURATION_BAR_COLOR, 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, generateTokensProvider, toRgb, toRgba, VuiAccordion, VuiAccountButton, VuiAppContent, VuiAppHeader, VuiAppLayout, VuiAppSideNav, VuiAppSideNavLink, VuiAppSideNavGroup, VuiBadge, VuiButtonPrimary, VuiButtonSecondary, VuiButtonTertiary, VuiIconButton, VuiCallout, VuiCard, VuiChat, VuiCheckbox, VuiChip, VuiCode, VuiCodeEditor, VuiComplexConfigurationButton, VuiContextProvider, VuiCopyButton, VuiDatePicker, VuiDateRangePicker, VuiDrawer, VuiDurationBar, VuiErrorBoundary, VuiFlexContainer, VuiFlexItem, VuiFormGroup, VuiGrid, VuiGridItem, VuiHorizontalRule, VuiIcon, VuiImage, VuiImagePreview, VuiInfoList, VuiInfoListItem, VuiInfoMenu, VuiInfoTable, VuiInfoTooltip, VuiKvTable, VuiInProgress, VuiItemsInput, VuiLabel, VuiLink, VuiLinkInternal, VuiList, VuiMenu, VuiMenuItem, VuiMenuList, VuiMenuListButton, VuiModal, VuiNotifications, VuiNumberInput, VuiOptionsButton, VuiOptionsList, VuiOptionsListItem, VuiPagination, VuiPanel, VuiPasswordInput, VuiPopover, VuiPortal, VuiProgressBar, VuiPrompt, VuiRadioButton, VuiScreenBlock, VuiSearchInput, VuiSearchResult, VuiSearchSelect, VuiSelect, VuiSetting, VuiSideList, VuiSideListButton, VuiSimpleCard, VuiSimpleGrid, VuiSpacer, VuiSpans, VuiSpinner, VuiStat, VuiStatList, VuiStatus, VuiSteps, VuiStepsVertical, VuiSummary, VuiSkeleton, VuiSummaryCitation, VuiSuperCheckboxGroup, VuiSuperRadioGroup, VuiTable, VuiTab, VuiTabbedRoutes, VuiTabs, VuiTabsNavigator, VuiText, VuiTextArea, VuiTextColor, VuiTextInput, VuiTimeline, VuiTimelineItem, VuiTitle, VuiToggle, VuiTooltip, VuiTopicButton };
119
+ export type { AnchorSide, AppContentPadding, BarChartSeries, ComposedSeries, LineChartSeries, LineChartVariant, ScatterSeries, ButtonColor, CalloutColor, ChatLanguage, ChatStyle, ChatTurn, CheckboxConfig, CodeEditorColorConfig, CodeEditorError, CodeLanguage, ComposerFileError, ComposerShortcutApi, ComposerShortcutHandler, ComposerSubmission, InfoListItemType, InfoListType, InfoTableColumnAlign, InfoTableRow, InfoTableRowType, KvTableAlign, KvTableItem, KvTableItems, KvTablePadding, LinkProps, MenuItem, OptionListItem, Pagination, PatchColor, RadioButtonConfig, SearchResult, SearchSuggestion, Sections, SectionItem, SpansRow, Stat, StepStatus, StepSize, Steps, StepsVertical, StepVerticalStatus, TabNavigatorRoute, TabSize, Tree, TreeItem };
120
+ export { BADGE_COLOR, BUTTON_COLOR, BUTTON_SIZE, CHART_PALETTE, CALLOUT_COLOR, CALLOUT_SIZE, DURATION_BAR_COLOR, ICON_COLOR, ICON_SIZE, ICON_TYPE, PATCH_COLOR, PROGRESS_BAR_COLOR, SPACER_SIZE, SPINNER_COLOR, SKELETON_COLOR, SPINNER_SIZE, TAB_SIZE, TEXT_COLOR, TEXT_SIZE, TITLE_SIZE, addNotification, copyToClipboard, generateTokensProvider, toRgb, toRgba, VuiAccordion, VuiAccountButton, VuiAppContent, VuiAppHeader, VuiAppLayout, VuiAppSideNav, VuiAppSideNavLink, VuiAppSideNavGroup, VuiBadge, VuiBarChart, VuiComposedChart, VuiLineChart, VuiPieChart, VuiScatterChart, VuiSparkline, VuiTreeMap, VuiButtonPrimary, VuiButtonSecondary, VuiButtonTertiary, VuiIconButton, VuiCallout, VuiCard, VuiChat, VuiCheckbox, VuiChip, VuiCode, VuiCodeEditor, VuiComposer, VuiComplexConfigurationButton, VuiContextProvider, VuiCopyButton, VuiDatePicker, VuiDateRangePicker, VuiDrawer, VuiDurationBar, VuiErrorBoundary, VuiFileDropTarget, VuiFlexContainer, VuiFlexItem, VuiFormGroup, VuiGrid, VuiGridItem, VuiHorizontalRule, VuiIcon, VuiImage, VuiImagePreview, VuiInfoList, VuiInfoListItem, VuiInfoMenu, VuiInfoTable, VuiInfoTooltip, VuiKvTable, VuiInProgress, VuiItemsInput, VuiLabel, VuiLink, VuiLinkInternal, VuiList, VuiMenu, VuiMenuItem, VuiMenuList, VuiMenuListButton, VuiModal, VuiNotifications, VuiNumberInput, VuiOptionsButton, VuiOptionsList, VuiOptionsListItem, VuiPagination, VuiPanel, VuiPasswordInput, VuiPatch, VuiPopover, VuiPortal, VuiProgressBar, VuiPrompt, VuiRadioButton, VuiScreenBlock, VuiSearchInput, VuiSearchResult, VuiSearchSelect, VuiSelect, VuiSetting, VuiSideList, VuiSideListButton, VuiSimpleCard, VuiSimpleGrid, VuiSpacer, VuiSpans, VuiSpinner, VuiStat, VuiStatList, VuiStatus, VuiSteps, VuiStepsVertical, VuiSummary, VuiSkeleton, VuiSummaryCitation, VuiSuperCheckboxGroup, VuiSuperRadioGroup, VuiTable, VuiTab, VuiTabbedRoutes, VuiTabs, VuiTabsNavigator, VuiText, VuiTextArea, VuiTextColor, VuiTextInput, VuiTimeline, VuiTimelineItem, VuiTitle, VuiToggle, VuiTooltip, VuiTopicButton };
@@ -14,10 +14,19 @@ import { VuiButtonTertiary } from "./button/ButtonTertiary";
14
14
  import { VuiIconButton } from "./button/IconButton";
15
15
  import { VuiCallout } from "./callout/Callout";
16
16
  import { VuiCard, VuiSimpleCard } from "./card";
17
+ import { VuiBarChart } from "./chart/BarChart";
18
+ import { VuiLineChart } from "./chart/LineChart";
19
+ import { VuiPieChart } from "./chart/PieChart";
20
+ import { VuiSparkline } from "./chart/Sparkline";
21
+ import { VuiTreeMap } from "./chart/TreeMap";
22
+ import { VuiScatterChart } from "./chart/ScatterChart";
23
+ import { VuiComposedChart } from "./chart/ComposedChart";
24
+ import { CHART_PALETTE } from "./chart/palette";
17
25
  import { CALLOUT_COLOR, CALLOUT_SIZE } from "./callout/types";
18
26
  import { VuiChat } from "./chat/Chat";
19
27
  import { VuiChip } from "./chip/Chip";
20
28
  import { VuiCode } from "./code/Code";
29
+ import { VuiComposer } from "./composer/Composer";
21
30
  import { VuiComplexConfigurationButton } from "./complexConfigurationButton/ComplexConfigurationButton";
22
31
  import { VuiContextProvider } from "./context/Context";
23
32
  import { VuiCopyButton } from "./copyButton/CopyButton";
@@ -26,6 +35,7 @@ import { VuiDateRangePicker } from "./datePicker/DateRangePicker";
26
35
  import { VuiDrawer } from "./drawer/Drawer";
27
36
  import { DURATION_BAR_COLOR, VuiDurationBar } from "./durationBar/DurationBar";
28
37
  import { VuiErrorBoundary } from "./errorBoundary/ErrorBoundary";
38
+ import { VuiFileDropTarget } from "./fileDropTarget/FileDropTarget";
29
39
  import { VuiFlexContainer } from "./flex/FlexContainer";
30
40
  import { VuiFlexItem } from "./flex/FlexItem";
31
41
  import { generateTokensProvider, VuiCheckbox, VuiCodeEditor, VuiItemsInput, VuiLabel, VuiNumberInput, VuiRadioButton, VuiSelect, VuiSuperCheckboxGroup, VuiSuperRadioGroup, VuiTextInput, VuiTextArea, VuiPasswordInput } from "./form";
@@ -56,6 +66,7 @@ import { VuiOptionsList } from "./optionsList/OptionsList";
56
66
  import { VuiOptionsListItem } from "./optionsList/OptionsListItem";
57
67
  import { VuiPagination } from "./pagination/Pagination";
58
68
  import { VuiPanel } from "./panel/Panel";
69
+ import { PATCH_COLOR, VuiPatch } from "./patch/VuiPatch";
59
70
  import { VuiPopover } from "./popover/Popover";
60
71
  import { VuiPortal } from "./portal/Portal";
61
72
  import { PROGRESS_BAR_COLOR, VuiProgressBar } from "./progressBar/ProgressBar";
@@ -96,4 +107,4 @@ import { VuiInfoTooltip } from "./tooltip/InfoTooltip";
96
107
  import { VuiTopicButton } from "./topicButton/TopicButton";
97
108
  import { copyToClipboard } from "../utils/copyToClipboard";
98
109
  import { toRgb, toRgba } from "./context/Theme";
99
- export { BADGE_COLOR, BUTTON_COLOR, BUTTON_SIZE, CALLOUT_COLOR, CALLOUT_SIZE, DURATION_BAR_COLOR, 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, generateTokensProvider, toRgb, toRgba, VuiAccordion, VuiAccountButton, VuiAppContent, VuiAppHeader, VuiAppLayout, VuiAppSideNav, VuiAppSideNavLink, VuiAppSideNavGroup, VuiBadge, VuiButtonPrimary, VuiButtonSecondary, VuiButtonTertiary, VuiIconButton, VuiCallout, VuiCard, VuiChat, VuiCheckbox, VuiChip, VuiCode, VuiCodeEditor, VuiComplexConfigurationButton, VuiContextProvider, VuiCopyButton, VuiDatePicker, VuiDateRangePicker, VuiDrawer, VuiDurationBar, VuiErrorBoundary, VuiFlexContainer, VuiFlexItem, VuiFormGroup, VuiGrid, VuiGridItem, VuiHorizontalRule, VuiIcon, VuiImage, VuiImagePreview, VuiInfoList, VuiInfoListItem, VuiInfoMenu, VuiInfoTable, VuiInfoTooltip, VuiKvTable, VuiInProgress, VuiItemsInput, VuiLabel, VuiLink, VuiLinkInternal, VuiList, VuiMenu, VuiMenuItem, VuiMenuList, VuiMenuListButton, VuiModal, VuiNotifications, VuiNumberInput, VuiOptionsButton, VuiOptionsList, VuiOptionsListItem, VuiPagination, VuiPanel, VuiPasswordInput, VuiPopover, VuiPortal, VuiProgressBar, VuiPrompt, VuiRadioButton, VuiScreenBlock, VuiSearchInput, VuiSearchResult, VuiSearchSelect, VuiSelect, VuiSetting, VuiSideList, VuiSideListButton, VuiSimpleCard, VuiSimpleGrid, VuiSpacer, VuiSpans, VuiSpinner, VuiStat, VuiStatList, VuiStatus, VuiSteps, VuiStepsVertical, VuiSummary, VuiSkeleton, VuiSummaryCitation, VuiSuperCheckboxGroup, VuiSuperRadioGroup, VuiTable, VuiTab, VuiTabbedRoutes, VuiTabs, VuiTabsNavigator, VuiText, VuiTextArea, VuiTextColor, VuiTextInput, VuiTimeline, VuiTimelineItem, VuiTitle, VuiToggle, VuiTooltip, VuiTopicButton };
110
+ export { BADGE_COLOR, BUTTON_COLOR, BUTTON_SIZE, CHART_PALETTE, CALLOUT_COLOR, CALLOUT_SIZE, DURATION_BAR_COLOR, ICON_COLOR, ICON_SIZE, ICON_TYPE, PATCH_COLOR, PROGRESS_BAR_COLOR, SPACER_SIZE, SPINNER_COLOR, SKELETON_COLOR, SPINNER_SIZE, TAB_SIZE, TEXT_COLOR, TEXT_SIZE, TITLE_SIZE, addNotification, copyToClipboard, generateTokensProvider, toRgb, toRgba, VuiAccordion, VuiAccountButton, VuiAppContent, VuiAppHeader, VuiAppLayout, VuiAppSideNav, VuiAppSideNavLink, VuiAppSideNavGroup, VuiBadge, VuiBarChart, VuiComposedChart, VuiLineChart, VuiPieChart, VuiScatterChart, VuiSparkline, VuiTreeMap, VuiButtonPrimary, VuiButtonSecondary, VuiButtonTertiary, VuiIconButton, VuiCallout, VuiCard, VuiChat, VuiCheckbox, VuiChip, VuiCode, VuiCodeEditor, VuiComposer, VuiComplexConfigurationButton, VuiContextProvider, VuiCopyButton, VuiDatePicker, VuiDateRangePicker, VuiDrawer, VuiDurationBar, VuiErrorBoundary, VuiFileDropTarget, VuiFlexContainer, VuiFlexItem, VuiFormGroup, VuiGrid, VuiGridItem, VuiHorizontalRule, VuiIcon, VuiImage, VuiImagePreview, VuiInfoList, VuiInfoListItem, VuiInfoMenu, VuiInfoTable, VuiInfoTooltip, VuiKvTable, VuiInProgress, VuiItemsInput, VuiLabel, VuiLink, VuiLinkInternal, VuiList, VuiMenu, VuiMenuItem, VuiMenuList, VuiMenuListButton, VuiModal, VuiNotifications, VuiNumberInput, VuiOptionsButton, VuiOptionsList, VuiOptionsListItem, VuiPagination, VuiPanel, VuiPasswordInput, VuiPatch, VuiPopover, VuiPortal, VuiProgressBar, VuiPrompt, VuiRadioButton, VuiScreenBlock, VuiSearchInput, VuiSearchResult, VuiSearchSelect, VuiSelect, VuiSetting, VuiSideList, VuiSideListButton, VuiSimpleCard, VuiSimpleGrid, VuiSpacer, VuiSpans, VuiSpinner, VuiStat, VuiStatList, VuiStatus, VuiSteps, VuiStepsVertical, VuiSummary, VuiSkeleton, VuiSummaryCitation, VuiSuperCheckboxGroup, VuiSuperRadioGroup, VuiTable, VuiTab, VuiTabbedRoutes, VuiTabs, VuiTabsNavigator, VuiText, VuiTextArea, VuiTextColor, VuiTextInput, VuiTimeline, VuiTimelineItem, VuiTitle, VuiToggle, VuiTooltip, VuiTopicButton };
@@ -0,0 +1,10 @@
1
+ export declare const PATCH_COLOR: readonly ["red", "orange", "amber", "lime", "emerald", "teal", "sky", "indigo", "purple", "fuchsia", "pink", "slate"];
2
+ export type PatchColor = (typeof PATCH_COLOR)[number];
3
+ type Props = {
4
+ color: PatchColor;
5
+ size?: "xs" | "s" | "m";
6
+ children?: React.ReactNode;
7
+ "data-testid"?: string;
8
+ };
9
+ export declare const VuiPatch: ({ color, size, children, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,32 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import classNames from "classnames";
14
+ export const PATCH_COLOR = [
15
+ "red",
16
+ "orange",
17
+ "amber",
18
+ "lime",
19
+ "emerald",
20
+ "teal",
21
+ "sky",
22
+ "indigo",
23
+ "purple",
24
+ "fuchsia",
25
+ "pink",
26
+ "slate"
27
+ ];
28
+ export const VuiPatch = (_a) => {
29
+ var { color, size = "xs", children } = _a, rest = __rest(_a, ["color", "size", "children"]);
30
+ const classes = classNames("vuiPatch", `vuiPatch--${color}`, `vuiPatch--${size}`);
31
+ return (_jsx("div", Object.assign({ className: classes }, rest, { children: children })));
32
+ };
@@ -0,0 +1,30 @@
1
+ .vuiPatch {
2
+ flex: 0 0 auto;
3
+ border-radius: $sizeXs;
4
+ display: inline-flex;
5
+ align-items: center;
6
+ justify-content: center;
7
+ }
8
+
9
+ $colors: "indigo", "emerald", "amber", "pink", "sky", "orange", "slate", "teal", "lime", "purple", "fuchsia", "red";
10
+
11
+ @each $color in $colors {
12
+ .vuiPatch--#{$color} {
13
+ background-color: var(--vui-color-#{$color}-background);
14
+ color: var(--vui-color-#{$color}-text);
15
+ }
16
+ }
17
+
18
+ $size: (
19
+ xs: $sizeXs,
20
+ s: $sizeS,
21
+ m: $sizeM
22
+ );
23
+
24
+ $sizes: "xs", "s", "m";
25
+
26
+ @each $sizeName, $sizeValue in $size {
27
+ .vuiPatch--#{$sizeName} {
28
+ padding: $sizeValue;
29
+ }
30
+ }
@@ -1310,50 +1310,49 @@ fieldset {
1310
1310
  }
1311
1311
 
1312
1312
  .vuiSimpleCard--interactive {
1313
- border: 1px solid var(--vui-color-primary-highlight-shade);
1314
1313
  transition: box-shadow 0.2s, border-color 0.2s;
1315
1314
  }
1316
1315
  .vuiSimpleCard--interactive:hover {
1317
- border-color: var(--vui-color-primary-shade);
1318
- box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;
1319
- }
1320
-
1321
- .vuiSimpleCard--danger {
1322
- border-color: var(--vui-color-danger-shade);
1323
- }
1324
- .vuiSimpleCard--danger.vuiSimpleCard--interactive:hover {
1325
- border-color: var(--vui-color-danger-shade);
1326
- }
1327
-
1328
- .vuiSimpleCard--warning {
1329
- border-color: var(--vui-color-warning-shade);
1330
- }
1331
- .vuiSimpleCard--warning.vuiSimpleCard--interactive:hover {
1332
- border-color: var(--vui-color-warning-shade);
1316
+ border-color: var(--vui-color-primary-highlight-shade);
1317
+ box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;
1333
1318
  }
1334
1319
 
1335
1320
  .vuiSimpleCard--fullHeight {
1336
1321
  height: 100%;
1337
1322
  }
1338
1323
 
1339
- .vuiSimpleCard--xxs {
1340
- padding: 8px 12px;
1324
+ .vuiSimpleCard--s {
1325
+ padding: 12px;
1341
1326
  }
1342
1327
 
1343
- .vuiSimpleCard--xs {
1344
- padding: 12px 16px;
1328
+ .vuiSimpleCard--m {
1329
+ padding: 16px;
1345
1330
  }
1346
1331
 
1347
- .vuiSimpleCard--s {
1348
- padding: 16px 24px;
1332
+ .vuiSimpleCard--l {
1333
+ padding: 24px;
1349
1334
  }
1350
1335
 
1351
- .vuiSimpleCard--m {
1352
- padding: 24px 32px;
1336
+ .vuiBarChart,
1337
+ .vuiLineChart,
1338
+ .vuiPieChart,
1339
+ .vuiScatterChart,
1340
+ .vuiComposedChart,
1341
+ .vuiTreeMap {
1342
+ width: 100%;
1343
+ }
1344
+ .vuiBarChart .recharts-legend-item,
1345
+ .vuiLineChart .recharts-legend-item,
1346
+ .vuiPieChart .recharts-legend-item,
1347
+ .vuiScatterChart .recharts-legend-item,
1348
+ .vuiComposedChart .recharts-legend-item,
1349
+ .vuiTreeMap .recharts-legend-item {
1350
+ margin-right: 16px !important;
1353
1351
  }
1354
1352
 
1355
- .vuiSimpleCard--l {
1356
- padding: 32px 40px;
1353
+ .vuiSparkline {
1354
+ display: inline-block;
1355
+ line-height: 0;
1357
1356
  }
1358
1357
 
1359
1358
  .vuiChatTurn {
@@ -1639,6 +1638,11 @@ fieldset {
1639
1638
  padding: 8px 4px 0 24px;
1640
1639
  }
1641
1640
 
1641
+ .vuiComposer {
1642
+ position: relative;
1643
+ width: 100%;
1644
+ }
1645
+
1642
1646
  .vuiComplexConfigurationButton {
1643
1647
  width: 100%;
1644
1648
  border: 1px solid var(--vui-color-primary-highlight-shade);
@@ -2610,6 +2614,38 @@ h2.react-datepicker__current-month {
2610
2614
  background-color: var(--vui-color-medium-shade);
2611
2615
  }
2612
2616
 
2617
+ .vuiFileDropTarget__messageContainer {
2618
+ position: fixed;
2619
+ left: 0;
2620
+ top: 0;
2621
+ width: 100%;
2622
+ height: 100%;
2623
+ display: flex;
2624
+ justify-content: center;
2625
+ align-items: center;
2626
+ }
2627
+
2628
+ .vuiFileDropTarget__message {
2629
+ padding: 24px;
2630
+ max-width: 400px;
2631
+ width: 100%;
2632
+ pointer-events: none;
2633
+ }
2634
+ .vuiFileDropTarget__message p,
2635
+ .vuiFileDropTarget__message span {
2636
+ color: var(--vui-color-empty-shade) !important;
2637
+ }
2638
+
2639
+ .vuiFileDropTarget__scopedOverlay {
2640
+ position: absolute;
2641
+ inset: 0;
2642
+ display: flex;
2643
+ align-items: center;
2644
+ justify-content: center;
2645
+ background-color: rgba(var(--vui-color-primary-shade-rgb), 0.6);
2646
+ z-index: 10;
2647
+ }
2648
+
2613
2649
  .vuiFlexContainer {
2614
2650
  display: flex;
2615
2651
  align-items: stretch;
@@ -4600,6 +4636,86 @@ h2.react-datepicker__current-month {
4600
4636
  height: auto;
4601
4637
  }
4602
4638
 
4639
+ .vuiPatch {
4640
+ flex: 0 0 auto;
4641
+ border-radius: 8px;
4642
+ display: inline-flex;
4643
+ align-items: center;
4644
+ justify-content: center;
4645
+ }
4646
+
4647
+ .vuiPatch--indigo {
4648
+ background-color: var(--vui-color-indigo-background);
4649
+ color: var(--vui-color-indigo-text);
4650
+ }
4651
+
4652
+ .vuiPatch--emerald {
4653
+ background-color: var(--vui-color-emerald-background);
4654
+ color: var(--vui-color-emerald-text);
4655
+ }
4656
+
4657
+ .vuiPatch--amber {
4658
+ background-color: var(--vui-color-amber-background);
4659
+ color: var(--vui-color-amber-text);
4660
+ }
4661
+
4662
+ .vuiPatch--pink {
4663
+ background-color: var(--vui-color-pink-background);
4664
+ color: var(--vui-color-pink-text);
4665
+ }
4666
+
4667
+ .vuiPatch--sky {
4668
+ background-color: var(--vui-color-sky-background);
4669
+ color: var(--vui-color-sky-text);
4670
+ }
4671
+
4672
+ .vuiPatch--orange {
4673
+ background-color: var(--vui-color-orange-background);
4674
+ color: var(--vui-color-orange-text);
4675
+ }
4676
+
4677
+ .vuiPatch--slate {
4678
+ background-color: var(--vui-color-slate-background);
4679
+ color: var(--vui-color-slate-text);
4680
+ }
4681
+
4682
+ .vuiPatch--teal {
4683
+ background-color: var(--vui-color-teal-background);
4684
+ color: var(--vui-color-teal-text);
4685
+ }
4686
+
4687
+ .vuiPatch--lime {
4688
+ background-color: var(--vui-color-lime-background);
4689
+ color: var(--vui-color-lime-text);
4690
+ }
4691
+
4692
+ .vuiPatch--purple {
4693
+ background-color: var(--vui-color-purple-background);
4694
+ color: var(--vui-color-purple-text);
4695
+ }
4696
+
4697
+ .vuiPatch--fuchsia {
4698
+ background-color: var(--vui-color-fuchsia-background);
4699
+ color: var(--vui-color-fuchsia-text);
4700
+ }
4701
+
4702
+ .vuiPatch--red {
4703
+ background-color: var(--vui-color-red-background);
4704
+ color: var(--vui-color-red-text);
4705
+ }
4706
+
4707
+ .vuiPatch--xs {
4708
+ padding: 8px;
4709
+ }
4710
+
4711
+ .vuiPatch--s {
4712
+ padding: 12px;
4713
+ }
4714
+
4715
+ .vuiPatch--m {
4716
+ padding: 16px;
4717
+ }
4718
+
4603
4719
  .vuiPopover {
4604
4720
  position: absolute;
4605
4721
  background-color: var(--vui-color-empty-shade);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectara/vectara-ui",
3
- "version": "18.4.0",
3
+ "version": "19.1.0",
4
4
  "homepage": "./",
5
5
  "description": "Vectara's design system, codified as a React and Sass component library",
6
6
  "author": "Vectara",
@@ -31,8 +31,8 @@
31
31
  "CHANGELOG.md"
32
32
  ],
33
33
  "scripts": {
34
- "start": "PORT=2000 react-scripts start",
35
- "buildDocs": "BUILD_PATH='./docs/public' PUBLIC_URL='.' react-scripts build",
34
+ "start": "REACT_APP_VUI_VERSION=$npm_package_version PORT=2000 react-scripts start",
35
+ "buildDocs": "REACT_APP_VUI_VERSION=$npm_package_version BUILD_PATH='./docs/public' PUBLIC_URL='.' react-scripts build",
36
36
  "test": "react-scripts test",
37
37
  "eject": "react-scripts eject",
38
38
  "build": "npx tsc --project tsconfig.lib.json && npm run copyStyleUtils && npm run copyComponentStyles && npm run compileCss",
@@ -62,6 +62,7 @@
62
62
  "react-icons": "^4.10.1",
63
63
  "react-scripts": "^5.0.1",
64
64
  "react-tooltip": "^5.30.0",
65
+ "recharts": "^3.8.1",
65
66
  "sonner": "^2.0.6",
66
67
  "web-vitals": "^2.1.4"
67
68
  },
package/src/docs/Docs.tsx CHANGED
@@ -10,6 +10,7 @@ import {
10
10
  VuiAppLayout,
11
11
  VuiButtonSecondary,
12
12
  VuiContextProvider,
13
+ VuiBadge,
13
14
  LinkProps
14
15
  } from "../lib";
15
16
  import { HeaderLogo } from "./components/HeaderLogo";
@@ -18,6 +19,9 @@ import { Home } from "./Home";
18
19
  import { Page } from "./Page";
19
20
  import "./index.scss";
20
21
 
22
+ // Baked in at build time from package.json via the REACT_APP_VUI_VERSION env var.
23
+ const VUI_VERSION = process.env.REACT_APP_VUI_VERSION;
24
+
21
25
  export const Docs = () => {
22
26
  return (
23
27
  <Router>
@@ -67,6 +71,12 @@ const DocsContent = () => {
67
71
  </VuiTitle>
68
72
  </VuiFlexItem>
69
73
 
74
+ {VUI_VERSION && (
75
+ <VuiFlexItem grow={false} shrink={false}>
76
+ <VuiBadge color="neutral">{`v${VUI_VERSION}`}</VuiBadge>
77
+ </VuiFlexItem>
78
+ )}
79
+
70
80
  <VuiFlexItem grow={false} shrink={false}>
71
81
  <VuiButtonSecondary size="s" color="neutral" href="/">
72
82
  Home
@@ -0,0 +1,21 @@
1
+ import { VuiBarChart } from "../../../lib";
2
+
3
+ const data = [
4
+ { quarter: "Q1", queries: 4200, documents: 1800 },
5
+ { quarter: "Q2", queries: 5100, documents: 2400 },
6
+ { quarter: "Q3", queries: 6800, documents: 3100 },
7
+ { quarter: "Q4", queries: 7400, documents: 3600 }
8
+ ];
9
+
10
+ export const Basic = () => {
11
+ return (
12
+ <VuiBarChart
13
+ data={data}
14
+ categoryKey="quarter"
15
+ series={[
16
+ { dataKey: "queries", name: "Queries" },
17
+ { dataKey: "documents", name: "Documents" }
18
+ ]}
19
+ />
20
+ );
21
+ };
@@ -0,0 +1,20 @@
1
+ import { VuiBarChart } from "../../../lib";
2
+
3
+ const data = [
4
+ { source: "Documentation", count: 3200 },
5
+ { source: "Blog", count: 2100 },
6
+ { source: "Support tickets", count: 1450 },
7
+ { source: "Forums", count: 980 },
8
+ { source: "Release notes", count: 540 }
9
+ ];
10
+
11
+ export const Horizontal = () => {
12
+ return (
13
+ <VuiBarChart
14
+ data={data}
15
+ categoryKey="source"
16
+ orientation="bars"
17
+ series={[{ dataKey: "count", name: "Indexed documents", color: "teal" }]}
18
+ />
19
+ );
20
+ };
@@ -0,0 +1,23 @@
1
+ import { VuiBarChart } from "../../../lib";
2
+
3
+ const data = [
4
+ { team: "Search", shipped: 12, inProgress: 5, planned: 8 },
5
+ { team: "Platform", shipped: 9, inProgress: 7, planned: 4 },
6
+ { team: "Growth", shipped: 6, inProgress: 3, planned: 9 },
7
+ { team: "Docs", shipped: 4, inProgress: 2, planned: 3 }
8
+ ];
9
+
10
+ export const Stacked = () => {
11
+ return (
12
+ <VuiBarChart
13
+ data={data}
14
+ categoryKey="team"
15
+ stacked
16
+ series={[
17
+ { dataKey: "shipped", name: "Shipped" },
18
+ { dataKey: "inProgress", name: "In progress" },
19
+ { dataKey: "planned", name: "Planned" }
20
+ ]}
21
+ />
22
+ );
23
+ };
@@ -0,0 +1,29 @@
1
+ import { Basic } from "./Basic";
2
+ import { Stacked } from "./Stacked";
3
+ import { Horizontal } from "./Horizontal";
4
+
5
+ const BasicSource = require("!!raw-loader!./Basic");
6
+ const StackedSource = require("!!raw-loader!./Stacked");
7
+ const HorizontalSource = require("!!raw-loader!./Horizontal");
8
+
9
+ export const barChart = {
10
+ name: "Bar chart",
11
+ path: "/bar-chart",
12
+ examples: [
13
+ {
14
+ name: "Basic",
15
+ component: <Basic />,
16
+ source: BasicSource.default.toString()
17
+ },
18
+ {
19
+ name: "Stacked",
20
+ component: <Stacked />,
21
+ source: StackedSource.default.toString()
22
+ },
23
+ {
24
+ name: "Horizontal",
25
+ component: <Horizontal />,
26
+ source: HorizontalSource.default.toString()
27
+ }
28
+ ]
29
+ };
@@ -1,8 +1,11 @@
1
1
  import { useState } from "react";
2
2
  import {
3
+ VuiBadge,
3
4
  VuiFlexContainer,
4
5
  VuiGrid,
6
+ VuiHorizontalRule,
5
7
  VuiIcon,
8
+ VuiPatch,
6
9
  VuiSelect,
7
10
  VuiSimpleCard,
8
11
  VuiSpacer,
@@ -10,18 +13,16 @@ import {
10
13
  VuiTextColor,
11
14
  VuiTitle
12
15
  } from "../../../lib";
13
- import { BiPencil } from "react-icons/bi";
16
+ import { BiData, BiPencil, BiRightArrowAlt } from "react-icons/bi";
14
17
 
15
18
  const paddingOptions = [
16
- { text: "Extra extra small", value: "xxs" },
17
- { text: "Extra small", value: "xs" },
18
19
  { text: "Small", value: "s" },
19
20
  { text: "Medium", value: "m" },
20
21
  { text: "Large", value: "l" }
21
22
  ];
22
23
 
23
24
  export const SimpleCard = () => {
24
- const [padding, setPadding] = useState<"xxs" | "xs" | "s" | "m" | "l">("xs");
25
+ const [padding, setPadding] = useState<"s" | "m" | "l">("l");
25
26
 
26
27
  return (
27
28
  <>
@@ -29,7 +30,7 @@ export const SimpleCard = () => {
29
30
  id="paddingOptions"
30
31
  options={paddingOptions}
31
32
  value={padding}
32
- onChange={(event) => setPadding(event.target.value as "xxs" | "xs" | "s" | "m" | "l")}
33
+ onChange={(event) => setPadding(event.target.value as "s" | "m" | "l")}
33
34
  />
34
35
 
35
36
  <VuiSpacer size="m" />
@@ -130,7 +131,11 @@ export const SimpleCard = () => {
130
131
  </VuiText>
131
132
  </VuiSimpleCard>
132
133
 
133
- <VuiSimpleCard padding={padding} warning="Missing configuration" onClick={() => console.log("Raccoon says hi!")}>
134
+ <VuiSimpleCard
135
+ padding={padding}
136
+ warning="Missing configuration"
137
+ onClick={() => console.log("Raccoon says hi!")}
138
+ >
134
139
  <VuiTitle size="xs">
135
140
  <h3>Raccoon</h3>
136
141
  </VuiTitle>
@@ -144,6 +149,67 @@ export const SimpleCard = () => {
144
149
  </VuiText>
145
150
  </VuiSimpleCard>
146
151
  </VuiGrid>
152
+
153
+ <VuiSpacer size="m" />
154
+
155
+ <div style={{ maxWidth: "400px" }}>
156
+ <VuiSimpleCard padding={padding} onClick={() => console.log("Selected")}>
157
+ <VuiFlexContainer alignItems="start" justifyContent="spaceBetween">
158
+ <VuiPatch color="emerald" size="s">
159
+ <VuiIcon>
160
+ <BiData />
161
+ </VuiIcon>
162
+ </VuiPatch>
163
+
164
+ <VuiBadge color="primary">Sources</VuiBadge>
165
+ </VuiFlexContainer>
166
+
167
+ <VuiSpacer size="m" />
168
+
169
+ <VuiTitle size="s">
170
+ <h3>
171
+ <strong>Tyrannodata</strong>
172
+ </h3>
173
+ </VuiTitle>
174
+
175
+ <VuiSpacer size="xxs" />
176
+
177
+ <VuiText size="xs">
178
+ <p>
179
+ <VuiTextColor color="subdued">Terrible, horrible, no-good data</VuiTextColor>
180
+ </p>
181
+ </VuiText>
182
+
183
+ <VuiSpacer size="s" />
184
+
185
+ <VuiText size="s">
186
+ <p>
187
+ <VuiTextColor color="subdued">
188
+ This data has seen better days. Where once it soared, mighty and free, above the lesser data, these days
189
+ it spends its time scavenging for bytes.
190
+ </VuiTextColor>
191
+ </p>
192
+ </VuiText>
193
+
194
+ <VuiSpacer size="l" />
195
+
196
+ <VuiHorizontalRule color="subdued" />
197
+
198
+ <VuiSpacer size="l" />
199
+
200
+ <VuiFlexContainer alignItems="center" justifyContent="spaceBetween">
201
+ <VuiText size="s">
202
+ <p>
203
+ <VuiTextColor color="primary">Select</VuiTextColor>
204
+ </p>
205
+ </VuiText>
206
+
207
+ <VuiIcon color="primary" size="s">
208
+ <BiRightArrowAlt />
209
+ </VuiIcon>
210
+ </VuiFlexContainer>
211
+ </VuiSimpleCard>
212
+ </div>
147
213
  </>
148
214
  );
149
215
  };