@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
@@ -0,0 +1,22 @@
1
+ import { Basic } from "./Basic";
2
+ import { Inline } from "./Inline";
3
+
4
+ const BasicSource = require("!!raw-loader!./Basic");
5
+ const InlineSource = require("!!raw-loader!./Inline");
6
+
7
+ export const sparkline = {
8
+ name: "Sparkline",
9
+ path: "/sparkline",
10
+ examples: [
11
+ {
12
+ name: "Basic",
13
+ component: <Basic />,
14
+ source: BasicSource.default.toString()
15
+ },
16
+ {
17
+ name: "Inline with stats",
18
+ component: <Inline />,
19
+ source: InlineSource.default.toString()
20
+ }
21
+ ]
22
+ };
@@ -0,0 +1,14 @@
1
+ import { VuiTreeMap } from "../../../lib";
2
+
3
+ const data = [
4
+ { name: "Documentation", value: 4200 },
5
+ { name: "Blog", value: 2100 },
6
+ { name: "Support tickets", value: 1450 },
7
+ { name: "Forums", value: 980 },
8
+ { name: "Release notes", value: 620 },
9
+ { name: "Changelog", value: 340 }
10
+ ];
11
+
12
+ export const Basic = () => {
13
+ return <VuiTreeMap data={data} categoryKey="name" valueKey="value" />;
14
+ };
@@ -0,0 +1,88 @@
1
+ import { VuiTreeMap } from "../../../lib";
2
+
3
+ // The same base categories and relative sizes as the Basic example. Each category's value is split
4
+ // across eight nested subcategories so the parents sum to the same totals, keeping their ratios identical.
5
+ const data = [
6
+ {
7
+ name: "Documentation",
8
+ children: [
9
+ { name: "Documentation 1", value: 826 },
10
+ { name: "Documentation 2", value: 689 },
11
+ { name: "Documentation 3", value: 620 },
12
+ { name: "Documentation 4", value: 551 },
13
+ { name: "Documentation 5", value: 482 },
14
+ { name: "Documentation 6", value: 413 },
15
+ { name: "Documentation 7", value: 344 },
16
+ { name: "Documentation 8", value: 275 }
17
+ ]
18
+ },
19
+ {
20
+ name: "Blog",
21
+ children: [
22
+ { name: "Blog 1", value: 413 },
23
+ { name: "Blog 2", value: 344 },
24
+ { name: "Blog 3", value: 310 },
25
+ { name: "Blog 4", value: 275 },
26
+ { name: "Blog 5", value: 241 },
27
+ { name: "Blog 6", value: 207 },
28
+ { name: "Blog 7", value: 172 },
29
+ { name: "Blog 8", value: 138 }
30
+ ]
31
+ },
32
+ {
33
+ name: "Support tickets",
34
+ children: [
35
+ { name: "Support tickets 1", value: 285 },
36
+ { name: "Support tickets 2", value: 238 },
37
+ { name: "Support tickets 3", value: 214 },
38
+ { name: "Support tickets 4", value: 190 },
39
+ { name: "Support tickets 5", value: 166 },
40
+ { name: "Support tickets 6", value: 143 },
41
+ { name: "Support tickets 7", value: 119 },
42
+ { name: "Support tickets 8", value: 95 }
43
+ ]
44
+ },
45
+ {
46
+ name: "Forums",
47
+ children: [
48
+ { name: "Forums 1", value: 193 },
49
+ { name: "Forums 2", value: 161 },
50
+ { name: "Forums 3", value: 145 },
51
+ { name: "Forums 4", value: 129 },
52
+ { name: "Forums 5", value: 112 },
53
+ { name: "Forums 6", value: 96 },
54
+ { name: "Forums 7", value: 80 },
55
+ { name: "Forums 8", value: 64 }
56
+ ]
57
+ },
58
+ {
59
+ name: "Release notes",
60
+ children: [
61
+ { name: "Release notes 1", value: 122 },
62
+ { name: "Release notes 2", value: 102 },
63
+ { name: "Release notes 3", value: 91 },
64
+ { name: "Release notes 4", value: 81 },
65
+ { name: "Release notes 5", value: 71 },
66
+ { name: "Release notes 6", value: 61 },
67
+ { name: "Release notes 7", value: 51 },
68
+ { name: "Release notes 8", value: 41 }
69
+ ]
70
+ },
71
+ {
72
+ name: "Changelog",
73
+ children: [
74
+ { name: "Changelog 1", value: 67 },
75
+ { name: "Changelog 2", value: 56 },
76
+ { name: "Changelog 3", value: 50 },
77
+ { name: "Changelog 4", value: 45 },
78
+ { name: "Changelog 5", value: 39 },
79
+ { name: "Changelog 6", value: 33 },
80
+ { name: "Changelog 7", value: 28 },
81
+ { name: "Changelog 8", value: 22 }
82
+ ]
83
+ }
84
+ ];
85
+
86
+ export const Nested = () => {
87
+ return <VuiTreeMap data={data} categoryKey="name" valueKey="value" childrenKey="children" height={440} />;
88
+ };
@@ -0,0 +1,22 @@
1
+ import { Basic } from "./Basic";
2
+ import { Nested } from "./Nested";
3
+
4
+ const BasicSource = require("!!raw-loader!./Basic");
5
+ const NestedSource = require("!!raw-loader!./Nested");
6
+
7
+ export const treeMap = {
8
+ name: "Tree map",
9
+ path: "/tree-map",
10
+ examples: [
11
+ {
12
+ name: "Basic",
13
+ component: <Basic />,
14
+ source: BasicSource.default.toString()
15
+ },
16
+ {
17
+ name: "Nested",
18
+ component: <Nested />,
19
+ source: NestedSource.default.toString()
20
+ }
21
+ ]
22
+ };
@@ -3,6 +3,7 @@ import { accordion } from "./pages/accordion";
3
3
  import { accountButton } from "./pages/accountButton";
4
4
  import { app } from "./pages/app";
5
5
  import { badge } from "./pages/badge";
6
+ import { barChart } from "./pages/barChart";
6
7
  import { button } from "./pages/button";
7
8
  import { callout } from "./pages/callout";
8
9
  import { card } from "./pages/card";
@@ -11,12 +12,16 @@ import { checkbox } from "./pages/checkbox";
11
12
  import { chip } from "./pages/chip";
12
13
  import { code } from "./pages/code";
13
14
  import { codeEditor } from "./pages/codeEditor";
15
+ import { composedChart } from "./pages/composedChart";
16
+ import { colorPalette } from "./pages/colorPalette";
14
17
  import { complexConfigurationButton } from "./pages/complexConfigurationButton";
18
+ import { composer } from "./pages/composer";
15
19
  import { copyButton } from "./pages/copyButton";
16
20
  import { datePicker } from "./pages/datePicker";
17
21
  import { drawer } from "./pages/drawer";
18
22
  import { durationBar } from "./pages/durationBar";
19
23
  import { errorBoundary } from "./pages/errorBoundary";
24
+ import { fileDropTarget } from "./pages/fileDropTarget";
20
25
  import { flex } from "./pages/flex";
21
26
  import { formGroup } from "./pages/formGroup";
22
27
  import { grid } from "./pages/grid";
@@ -31,6 +36,7 @@ import { inProgress } from "./pages/inProgress";
31
36
  import { input } from "./pages/input";
32
37
  import { itemsInput } from "./pages/itemsInput";
33
38
  import { label } from "./pages/label";
39
+ import { lineChart } from "./pages/lineChart";
34
40
  import { link } from "./pages/link";
35
41
  import { list } from "./pages/list";
36
42
  import { menu } from "./pages/menu";
@@ -40,17 +46,21 @@ import { optionsButton } from "./pages/optionsButton";
40
46
  import { optionsList } from "./pages/optionsList";
41
47
  import { pagination } from "./pages/pagination";
42
48
  import { panel } from "./pages/panel";
49
+ import { patch } from "./pages/patch";
50
+ import { pieChart } from "./pages/pieChart";
43
51
  import { popover } from "./pages/popover";
44
52
  import { progressBar } from "./pages/progressBar";
45
53
  import { prompt } from "./pages/prompt";
46
54
  import { radioButton } from "./pages/radioButton";
47
55
  import { searchInput } from "./pages/searchInput";
48
56
  import { searchResult } from "./pages/searchResult";
57
+ import { scatterChart } from "./pages/scatterChart";
49
58
  import { searchSelect } from "./pages/searchSelect";
50
59
  import { select } from "./pages/select";
51
60
  import { setting } from "./pages/setting";
52
61
  import { menuList } from "./pages/menuList";
53
62
  import { spacer } from "./pages/spacer";
63
+ import { sparkline } from "./pages/sparkline";
54
64
  import { spinner } from "./pages/spinner";
55
65
  import { stat } from "./pages/stat";
56
66
  import { status } from "./pages/status";
@@ -69,6 +79,7 @@ import { textArea } from "./pages/textArea";
69
79
  import { theme } from "./pages/theme";
70
80
  import { portalContainer } from "./pages/portalContainer";
71
81
  import { timeline } from "./pages/timeline";
82
+ import { treeMap } from "./pages/treeMap";
72
83
  import { toggle } from "./pages/toggle";
73
84
  import { tooltip } from "./pages/tooltip";
74
85
  import { topicButton } from "./pages/topicButton";
@@ -84,11 +95,11 @@ type Example = { component: React.ReactNode; source: string };
84
95
  export const categories: Category[] = [
85
96
  {
86
97
  name: "Query",
87
- pages: [chat, prompt, searchInput, searchResult, summary]
98
+ pages: [chat, composer, prompt, searchInput, searchResult, summary]
88
99
  },
89
100
  {
90
101
  name: "Application",
91
- pages: [app, drawer, modal, portalContainer, notifications, accountButton, theme]
102
+ pages: [app, drawer, modal, portalContainer, notifications, accountButton, theme, colorPalette]
92
103
  },
93
104
  {
94
105
  name: "Info",
@@ -106,6 +117,7 @@ export const categories: Category[] = [
106
117
  name: "Content",
107
118
  pages: [
108
119
  badge,
120
+ patch,
109
121
  status,
110
122
  callout,
111
123
  code,
@@ -138,7 +150,8 @@ export const categories: Category[] = [
138
150
  radioButton,
139
151
  superCheckboxGroup,
140
152
  superRadioGroup,
141
- itemsInput
153
+ itemsInput,
154
+ fileDropTarget
142
155
  ]
143
156
  },
144
157
  {
@@ -156,6 +169,10 @@ export const categories: Category[] = [
156
169
  searchSelect
157
170
  ]
158
171
  },
172
+ {
173
+ name: "Data visualization",
174
+ pages: [barChart, lineChart, pieChart, scatterChart, composedChart, treeMap, sparkline]
175
+ },
159
176
  {
160
177
  name: "Utils",
161
178
  pages: [errorBoundary, truncate]