ingred-ui 27.2.0 → 27.3.1

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.
@@ -51,9 +51,23 @@ export type CalendarRangeProps = React.HTMLAttributes<HTMLDivElement> & {
51
51
  */
52
52
  dateFieldFormat?: string;
53
53
  /**
54
- * 親コンポーネントで calendar を任意のタイミングで閉じたい場合に使用する
54
+ * モバイル幅でのみ表示する「適用」押下時(DateRangePicker のポップオーバーを閉じる等)
55
55
  */
56
- onClose?: (clickState: any) => void;
56
+ onApply?: () => void;
57
+ /**
58
+ * モバイル幅でのみ表示する「キャンセル」押下時(`onCancel` があるときだけボタンを表示)
59
+ */
60
+ onCancel?: () => void;
61
+ /**
62
+ * 適用ボタンのラベル
63
+ * @default 適用
64
+ */
65
+ applyButtonText?: string;
66
+ /**
67
+ * キャンセルボタンのラベル
68
+ * @default キャンセル
69
+ */
70
+ cancelButtonText?: string;
57
71
  /**
58
72
  * 選択可能なカレンダーの領域を制限する
59
73
  * true が返る場合は、選択不可となる
@@ -127,9 +141,23 @@ export declare const CalendarRange: React.ForwardRefExoticComponent<React.HTMLAt
127
141
  */
128
142
  dateFieldFormat?: string | undefined;
129
143
  /**
130
- * 親コンポーネントで calendar を任意のタイミングで閉じたい場合に使用する
144
+ * モバイル幅でのみ表示する「適用」押下時(DateRangePicker のポップオーバーを閉じる等)
145
+ */
146
+ onApply?: (() => void) | undefined;
147
+ /**
148
+ * モバイル幅でのみ表示する「キャンセル」押下時(`onCancel` があるときだけボタンを表示)
149
+ */
150
+ onCancel?: (() => void) | undefined;
151
+ /**
152
+ * 適用ボタンのラベル
153
+ * @default 適用
154
+ */
155
+ applyButtonText?: string | undefined;
156
+ /**
157
+ * キャンセルボタンのラベル
158
+ * @default キャンセル
131
159
  */
132
- onClose?: ((clickState: any) => void) | undefined;
160
+ cancelButtonText?: string | undefined;
133
161
  /**
134
162
  * 選択可能なカレンダーの領域を制限する
135
163
  * true が返る場合は、選択不可となる
@@ -199,9 +227,23 @@ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponen
199
227
  */
200
228
  dateFieldFormat?: string | undefined;
201
229
  /**
202
- * 親コンポーネントで calendar を任意のタイミングで閉じたい場合に使用する
230
+ * モバイル幅でのみ表示する「適用」押下時(DateRangePicker のポップオーバーを閉じる等)
231
+ */
232
+ onApply?: (() => void) | undefined;
233
+ /**
234
+ * モバイル幅でのみ表示する「キャンセル」押下時(`onCancel` があるときだけボタンを表示)
235
+ */
236
+ onCancel?: (() => void) | undefined;
237
+ /**
238
+ * 適用ボタンのラベル
239
+ * @default 適用
240
+ */
241
+ applyButtonText?: string | undefined;
242
+ /**
243
+ * キャンセルボタンのラベル
244
+ * @default キャンセル
203
245
  */
204
- onClose?: ((clickState: any) => void) | undefined;
246
+ cancelButtonText?: string | undefined;
205
247
  /**
206
248
  * 選択可能なカレンダーの領域を制限する
207
249
  * true が返る場合は、選択不可となる
@@ -15,7 +15,10 @@ declare const _default: {
15
15
  onPresetButtonClick?: ((action: import("../internal/Actions").PresetButton) => void) | undefined;
16
16
  showDateFields?: boolean | undefined;
17
17
  dateFieldFormat?: string | undefined;
18
- onClose?: ((clickState: any) => void) | undefined;
18
+ onApply?: (() => void) | undefined;
19
+ onCancel?: (() => void) | undefined;
20
+ applyButtonText?: string | undefined;
21
+ cancelButtonText?: string | undefined;
19
22
  isOutsideRange?: ((date: dayjs.Dayjs) => boolean) | undefined;
20
23
  onDatesChange?: ((dates: import("./CalendarRange").DateRange) => void) | undefined;
21
24
  showTimeFields?: boolean | undefined;
@@ -29,3 +32,5 @@ export declare const WithPresetButtons: StoryObj<CalendarRangeProps>;
29
32
  export declare const WithDateField: StoryObj<CalendarRangeProps>;
30
33
  export declare const WithDateFieldAndPresetButtons: StoryObj<CalendarRangeProps>;
31
34
  export declare const WithDateFieldsAndTimeFields: StoryObj<CalendarRangeProps>;
35
+ /** DateField + TimeField に加え、プリセットボタンを並べた組み合わせ例 */
36
+ export declare const WithDateFieldsTimeFieldsAndPresetButtons: StoryObj<CalendarRangeProps>;
@@ -1 +1,2 @@
1
- export declare const HEIGHT = "400px";
1
+ /** カレンダーカード(グリッド+Actions)の最大幅。1fr グリッドや広い親・100vw 上限だけでは横に伸び切るのを防ぐ */
2
+ export declare const CALENDAR_CARD_MAX_WIDTH_PX = 640;
@@ -4,5 +4,6 @@ export declare const PresetButton: import("styled-components").StyledComponent<"
4
4
  export declare const ActionsContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
5
5
  export declare const PresetButtonsWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
6
6
  export declare const DateFieldWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
7
+ /** 開始/終了など複数ブロックを、幅に応じて横並び〜折り返し(常に左詰め・伸長なし) */
7
8
  export declare const DateFieldsGroup: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
8
9
  export declare const DateFieldLabel: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
@@ -6,8 +6,6 @@ type Props = {
6
6
  weekList?: string[];
7
7
  weekStart?: number;
8
8
  current: Dayjs;
9
- yearIsOpen: boolean;
10
- onYearIsOpen: (yearIsOpen: boolean) => void;
11
9
  isOutsideRange: (date: Dayjs) => boolean;
12
10
  onDateChange: (value: Dayjs) => void;
13
11
  onPreviousMonth: () => void;
@@ -7,7 +7,6 @@ type Props = {
7
7
  weekList?: string[];
8
8
  weekStart?: number;
9
9
  current: Dayjs;
10
- yearIsOpen: boolean;
11
10
  isOutsideRange: (date: Dayjs) => boolean;
12
11
  onDatesChange: (dates: {
13
12
  startDate: Dayjs;
@@ -5,20 +5,18 @@ export declare const ScrollContainer: import("styled-components").StyledComponen
5
5
  export declare const DatePickerContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, import("../Flex/Flex").FlexProps, never>;
6
6
  export declare const CalendarContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, import("../Flex/Flex").FlexProps, never>;
7
7
  export declare const DayStyle: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
8
- export declare const TitleContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../Typography/Typography").TypographyProps & import("react").RefAttributes<HTMLElement>>, import("styled-components").DefaultTheme, {
9
- expanded: boolean;
10
- }, never>;
11
- export declare const CalendarMonth: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
12
- expanded: boolean;
13
- }, never>;
14
- export declare const IconContainer: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
15
- expanded: boolean;
16
- }, never>;
17
- export declare const IconButton: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
18
- expanded: boolean;
19
- }, never>;
8
+ export declare const TitleContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../Typography/Typography").TypographyProps & import("react").RefAttributes<HTMLElement>>, import("styled-components").DefaultTheme, {}, never>;
9
+ export declare const CalendarMonth: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
20
10
  export declare const NavigationContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
11
+ export declare const CalendarHeader: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
21
12
  export declare const CalendarLayout: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
13
+ /**
14
+ * デスクトップでは子を親レイアウトに直接参加させる(display: contents)。
15
+ * モバイルではカレンダー本体 + Actions + 適用フッターを一括スクロールするラッパー。
16
+ */
17
+ export declare const CalendarMobileApplyHost: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
18
+ /** Select2 等と同様、モバイルのみ右下に適用ボタンを置く */
19
+ export declare const CalendarApplyFooter: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
22
20
  type TodayIndicatorProps = {
23
21
  isToday?: boolean;
24
22
  };
@@ -100,6 +100,16 @@ export type DateRangePickerProps = {
100
100
  * @default "YYYY-MM-DD"
101
101
  */
102
102
  format?: string;
103
+ /**
104
+ * モバイルでカレンダー下部に表示する「適用」ボタンのラベル
105
+ * @default ロケールの defaultProps(ja: 適用 / en: Apply)
106
+ */
107
+ applyButtonText?: string;
108
+ /**
109
+ * モバイルでカレンダー下部に表示する「キャンセル」ボタンのラベル
110
+ * @default ロケールの defaultProps(ja: キャンセル / en: Cancel)
111
+ */
112
+ cancelButtonText?: string;
103
113
  };
104
114
  export declare const DateRangePicker: React.ForwardRefExoticComponent<DateRangePickerProps & React.RefAttributes<HTMLDivElement>>;
105
115
  declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<DateRangePickerProps & React.RefAttributes<HTMLDivElement>>>;
@@ -22,3 +22,7 @@ export declare const DarkVariant: StoryObj<DateRangePickerProps>;
22
22
  export declare const WithDateFields: StoryObj<DateRangePickerProps>;
23
23
  export declare const WithDateFieldsAndPresetButtons: StoryObj<DateRangePickerProps>;
24
24
  export declare const WithTimeFields: StoryObj<DateRangePickerProps>;
25
+ /**
26
+ * CalendarRange の unified 例(日付・時刻フィールド+多数プリセット)をポップオーバーで再現
27
+ */
28
+ export declare const UnifiedCalendarWithDateTimeAndPresets: StoryObj<DateRangePickerProps>;
@@ -43,6 +43,8 @@ export interface Localization {
43
43
  defaultProps: Pick<DatePickerProps, "monthFormat"> & {
44
44
  weekList: string[];
45
45
  weekStart: number;
46
+ applyButtonText: string;
47
+ cancelButtonText: string;
46
48
  };
47
49
  };
48
50
  WeekTime?: {