@situaction/traq-ui-ste 1.1.32 → 1.1.33

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,14 +1,29 @@
1
1
  import { SelectItem } from '../select/Select';
2
2
 
3
3
  interface EditableSelectProps {
4
+ /** Label displayed above the select or static value */
4
5
  label: string;
6
+ /** List of selectable items */
5
7
  listItems: SelectItem[];
8
+ /** Static text value shown when not in edit mode */
6
9
  value?: string;
10
+ /** Placeholder shown when no item is selected */
7
11
  placeholder?: string;
12
+ /** Determines if the select is editable or read-only */
8
13
  edit: boolean;
14
+ /** Callback triggered when an item is selected */
9
15
  onSelect?: (selected: SelectItem) => void;
16
+ /** The currently selected item */
10
17
  selected?: SelectItem;
11
- autoCloseCondition: boolean;
18
+ /** Condition that automatically closes the dropdown */
19
+ autoCloseCondition?: boolean;
20
+ /** If true, the select takes full width */
21
+ fullWidth?: boolean;
12
22
  }
13
- export declare const EditableSelect: ({ label, listItems, value, placeholder, edit, onSelect, selected, autoCloseCondition }: EditableSelectProps) => import("react/jsx-runtime").JSX.Element;
23
+ /**
24
+ * EditableSelect is a component that toggles between a static text display
25
+ * and a Select dropdown based on the `edit` prop. It is commonly used
26
+ * in forms or data views where inline editing is required.
27
+ */
28
+ export declare const EditableSelect: ({ label, listItems, value, placeholder, edit, onSelect, selected, autoCloseCondition, fullWidth }: EditableSelectProps) => import("react/jsx-runtime").JSX.Element;
14
29
  export {};
@@ -1,12 +1,22 @@
1
- import { jsxs as i, Fragment as o, jsx as e } from "react/jsx-runtime";
2
- import { Select as S } from "../select/Select.js";
3
- import '../../styles/EditableSelect.css';const x = "_editableSelect_6vsm4_30", p = "_statiqueField_6vsm4_40", l = {
4
- editableSelect: x,
5
- statiqueField: p
6
- }, F = ({ label: s, listItems: a, value: t, placeholder: c, edit: d, onSelect: m, selected: r, autoCloseCondition: n }) => d ? /* @__PURE__ */ i(o, { children: [
1
+ import { jsxs as l, Fragment as S, jsx as e } from "react/jsx-runtime";
2
+ import { Select as x } from "../select/Select.js";
3
+ import '../../styles/EditableSelect.css';const p = "_editableSelect_6vsm4_30", _ = "_statiqueField_6vsm4_40", i = {
4
+ editableSelect: p,
5
+ statiqueField: _
6
+ }, F = ({
7
+ label: s,
8
+ listItems: a,
9
+ value: t,
10
+ placeholder: c,
11
+ edit: d,
12
+ onSelect: m,
13
+ selected: r,
14
+ autoCloseCondition: n = !1,
15
+ fullWidth: o = !1
16
+ }) => d ? /* @__PURE__ */ l(S, { children: [
7
17
  /* @__PURE__ */ e("span", { className: "textSmall", children: s }),
8
18
  /* @__PURE__ */ e(
9
- S,
19
+ x,
10
20
  {
11
21
  size: "s",
12
22
  listItem: a,
@@ -14,12 +24,13 @@ import '../../styles/EditableSelect.css';const x = "_editableSelect_6vsm4_30", p
14
24
  modeDisplay: "text",
15
25
  onSelect: m,
16
26
  selected: r,
17
- autoCloseCondition: n
27
+ autoCloseCondition: n,
28
+ fullWidth: o
18
29
  }
19
30
  )
20
- ] }) : /* @__PURE__ */ i("div", { className: l.editableSelect, children: [
31
+ ] }) : /* @__PURE__ */ l("div", { className: i.editableSelect, children: [
21
32
  /* @__PURE__ */ e("span", { className: "textSmall", children: s }),
22
- /* @__PURE__ */ e("div", { className: `${l.statiqueField} textSmall`, children: (t == null ? void 0 : t.trim()) || "-" })
33
+ /* @__PURE__ */ e("div", { className: `${i.statiqueField} textSmall`, children: (t == null ? void 0 : t.trim()) || "-" })
23
34
  ] });
24
35
  export {
25
36
  F as EditableSelect
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@situaction/traq-ui-ste",
3
- "version": "1.1.32",
3
+ "version": "1.1.33",
4
4
  "description": "library react component Situaction",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",