@epam/ai-dial-sidebar 1.0.0-dev.503 → 1.0.0-dev.509

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.
@@ -1,29 +1,39 @@
1
1
  import { FC } from 'react';
2
- /** CSS custom-property overrides for the `SearchInput` component. */
3
- export interface SearchInputColors {
4
- /** Search icon color. */
5
- icon?: string;
6
- }
7
- /** Props for `SearchInput`. */
8
- export interface SearchInputProps {
2
+ /** All user-visible strings in {@link SearchInputProps}. */
3
+ export interface SearchInputLabels {
9
4
  /** Placeholder text (e.g. `"Search chat…"`). */
10
5
  placeholder: string;
11
- /** Current search query value. */
12
- value: string;
13
- /** Called whenever the query changes. */
14
- onChange: (value: string) => void;
15
6
  /** Accessible label for the clear-search button. */
16
7
  clearLabel: string;
17
8
  /** Accessible label for the search input. Defaults to `placeholder` when omitted. */
18
9
  ariaLabel?: string;
10
+ }
11
+ /** CSS custom-property overrides for the `SearchInput` component. */
12
+ export interface SearchInputColors {
13
+ /** Search icon color. */
14
+ icon?: string;
15
+ }
16
+ /** Combined style overrides (colors and class names) for the `SearchInput` component. */
17
+ export interface SearchInputStyles {
18
+ /** Color overrides applied as CSS custom properties. */
19
+ colors?: SearchInputColors;
19
20
  /** CSS class applied to the search icon. Defaults to the module's `.icon` class (`--text-secondary`). */
20
21
  iconClassName?: string;
21
22
  /** CSS class applied to the outer wrapper, merged over the default `'px-2 py-1'`. Override to change the pill's horizontal inset. */
22
23
  wrapperClassName?: string;
23
24
  /** CSS class applied to the search row, merged after its own border/radius defaults. Use an important-modifier class (e.g. `'!rounded-lg'`) to override the default pill shape. */
24
25
  rowClassName?: string;
25
- /** Color overrides applied as CSS custom properties. */
26
- colors?: SearchInputColors;
26
+ }
27
+ /** Props for `SearchInput`. */
28
+ export interface SearchInputProps {
29
+ /** Current search query value. */
30
+ value: string;
31
+ /** Called whenever the query changes. */
32
+ onChange: (value: string) => void;
33
+ /** User-visible strings. */
34
+ labels: SearchInputLabels;
35
+ /** Style overrides for colors and element class names. */
36
+ styles?: SearchInputStyles;
27
37
  }
28
38
  /**
29
39
  * Minimal search input with icon positioned to align with sibling action buttons.
@@ -1 +1 @@
1
- {"version":3,"file":"SearchInput.d.ts","sourceRoot":"","sources":["../../../src/components/SearchInput/SearchInput.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,EAAiB,MAAM,OAAO,CAAC;AAG/C,qEAAqE;AACrE,MAAM,WAAW,iBAAiB;IAChC,yBAAyB;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,+BAA+B;AAC/B,MAAM,WAAW,gBAAgB;IAC/B,gDAAgD;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,oDAAoD;IACpD,UAAU,EAAE,MAAM,CAAC;IACnB,qFAAqF;IACrF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yGAAyG;IACzG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qIAAqI;IACrI,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mLAAmL;IACnL,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wDAAwD;IACxD,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AAED;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CA2C5C,CAAC"}
1
+ {"version":3,"file":"SearchInput.d.ts","sourceRoot":"","sources":["../../../src/components/SearchInput/SearchInput.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,EAAiB,MAAM,OAAO,CAAC;AAG/C,4DAA4D;AAC5D,MAAM,WAAW,iBAAiB;IAChC,gDAAgD;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,oDAAoD;IACpD,UAAU,EAAE,MAAM,CAAC;IACnB,qFAAqF;IACrF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qEAAqE;AACrE,MAAM,WAAW,iBAAiB;IAChC,yBAAyB;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,yFAAyF;AACzF,MAAM,WAAW,iBAAiB;IAChC,wDAAwD;IACxD,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,yGAAyG;IACzG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qIAAqI;IACrI,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mLAAmL;IACnL,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,+BAA+B;AAC/B,MAAM,WAAW,gBAAgB;IAC/B,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,4BAA4B;IAC5B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,0DAA0D;IAC1D,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AAED;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CA4C5C,CAAC"}
package/index.d.ts CHANGED
@@ -3,7 +3,7 @@ export { SearchInput } from './components/SearchInput/SearchInput';
3
3
  export { PanelEmpty } from './components/PanelEmptyState/PanelEmpty';
4
4
  export { PanelNoResults } from './components/PanelEmptyState/PanelNoResults';
5
5
  export { SidebarOrientation } from './types/orientation';
6
- export type { SearchInputProps } from './components/SearchInput/SearchInput';
6
+ export type { SearchInputColors, SearchInputLabels, SearchInputProps, SearchInputStyles, } from './components/SearchInput/SearchInput';
7
7
  export type { PanelEmptyProps } from './components/PanelEmptyState/PanelEmpty';
8
8
  export type { PanelNoResultsProps } from './components/PanelEmptyState/PanelNoResults';
9
9
  export type { SidebarPanelProps, SidebarPanelStyles, SidebarPanelColors, SidebarPanelTypography, } from './models/panel-props';
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,YAAY,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,YAAY,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC/E,YAAY,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AACvF,YAAY,EACV,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,YAAY,EACV,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC/E,YAAY,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AACvF,YAAY,EACV,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,sBAAsB,CAAC"}
package/index.js CHANGED
@@ -76227,36 +76227,36 @@ var a3 = {
76227
76227
  container: "_container_bc4pw_1",
76228
76228
  icon: "_icon_bc4pw_16",
76229
76229
  input: "_input_bc4pw_20"
76230
- }, o3 = ({ value: e, onChange: t, placeholder: n = "Search", ariaLabel: r, containerClassName: i, iconClassName: a, inputClassName: o, iconSize: s = ko.MD, iconStrokeWidth: c, clearLabel: l = "Clear search", clearButtonClassName: u }) => {
76231
- let d = r ?? n;
76230
+ }, o3 = ({ value: e, onChange: t, labels: n, iconSize: r = ko.MD, iconStrokeWidth: i, styles: a }) => {
76231
+ let { placeholder: o = "Search", ariaLabel: s, clearLabel: c = "Clear search" } = n ?? {}, { containerClassName: l, iconClassName: u, inputClassName: d, clearButtonClassName: f } = a ?? {}, p = s ?? o;
76232
76232
  return /* @__PURE__ */ j("div", {
76233
76233
  role: "search",
76234
76234
  children: /* @__PURE__ */ M("div", {
76235
- className: EB(a3.container, "flex cursor-text items-center gap-3 rounded-xl border px-4 py-2 transition-[border-color,box-shadow] duration-150 ease-in-out", i),
76235
+ className: EB(a3.container, "flex cursor-text items-center gap-3 rounded-xl border px-4 py-2 transition-[border-color,box-shadow] duration-150 ease-in-out", l),
76236
76236
  children: [
76237
76237
  /* @__PURE__ */ j(be, {
76238
- size: s,
76239
- stroke: c,
76240
- className: EB(a3.icon, "shrink-0 transition-colors duration-150 ease-in-out", a),
76238
+ size: r,
76239
+ stroke: i,
76240
+ className: EB(a3.icon, "shrink-0 transition-colors duration-150 ease-in-out", u),
76241
76241
  "aria-hidden": !0
76242
76242
  }),
76243
76243
  /* @__PURE__ */ j("input", {
76244
76244
  type: "text",
76245
- className: EB(a3.input, "min-w-0 flex-1 border-0 p-0 text-sm font-normal leading-5 outline-none", o),
76245
+ className: EB(a3.input, "min-w-0 flex-1 border-0 p-0 text-sm font-normal leading-5 outline-none", d),
76246
76246
  value: e,
76247
- placeholder: n,
76248
- "aria-label": d,
76247
+ placeholder: o,
76248
+ "aria-label": p,
76249
76249
  onChange: (e) => t(e.target.value)
76250
76250
  }),
76251
76251
  e && /* @__PURE__ */ j("button", {
76252
76252
  type: "button",
76253
76253
  onClick: () => t(""),
76254
- "aria-label": l,
76255
- className: EB("flex shrink-0 items-center justify-center", u),
76254
+ "aria-label": c,
76255
+ className: EB("flex shrink-0 items-center justify-center", f),
76256
76256
  children: /* @__PURE__ */ j(xe, {
76257
- size: s,
76258
- stroke: c,
76259
- className: EB(a3.icon, a),
76257
+ size: r,
76258
+ stroke: i,
76259
+ className: EB(a3.icon, u),
76260
76260
  "aria-hidden": !0
76261
76261
  })
76262
76262
  })
@@ -76267,34 +76267,41 @@ var a3 = {
76267
76267
  tabContainer: "_tabContainer_rzv03_1",
76268
76268
  tabActive: "_tabActive_rzv03_13"
76269
76269
  };
76270
- b(({ tabs: e, activeTabId: t, onTabChange: n, tabClassName: r = "dial-tiny-semi-text" }) => /* @__PURE__ */ j("div", {
76271
- className: "flex flex-nowrap gap-1",
76272
- children: e.map((e) => {
76273
- let i = t === e.id;
76274
- return /* @__PURE__ */ j(jo, {
76275
- label: e.label,
76276
- selected: i,
76277
- onClick: () => n(e.id),
76278
- className: EB("box-border h-auto shrink-0 justify-center rounded-full p-2 text-center", r, s3.tabContainer, i && s3.tabActive)
76279
- }, e.id);
76280
- })
76281
- }));
76282
- var c3 = { icon: "_icon_1b1ye_1" }, l3 = b(({ placeholder: e, value: i, onChange: a, clearLabel: o, ariaLabel: s, iconClassName: c = c3.icon, wrapperClassName: l, rowClassName: u, colors: d }) => {
76283
- let f = D(() => t({ "--si-icon": d?.icon }), [d]);
76270
+ b(({ tabs: e, activeTabId: t, onTabChange: n, styles: r }) => {
76271
+ let { tabClassName: i = "dial-tiny-semi-text" } = r?.typography ?? {};
76272
+ return /* @__PURE__ */ j("div", {
76273
+ className: "flex flex-nowrap gap-1",
76274
+ children: e.map((e) => {
76275
+ let r = t === e.id;
76276
+ return /* @__PURE__ */ j(jo, {
76277
+ label: e.label,
76278
+ selected: r,
76279
+ onClick: () => n(e.id),
76280
+ className: EB("box-border h-auto shrink-0 justify-center rounded-full p-2 text-center", i, s3.tabContainer, r && s3.tabActive)
76281
+ }, e.id);
76282
+ })
76283
+ });
76284
+ });
76285
+ var c3 = { icon: "_icon_1b1ye_1" }, l3 = b(({ value: e, onChange: i, labels: a, styles: o }) => {
76286
+ let { colors: s, iconClassName: c = c3.icon, wrapperClassName: l, rowClassName: u } = o ?? {}, d = D(() => t({ "--si-icon": s?.icon }), [s]);
76284
76287
  return /* @__PURE__ */ j("div", {
76285
76288
  className: n("px-3 py-2", l),
76286
- style: f,
76289
+ style: d,
76287
76290
  children: /* @__PURE__ */ j(o3, {
76288
- value: i,
76289
- onChange: a,
76290
- placeholder: e,
76291
- clearLabel: o,
76292
- ariaLabel: s,
76293
- iconClassName: c,
76291
+ value: e,
76292
+ onChange: i,
76293
+ labels: {
76294
+ placeholder: a.placeholder,
76295
+ clearLabel: a.clearLabel,
76296
+ ariaLabel: a.ariaLabel
76297
+ },
76294
76298
  iconSize: r.SM,
76295
76299
  iconStrokeWidth: 1.5,
76296
- containerClassName: n("min-h-11 w-full gap-2 rounded-full border pe-3 ps-3 desktop:min-h-9", u),
76297
- clearButtonClassName: "size-11 desktop:size-6"
76300
+ styles: {
76301
+ iconClassName: c,
76302
+ containerClassName: n("min-h-11 w-full gap-2 rounded-full border pe-3 ps-3 desktop:min-h-9", u),
76303
+ clearButtonClassName: "size-11 desktop:size-6"
76304
+ }
76298
76305
  })
76299
76306
  });
76300
76307
  }), u3 = b(({ label: t, icon: n = c, iconSize: r = 48 }) => /* @__PURE__ */ j(e, {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-sidebar",
3
3
  "description": "Resizable sidebar panel shell with header, search, and empty state components",
4
- "version": "1.0.0-dev.503",
4
+ "version": "1.0.0-dev.509",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -17,8 +17,8 @@
17
17
  }
18
18
  },
19
19
  "peerDependencies": {
20
- "@epam/ai-dial-chat-shared": "1.0.0-dev.503",
21
- "@epam/ai-dial-kit": "1.0.0-dev.503",
20
+ "@epam/ai-dial-chat-shared": "1.0.0-dev.509",
21
+ "@epam/ai-dial-kit": "1.0.0-dev.509",
22
22
  "@epam/ai-dial-ui-kit": "0.12.0-dev.28",
23
23
  "@tabler/icons-react": "^3.44.0",
24
24
  "react": "^19.0.0"