@povio/ui 2.3.0-rc.1 → 2.3.0-rc.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.
@@ -274,7 +274,6 @@ var DatePicker = ({ fullIso = true, granularity = "day", minValue, maxValue, ren
274
274
  const staticSegments = getStaticCalendarDateSegments({
275
275
  value: dateValue,
276
276
  locale,
277
- placeholder: props.placeholder,
278
277
  shouldForceLeadingZeros,
279
278
  isDisabled,
280
279
  hidePlaceholder: as === "floating" && !dateValue
@@ -624,7 +624,6 @@ var DateRangePicker = ({ fullIso = true, minValue, maxValue, renderStaticInput,
624
624
  start: startDateValue,
625
625
  end: endDateValue,
626
626
  locale,
627
- placeholder: props.placeholder,
628
627
  shouldForceLeadingZeros,
629
628
  isDisabled,
630
629
  hidePlaceholder: as === "floating" && !hasProvidedRangeValue
@@ -265,7 +265,6 @@ var DateTimePicker = ({ fullIso = true, renderStaticInput, ...props }) => {
265
265
  const staticSegments = getStaticCalendarDateTimeSegments({
266
266
  value: dateTimeValue,
267
267
  locale,
268
- placeholder: props.placeholder,
269
268
  shouldForceLeadingZeros,
270
269
  isDisabled,
271
270
  hidePlaceholder: as === "floating" && !dateTimeValue
@@ -181,7 +181,6 @@ var TimePicker = ({ renderStaticInput, ...props }) => {
181
181
  const staticSegments = getStaticTimeSegments({
182
182
  value: timeValue,
183
183
  locale,
184
- placeholder: props.placeholder,
185
184
  isDisabled,
186
185
  hidePlaceholder: as === "floating" && !timeValue
187
186
  });
@@ -7,29 +7,25 @@ interface StaticSegmentProps {
7
7
  interface StaticCalendarDateSegmentsProps extends StaticSegmentProps {
8
8
  value?: CalendarDate | null;
9
9
  locale: string;
10
- placeholder?: string;
11
10
  shouldForceLeadingZeros?: boolean;
12
11
  }
13
12
  interface StaticCalendarDateTimeSegmentsProps extends StaticSegmentProps {
14
13
  value?: DateValue | null;
15
14
  locale: string;
16
- placeholder?: string;
17
15
  shouldForceLeadingZeros?: boolean;
18
16
  }
19
17
  interface StaticDateRangeSegmentsProps extends StaticSegmentProps {
20
18
  start?: CalendarDate | null;
21
19
  end?: CalendarDate | null;
22
20
  locale: string;
23
- placeholder?: string;
24
21
  shouldForceLeadingZeros?: boolean;
25
22
  }
26
23
  interface StaticTimeSegmentsProps extends StaticSegmentProps {
27
24
  value?: TimeValue | null;
28
25
  locale: string;
29
- placeholder?: string;
30
26
  }
31
- export declare const getStaticCalendarDateSegments: ({ value, locale, placeholder, shouldForceLeadingZeros, isDisabled, hidePlaceholder, }: StaticCalendarDateSegmentsProps) => import("react/jsx-runtime").JSX.Element;
32
- export declare const getStaticCalendarDateTimeSegments: ({ value, locale, placeholder, shouldForceLeadingZeros, isDisabled, hidePlaceholder, }: StaticCalendarDateTimeSegmentsProps) => import("react/jsx-runtime").JSX.Element;
33
- export declare const getStaticDateRangeSegments: ({ start, end, locale, placeholder, shouldForceLeadingZeros, isDisabled, hidePlaceholder, }: StaticDateRangeSegmentsProps) => import("react/jsx-runtime").JSX.Element;
34
- export declare const getStaticTimeSegments: ({ value, locale, placeholder, isDisabled, hidePlaceholder, }: StaticTimeSegmentsProps) => import("react/jsx-runtime").JSX.Element;
27
+ export declare const getStaticCalendarDateSegments: ({ value, locale, shouldForceLeadingZeros, isDisabled, hidePlaceholder, }: StaticCalendarDateSegmentsProps) => import("react/jsx-runtime").JSX.Element;
28
+ export declare const getStaticCalendarDateTimeSegments: ({ value, locale, shouldForceLeadingZeros, isDisabled, hidePlaceholder, }: StaticCalendarDateTimeSegmentsProps) => import("react/jsx-runtime").JSX.Element;
29
+ export declare const getStaticDateRangeSegments: ({ start, end, locale, shouldForceLeadingZeros, isDisabled, hidePlaceholder, }: StaticDateRangeSegmentsProps) => import("react/jsx-runtime").JSX.Element;
30
+ export declare const getStaticTimeSegments: ({ value, locale, isDisabled, hidePlaceholder }: StaticTimeSegmentsProps) => import("react/jsx-runtime").JSX.Element;
35
31
  export {};
@@ -2,26 +2,26 @@ import { DateSegmentItemView } from "./DateSegmentItem.js";
2
2
  import { DateTimeUtils } from "../../../../utils/date-time.utils.js";
3
3
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
4
  //#region src/components/inputs/DateTime/shared/staticDateTimeSegments.tsx
5
- var getStaticCalendarDateSegments = ({ value, locale, placeholder, shouldForceLeadingZeros, isDisabled, hidePlaceholder }) => {
5
+ var getStaticCalendarDateSegments = ({ value, locale, shouldForceLeadingZeros, isDisabled, hidePlaceholder }) => {
6
6
  const hasValue = !!value;
7
- return renderStaticSegments(value ? DateTimeUtils.formatCalendarDateLocalized(value, locale, { shouldForceLeadingZeros }) : placeholder ?? DateTimeUtils.getDatePlaceholder(locale, { shouldForceLeadingZeros }), {
7
+ return renderStaticSegments(value ? DateTimeUtils.formatCalendarDateLocalized(value, locale, { shouldForceLeadingZeros }) : DateTimeUtils.getDatePlaceholder(locale, { shouldForceLeadingZeros }), {
8
8
  isPlaceholder: !hasValue,
9
9
  isInputEmpty: !hasValue,
10
10
  isDisabled,
11
11
  hidePlaceholder
12
12
  });
13
13
  };
14
- var getStaticCalendarDateTimeSegments = ({ value, locale, placeholder, shouldForceLeadingZeros, isDisabled, hidePlaceholder }) => {
14
+ var getStaticCalendarDateTimeSegments = ({ value, locale, shouldForceLeadingZeros, isDisabled, hidePlaceholder }) => {
15
15
  const hasValue = !!(value && "hour" in value);
16
- return renderStaticSegments(hasValue ? DateTimeUtils.formatCalendarDateTimeLocalized(value, locale, { shouldForceLeadingZeros }) : placeholder ?? DateTimeUtils.getDateTimePlaceholder(locale, { shouldForceLeadingZeros }), {
16
+ return renderStaticSegments(hasValue ? DateTimeUtils.formatCalendarDateTimeLocalized(value, locale, { shouldForceLeadingZeros }) : DateTimeUtils.getDateTimePlaceholder(locale, { shouldForceLeadingZeros }), {
17
17
  isPlaceholder: !hasValue,
18
18
  isInputEmpty: !hasValue,
19
19
  isDisabled,
20
20
  hidePlaceholder
21
21
  });
22
22
  };
23
- var getStaticDateRangeSegments = ({ start, end, locale, placeholder, shouldForceLeadingZeros, isDisabled, hidePlaceholder }) => {
24
- const defaultPlaceholder = placeholder ?? DateTimeUtils.getDatePlaceholder(locale, { shouldForceLeadingZeros });
23
+ var getStaticDateRangeSegments = ({ start, end, locale, shouldForceLeadingZeros, isDisabled, hidePlaceholder }) => {
24
+ const defaultPlaceholder = DateTimeUtils.getDatePlaceholder(locale, { shouldForceLeadingZeros });
25
25
  return /* @__PURE__ */ jsxs(Fragment, { children: [
26
26
  renderStaticSegments(start ? DateTimeUtils.formatCalendarDateLocalized(start, locale, { shouldForceLeadingZeros }) : defaultPlaceholder, {
27
27
  isPlaceholder: !start,
@@ -41,9 +41,9 @@ var getStaticDateRangeSegments = ({ start, end, locale, placeholder, shouldForce
41
41
  })
42
42
  ] });
43
43
  };
44
- var getStaticTimeSegments = ({ value, locale, placeholder, isDisabled, hidePlaceholder }) => {
44
+ var getStaticTimeSegments = ({ value, locale, isDisabled, hidePlaceholder }) => {
45
45
  const hasValue = !!value;
46
- return renderStaticSegments(value ? DateTimeUtils.formatTimeLocalized(value, locale) : placeholder ?? DateTimeUtils.getTimePlaceholder(locale), {
46
+ return renderStaticSegments(value ? DateTimeUtils.formatTimeLocalized(value, locale) : DateTimeUtils.getTimePlaceholder(locale), {
47
47
  isPlaceholder: !hasValue,
48
48
  isInputEmpty: !hasValue,
49
49
  isDisabled,
@@ -88,7 +88,7 @@ function Autocomplete({ renderStaticInput, ...props }) {
88
88
  ...props,
89
89
  isDisabled,
90
90
  className: clsx("w-full", props.containerClassName),
91
- inputClassName: clsx(props.className, props.inputClassName),
91
+ inputClassName: clsx("px-0!", props.className, props.inputClassName),
92
92
  contentWrapperClassName: "flex flex-1 flex-wrap gap-input-gap-input-text-to-elements truncate",
93
93
  labelPlacement: "content-row",
94
94
  dataAttributes,
@@ -89,7 +89,7 @@ function Select({ renderStaticInput, ...props }) {
89
89
  ...props,
90
90
  isDisabled,
91
91
  className: clsx("w-full", props.containerClassName),
92
- inputClassName: clsx(props.className, props.inputClassName),
92
+ inputClassName: clsx("px-0!", props.className, props.inputClassName),
93
93
  typographySize: "label-1",
94
94
  labelPlacement: "content-row",
95
95
  dataAttributes,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@povio/ui",
3
- "version": "2.3.0-rc.1",
3
+ "version": "2.3.0-rc.2",
4
4
  "type": "module",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",