@blocklet/labels 1.6.92 → 1.6.93

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.
package/dist/index.es.js CHANGED
@@ -1116,6 +1116,7 @@ function Labels2({ labels, sx, renderLabel, prepend }) {
1116
1116
  ] });
1117
1117
  }
1118
1118
  function LabelsInput({ value = [], onChange, ...rest }) {
1119
+ var _a;
1119
1120
  const { getLabelsByIds, loading } = LabelsContainer.useContainer();
1120
1121
  const valueOptions = useMemo(() => getLabelsByIds(value), [getLabelsByIds, value]);
1121
1122
  if (loading) {
@@ -1134,11 +1135,14 @@ function LabelsInput({ value = [], onChange, ...rest }) {
1134
1135
  InputProps: {
1135
1136
  autoComplete: "off",
1136
1137
  ...rest.InputProps,
1137
- startAdornment: valueOptions.map((x, index) => /* @__PURE__ */ jsx(LabelChip, { label: x }, index))
1138
+ startAdornment: [
1139
+ (_a = rest.InputProps) == null ? void 0 : _a.startAdornment,
1140
+ ...valueOptions.map((x, index) => /* @__PURE__ */ jsx(LabelChip, { label: x }, index))
1141
+ ].filter(Boolean)
1138
1142
  },
1139
1143
  sx: {
1140
1144
  "& .MuiInputBase-root": { flexWrap: "wrap", gap: 0.5, p: 1 },
1141
- "& .MuiInputBase-input": { width: 20, p: 0 }
1145
+ "& .MuiInputBase-input": { width: (rest == null ? void 0 : rest.placeholder) ? "initial" : "20px", p: 0 }
1142
1146
  }
1143
1147
  }
1144
1148
  )
package/dist/index.umd.js CHANGED
@@ -1104,6 +1104,7 @@ var __publicField = (obj, key, value) => {
1104
1104
  ] });
1105
1105
  }
1106
1106
  function LabelsInput({ value = [], onChange, ...rest }) {
1107
+ var _a;
1107
1108
  const { getLabelsByIds, loading } = LabelsContainer.useContainer();
1108
1109
  const valueOptions = react.useMemo(() => getLabelsByIds(value), [getLabelsByIds, value]);
1109
1110
  if (loading) {
@@ -1122,11 +1123,14 @@ var __publicField = (obj, key, value) => {
1122
1123
  InputProps: {
1123
1124
  autoComplete: "off",
1124
1125
  ...rest.InputProps,
1125
- startAdornment: valueOptions.map((x, index) => /* @__PURE__ */ jsxRuntime.jsx(LabelChip, { label: x }, index))
1126
+ startAdornment: [
1127
+ (_a = rest.InputProps) == null ? void 0 : _a.startAdornment,
1128
+ ...valueOptions.map((x, index) => /* @__PURE__ */ jsxRuntime.jsx(LabelChip, { label: x }, index))
1129
+ ].filter(Boolean)
1126
1130
  },
1127
1131
  sx: {
1128
1132
  "& .MuiInputBase-root": { flexWrap: "wrap", gap: 0.5, p: 1 },
1129
- "& .MuiInputBase-input": { width: 20, p: 0 }
1133
+ "& .MuiInputBase-input": { width: (rest == null ? void 0 : rest.placeholder) ? "initial" : "20px", p: 0 }
1130
1134
  }
1131
1135
  }
1132
1136
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/labels",
3
- "version": "1.6.92",
3
+ "version": "1.6.93",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -28,7 +28,7 @@
28
28
  "access": "public"
29
29
  },
30
30
  "dependencies": {
31
- "@blocklet/translation-input": "1.6.92",
31
+ "@blocklet/translation-input": "1.6.93",
32
32
  "@emotion/css": "^11.10.5",
33
33
  "@emotion/react": "^11.10.5",
34
34
  "@emotion/styled": "^11.10.5",
@@ -80,5 +80,5 @@
80
80
  "resolutions": {
81
81
  "react": "^18.2.0"
82
82
  },
83
- "gitHead": "74c76246a5e7d12fc87d4a94fbda2829a5cf2b78"
83
+ "gitHead": "40e9aabfd62d511bd33aa1507276bc7987aa541f"
84
84
  }