@progress/kendo-themes-html 7.1.0-dev.3 → 7.1.0-dev.5

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 (63) hide show
  1. package/dist/cjs/index.js +1270 -1247
  2. package/dist/cjs/prompt/prompt-content.js +3 -4813
  3. package/dist/cjs/prompt/prompt-view.js +4862 -0
  4. package/dist/cjs/prompt/templates/prompt-more-actions.js +92 -72
  5. package/dist/cjs/prompt/templates/prompt-normal.js +89 -69
  6. package/dist/cjs/prompt/templates/prompt-output.js +120 -100
  7. package/dist/cjs/prompt/templates/prompt-popup.js +91 -71
  8. package/dist/cjs/prompt/templates/prompt-settings.js +86 -66
  9. package/dist/cjs/prompt/templates/prompt-suggestions.js +96 -76
  10. package/dist/cjs/prompt/tests/prompt-more-actions.js +98 -78
  11. package/dist/cjs/prompt/tests/prompt-normal.js +136 -116
  12. package/dist/cjs/prompt/tests/prompt-output.js +126 -106
  13. package/dist/cjs/timeline/horizontal-timeline-event.spec.js +2 -2
  14. package/dist/cjs/timeline/templates/timeline-horizontal.js +2 -2
  15. package/dist/cjs/timeline/templates/timeline-normal-alternating.js +2 -2
  16. package/dist/cjs/timeline/templates/timeline-normal-collapsible.js +2 -2
  17. package/dist/cjs/timeline/templates/timeline-normal.js +2 -2
  18. package/dist/cjs/timeline/tests/timeline-horizontal.js +2 -2
  19. package/dist/cjs/timeline/tests/timeline-vertical-alternating.js +2 -2
  20. package/dist/cjs/timeline/tests/timeline-vertical.js +2 -2
  21. package/dist/cjs/timeline/timeline-card-title.js +8 -165
  22. package/dist/cjs/timeline/timeline-card.spec.js +2 -2
  23. package/dist/cjs/timeline/timeline-track-wrap.spec.js +2 -2
  24. package/dist/cjs/timeline/vertical-timeline-event.spec.js +2 -2
  25. package/dist/esm/index.js +1096 -1073
  26. package/dist/esm/prompt/prompt-content.js +4 -4820
  27. package/dist/esm/prompt/prompt-view.js +4846 -0
  28. package/dist/esm/prompt/templates/prompt-more-actions.js +84 -64
  29. package/dist/esm/prompt/templates/prompt-normal.js +83 -63
  30. package/dist/esm/prompt/templates/prompt-output.js +108 -88
  31. package/dist/esm/prompt/templates/prompt-popup.js +86 -66
  32. package/dist/esm/prompt/templates/prompt-settings.js +77 -57
  33. package/dist/esm/prompt/templates/prompt-suggestions.js +90 -70
  34. package/dist/esm/prompt/tests/prompt-more-actions.js +89 -69
  35. package/dist/esm/prompt/tests/prompt-normal.js +123 -103
  36. package/dist/esm/prompt/tests/prompt-output.js +113 -93
  37. package/dist/esm/timeline/horizontal-timeline-event.spec.js +2 -2
  38. package/dist/esm/timeline/templates/timeline-horizontal.js +2 -2
  39. package/dist/esm/timeline/templates/timeline-normal-alternating.js +2 -2
  40. package/dist/esm/timeline/templates/timeline-normal-collapsible.js +2 -2
  41. package/dist/esm/timeline/templates/timeline-normal.js +2 -2
  42. package/dist/esm/timeline/tests/timeline-horizontal.js +2 -2
  43. package/dist/esm/timeline/tests/timeline-vertical-alternating.js +2 -2
  44. package/dist/esm/timeline/tests/timeline-vertical.js +2 -2
  45. package/dist/esm/timeline/timeline-card-title.js +8 -165
  46. package/dist/esm/timeline/timeline-card.spec.js +2 -2
  47. package/dist/esm/timeline/timeline-track-wrap.spec.js +2 -2
  48. package/dist/esm/timeline/vertical-timeline-event.spec.js +2 -2
  49. package/dist/types/prompt/index.d.ts +1 -0
  50. package/dist/types/prompt/prompt-content.d.ts +1 -7
  51. package/dist/types/prompt/prompt-view.d.ts +8 -0
  52. package/package.json +2 -2
  53. package/src/prompt/index.ts +1 -0
  54. package/src/prompt/prompt-content.tsx +1 -30
  55. package/src/prompt/prompt-view.tsx +51 -0
  56. package/src/prompt/templates/prompt-more-actions.tsx +11 -9
  57. package/src/prompt/templates/prompt-normal.tsx +4 -2
  58. package/src/prompt/templates/prompt-output.tsx +33 -31
  59. package/src/prompt/templates/prompt-popup.tsx +4 -2
  60. package/src/prompt/templates/prompt-settings.tsx +25 -23
  61. package/src/prompt/templates/prompt-suggestions.tsx +12 -10
  62. package/src/timeline/timeline-card-title.tsx +2 -2
  63. package/src/timeline/timeline-card.spec.tsx +1 -0
@@ -4636,7 +4636,6 @@ Button.defaultProps = defaultProps6;
4636
4636
 
4637
4637
  // src/button/templates/icon-button.tsx
4638
4638
  import { jsx as jsx11 } from "react/jsx-runtime";
4639
- var IconButton = (props) => /* @__PURE__ */ jsx11(Button, { icon: "folder", ...props, children: void 0 });
4640
4639
 
4641
4640
  // src/button/templates/icon-text-button.tsx
4642
4641
  import { jsx as jsx12 } from "react/jsx-runtime";
@@ -4941,6 +4940,7 @@ var TimelineCard = (props) => {
4941
4940
  props.className
4942
4941
  ),
4943
4942
  orientation: "vertical",
4943
+ callout: "true",
4944
4944
  ...other,
4945
4945
  children: [
4946
4946
  callout && /* @__PURE__ */ jsx27(TimelineCardCallout, { callout }),
@@ -4973,7 +4973,7 @@ var TimelineCardTitle = (props) => {
4973
4973
  ...other,
4974
4974
  children: [
4975
4975
  /* @__PURE__ */ jsx28("span", { className: "k-event-title", children }),
4976
- collapsible && /* @__PURE__ */ jsx28(IconButton, { fillMode: "flat", icon: "chevron-right", className: "k-event-collapse" })
4976
+ collapsible && /* @__PURE__ */ jsx28("span", { className: "k-event-collapse k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button", children: /* @__PURE__ */ jsx28(Icon, { icon: "chevron-right", className: "k-button-icon" }) })
4977
4977
  ]
4978
4978
  }
4979
4979
  );
@@ -40,22 +40,6 @@ var optionClassNames = (componentClassName, props) => {
40
40
  }
41
41
  );
42
42
  };
43
- var stateClassNames = (_componentClassName, props) => {
44
- return classNames({
45
- "k-valid": props.valid,
46
- "k-invalid": props.invalid,
47
- "k-hover": props.hover,
48
- "k-focus": props.focus,
49
- "k-checked": props.checked,
50
- "k-active": props.active,
51
- "k-selected": props.selected,
52
- "k-disabled": props.disabled,
53
- "k-indeterminate": props.indeterminate && !props.checked,
54
- "k-loading": props.loading,
55
- "k-empty": props.empty,
56
- "k-readonly": props.readonly
57
- });
58
- };
59
43
 
60
44
  // src/misc/theme.ts
61
45
  var Size = {
@@ -67,19 +51,6 @@ var Size = {
67
51
  "xxlarge": "xxlarge",
68
52
  "xxxlarge": "xxxlarge"
69
53
  };
70
- var Roundness = {
71
- "small": "small",
72
- "medium": "medium",
73
- "large": "large",
74
- "full": "full"
75
- };
76
- var FillMode = {
77
- "solid": "solid",
78
- "flat": "flat",
79
- "outline": "outline",
80
- "clear": "clear",
81
- "link": "link"
82
- };
83
54
  var ThemeColor = {
84
55
  "inherit": "inherit",
85
56
  "base": "base",
@@ -94,22 +65,6 @@ var ThemeColor = {
94
65
  "light": "light",
95
66
  "inverse": "inverse"
96
67
  };
97
- var States = {
98
- "open": "open",
99
- "hover": "hover",
100
- "focus": "focus",
101
- "active": "active",
102
- "selected": "selected",
103
- "disabled": "disabled",
104
- "valid": "valid",
105
- "invalid": "invalid",
106
- "loading": "loading",
107
- "required": "required",
108
- "empty": "empty",
109
- "indeterminate": "indeterminate",
110
- "checked": "checked",
111
- "readonly": "readonly"
112
- };
113
68
 
114
69
  // src/icon/font-icon.spec.tsx
115
70
  import { Fragment, jsx } from "react/jsx-runtime";
@@ -4344,130 +4299,18 @@ Icon.states = states3;
4344
4299
  Icon.options = options3;
4345
4300
  Icon.defaultProps = defaultProps3;
4346
4301
 
4347
- // src/button/button.spec.tsx
4348
- import { Fragment as Fragment4, jsx as jsx4, jsxs } from "react/jsx-runtime";
4349
- var BUTTON_CLASSNAME = `k-button`;
4350
- var states4 = [
4351
- States.hover,
4352
- States.focus,
4353
- States.active,
4354
- States.selected,
4355
- States.disabled
4356
- ];
4357
- var options4 = {
4358
- size: [Size.small, Size.medium, Size.large],
4359
- rounded: [Roundness.small, Roundness.medium, Roundness.large, Roundness.full],
4360
- fillMode: [FillMode.solid, FillMode.flat, FillMode.outline, FillMode.clear, FillMode.link],
4361
- themeColor: [
4362
- ThemeColor.base,
4363
- ThemeColor.primary,
4364
- ThemeColor.secondary,
4365
- ThemeColor.tertiary,
4366
- ThemeColor.success,
4367
- ThemeColor.warning,
4368
- ThemeColor.error,
4369
- ThemeColor.info,
4370
- ThemeColor.light,
4371
- ThemeColor.dark,
4372
- ThemeColor.inverse
4373
- ]
4374
- };
4375
- var defaultProps4 = {
4376
- size: Size.medium,
4377
- rounded: Roundness.medium,
4378
- fillMode: FillMode.solid,
4379
- themeColor: ThemeColor.base,
4380
- showArrow: false,
4381
- arrowIconName: "caret-alt-down"
4382
- };
4383
- var Button = (props) => {
4384
- const {
4385
- size = defaultProps4.size,
4386
- rounded = defaultProps4.rounded,
4387
- fillMode = defaultProps4.fillMode,
4388
- themeColor = defaultProps4.themeColor,
4389
- hover,
4390
- focus,
4391
- active,
4392
- selected,
4393
- disabled,
4394
- icon,
4395
- text,
4396
- iconClassName,
4397
- showArrow = defaultProps4.showArrow,
4398
- arrowIconName = defaultProps4.arrowIconName,
4399
- ...other
4400
- } = props;
4401
- const hasIcon = icon !== void 0;
4402
- const hasChildren = props.children !== void 0;
4403
- return /* @__PURE__ */ jsxs(
4404
- "button",
4405
- {
4406
- ...other,
4407
- className: classNames(
4408
- props.className,
4409
- BUTTON_CLASSNAME,
4410
- optionClassNames(BUTTON_CLASSNAME, {
4411
- size,
4412
- rounded,
4413
- fillMode,
4414
- themeColor
4415
- }),
4416
- stateClassNames(BUTTON_CLASSNAME, {
4417
- hover,
4418
- focus,
4419
- active,
4420
- disabled,
4421
- selected
4422
- }),
4423
- {
4424
- ["k-icon-button"]: !text && !hasChildren && hasIcon
4425
- }
4426
- ),
4427
- children: [
4428
- icon && /* @__PURE__ */ jsx4(
4429
- Icon,
4430
- {
4431
- className: classNames(iconClassName, "k-button-icon"),
4432
- icon
4433
- }
4434
- ),
4435
- text ? /* @__PURE__ */ jsxs(Fragment4, { children: [
4436
- text && /* @__PURE__ */ jsx4("span", { className: "k-button-text", children: text }),
4437
- props.children
4438
- ] }) : props.children && /* @__PURE__ */ jsx4("span", { className: "k-button-text", children: props.children }),
4439
- showArrow && /* @__PURE__ */ jsx4("span", { className: "k-menu-button-arrow k-button-arrow", children: /* @__PURE__ */ jsx4(Icon, { icon: arrowIconName }) })
4440
- ]
4441
- }
4442
- );
4443
- };
4444
- Button.states = states4;
4445
- Button.options = options4;
4446
- Button.className = BUTTON_CLASSNAME;
4447
- Button.defaultProps = defaultProps4;
4448
-
4449
- // src/button/templates/icon-button.tsx
4450
- import { jsx as jsx5 } from "react/jsx-runtime";
4451
- var IconButton = (props) => /* @__PURE__ */ jsx5(Button, { icon: "folder", ...props, children: void 0 });
4452
-
4453
- // src/button/templates/icon-text-button.tsx
4454
- import { jsx as jsx6 } from "react/jsx-runtime";
4455
-
4456
- // src/button/templates/text-button.tsx
4457
- import { jsx as jsx7 } from "react/jsx-runtime";
4458
-
4459
4302
  // src/timeline/timeline-card-title.tsx
4460
- import { jsx as jsx8, jsxs as jsxs2 } from "react/jsx-runtime";
4303
+ import { jsx as jsx4, jsxs } from "react/jsx-runtime";
4461
4304
  var TIMELINECARDTITLE_CLASSNAME = `k-card-title`;
4462
- var states5 = [];
4463
- var defaultProps5 = {};
4305
+ var states4 = [];
4306
+ var defaultProps4 = {};
4464
4307
  var TimelineCardTitle = (props) => {
4465
4308
  const {
4466
4309
  collapsible,
4467
4310
  children,
4468
4311
  ...other
4469
4312
  } = props;
4470
- return /* @__PURE__ */ jsxs2(
4313
+ return /* @__PURE__ */ jsxs(
4471
4314
  "div",
4472
4315
  {
4473
4316
  className: classNames(
@@ -4476,15 +4319,15 @@ var TimelineCardTitle = (props) => {
4476
4319
  ),
4477
4320
  ...other,
4478
4321
  children: [
4479
- /* @__PURE__ */ jsx8("span", { className: "k-event-title", children }),
4480
- collapsible && /* @__PURE__ */ jsx8(IconButton, { fillMode: "flat", icon: "chevron-right", className: "k-event-collapse" })
4322
+ /* @__PURE__ */ jsx4("span", { className: "k-event-title", children }),
4323
+ collapsible && /* @__PURE__ */ jsx4("span", { className: "k-event-collapse k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button", children: /* @__PURE__ */ jsx4(Icon, { icon: "chevron-right", className: "k-button-icon" }) })
4481
4324
  ]
4482
4325
  }
4483
4326
  );
4484
4327
  };
4485
- TimelineCardTitle.states = states5;
4328
+ TimelineCardTitle.states = states4;
4486
4329
  TimelineCardTitle.className = TIMELINECARDTITLE_CLASSNAME;
4487
- TimelineCardTitle.defaultProps = defaultProps5;
4330
+ TimelineCardTitle.defaultProps = defaultProps4;
4488
4331
  var timeline_card_title_default = TimelineCardTitle;
4489
4332
  export {
4490
4333
  TIMELINECARDTITLE_CLASSNAME,
@@ -4599,7 +4599,6 @@ Button.defaultProps = defaultProps5;
4599
4599
 
4600
4600
  // src/button/templates/icon-button.tsx
4601
4601
  import { jsx as jsx10 } from "react/jsx-runtime";
4602
- var IconButton = (props) => /* @__PURE__ */ jsx10(Button, { icon: "folder", ...props, children: void 0 });
4603
4602
 
4604
4603
  // src/button/templates/icon-text-button.tsx
4605
4604
  import { jsx as jsx11 } from "react/jsx-runtime";
@@ -4945,7 +4944,7 @@ var TimelineCardTitle = (props) => {
4945
4944
  ...other,
4946
4945
  children: [
4947
4946
  /* @__PURE__ */ jsx27("span", { className: "k-event-title", children }),
4948
- collapsible && /* @__PURE__ */ jsx27(IconButton, { fillMode: "flat", icon: "chevron-right", className: "k-event-collapse" })
4947
+ collapsible && /* @__PURE__ */ jsx27("span", { className: "k-event-collapse k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button", children: /* @__PURE__ */ jsx27(Icon, { icon: "chevron-right", className: "k-button-icon" }) })
4949
4948
  ]
4950
4949
  }
4951
4950
  );
@@ -5046,6 +5045,7 @@ var TimelineCard = (props) => {
5046
5045
  props.className
5047
5046
  ),
5048
5047
  orientation: "vertical",
5048
+ callout: "true",
5049
5049
  ...other,
5050
5050
  children: [
5051
5051
  callout && /* @__PURE__ */ jsx36(TimelineCardCallout, { callout }),
@@ -4460,7 +4460,6 @@ Button.defaultProps = defaultProps4;
4460
4460
 
4461
4461
  // src/button/templates/icon-button.tsx
4462
4462
  import { jsx as jsx5 } from "react/jsx-runtime";
4463
- var IconButton = (props) => /* @__PURE__ */ jsx5(Button, { icon: "folder", ...props, children: void 0 });
4464
4463
 
4465
4464
  // src/button/templates/icon-text-button.tsx
4466
4465
  import { jsx as jsx6 } from "react/jsx-runtime";
@@ -4941,6 +4940,7 @@ var TimelineCard = (props) => {
4941
4940
  props.className
4942
4941
  ),
4943
4942
  orientation: "vertical",
4943
+ callout: "true",
4944
4944
  ...other,
4945
4945
  children: [
4946
4946
  callout && /* @__PURE__ */ jsx27(TimelineCardCallout, { callout }),
@@ -4973,7 +4973,7 @@ var TimelineCardTitle = (props) => {
4973
4973
  ...other,
4974
4974
  children: [
4975
4975
  /* @__PURE__ */ jsx28("span", { className: "k-event-title", children }),
4976
- collapsible && /* @__PURE__ */ jsx28(IconButton, { fillMode: "flat", icon: "chevron-right", className: "k-event-collapse" })
4976
+ collapsible && /* @__PURE__ */ jsx28("span", { className: "k-event-collapse k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button", children: /* @__PURE__ */ jsx28(Icon, { icon: "chevron-right", className: "k-button-icon" }) })
4977
4977
  ]
4978
4978
  }
4979
4979
  );
@@ -4599,7 +4599,6 @@ Button.defaultProps = defaultProps5;
4599
4599
 
4600
4600
  // src/button/templates/icon-button.tsx
4601
4601
  import { jsx as jsx10 } from "react/jsx-runtime";
4602
- var IconButton = (props) => /* @__PURE__ */ jsx10(Button, { icon: "folder", ...props, children: void 0 });
4603
4602
 
4604
4603
  // src/button/templates/icon-text-button.tsx
4605
4604
  import { jsx as jsx11 } from "react/jsx-runtime";
@@ -4889,6 +4888,7 @@ var TimelineCard = (props) => {
4889
4888
  props.className
4890
4889
  ),
4891
4890
  orientation: "vertical",
4891
+ callout: "true",
4892
4892
  ...other,
4893
4893
  children: [
4894
4894
  callout && /* @__PURE__ */ jsx26(TimelineCardCallout, { callout }),
@@ -4921,7 +4921,7 @@ var TimelineCardTitle = (props) => {
4921
4921
  ...other,
4922
4922
  children: [
4923
4923
  /* @__PURE__ */ jsx27("span", { className: "k-event-title", children }),
4924
- collapsible && /* @__PURE__ */ jsx27(IconButton, { fillMode: "flat", icon: "chevron-right", className: "k-event-collapse" })
4924
+ collapsible && /* @__PURE__ */ jsx27("span", { className: "k-event-collapse k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button", children: /* @__PURE__ */ jsx27(Icon, { icon: "chevron-right", className: "k-button-icon" }) })
4925
4925
  ]
4926
4926
  }
4927
4927
  );
@@ -1,6 +1,7 @@
1
1
  export * from './prompt.spec';
2
2
  export * from './prompt-header';
3
3
  export * from './prompt-content';
4
+ export * from './prompt-view';
4
5
  export * from './prompt-footer';
5
6
  export * from './prompt-suggestion';
6
7
  export * from './prompt-setting';
@@ -1,8 +1,2 @@
1
- /// <reference types="react" />
2
1
  export declare const PROMPTCONTENT_CLASSNAME = "k-prompt-content";
3
- export type KendoPromptContentProps = {
4
- showSearch?: boolean;
5
- suggestions?: JSX.Element;
6
- settings?: JSX.Element;
7
- };
8
- export declare const PromptContent: (props: KendoPromptContentProps & React.HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const PromptContent: (props: React.HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ export declare const PROMPTVIEW_CLASSNAME = "k-prompt-view";
3
+ export type KendoPromptViewProps = {
4
+ showSearch?: boolean;
5
+ suggestions?: JSX.Element;
6
+ settings?: JSX.Element;
7
+ };
8
+ export declare const PromptView: (props: KendoPromptViewProps & React.HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@progress/kendo-themes-html",
3
3
  "description": "A collection of HTML helpers used for developing Kendo UI themes",
4
- "version": "7.1.0-dev.3",
4
+ "version": "7.1.0-dev.5",
5
5
  "author": "Progress",
6
6
  "license": "Apache-2.0",
7
7
  "keywords": [
@@ -52,5 +52,5 @@
52
52
  "devDependencies": {
53
53
  "@types/react": "^18.0.2"
54
54
  },
55
- "gitHead": "08affab2e5f6db6c25943449ac5d3547283dce22"
55
+ "gitHead": "0c774d5ccc5cff1496f9b526bd1fef066d346ad6"
56
56
  }
@@ -1,6 +1,7 @@
1
1
  export * from './prompt.spec';
2
2
  export * from './prompt-header';
3
3
  export * from './prompt-content';
4
+ export * from './prompt-view';
4
5
  export * from './prompt-footer';
5
6
  export * from './prompt-suggestion';
6
7
  export * from './prompt-setting';
@@ -1,23 +1,11 @@
1
- import { IconTextButton } from '../button';
2
1
  import { classNames } from '../misc';
3
- import { Textarea } from '../textarea';
4
2
 
5
3
  export const PROMPTCONTENT_CLASSNAME = `k-prompt-content`;
6
4
 
7
- export type KendoPromptContentProps = {
8
- showSearch?: boolean;
9
- suggestions?: JSX.Element;
10
- settings?: JSX.Element;
11
- }
12
-
13
5
  export const PromptContent = (
14
- props: KendoPromptContentProps &
15
- React.HTMLAttributes<HTMLDivElement>
6
+ props: React.HTMLAttributes<HTMLDivElement>
16
7
  ) => {
17
8
  const {
18
- showSearch,
19
- suggestions,
20
- settings,
21
9
  ...other
22
10
  } = props;
23
11
 
@@ -28,23 +16,6 @@ export const PromptContent = (
28
16
  props.className,
29
17
  PROMPTCONTENT_CLASSNAME,
30
18
  )}>
31
- { showSearch && <Textarea rows={1} placeholder="Ask or generate content with AI"></Textarea> }
32
- { suggestions &&
33
- <div className="k-prompt-expander">
34
- <IconTextButton fillMode={"flat"} icon="chevron-down">Prompt Suggestions</IconTextButton>
35
- <div className="k-prompt-expander-content">
36
- <>{suggestions}</>
37
- </div>
38
- </div>
39
- }
40
- { settings &&
41
- <div className="k-prompt-expander">
42
- <IconTextButton fillMode={"flat"} icon="chevron-down">Settings</IconTextButton>
43
- <div className="k-prompt-expander-content">
44
- {settings}
45
- </div>
46
- </div>
47
- }
48
19
  <>{props.children}</>
49
20
  </div>
50
21
  );
@@ -0,0 +1,51 @@
1
+ import { IconTextButton } from '../button';
2
+ import { classNames } from '../misc';
3
+ import { Textarea } from '../textarea';
4
+
5
+ export const PROMPTVIEW_CLASSNAME = `k-prompt-view`;
6
+
7
+ export type KendoPromptViewProps = {
8
+ showSearch?: boolean;
9
+ suggestions?: JSX.Element;
10
+ settings?: JSX.Element;
11
+ }
12
+
13
+ export const PromptView = (
14
+ props: KendoPromptViewProps &
15
+ React.HTMLAttributes<HTMLDivElement>
16
+ ) => {
17
+ const {
18
+ showSearch,
19
+ suggestions,
20
+ settings,
21
+ ...other
22
+ } = props;
23
+
24
+ return (
25
+ <div
26
+ {...other}
27
+ className={classNames(
28
+ props.className,
29
+ PROMPTVIEW_CLASSNAME,
30
+ )}>
31
+ { showSearch && <Textarea rows={1} placeholder="Ask or generate content with AI"></Textarea> }
32
+ { suggestions &&
33
+ <div className="k-prompt-expander">
34
+ <IconTextButton fillMode={"flat"} icon="chevron-down">Prompt Suggestions</IconTextButton>
35
+ <div className="k-prompt-expander-content">
36
+ <>{suggestions}</>
37
+ </div>
38
+ </div>
39
+ }
40
+ { settings &&
41
+ <div className="k-prompt-expander">
42
+ <IconTextButton fillMode={"flat"} icon="chevron-down">Settings</IconTextButton>
43
+ <div className="k-prompt-expander-content">
44
+ {settings}
45
+ </div>
46
+ </div>
47
+ }
48
+ {props.children}
49
+ </div>
50
+ );
51
+ };
@@ -1,6 +1,6 @@
1
1
  import { IconTextButton, IconButton } from "../../button";
2
2
  import { Toolbar } from "../../toolbar";
3
- import { Prompt, PromptContent, PromptHeader } from "..";
3
+ import { Prompt, PromptContent, PromptHeader, PromptView } from "..";
4
4
  import { Icon } from "../../icon";
5
5
 
6
6
  export const PromptMoreActions = (props) => (
@@ -15,18 +15,20 @@ export const PromptMoreActions = (props) => (
15
15
  </Toolbar>
16
16
  </PromptHeader>
17
17
  <PromptContent>
18
- <div className="k-column-menu k-flex-col k-flex-1">
19
- <div className="k-columnmenu-item-wrapper">
20
- <div className="k-columnmenu-item">
21
- <Icon icon="sort-asc-small" />
18
+ <PromptView>
19
+ <div className="k-column-menu k-flex-col k-flex-1">
20
+ <div className="k-columnmenu-item-wrapper">
21
+ <div className="k-columnmenu-item">
22
+ <Icon icon="sort-asc-small" />
22
23
  Command
23
- </div>
24
- <div className="k-columnmenu-item">
25
- <Icon icon="sort-desc-small" />
24
+ </div>
25
+ <div className="k-columnmenu-item">
26
+ <Icon icon="sort-desc-small" />
26
27
  Command
28
+ </div>
27
29
  </div>
28
30
  </div>
29
- </div>
31
+ </PromptView>
30
32
  </PromptContent>
31
33
  </Prompt>
32
34
  );
@@ -1,7 +1,7 @@
1
1
  import { ActionButtons } from "../../action-buttons";
2
2
  import { IconTextButton, IconButton } from "../../button";
3
3
  import { Toolbar } from "../../toolbar";
4
- import { Prompt, PromptHeader, PromptFooter, PromptContent } from "..";
4
+ import { Prompt, PromptHeader, PromptFooter, PromptContent, PromptView } from "..";
5
5
 
6
6
  export const PromptNormal = (props) => (
7
7
  <Prompt
@@ -14,7 +14,9 @@ export const PromptNormal = (props) => (
14
14
  <IconButton fillMode="flat" themeColor="primary" icon="more-horizontal" rounded="full"></IconButton>
15
15
  </Toolbar>
16
16
  </PromptHeader>
17
- <PromptContent showSearch></PromptContent>
17
+ <PromptContent>
18
+ <PromptView showSearch></PromptView>
19
+ </PromptContent>
18
20
  <PromptFooter>
19
21
  <ActionButtons className="k-prompt-actions" alignment="start">
20
22
  <IconTextButton icon="sparkles" themeColor="primary" rounded="full">Generate</IconTextButton>
@@ -1,7 +1,7 @@
1
1
  import { ActionButtons } from "../../action-buttons";
2
2
  import { IconTextButton, IconButton } from "../../button";
3
3
  import { Toolbar } from "../../toolbar";
4
- import { Prompt, PromptContent, PromptHeader } from "..";
4
+ import { Prompt, PromptContent, PromptHeader, PromptView } from "..";
5
5
  import { Card, CardHeader, CardBody } from "../../card";
6
6
 
7
7
  export const PromptOutput = (props) => (
@@ -16,37 +16,39 @@ export const PromptOutput = (props) => (
16
16
  </Toolbar>
17
17
  </PromptHeader>
18
18
  <PromptContent>
19
- <div className="k-card-list">
20
- <Card>
21
- <CardHeader title="Card Title" subtitle="Card Subtitle"></CardHeader>
22
- <CardBody>
23
- <p>Some quick example text to build on the card title and make up the bulk of the card's content.</p>
24
- </CardBody>
25
- <ActionButtons className="k-card-actions" alignment="start">
26
- <IconTextButton fillMode="flat" themeColor="primary" icon="copy">Copy</IconTextButton>
27
- <IconTextButton fillMode="flat" themeColor="base" icon="arrow-rotate-cw">Retry</IconTextButton>
28
- <IconButton fillMode="flat" themeColor="primary" icon="more-horizontal"></IconButton>
29
- <span className="k-spacer"></span>
30
- <IconButton fillMode="flat" themeColor="base" icon="thumb-up-outline"></IconButton>
31
- <IconButton fillMode="flat" themeColor="base" icon="thumb-down-outline"></IconButton>
32
- </ActionButtons>
33
- </Card>
19
+ <PromptView>
20
+ <div className="k-card-list">
21
+ <Card>
22
+ <CardHeader title="Card Title" subtitle="Card Subtitle"></CardHeader>
23
+ <CardBody>
24
+ <p>Some quick example text to build on the card title and make up the bulk of the card's content.</p>
25
+ </CardBody>
26
+ <ActionButtons className="k-card-actions" alignment="start">
27
+ <IconTextButton fillMode="flat" themeColor="primary" icon="copy">Copy</IconTextButton>
28
+ <IconTextButton fillMode="flat" themeColor="base" icon="arrow-rotate-cw">Retry</IconTextButton>
29
+ <IconButton fillMode="flat" themeColor="primary" icon="more-horizontal"></IconButton>
30
+ <span className="k-spacer"></span>
31
+ <IconButton fillMode="flat" themeColor="base" icon="thumb-up-outline"></IconButton>
32
+ <IconButton fillMode="flat" themeColor="base" icon="thumb-down-outline"></IconButton>
33
+ </ActionButtons>
34
+ </Card>
34
35
 
35
- <Card>
36
- <CardHeader title="Card Title" subtitle="Card Subtitle"></CardHeader>
37
- <CardBody>
38
- <p>Some quick example text to build on the card title and make up the bulk of the card's content.</p>
39
- </CardBody>
40
- <ActionButtons className="k-card-actions" alignment="start">
41
- <IconTextButton fillMode="flat" themeColor="primary" icon="copy">Copy</IconTextButton>
42
- <IconTextButton fillMode="flat" themeColor="base" icon="arrow-rotate-cw">Retry</IconTextButton>
43
- <IconButton fillMode="flat" themeColor="primary" icon="more-horizontal"></IconButton>
44
- <span className="k-spacer"></span>
45
- <IconButton fillMode="flat" themeColor="base" icon="thumb-up-outline"></IconButton>
46
- <IconButton fillMode="flat" themeColor="base" icon="thumb-down-outline"></IconButton>
47
- </ActionButtons>
48
- </Card>
49
- </div>
36
+ <Card>
37
+ <CardHeader title="Card Title" subtitle="Card Subtitle"></CardHeader>
38
+ <CardBody>
39
+ <p>Some quick example text to build on the card title and make up the bulk of the card's content.</p>
40
+ </CardBody>
41
+ <ActionButtons className="k-card-actions" alignment="start">
42
+ <IconTextButton fillMode="flat" themeColor="primary" icon="copy">Copy</IconTextButton>
43
+ <IconTextButton fillMode="flat" themeColor="base" icon="arrow-rotate-cw">Retry</IconTextButton>
44
+ <IconButton fillMode="flat" themeColor="primary" icon="more-horizontal"></IconButton>
45
+ <span className="k-spacer"></span>
46
+ <IconButton fillMode="flat" themeColor="base" icon="thumb-up-outline"></IconButton>
47
+ <IconButton fillMode="flat" themeColor="base" icon="thumb-down-outline"></IconButton>
48
+ </ActionButtons>
49
+ </Card>
50
+ </div>
51
+ </PromptView>
50
52
  </PromptContent>
51
53
  </Prompt>
52
54
  );
@@ -1,7 +1,7 @@
1
1
  import { ActionButtons } from "../../action-buttons";
2
2
  import { IconTextButton, IconButton } from "../../button";
3
3
  import { Toolbar } from "../../toolbar";
4
- import { Prompt, PromptHeader, PromptFooter, PromptContent } from "..";
4
+ import { Prompt, PromptHeader, PromptFooter, PromptContent, PromptView } from "..";
5
5
  import { Popup } from "../../popup";
6
6
 
7
7
  export const PromptInPopup = (props) => (
@@ -18,7 +18,9 @@ export const PromptInPopup = (props) => (
18
18
  <IconButton fillMode="flat" themeColor="base" icon="x" rounded="full"></IconButton>
19
19
  </Toolbar>
20
20
  </PromptHeader>
21
- <PromptContent showSearch></PromptContent>
21
+ <PromptContent>
22
+ <PromptView showSearch></PromptView>
23
+ </PromptContent>
22
24
  <PromptFooter>
23
25
  <ActionButtons className="k-prompt-actions" alignment="start">
24
26
  <IconTextButton icon="sparkles" themeColor="primary" rounded="full">Generate</IconTextButton>