@snack-uikit/calendar 0.13.16-preview-0aba136f.0 → 0.13.16

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/CHANGELOG.md CHANGED
@@ -3,6 +3,15 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 0.13.16 (2026-03-11)
7
+
8
+ ### Only dependencies have been changed
9
+ * [@snack-uikit/list@0.32.15]($PUBLIC_PROJECT_URL/blob/master/packages/list/CHANGELOG.md)
10
+
11
+
12
+
13
+
14
+
6
15
  ## 0.13.15 (2026-03-04)
7
16
 
8
17
  ### Only dependencies have been changed
package/README.md CHANGED
@@ -128,7 +128,6 @@ function TimePickerExample() {
128
128
  | defaultValue | `TimeValue` | - | Значение по-умолчанию для uncontrolled. |
129
129
  | onChangeValue | `(value?: TimeValue) => void` | - | Колбек выбора значения |
130
130
  | showSeconds | `boolean` | true | Показывать ли секунды |
131
- | showCurrentButton | `boolean` | - | Показывать ли кнопку выбора текущего времени |
132
131
  | size | enum Size: `"s"`, `"m"`, `"l"` | m | Размер |
133
132
  | className | `string` | - | CSS-класс контейнера |
134
133
  | fitToContainer | `boolean` | true | Отключает предустановленный размер, заставляя компонент подстраиваться к размеру контейнра: (width: 100%, height: 100%). |
@@ -12,8 +12,6 @@ export type TimePickerProps = WithSupportProps<{
12
12
  onChangeValue?(value?: TimeValue): void;
13
13
  /** Показывать ли секунды */
14
14
  showSeconds?: boolean;
15
- /** Показывать ли кнопку выбора текущего времени */
16
- showCurrentButton?: boolean;
17
15
  /**
18
16
  * Размер
19
17
  * @default m
@@ -33,4 +31,4 @@ export type TimePickerProps = WithSupportProps<{
33
31
  focus(): void;
34
32
  }>;
35
33
  }>;
36
- export declare function TimePicker({ className, size, fitToContainer, value: valueProp, defaultValue, onChangeValue, onFocusLeave, 'data-test-id': testId, navigationStartRef, showSeconds, today: todayProp, showCurrentButton, }: TimePickerProps): import("react/jsx-runtime").JSX.Element;
34
+ export declare function TimePicker({ className, size, fitToContainer, value: valueProp, defaultValue, onChangeValue, onFocusLeave, 'data-test-id': testId, navigationStartRef, showSeconds, today: todayProp, }: TimePickerProps): import("react/jsx-runtime").JSX.Element;
@@ -36,8 +36,7 @@ function TimePicker(_ref) {
36
36
  'data-test-id': testId,
37
37
  navigationStartRef,
38
38
  showSeconds = true,
39
- today: todayProp,
40
- showCurrentButton
39
+ today: todayProp
41
40
  } = _ref;
42
41
  const [value, setValueState] = (0, uncontrollable_1.useUncontrolledProp)(valueProp, defaultValue, onChangeValue);
43
42
  const setValueEventHandler = (0, utils_1.useEventHandler)(setValueState);
@@ -111,7 +110,6 @@ function TimePicker(_ref) {
111
110
  onFocusLeave,
112
111
  navigationStartRef,
113
112
  showSeconds,
114
- showCurrentButton,
115
113
  dateAndTime,
116
114
  onTimeChange,
117
115
  onDateAndTimeChange,
@@ -21,8 +21,6 @@ export type CalendarContextType = {
21
21
  viewShift: number;
22
22
  focus?: string;
23
23
  locale: Intl.Locale;
24
- /** Показывать ли кнопку выбора текущего времени в футере */
25
- showCurrentButton?: boolean;
26
24
  onFocusLeave?(direction: FocusDirection): void;
27
25
  buildCellProps?: BuildCellPropsFunction;
28
26
  setFocus(address: string | undefined): void;
@@ -40,8 +40,7 @@ function Footer() {
40
40
  getTestId,
41
41
  referenceDate,
42
42
  setViewShift,
43
- onFocusLeave,
44
- showCurrentButton = true
43
+ onFocusLeave
45
44
  } = (0, react_1.useContext)(CalendarContext_1.CalendarContext);
46
45
  const {
47
46
  t
@@ -106,7 +105,7 @@ function Footer() {
106
105
  }), (0, jsx_runtime_1.jsxs)("div", {
107
106
  className: styles_module_scss_1.default.currentWrapper,
108
107
  "data-size": size,
109
- children: [showCurrentButton && (0, jsx_runtime_1.jsx)(button_1.ButtonFunction, {
108
+ children: [(0, jsx_runtime_1.jsx)(button_1.ButtonFunction, {
110
109
  label: t('current'),
111
110
  size: size === 's' ? 'xs' : 's',
112
111
  onClick: handleCurrentClick,
@@ -114,8 +113,6 @@ function Footer() {
114
113
  onKeyDown: handleCurrentKeyDown,
115
114
  "data-test-id": getTestId('current-button')
116
115
  }), (0, jsx_runtime_1.jsx)(button_1.ButtonFilled, {
117
- label: !showCurrentButton ? t('apply') : undefined,
118
- fullWidth: !showCurrentButton,
119
116
  icon: (0, jsx_runtime_1.jsx)(icons_1.CheckSVG, {}),
120
117
  size: size === 's' ? 'xs' : 's',
121
118
  disabled: isApplyButtonDisabled,
@@ -12,8 +12,6 @@ export type TimePickerProps = WithSupportProps<{
12
12
  onChangeValue?(value?: TimeValue): void;
13
13
  /** Показывать ли секунды */
14
14
  showSeconds?: boolean;
15
- /** Показывать ли кнопку выбора текущего времени */
16
- showCurrentButton?: boolean;
17
15
  /**
18
16
  * Размер
19
17
  * @default m
@@ -33,4 +31,4 @@ export type TimePickerProps = WithSupportProps<{
33
31
  focus(): void;
34
32
  }>;
35
33
  }>;
36
- export declare function TimePicker({ className, size, fitToContainer, value: valueProp, defaultValue, onChangeValue, onFocusLeave, 'data-test-id': testId, navigationStartRef, showSeconds, today: todayProp, showCurrentButton, }: TimePickerProps): import("react/jsx-runtime").JSX.Element;
34
+ export declare function TimePicker({ className, size, fitToContainer, value: valueProp, defaultValue, onChangeValue, onFocusLeave, 'data-test-id': testId, navigationStartRef, showSeconds, today: todayProp, }: TimePickerProps): import("react/jsx-runtime").JSX.Element;
@@ -13,7 +13,7 @@ import { getLocale, getTestIdBuilder } from '../../utils';
13
13
  import styles from './styles.module.css';
14
14
  const stubDate = new Date();
15
15
  const stubFunc = () => { };
16
- export function TimePicker({ className, size = SIZE.M, fitToContainer = true, value: valueProp, defaultValue, onChangeValue, onFocusLeave, 'data-test-id': testId, navigationStartRef, showSeconds = true, today: todayProp, showCurrentButton, }) {
16
+ export function TimePicker({ className, size = SIZE.M, fitToContainer = true, value: valueProp, defaultValue, onChangeValue, onFocusLeave, 'data-test-id': testId, navigationStartRef, showSeconds = true, today: todayProp, }) {
17
17
  const [value, setValueState] = useUncontrolledProp(valueProp, defaultValue, onChangeValue);
18
18
  const setValueEventHandler = useEventHandler(setValueState);
19
19
  const [internalValue, setInternalValue] = useState();
@@ -55,7 +55,6 @@ export function TimePicker({ className, size = SIZE.M, fitToContainer = true, va
55
55
  onFocusLeave,
56
56
  navigationStartRef,
57
57
  showSeconds,
58
- showCurrentButton,
59
58
  dateAndTime,
60
59
  onTimeChange,
61
60
  onDateAndTimeChange,
@@ -21,8 +21,6 @@ export type CalendarContextType = {
21
21
  viewShift: number;
22
22
  focus?: string;
23
23
  locale: Intl.Locale;
24
- /** Показывать ли кнопку выбора текущего времени в футере */
25
- showCurrentButton?: boolean;
26
24
  onFocusLeave?(direction: FocusDirection): void;
27
25
  buildCellProps?: BuildCellPropsFunction;
28
26
  setFocus(address: string | undefined): void;
@@ -10,7 +10,7 @@ import { getMonthShift } from '../../utils';
10
10
  import { CalendarContext } from '../CalendarContext';
11
11
  import styles from './styles.module.css';
12
12
  export function Footer() {
13
- const { size, viewMode, mode, today, setValue, dateAndTime, isTimeFilled, isDateAndTimeFilled, onDateAndTimeChange, applyButtonRef, currentButtonRef, hoursKeyboardNavigationRef, minutesKeyboardNavigationRef, secondsKeyboardNavigationRef, showSeconds, getTestId, referenceDate, setViewShift, onFocusLeave, showCurrentButton = true, } = useContext(CalendarContext);
13
+ const { size, viewMode, mode, today, setValue, dateAndTime, isTimeFilled, isDateAndTimeFilled, onDateAndTimeChange, applyButtonRef, currentButtonRef, hoursKeyboardNavigationRef, minutesKeyboardNavigationRef, secondsKeyboardNavigationRef, showSeconds, getTestId, referenceDate, setViewShift, onFocusLeave, } = useContext(CalendarContext);
14
14
  const { t } = useLocale('Calendar');
15
15
  if (![CALENDAR_MODE.DateTime, 'time'].includes(mode) || viewMode !== 'month') {
16
16
  return null;
@@ -59,5 +59,5 @@ export function Footer() {
59
59
  const newDate = new Date(year, month, day, hours, minutes, showSeconds ? seconds : 0);
60
60
  setValue([newDate, newDate]);
61
61
  };
62
- return (_jsxs("div", { className: styles.footer, "data-size": size, children: [_jsx(Divider, { className: styles.divider }), _jsxs("div", { className: styles.currentWrapper, "data-size": size, children: [showCurrentButton && (_jsx(ButtonFunction, { label: t('current'), size: size === 's' ? 'xs' : 's', onClick: handleCurrentClick, ref: currentButtonRef, onKeyDown: handleCurrentKeyDown, "data-test-id": getTestId('current-button') })), _jsx(ButtonFilled, { label: !showCurrentButton ? t('apply') : undefined, fullWidth: !showCurrentButton, icon: _jsx(CheckSVG, {}), size: size === 's' ? 'xs' : 's', disabled: isApplyButtonDisabled, onClick: handleApplySelection, ref: applyButtonRef, onKeyDown: handleApplyKeyDown, "data-test-id": getTestId('apply-button') })] })] }));
62
+ return (_jsxs("div", { className: styles.footer, "data-size": size, children: [_jsx(Divider, { className: styles.divider }), _jsxs("div", { className: styles.currentWrapper, "data-size": size, children: [_jsx(ButtonFunction, { label: t('current'), size: size === 's' ? 'xs' : 's', onClick: handleCurrentClick, ref: currentButtonRef, onKeyDown: handleCurrentKeyDown, "data-test-id": getTestId('current-button') }), _jsx(ButtonFilled, { icon: _jsx(CheckSVG, {}), size: size === 's' ? 'xs' : 's', disabled: isApplyButtonDisabled, onClick: handleApplySelection, ref: applyButtonRef, onKeyDown: handleApplyKeyDown, "data-test-id": getTestId('apply-button') })] })] }));
63
63
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "title": "Calendar",
7
- "version": "0.13.16-preview-0aba136f.0",
7
+ "version": "0.13.16",
8
8
  "sideEffects": [
9
9
  "*.css",
10
10
  "*.woff",
@@ -39,7 +39,7 @@
39
39
  "@snack-uikit/button": "0.19.17",
40
40
  "@snack-uikit/divider": "3.2.11",
41
41
  "@snack-uikit/icons": "0.27.7",
42
- "@snack-uikit/list": "0.32.15-preview-0aba136f.0",
42
+ "@snack-uikit/list": "0.32.15",
43
43
  "@snack-uikit/utils": "4.0.1",
44
44
  "classnames": "2.5.1",
45
45
  "uncontrollable": "8.0.4",
@@ -48,5 +48,5 @@
48
48
  "peerDependencies": {
49
49
  "@snack-uikit/locale": "*"
50
50
  },
51
- "gitHead": "a2db41da4366417b6ff322f3a1ba73da8ba96222"
51
+ "gitHead": "08bc11a562baec889f73cfb3af56946ab5e668fb"
52
52
  }
@@ -29,8 +29,6 @@ export type TimePickerProps = WithSupportProps<{
29
29
  onChangeValue?(value?: TimeValue): void;
30
30
  /** Показывать ли секунды */
31
31
  showSeconds?: boolean;
32
- /** Показывать ли кнопку выбора текущего времени */
33
- showCurrentButton?: boolean;
34
32
 
35
33
  /**
36
34
  * Размер
@@ -63,7 +61,6 @@ export function TimePicker({
63
61
  navigationStartRef,
64
62
  showSeconds = true,
65
63
  today: todayProp,
66
- showCurrentButton,
67
64
  }: TimePickerProps) {
68
65
  const [value, setValueState] = useUncontrolledProp<TimeValue | undefined>(valueProp, defaultValue, onChangeValue);
69
66
  const setValueEventHandler = useEventHandler(setValueState);
@@ -130,7 +127,6 @@ export function TimePicker({
130
127
  onFocusLeave,
131
128
  navigationStartRef,
132
129
  showSeconds,
133
- showCurrentButton,
134
130
  dateAndTime,
135
131
  onTimeChange,
136
132
  onDateAndTimeChange,
@@ -35,8 +35,6 @@ export type CalendarContextType = {
35
35
  viewShift: number;
36
36
  focus?: string;
37
37
  locale: Intl.Locale;
38
- /** Показывать ли кнопку выбора текущего времени в футере */
39
- showCurrentButton?: boolean;
40
38
  onFocusLeave?(direction: FocusDirection): void;
41
39
  buildCellProps?: BuildCellPropsFunction;
42
40
  setFocus(address: string | undefined): void;
@@ -32,7 +32,6 @@ export function Footer() {
32
32
  referenceDate,
33
33
  setViewShift,
34
34
  onFocusLeave,
35
- showCurrentButton = true,
36
35
  } = useContext(CalendarContext);
37
36
 
38
37
  const { t } = useLocale('Calendar');
@@ -106,20 +105,16 @@ export function Footer() {
106
105
  <Divider className={styles.divider} />
107
106
 
108
107
  <div className={styles.currentWrapper} data-size={size}>
109
- {showCurrentButton && (
110
- <ButtonFunction
111
- label={t('current')}
112
- size={size === 's' ? 'xs' : 's'}
113
- onClick={handleCurrentClick}
114
- ref={currentButtonRef}
115
- onKeyDown={handleCurrentKeyDown}
116
- data-test-id={getTestId('current-button')}
117
- />
118
- )}
108
+ <ButtonFunction
109
+ label={t('current')}
110
+ size={size === 's' ? 'xs' : 's'}
111
+ onClick={handleCurrentClick}
112
+ ref={currentButtonRef}
113
+ onKeyDown={handleCurrentKeyDown}
114
+ data-test-id={getTestId('current-button')}
115
+ />
119
116
 
120
117
  <ButtonFilled
121
- label={!showCurrentButton ? t('apply') : undefined}
122
- fullWidth={!showCurrentButton}
123
118
  icon={<CheckSVG />}
124
119
  size={size === 's' ? 'xs' : 's'}
125
120
  disabled={isApplyButtonDisabled}