@northlight/ui 2.35.0 → 2.35.2

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.
@@ -700,7 +700,7 @@ declare const ColorPicker: ({ onChange, clearable, colors, expandedColors, value
700
700
  declare const ColorPickerField: ({ name, label, direction, isRequired, validate, ...rest }: ColorPickerFieldProps) => JSX.Element;
701
701
 
702
702
  type FlipButtonSize = 'xs' | 'sm' | 'md' | 'lg';
703
- type FlipButtonVariant = 'default' | 'brand';
703
+ type FlipButtonVariant = 'default' | 'brand' | 'light';
704
704
  type StyleType = {
705
705
  opacity: '0';
706
706
  width: '0';
@@ -3265,7 +3265,7 @@ interface PresetOptions {
3265
3265
  thousandSeparator: string;
3266
3266
  decimalSeparator: string;
3267
3267
  }
3268
- interface FormattedNumberInputProps extends Omit<NumericFormatProps, 'onChange' | 'max' | 'min'> {
3268
+ interface FormattedNumberInputProps extends Omit<NumericFormatProps, 'onChange' | 'max' | 'min'>, Omit<InputProps, 'color' | 'defaultValue' | 'value' | 'height' | 'size' | 'type' | 'width' | 'values' | 'events' | 'onChange'> {
3269
3269
  max?: number;
3270
3270
  min?: number;
3271
3271
  /** Changes thousand and decimal separators */
@@ -2148,6 +2148,24 @@ const FlipButton$1 = {
2148
2148
  }
2149
2149
  }
2150
2150
  }),
2151
+ light: ({ theme: { colors: color }, sx }) => ({
2152
+ container: merge({
2153
+ bgColor: color["base-alt"]
2154
+ }, sx),
2155
+ button: {
2156
+ bgColor: "mono.transparent",
2157
+ _hover: {
2158
+ bgColor: color.background.button["ghost-hover"]
2159
+ },
2160
+ _checked: {
2161
+ color: color.text["flip-button"].default,
2162
+ bgColor: "bg.base",
2163
+ _hover: {
2164
+ bgColor: "bg.base"
2165
+ }
2166
+ }
2167
+ }
2168
+ }),
2151
2169
  ai: ({ theme: { colors: color }, sx }) => ({
2152
2170
  container: merge({
2153
2171
  bgColor: color.background["flip-button"]["default-deselected-brand"]
@@ -14519,7 +14537,7 @@ const ComboPicker = (_a) => {
14519
14537
  "max",
14520
14538
  "min"
14521
14539
  ]);
14522
- var _a2;
14540
+ var _a2, _b2, _c;
14523
14541
  const { isOpen, onToggle, onClose } = useDisclosure();
14524
14542
  const [inputValueState, setInputValueState] = useState(valueProp == null ? void 0 : valueProp.input);
14525
14543
  const [selectOptionState, setselectOptionState] = useState(valueProp == null ? void 0 : valueProp.option);
@@ -14581,9 +14599,10 @@ const ComboPicker = (_a) => {
14581
14599
  onChange == null ? void 0 : onChange(getNewValue(option, input));
14582
14600
  }
14583
14601
  }, [inputValue, defaultToZeroIfEmpty]);
14602
+ const buttonWidth = (_b2 = (_a2 = buttonRef.current) == null ? void 0 : _a2.offsetWidth) != null ? _b2 : 0;
14584
14603
  return /* @__PURE__ */ React.createElement(InputGroup, null, /* @__PURE__ */ React.createElement(
14585
14604
  FormattedNumberInput,
14586
- __spreadValues$1({
14605
+ __spreadProps(__spreadValues$1({
14587
14606
  width: "100%",
14588
14607
  onChange: (values) => handleInputChange(values.floatValue),
14589
14608
  value: inputValue,
@@ -14595,7 +14614,9 @@ const ComboPicker = (_a) => {
14595
14614
  readOnly: isReadOnly,
14596
14615
  min,
14597
14616
  max
14598
- }, rest)
14617
+ }, rest), {
14618
+ pr: `${buttonWidth >= 0 ? buttonWidth + 10 : 0}px`
14619
+ })
14599
14620
  ), /* @__PURE__ */ React.createElement(
14600
14621
  InputRightElement,
14601
14622
  {
@@ -14613,7 +14634,7 @@ const ComboPicker = (_a) => {
14613
14634
  flexShrink: "0",
14614
14635
  height: "100%"
14615
14636
  },
14616
- (_a2 = selectOption == null ? void 0 : selectOption.label) != null ? _a2 : ""
14637
+ (_c = selectOption == null ? void 0 : selectOption.label) != null ? _c : ""
14617
14638
  )
14618
14639
  ), /* @__PURE__ */ React.createElement(Box, { position: "absolute", width: "100%" }, /* @__PURE__ */ React.createElement(
14619
14640
  Select,