myoperator-ui 0.0.179-beta.0 → 0.0.179

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 (2) hide show
  1. package/dist/index.js +14 -12
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2190,14 +2190,18 @@ const SelectField = React.forwardRef<HTMLButtonElement, SelectFieldProps>(
2190
2190
  // Internal state for search
2191
2191
  const [searchQuery, setSearchQuery] = React.useState("");
2192
2192
 
2193
- // Handle onSelect at item level (fires even when same value is re-selected)
2194
- const handleItemSelect = React.useCallback(
2195
- (option: SelectOption) => {
2196
- if (!option.disabled) {
2197
- onSelect?.(option);
2193
+ // Combined value change handler that also fires onSelect with full option object
2194
+ const handleValueChange = React.useCallback(
2195
+ (newValue: string) => {
2196
+ onValueChange?.(newValue);
2197
+ if (onSelect) {
2198
+ const option = options.find((o) => o.value === newValue);
2199
+ if (option) {
2200
+ onSelect(option);
2201
+ }
2198
2202
  }
2199
2203
  },
2200
- [onSelect]
2204
+ [onValueChange, onSelect, options]
2201
2205
  );
2202
2206
 
2203
2207
  // Derive state from props
@@ -2274,7 +2278,7 @@ const SelectField = React.forwardRef<HTMLButtonElement, SelectFieldProps>(
2274
2278
  <Select
2275
2279
  value={value}
2276
2280
  defaultValue={defaultValue}
2277
- onValueChange={onValueChange}
2281
+ onValueChange={handleValueChange}
2278
2282
  disabled={disabled || loading}
2279
2283
  name={name}
2280
2284
  onOpenChange={handleOpenChange}
@@ -2315,7 +2319,6 @@ const SelectField = React.forwardRef<HTMLButtonElement, SelectFieldProps>(
2315
2319
  key={option.value}
2316
2320
  value={option.value}
2317
2321
  disabled={option.disabled}
2318
- onSelect={() => handleItemSelect(option)}
2319
2322
  >
2320
2323
  {option.label}
2321
2324
  </SelectItem>
@@ -2332,8 +2335,7 @@ const SelectField = React.forwardRef<HTMLButtonElement, SelectFieldProps>(
2332
2335
  key={option.value}
2333
2336
  value={option.value}
2334
2337
  disabled={option.disabled}
2335
- onSelect={() => handleItemSelect(option)}
2336
- >
2338
+ >
2337
2339
  {option.label}
2338
2340
  </SelectItem>
2339
2341
  ))}
@@ -5966,7 +5968,7 @@ const PageHeader = React.forwardRef<HTMLDivElement, PageHeaderProps>(
5966
5968
  {/* Content Section: Title + Description */}
5967
5969
  <div className="flex-1 min-w-0">
5968
5970
  <div className="flex items-center gap-2">
5969
- <h1 className="m-0 text-base font-semibold text-semantic-text-primary truncate">
5971
+ <h1 className="m-0 text-lg font-semibold text-semantic-text-primary truncate">
5970
5972
  {title}
5971
5973
  </h1>
5972
5974
  {infoIcon && (
@@ -5976,7 +5978,7 @@ const PageHeader = React.forwardRef<HTMLDivElement, PageHeaderProps>(
5976
5978
  )}
5977
5979
  </div>
5978
5980
  {description && (
5979
- <p className="m-0 text-sm text-semantic-text-secondary font-normal mt-1 line-clamp-2">
5981
+ <p className="m-0 text-sm text-semantic-text-muted font-normal mt-1 line-clamp-2">
5980
5982
  {description}
5981
5983
  </p>
5982
5984
  )}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myoperator-ui",
3
- "version": "0.0.179-beta.0",
3
+ "version": "0.0.179",
4
4
  "description": "CLI for adding myOperator UI components to your project",
5
5
  "type": "module",
6
6
  "exports": "./dist/index.js",