@norges-domstoler/dds-components 0.0.0-dev-20251111115604 → 0.0.0-dev-20251111141002

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.d.mts CHANGED
@@ -2308,6 +2308,25 @@ declare const Typography: {
2308
2308
  displayName: string;
2309
2309
  };
2310
2310
 
2311
+ declare const ICON_SIZES: ["small", "medium", "large", "inherit"];
2312
+ type IconSize = (typeof ICON_SIZES)[number];
2313
+ type IconProps = BaseComponentProps<SVGSVGElement, {
2314
+ /**Ikonet importert fra `@norges-domstoler/dds-components`. */
2315
+ icon: SvgIcon;
2316
+ /**Størrelsen på ikonet.
2317
+ * @default "medium"
2318
+ */
2319
+ iconSize?: IconSize;
2320
+ /**Fargen på ikonet.
2321
+ * @default "currentcolor"
2322
+ */
2323
+ color?: TextColor;
2324
+ }, Omit<HTMLAttributes<SVGSVGElement>, 'color'>>;
2325
+ declare function Icon(props: IconProps): react.JSX.Element;
2326
+ declare namespace Icon {
2327
+ var displayName: string;
2328
+ }
2329
+
2311
2330
  interface CommonInputProps {
2312
2331
  /**Ledetekst. */
2313
2332
  label?: string;
@@ -2328,6 +2347,10 @@ type InputProps = CommonInputProps & {
2328
2347
  */
2329
2348
  componentSize?: InputSize;
2330
2349
  } & Omit<ComponentPropsWithRef<'input'>, 'width' | 'height'>;
2350
+ interface InputIconProps {
2351
+ /** Ikonet som vises i komponenten. */
2352
+ icon?: SvgIcon;
2353
+ }
2331
2354
 
2332
2355
  declare const defaultTypographyType: TypographyBodyType;
2333
2356
  declare const defaultTypographyTypeClassName: HyphenTypographyType;
@@ -3181,25 +3204,6 @@ declare function FormSummaryEmptyValue(): react_jsx_runtime.JSX.Element;
3181
3204
  type FormSummaryErrorProps = Omit<InputMessageProps, 'messageType' | 'message'>;
3182
3205
  declare function FormSummaryError({ ...props }: FormSummaryErrorProps): react_jsx_runtime.JSX.Element;
3183
3206
 
3184
- declare const ICON_SIZES: ["small", "medium", "large", "inherit"];
3185
- type IconSize = (typeof ICON_SIZES)[number];
3186
- type IconProps = BaseComponentProps<SVGSVGElement, {
3187
- /**Ikonet importert fra `@norges-domstoler/dds-components`. */
3188
- icon: SvgIcon;
3189
- /**Størrelsen på ikonet.
3190
- * @default "medium"
3191
- */
3192
- iconSize?: IconSize;
3193
- /**Fargen på ikonet.
3194
- * @default "currentcolor"
3195
- */
3196
- color?: TextColor;
3197
- }, Omit<HTMLAttributes<SVGSVGElement>, 'color'>>;
3198
- declare function Icon(props: IconProps): react.JSX.Element;
3199
- declare namespace Icon {
3200
- var displayName: string;
3201
- }
3202
-
3203
3207
  type GlobalMessagePurpose = 'info' | 'warning' | 'danger';
3204
3208
  type GlobalMessageProps = BaseComponentPropsWithChildren<HTMLDivElement, {
3205
3209
  /**Meldingen som vises til brukeren. Brukes kun når meldingen er en `string`. */
@@ -3810,8 +3814,6 @@ type SelectProps<Option = unknown, IsMulti extends boolean = false> = {
3810
3814
  * @default "medium"
3811
3815
  */
3812
3816
  componentSize?: InputSize;
3813
- /**Ikonet som vises i komponenten. */
3814
- icon?: SvgIcon;
3815
3817
  /**Nedtrekkslisten blir `readonly` og får readOnly styling. */
3816
3818
  readOnly?: boolean;
3817
3819
  /** CSS klassenavn. */
@@ -3826,7 +3828,7 @@ type SelectProps<Option = unknown, IsMulti extends boolean = false> = {
3826
3828
  'data-testid'?: string;
3827
3829
  /**Ref til komponenten. */
3828
3830
  ref?: SelectForwardRefType<Option, IsMulti>;
3829
- } & CommonInputProps & Pick<HTMLAttributes<HTMLInputElement>, 'aria-required'> & WrappedReactSelectProps<Option, IsMulti, GroupBase<Option>>;
3831
+ } & CommonInputProps & InputIconProps & Pick<HTMLAttributes<HTMLInputElement>, 'aria-required'> & WrappedReactSelectProps<Option, IsMulti, GroupBase<Option>>;
3830
3832
  type SelectForwardRefType<Option, IsMulti extends boolean> = Ref<SelectInstance<Option, IsMulti, GroupBase<Option>>>;
3831
3833
  declare function Select<Option = unknown, IsMulti extends boolean = false>({ id, label, componentSize, errorMessage, tip, 'aria-required': ariaRequired, readOnly, options, isMulti, value, icon, defaultValue, width, closeMenuOnSelect, className, style, isDisabled, isClearable, placeholder, menuPortalTarget, customOptionElement, customSingleValueElement, 'data-testid': dataTestId, onKeyDown, openMenuOnClick, ref, instanceId, afterLabelContent, ...rest }: SelectProps<Option, IsMulti>): react_jsx_runtime.JSX.Element;
3832
3834
  declare namespace Select {
@@ -3838,8 +3840,8 @@ type NativeSelectProps = {
3838
3840
  clearable?: boolean;
3839
3841
  /** Implementerer `readOnly` oppførsel etter standard for `<input>` og setter `readOnly` styling. */
3840
3842
  readOnly?: InputProps['readOnly'];
3841
- } & CommonInputProps & Pick<InputProps, 'componentSize'> & ComponentPropsWithRef<'select'>;
3842
- declare const NativeSelect: ({ ref, id, children, componentSize, label, multiple, readOnly, errorMessage, tip, required, "aria-required": ariaRequired, "aria-describedby": ariaDescribedby, width, className, style, onKeyDown, onMouseDown, clearable, afterLabelContent, onChange, ...rest }: NativeSelectProps) => react_jsx_runtime.JSX.Element;
3843
+ } & CommonInputProps & Pick<InputProps, 'componentSize'> & InputIconProps & ComponentPropsWithRef<'select'>;
3844
+ declare const NativeSelect: ({ ref, id, children, componentSize, label, multiple, readOnly, errorMessage, tip, required, "aria-required": ariaRequired, "aria-describedby": ariaDescribedby, width, className, style, onKeyDown, onMouseDown, clearable, afterLabelContent, onChange, icon, ...rest }: NativeSelectProps) => react_jsx_runtime.JSX.Element;
3843
3845
  type NativeSelectPlaceholderProps = ComponentPropsWithRef<'option'>;
3844
3846
  declare const NativeSelectPlaceholder: {
3845
3847
  ({ children, value, ...rest }: NativeSelectPlaceholderProps): react_jsx_runtime.JSX.Element;
@@ -4206,11 +4208,9 @@ declare const TextArea: {
4206
4208
  displayName: string;
4207
4209
  };
4208
4210
 
4209
- type TextInputProps = Omit<InputProps, 'prefix'> & {
4211
+ type TextInputProps = Omit<InputProps, 'prefix'> & InputIconProps & {
4210
4212
  /** Spesifiserer om tegntelleren skal vises ved bruk av `maxLength` attributt. */
4211
4213
  withCharacterCounter?: boolean;
4212
- /** Ikonet som vises i komponenten. */
4213
- icon?: SvgIcon;
4214
4214
  /**
4215
4215
  * Prefiks som vises før inputfeltet. **OBS!** Prefiks leses ikke av skjermleser og skal derfor ikke brukes som en erstatter for en beskrivende label.
4216
4216
  * */
package/dist/index.d.ts CHANGED
@@ -2308,6 +2308,25 @@ declare const Typography: {
2308
2308
  displayName: string;
2309
2309
  };
2310
2310
 
2311
+ declare const ICON_SIZES: ["small", "medium", "large", "inherit"];
2312
+ type IconSize = (typeof ICON_SIZES)[number];
2313
+ type IconProps = BaseComponentProps<SVGSVGElement, {
2314
+ /**Ikonet importert fra `@norges-domstoler/dds-components`. */
2315
+ icon: SvgIcon;
2316
+ /**Størrelsen på ikonet.
2317
+ * @default "medium"
2318
+ */
2319
+ iconSize?: IconSize;
2320
+ /**Fargen på ikonet.
2321
+ * @default "currentcolor"
2322
+ */
2323
+ color?: TextColor;
2324
+ }, Omit<HTMLAttributes<SVGSVGElement>, 'color'>>;
2325
+ declare function Icon(props: IconProps): react.JSX.Element;
2326
+ declare namespace Icon {
2327
+ var displayName: string;
2328
+ }
2329
+
2311
2330
  interface CommonInputProps {
2312
2331
  /**Ledetekst. */
2313
2332
  label?: string;
@@ -2328,6 +2347,10 @@ type InputProps = CommonInputProps & {
2328
2347
  */
2329
2348
  componentSize?: InputSize;
2330
2349
  } & Omit<ComponentPropsWithRef<'input'>, 'width' | 'height'>;
2350
+ interface InputIconProps {
2351
+ /** Ikonet som vises i komponenten. */
2352
+ icon?: SvgIcon;
2353
+ }
2331
2354
 
2332
2355
  declare const defaultTypographyType: TypographyBodyType;
2333
2356
  declare const defaultTypographyTypeClassName: HyphenTypographyType;
@@ -3181,25 +3204,6 @@ declare function FormSummaryEmptyValue(): react_jsx_runtime.JSX.Element;
3181
3204
  type FormSummaryErrorProps = Omit<InputMessageProps, 'messageType' | 'message'>;
3182
3205
  declare function FormSummaryError({ ...props }: FormSummaryErrorProps): react_jsx_runtime.JSX.Element;
3183
3206
 
3184
- declare const ICON_SIZES: ["small", "medium", "large", "inherit"];
3185
- type IconSize = (typeof ICON_SIZES)[number];
3186
- type IconProps = BaseComponentProps<SVGSVGElement, {
3187
- /**Ikonet importert fra `@norges-domstoler/dds-components`. */
3188
- icon: SvgIcon;
3189
- /**Størrelsen på ikonet.
3190
- * @default "medium"
3191
- */
3192
- iconSize?: IconSize;
3193
- /**Fargen på ikonet.
3194
- * @default "currentcolor"
3195
- */
3196
- color?: TextColor;
3197
- }, Omit<HTMLAttributes<SVGSVGElement>, 'color'>>;
3198
- declare function Icon(props: IconProps): react.JSX.Element;
3199
- declare namespace Icon {
3200
- var displayName: string;
3201
- }
3202
-
3203
3207
  type GlobalMessagePurpose = 'info' | 'warning' | 'danger';
3204
3208
  type GlobalMessageProps = BaseComponentPropsWithChildren<HTMLDivElement, {
3205
3209
  /**Meldingen som vises til brukeren. Brukes kun når meldingen er en `string`. */
@@ -3810,8 +3814,6 @@ type SelectProps<Option = unknown, IsMulti extends boolean = false> = {
3810
3814
  * @default "medium"
3811
3815
  */
3812
3816
  componentSize?: InputSize;
3813
- /**Ikonet som vises i komponenten. */
3814
- icon?: SvgIcon;
3815
3817
  /**Nedtrekkslisten blir `readonly` og får readOnly styling. */
3816
3818
  readOnly?: boolean;
3817
3819
  /** CSS klassenavn. */
@@ -3826,7 +3828,7 @@ type SelectProps<Option = unknown, IsMulti extends boolean = false> = {
3826
3828
  'data-testid'?: string;
3827
3829
  /**Ref til komponenten. */
3828
3830
  ref?: SelectForwardRefType<Option, IsMulti>;
3829
- } & CommonInputProps & Pick<HTMLAttributes<HTMLInputElement>, 'aria-required'> & WrappedReactSelectProps<Option, IsMulti, GroupBase<Option>>;
3831
+ } & CommonInputProps & InputIconProps & Pick<HTMLAttributes<HTMLInputElement>, 'aria-required'> & WrappedReactSelectProps<Option, IsMulti, GroupBase<Option>>;
3830
3832
  type SelectForwardRefType<Option, IsMulti extends boolean> = Ref<SelectInstance<Option, IsMulti, GroupBase<Option>>>;
3831
3833
  declare function Select<Option = unknown, IsMulti extends boolean = false>({ id, label, componentSize, errorMessage, tip, 'aria-required': ariaRequired, readOnly, options, isMulti, value, icon, defaultValue, width, closeMenuOnSelect, className, style, isDisabled, isClearable, placeholder, menuPortalTarget, customOptionElement, customSingleValueElement, 'data-testid': dataTestId, onKeyDown, openMenuOnClick, ref, instanceId, afterLabelContent, ...rest }: SelectProps<Option, IsMulti>): react_jsx_runtime.JSX.Element;
3832
3834
  declare namespace Select {
@@ -3838,8 +3840,8 @@ type NativeSelectProps = {
3838
3840
  clearable?: boolean;
3839
3841
  /** Implementerer `readOnly` oppførsel etter standard for `<input>` og setter `readOnly` styling. */
3840
3842
  readOnly?: InputProps['readOnly'];
3841
- } & CommonInputProps & Pick<InputProps, 'componentSize'> & ComponentPropsWithRef<'select'>;
3842
- declare const NativeSelect: ({ ref, id, children, componentSize, label, multiple, readOnly, errorMessage, tip, required, "aria-required": ariaRequired, "aria-describedby": ariaDescribedby, width, className, style, onKeyDown, onMouseDown, clearable, afterLabelContent, onChange, ...rest }: NativeSelectProps) => react_jsx_runtime.JSX.Element;
3843
+ } & CommonInputProps & Pick<InputProps, 'componentSize'> & InputIconProps & ComponentPropsWithRef<'select'>;
3844
+ declare const NativeSelect: ({ ref, id, children, componentSize, label, multiple, readOnly, errorMessage, tip, required, "aria-required": ariaRequired, "aria-describedby": ariaDescribedby, width, className, style, onKeyDown, onMouseDown, clearable, afterLabelContent, onChange, icon, ...rest }: NativeSelectProps) => react_jsx_runtime.JSX.Element;
3843
3845
  type NativeSelectPlaceholderProps = ComponentPropsWithRef<'option'>;
3844
3846
  declare const NativeSelectPlaceholder: {
3845
3847
  ({ children, value, ...rest }: NativeSelectPlaceholderProps): react_jsx_runtime.JSX.Element;
@@ -4206,11 +4208,9 @@ declare const TextArea: {
4206
4208
  displayName: string;
4207
4209
  };
4208
4210
 
4209
- type TextInputProps = Omit<InputProps, 'prefix'> & {
4211
+ type TextInputProps = Omit<InputProps, 'prefix'> & InputIconProps & {
4210
4212
  /** Spesifiserer om tegntelleren skal vises ved bruk av `maxLength` attributt. */
4211
4213
  withCharacterCounter?: boolean;
4212
- /** Ikonet som vises i komponenten. */
4213
- icon?: SvgIcon;
4214
4214
  /**
4215
4215
  * Prefiks som vises før inputfeltet. **OBS!** Prefiks leses ikke av skjermleser og skal derfor ikke brukes som en erstatter for en beskrivende label.
4216
4216
  * */
package/dist/index.js CHANGED
@@ -6089,9 +6089,8 @@ var DateInput_default = {
6089
6089
  "segment__placeholder--invisible": "DateInput_segment__placeholder--invisible",
6090
6090
  "clear-button": "DateInput_clear-button",
6091
6091
  "clear-button--inactive": "DateInput_clear-button--inactive",
6092
- icon: "DateInput_icon",
6093
- "popover-button": "DateInput_popover-button",
6094
6092
  "icon-wrapper--disabled": "DateInput_icon-wrapper--disabled",
6093
+ "popover-button": "DateInput_popover-button",
6095
6094
  "icon-wrapper--readonly": "DateInput_icon-wrapper--readonly",
6096
6095
  "popover-button--readonly": "DateInput_popover-button--readonly",
6097
6096
  popover: "DateInput_popover",
@@ -6672,6 +6671,36 @@ var InlineIconButton = ({
6672
6671
  );
6673
6672
  InlineIconButton.displayName = "InlineIconButton";
6674
6673
 
6674
+ // src/components/helpers/Input/Input.module.css
6675
+ var Input_default = {
6676
+ container: "Input_container",
6677
+ "input-group": "Input_input-group",
6678
+ input: "Input_input",
6679
+ disabled: "Input_disabled",
6680
+ "read-only": "Input_read-only",
6681
+ "input--stateful": "Input_input--stateful",
6682
+ "input--hover": "Input_input--hover",
6683
+ "input--stateful-danger": "Input_input--stateful-danger",
6684
+ "input--large": "Input_input--large",
6685
+ "input--medium": "Input_input--medium",
6686
+ "input--small": "Input_input--small",
6687
+ "input--xsmall": "Input_input--xsmall",
6688
+ "input-with-icon--large": "Input_input-with-icon--large",
6689
+ "input-with-icon--medium": "Input_input-with-icon--medium",
6690
+ "input-with-icon--small": "Input_input-with-icon--small",
6691
+ "input-with-icon--xsmall": "Input_input-with-icon--xsmall",
6692
+ "input-with-el-right--large": "Input_input-with-el-right--large",
6693
+ "input-with-el-right--medium": "Input_input-with-el-right--medium",
6694
+ "input-with-el-right--small": "Input_input-with-el-right--small",
6695
+ "input-with-el-right--xsmall": "Input_input-with-el-right--xsmall",
6696
+ "input--with-affix": "Input_input--with-affix",
6697
+ "input-group__absolute-el": "Input_input-group__absolute-el",
6698
+ "input-group__absolute-el--large": "Input_input-group__absolute-el--large",
6699
+ "input-group__absolute-el--medium": "Input_input-group__absolute-el--medium",
6700
+ "input-group__absolute-el--small": "Input_input-group__absolute-el--small",
6701
+ "input-group__absolute-el--xsmall": "Input_input-group__absolute-el--xsmall"
6702
+ };
6703
+
6675
6704
  // src/components/date-inputs/DatePicker/DateField/CalendarButton.tsx
6676
6705
  var import_jsx_runtime230 = require("react/jsx-runtime");
6677
6706
  function CalendarButton({
@@ -6691,7 +6720,9 @@ function CalendarButton({
6691
6720
  buttonProps.className,
6692
6721
  DateInput_default["popover-button"],
6693
6722
  isReadOnly && DateInput_default["popover-button--readonly"],
6694
- !props.isDisabled && focusable
6723
+ !props.isDisabled && focusable,
6724
+ Input_default["input-group__absolute-el"],
6725
+ Input_default[`input-group__absolute-el--${componentSize}`]
6695
6726
  ),
6696
6727
  icon: CalendarIcon,
6697
6728
  size: getFormInputIconSize(componentSize)
@@ -6832,23 +6863,6 @@ ClearButton.displayName = "ClearButton";
6832
6863
  // src/components/date-inputs/common/DateInput.tsx
6833
6864
  var import_react44 = require("react");
6834
6865
 
6835
- // src/components/helpers/Input/Input.module.css
6836
- var Input_default = {
6837
- container: "Input_container",
6838
- "input-group": "Input_input-group",
6839
- input: "Input_input",
6840
- disabled: "Input_disabled",
6841
- "read-only": "Input_read-only",
6842
- "input--stateful": "Input_input--stateful",
6843
- "input--hover": "Input_input--hover",
6844
- "input--stateful-danger": "Input_input--stateful-danger",
6845
- "input--medium": "Input_input--medium",
6846
- "input--small": "Input_input--small",
6847
- "input--xsmall": "Input_input--xsmall",
6848
- "input--with-affix": "Input_input--with-affix",
6849
- "input-group__absolute-element": "Input_input-group__absolute-element"
6850
- };
6851
-
6852
6866
  // src/components/helpers/Input/Input.tsx
6853
6867
  var import_jsx_runtime233 = require("react/jsx-runtime");
6854
6868
  var Input = ({
@@ -6962,6 +6976,7 @@ function DateInput({
6962
6976
  Input_default["input--stateful"],
6963
6977
  Input_default["input--hover"],
6964
6978
  Input_default[`input--${componentSize}`],
6979
+ Input_default[`input-with-icon--${componentSize}`],
6965
6980
  hasErrorMessage && Input_default["input--stateful-danger"],
6966
6981
  DateInput_default["date-input"],
6967
6982
  clearable && DateInput_default[`date-input--${componentSize}--clearable`],
@@ -7268,7 +7283,8 @@ function TimePicker({
7268
7283
  icon: TimeIcon,
7269
7284
  iconSize,
7270
7285
  className: cn(
7271
- DateInput_default.icon,
7286
+ Input_default["input-group__absolute-el"],
7287
+ Input_default[`input-group__absolute-el--${componentSize}`],
7272
7288
  disabled && DateInput_default["icon-wrapper--disabled"],
7273
7289
  props.isReadOnly && DateInput_default["icon-wrapper--readonly"]
7274
7290
  )
@@ -10341,7 +10357,7 @@ var control = {
10341
10357
  ...optionTypography.medium
10342
10358
  },
10343
10359
  hasIcon: {
10344
- paddingLeft: "calc(var(--dds-spacing-x0-75) + var(--dds-icon-size-medium) + var(--dds-spacing-x0-5))"
10360
+ paddingLeft: "calc(var(--dds-spacing-x0-75) + var(--dds-icon-size-medium) + var(--dds-spacing-md-icon-text-gap))"
10345
10361
  }
10346
10362
  },
10347
10363
  small: {
@@ -10351,7 +10367,7 @@ var control = {
10351
10367
  ...optionTypography.small
10352
10368
  },
10353
10369
  hasIcon: {
10354
- paddingLeft: "calc(var(--dds-spacing-x0-75) + var(--dds-icon-size-medium) + var(--dds-spacing-x0-5))"
10370
+ paddingLeft: "calc(var(--dds-spacing-x0-75) + var(--dds-icon-size-medium) + var(--dds-spacing-sm-icon-text-gap))"
10355
10371
  }
10356
10372
  },
10357
10373
  xsmall: {
@@ -10361,7 +10377,7 @@ var control = {
10361
10377
  ...optionTypography.xsmall
10362
10378
  },
10363
10379
  hasIcon: {
10364
- paddingLeft: "calc(var(--dds-spacing-x0-5) + var(--dds-icon-size-small) + var(--dds-spacing-x0-5))"
10380
+ paddingLeft: "calc(var(--dds-spacing-x0-5) + var(--dds-icon-size-small) + var(--dds-spacing-xs-icon-text-gap))"
10365
10381
  }
10366
10382
  }
10367
10383
  };
@@ -10659,7 +10675,7 @@ function DDSControl(props) {
10659
10675
  icon,
10660
10676
  iconSize: getFormInputIconSize(componentSize),
10661
10677
  className: cn(
10662
- Input_default["input-group__absolute-element"],
10678
+ Input_default["input-group__absolute-el"],
10663
10679
  Select_default[`icon--${componentSize}`]
10664
10680
  )
10665
10681
  }
@@ -10888,6 +10904,7 @@ var NativeSelect = ({
10888
10904
  clearable,
10889
10905
  afterLabelContent,
10890
10906
  onChange,
10907
+ icon,
10891
10908
  ...rest
10892
10909
  }) => {
10893
10910
  const { t } = useTranslation();
@@ -10933,6 +10950,7 @@ var NativeSelect = ({
10933
10950
  };
10934
10951
  const iconSize = componentSize === "medium" ? "medium" : "small";
10935
10952
  const showClearButton = clearable && hasValue && !readOnly && !rest.disabled;
10953
+ const hasIcon = !!icon;
10936
10954
  return /* @__PURE__ */ (0, import_jsx_runtime290.jsxs)("div", { className, style, children: [
10937
10955
  renderLabel({
10938
10956
  label,
@@ -10942,6 +10960,17 @@ var NativeSelect = ({
10942
10960
  afterLabelContent
10943
10961
  }),
10944
10962
  /* @__PURE__ */ (0, import_jsx_runtime290.jsxs)(Box, { position: "relative", width: inputWidth, children: [
10963
+ hasIcon && /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
10964
+ Icon,
10965
+ {
10966
+ icon,
10967
+ className: cn(
10968
+ Input_default["input-group__absolute-el"],
10969
+ Input_default[`input-group__absolute-el--${componentSize}`]
10970
+ ),
10971
+ iconSize: getFormInputIconSize(componentSize)
10972
+ }
10973
+ ),
10945
10974
  /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
10946
10975
  "select",
10947
10976
  {
@@ -10953,6 +10982,7 @@ var NativeSelect = ({
10953
10982
  readOnly && NativeSelect_default["select--readonly"],
10954
10983
  Input_default.input,
10955
10984
  Input_default[`input--${componentSize}`],
10985
+ hasIcon && Input_default[`input-with-icon--${componentSize}`],
10956
10986
  NativeSelect_default[`select--${componentSize}`],
10957
10987
  scrollbar,
10958
10988
  focusable,
@@ -11949,7 +11979,7 @@ var PhoneInput = ({
11949
11979
  {
11950
11980
  className: cn(
11951
11981
  typographyStyles_default[`body-${componentSize}`],
11952
- Input_default["input-group__absolute-element"],
11982
+ Input_default["input-group__absolute-el"],
11953
11983
  PhoneInput_default["calling-code"]
11954
11984
  ),
11955
11985
  ref: callingCodeRef,
@@ -12628,7 +12658,6 @@ var useAutocompleteSearch = () => {
12628
12658
  var Search_default = {
12629
12659
  "with-button-container": "Search_with-button-container",
12630
12660
  input: "Search_input",
12631
- "search-icon": "Search_search-icon",
12632
12661
  "clear-button": "Search_clear-button",
12633
12662
  suggestions: "Search_suggestions"
12634
12663
  };
@@ -12774,29 +12803,10 @@ var getIconSize2 = (size2) => {
12774
12803
  case "large":
12775
12804
  return "medium";
12776
12805
  case "medium":
12777
- return "medium";
12778
12806
  case "small":
12779
- return "small";
12807
+ return getFormInputIconSize(size2);
12780
12808
  }
12781
12809
  };
12782
- var getPadding = (size2, showIcon) => {
12783
- const paddingRight = (textSize) => `calc(
12784
- var(--dds-spacing-x1) + ${textSize} * 1.5 + var(--dds-spacing-x0-5)
12785
- )`;
12786
- const paddingLeft = (iconSize) => `calc(
12787
- var(--dds-spacing-x0-75) + ${iconSize} + var(--dds-spacing-x0-5)
12788
- )`;
12789
- const pRSmallButton = paddingRight("0.875rem");
12790
- const pRMediumButton = paddingRight("1rem");
12791
- const pLSmallIcon = paddingLeft("var(--dds-icon-size-small)");
12792
- const pLMediumIcon = paddingLeft("var(--dds-icon-size-medium)");
12793
- const paddingMap = {
12794
- large: `x1 ${pRMediumButton} x1 ${showIcon ? pLMediumIcon : "x0.75"}`,
12795
- medium: `x0.75 ${pRSmallButton} x0.75 ${showIcon ? pLMediumIcon : "x0.75"}`,
12796
- small: `x0.5 ${pRSmallButton} x0.5 ${showIcon ? pLSmallIcon : "x0.75"}`
12797
- };
12798
- return paddingMap[size2];
12799
- };
12800
12810
  var Search = ({
12801
12811
  componentSize = "medium",
12802
12812
  buttonProps,
@@ -12857,8 +12867,8 @@ var Search = ({
12857
12867
  icon: SearchIcon,
12858
12868
  iconSize: getIconSize2(componentSize),
12859
12869
  className: cn(
12860
- Input_default["input-group__absolute-element"],
12861
- Search_default["search-icon"]
12870
+ Input_default["input-group__absolute-el"],
12871
+ Input_default[`input-group__absolute-el--${componentSize}`]
12862
12872
  )
12863
12873
  }
12864
12874
  ),
@@ -12884,9 +12894,11 @@ var Search = ({
12884
12894
  "aria-expanded": context.showSuggestions,
12885
12895
  role: hasSuggestions ? "combobox" : void 0,
12886
12896
  width: "100%",
12887
- padding: getPadding(componentSize, showIcon),
12888
12897
  className: cn(
12889
12898
  Search_default.input,
12899
+ Input_default[`input--${componentSize}`],
12900
+ showIcon && Input_default[`input-with-icon--${componentSize}`],
12901
+ Input_default[`input-with-el-right--${componentSize}`],
12890
12902
  typographyStyles_default[getTypographyCn(typographyTypes2[componentSize])]
12891
12903
  )
12892
12904
  }
@@ -14028,10 +14040,6 @@ var TextInput_default = {
14028
14040
  container: "TextInput_container",
14029
14041
  "container--readonly": "TextInput_container--readonly",
14030
14042
  "container--disabled": "TextInput_container--disabled",
14031
- input: "TextInput_input",
14032
- "with-icon--medium": "TextInput_with-icon--medium",
14033
- "with-icon--small": "TextInput_with-icon--small",
14034
- "with-icon--xsmall": "TextInput_with-icon--xsmall",
14035
14043
  "input--extended": "TextInput_input--extended",
14036
14044
  "icon--medium": "TextInput_icon--medium",
14037
14045
  "icon--small": "TextInput_icon--small",
@@ -14145,7 +14153,8 @@ var TextInput = ({
14145
14153
  icon,
14146
14154
  iconSize: getFormInputIconSize(componentSize),
14147
14155
  className: cn(
14148
- Input_default["input-group__absolute-element"],
14156
+ Input_default["input-group__absolute-el"],
14157
+ Input_default[`input-group__absolute-el--${componentSize}`],
14149
14158
  TextInput_default[`icon--${componentSize}`]
14150
14159
  )
14151
14160
  }
@@ -14154,8 +14163,7 @@ var TextInput = ({
14154
14163
  StatefulInput,
14155
14164
  {
14156
14165
  className: cn(
14157
- TextInput_default.input,
14158
- TextInput_default[`with-icon--${componentSize}`],
14166
+ Input_default[`input-with-icon--${componentSize}`],
14159
14167
  TextInput_default["input--extended"]
14160
14168
  ),
14161
14169
  ...generalInputProps