@semcore/date-picker 17.2.1 → 18.0.0-prerelease.0

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.
@@ -1,17 +1,15 @@
1
- import type { Flex, Box, BoxProps } from '@semcore/base-components';
2
- import type Popper from '@semcore/base-components';
1
+ import type { NSFlex, NSBox, NSPopper } from '@semcore/base-components';
3
2
  import type { BaseTriggerProps } from '@semcore/base-trigger';
4
3
  import type BaseTrigger from '@semcore/base-trigger';
5
- import type { ButtonProps } from '@semcore/button';
6
- import type Button from '@semcore/button';
4
+ import type { NSButton } from '@semcore/button';
7
5
  import type Checkbox from '@semcore/checkbox';
8
6
  import type { UnknownProperties, Intergalactic, PropGetterFn } from '@semcore/core';
9
7
  import type { WithI18nEnhanceProps } from '@semcore/core/lib/utils/enhances/i18nEnhance';
10
8
  import type Divider from '@semcore/divider';
11
9
  import type { DropdownProps, DropdownTriggerProps } from '@semcore/dropdown';
12
- import type { InputProps, InputValueProps } from '@semcore/input';
10
+ import type { NSInput } from '@semcore/input';
13
11
  import type Input from '@semcore/input';
14
- import type { InputMaskValueProps } from '@semcore/input-mask';
12
+ import type { NSInputMask } from '@semcore/input-mask';
15
13
  import type { TooltipProps } from '@semcore/tooltip';
16
14
  import type dayjs from 'dayjs';
17
15
  import type { ChangeEvent } from 'react';
@@ -25,7 +23,7 @@ export type DateConstructorParams = string | number | Date;
25
23
  * */
26
24
  export type DisabledDates = (DateConstructorParams | (DateConstructorParams | false)[] | string)[];
27
25
 
28
- export type CalendarProps = BoxProps & {
26
+ export type CalendarProps = NSBox.Props & {
29
27
  /**
30
28
  * Locale for displaying the days of a week and months, to be transferred to `Intl`
31
29
  * @default en
@@ -64,7 +62,7 @@ export type CalendarMonthsContext = {
64
62
  months: CalendarUnitProps[];
65
63
  };
66
64
 
67
- export type CalendarUnitProps = BoxProps & {
65
+ export type CalendarUnitProps = NSBox.Props & {
68
66
  /** Indicates if the calendar unit is part of a selected date range */
69
67
  selected?: boolean;
70
68
  /** Marks units from previous/next months that appear in the current month view */
@@ -222,10 +220,10 @@ WithI18nEnhanceProps & {
222
220
  * [{value: [new Date(), new Date()], children: "Today"}]
223
221
  * @default Past 2 days / Past week / Past 2 week / Past month / Past 2 month
224
222
  * */
225
- periods?: (ButtonProps & { value: Date[] })[];
223
+ periods?: (NSButton.Props & { value: Date[] })[];
226
224
  };
227
225
 
228
- export type DateRangePickerPeriodProps = BoxProps & {
226
+ export type DateRangePickerPeriodProps = NSBox.Props & {
229
227
  /**
230
228
  * Current selected period
231
229
  * */
@@ -247,7 +245,7 @@ export type DateRangePickerPeriodProps = BoxProps & {
247
245
  * [{value: [new Date(), new Date()], children: "Today"}]
248
246
  * @default Past 2 days / Past week / Past 2 week / Past month / Past 2 month
249
247
  * */
250
- periods?: (ButtonProps & { value: Date[] })[];
248
+ periods?: (NSButton.Props & { value: Date[] })[];
251
249
  };
252
250
 
253
251
  export type DatePickerContext = {
@@ -272,7 +270,7 @@ export type DatePickerHandlers = {
272
270
  visible: (index: boolean) => void;
273
271
  };
274
272
 
275
- export type BaseInputTriggerProps = InputProps &
273
+ export type BaseInputTriggerProps = NSInput.Props &
276
274
  TooltipProps & {
277
275
  /**
278
276
  * Date input placeholder characters
@@ -313,9 +311,9 @@ declare const InputTrigger: Intergalactic.Component<
313
311
  > & {
314
312
  Addon: typeof Input.Addon;
315
313
  Value: typeof Input.Value;
316
- SingleDateInput: Intergalactic.Component<'div', InputProps & SingleDateInputProps> & {
314
+ SingleDateInput: Intergalactic.Component<'div', NSInput.Props & SingleDateInputProps> & {
317
315
  Indicator: typeof Input.Addon;
318
- MaskedInput: Intergalactic.Component<'input', InputMaskValueProps & DatePickerMaskedInputProps>;
316
+ MaskedInput: Intergalactic.Component<'input', NSInputMask.Value.Props & DatePickerMaskedInputProps>;
319
317
  };
320
318
  };
321
319
 
@@ -325,16 +323,16 @@ declare const RangeInputTrigger: Intergalactic.Component<
325
323
  > & {
326
324
  Addon: typeof Input.Addon;
327
325
  Value: typeof Input.Value;
328
- DateRange: Intergalactic.Component<'div', InputValueProps & DateRangeProps> & {
326
+ DateRange: Intergalactic.Component<'div', NSInput.Value.Props & DateRangeProps> & {
329
327
  Indicator: typeof Input.Addon;
330
328
  RangeSep: typeof Input.Addon;
331
329
  FromMaskedInput: Intergalactic.Component<
332
330
  'input',
333
- InputMaskValueProps & DatePickerMaskedInputProps
331
+ NSInputMask.Value.Props & DatePickerMaskedInputProps
334
332
  >;
335
333
  ToMaskedInput: Intergalactic.Component<
336
334
  'input',
337
- InputMaskValueProps & DatePickerMaskedInputProps
335
+ NSInputMask.Value.Props & DatePickerMaskedInputProps
338
336
  >;
339
337
  };
340
338
  };
@@ -350,13 +348,13 @@ declare const DatePicker: Intergalactic.Component<
350
348
  Text: typeof BaseTrigger.Text;
351
349
  };
352
350
  Trigger: typeof InputTrigger;
353
- Popper: typeof Popper.Popper;
354
- Header: typeof Box;
351
+ Popper: NSPopper.Popper.Component;
352
+ Header: NSBox.Component;
355
353
  Title: Intergalactic.Component<'div', DatePickerProps, DatePickerContext>;
356
- Prev: typeof Button;
357
- Next: typeof Button;
354
+ Prev: NSButton.Component;
355
+ Next: NSButton.Component;
358
356
  Calendar: typeof Calendar;
359
- Today: typeof Box;
357
+ Today: NSBox.Component;
360
358
  add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;
361
359
  subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;
362
360
  };
@@ -384,15 +382,15 @@ declare const DateRangePicker: Intergalactic.Component<
384
382
  Text: typeof BaseTrigger.Text;
385
383
  };
386
384
  Trigger: typeof RangeInputTrigger;
387
- Popper: typeof Popper.Popper;
388
- Header: typeof Box;
385
+ Popper: NSPopper.Popper.Component;
386
+ Header: NSBox.Component;
389
387
  Title: Intergalactic.Component<'div', DateRangePickerProps, DateRangePickerContext>;
390
- Prev: typeof Button;
391
- Next: typeof Button;
388
+ Prev: NSButton.Component;
389
+ Next: NSButton.Component;
392
390
  Calendar: typeof Calendar;
393
391
  Period: Intergalactic.Component<'div', DateRangePickerPeriodProps>;
394
- Apply: typeof Button;
395
- Reset: typeof Button;
392
+ Apply: NSButton.Component;
393
+ Reset: NSButton.Component;
396
394
  add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;
397
395
  subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;
398
396
  };
@@ -419,11 +417,11 @@ declare const MonthPicker: Intergalactic.Component<
419
417
  Text: typeof BaseTrigger.Text;
420
418
  };
421
419
  Trigger: typeof InputTrigger;
422
- Popper: typeof Popper.Popper;
423
- Header: typeof Box;
420
+ Popper: NSPopper.Popper.Component;
421
+ Header: NSBox.Component;
424
422
  Title: Intergalactic.Component<'div', DatePickerProps, MonthPickerContext>;
425
- Prev: typeof Button;
426
- Next: typeof Button;
423
+ Prev: NSButton.Component;
424
+ Next: NSButton.Component;
427
425
  Calendar: typeof Calendar;
428
426
  add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;
429
427
  subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;
@@ -452,15 +450,15 @@ declare const MonthRangePicker: Intergalactic.Component<
452
450
  Text: typeof BaseTrigger.Text;
453
451
  };
454
452
  Trigger: typeof RangeInputTrigger;
455
- Popper: typeof Popper.Popper;
456
- Header: typeof Box;
453
+ Popper: NSPopper.Popper.Component;
454
+ Header: NSBox.Component;
457
455
  Title: Intergalactic.Component<'div', DateRangePickerProps, MonthRangePickerContext>;
458
- Prev: typeof Button;
459
- Next: typeof Button;
456
+ Prev: NSButton.Component;
457
+ Next: NSButton.Component;
460
458
  Calendar: typeof Calendar;
461
459
  Period: Intergalactic.Component<'div', DateRangePickerPeriodProps>;
462
- Apply: typeof Button;
463
- Reset: typeof Button;
460
+ Apply: NSButton.Component;
461
+ Reset: NSButton.Component;
464
462
  add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;
465
463
  subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;
466
464
  };
@@ -573,7 +571,7 @@ WithI18nEnhanceProps & {
573
571
  * [{value: [new Date(), new Date()], children: "Today"}]
574
572
  * @default Past 2 days / Past week / Past 2 week / Past month / Past 2 month
575
573
  * */
576
- periods?: (ButtonProps & { value: Date[] })[];
574
+ periods?: (NSButton.Props & { value: Date[] })[];
577
575
  };
578
576
 
579
577
  export type DateRangeComparatorContext = {
@@ -605,16 +603,16 @@ declare const DateRangeComparator: Intergalactic.Component<
605
603
  DateRangeComparatorProps,
606
604
  DateRangeComparatorContext & CalendarDaysContext
607
605
  > & {
608
- Popper: typeof Popper.Popper;
609
- Header: typeof Flex;
610
- Prev: typeof Button;
611
- Next: typeof Button;
606
+ Popper: NSPopper.Popper.Component;
607
+ Header: NSFlex.Component;
608
+ Prev: NSButton.Component;
609
+ Next: NSButton.Component;
612
610
  Calendar: typeof Calendar;
613
- Apply: typeof Button;
614
- Reset: typeof Button;
611
+ Apply: NSButton.Component;
612
+ Reset: NSButton.Component;
615
613
 
616
- CalendarHeader: typeof Box;
617
- Title: typeof Box;
614
+ CalendarHeader: NSBox.Component;
615
+ Title: NSBox.Component;
618
616
 
619
617
  Trigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {
620
618
  Addon: typeof BaseTrigger.Addon;
@@ -623,15 +621,15 @@ declare const DateRangeComparator: Intergalactic.Component<
623
621
  ValueDateRange: Intergalactic.Component<'div', InputTriggerProps>;
624
622
  CompareToggle: typeof Checkbox;
625
623
  CompareDateRange: Intergalactic.Component<'div', InputTriggerProps>;
626
- Body: typeof Flex;
627
- RangeCalendar: typeof Flex;
628
- Periods: typeof Flex & {
624
+ Body: NSFlex.Component;
625
+ RangeCalendar: NSFlex.Component;
626
+ Periods: NSFlex.Component & {
629
627
  Divider: typeof Divider;
630
- Column: typeof Flex;
631
- Options: typeof Flex;
632
- Controls: typeof Flex;
628
+ Column: NSFlex.Component;
629
+ Options: NSFlex.Component;
630
+ Controls: NSFlex.Component;
633
631
  };
634
- Footer: typeof Flex;
632
+ Footer: NSFlex.Component;
635
633
  };
636
634
 
637
635
  declare const MonthDateRangeComparator: typeof DateRangeComparator;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/date-picker",
3
3
  "description": "Semrush DatePicker Component",
4
- "version": "17.2.1",
4
+ "version": "18.0.0-prerelease.0",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -14,20 +14,20 @@
14
14
  "require": "./lib/cjs/index.js"
15
15
  },
16
16
  "dependencies": {
17
- "@semcore/base-trigger": "^17.2.1",
18
- "@semcore/button": "^17.2.1",
19
- "@semcore/divider": "^17.2.1",
20
- "@semcore/dropdown": "^17.3.0",
21
- "@semcore/input": "^17.2.1",
22
- "@semcore/input-mask": "^17.2.1",
23
- "@semcore/typography": "^17.2.1",
24
- "@semcore/checkbox": "^17.2.1",
25
- "@semcore/tooltip": "^17.2.1",
17
+ "@semcore/base-trigger": "^18.0.0-prerelease.0",
18
+ "@semcore/button": "^18.0.0-prerelease.0",
19
+ "@semcore/divider": "^18.0.0-prerelease.0",
20
+ "@semcore/dropdown": "^18.0.0-prerelease.0",
21
+ "@semcore/input": "^18.0.0-prerelease.0",
22
+ "@semcore/input-mask": "^18.0.0-prerelease.0",
23
+ "@semcore/typography": "^18.0.0-prerelease.0",
24
+ "@semcore/checkbox": "^18.0.0-prerelease.0",
25
+ "@semcore/tooltip": "^18.0.0-prerelease.0",
26
26
  "dayjs": "1.8.36"
27
27
  },
28
28
  "peerDependencies": {
29
- "@semcore/base-components": "^17.2.1",
30
- "@semcore/icon": "^17.2.0"
29
+ "@semcore/base-components": "^18.0.0-prerelease.0",
30
+ "@semcore/icon": "^18.0.0-prerelease.0"
31
31
  },
32
32
  "repository": {
33
33
  "type": "git",
@@ -35,10 +35,10 @@
35
35
  "directory": "semcore/date-picker"
36
36
  },
37
37
  "devDependencies": {
38
- "@semcore/core": "17.2.1",
39
- "@semcore/base-components": "17.2.1",
40
38
  "@semcore/testing-utils": "1.0.0",
41
- "@semcore/icon": "17.2.0"
39
+ "@semcore/base-components": "18.0.0-prerelease.0",
40
+ "@semcore/core": "18.0.0-prerelease.0",
41
+ "@semcore/icon": "18.0.0-prerelease.0"
42
42
  },
43
43
  "scripts": {
44
44
  "build": "pnpm semcore-builder --source=js && pnpm vite build"