@caspeco/casper-ui-library 11.3.0 → 12.0.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.
- package/dist/components/accordion/accordion-item.js +10 -10
- package/dist/components/accordion/accordion-panel.js +4 -4
- package/dist/components/accordion/accordion.js +4 -4
- package/dist/components/alert/alert.js +10 -10
- package/dist/components/badge/badge.js +18 -18
- package/dist/components/box/box.js +3 -3
- package/dist/components/breadcrumbs/breadcrumb-item.d.ts.map +1 -1
- package/dist/components/breadcrumbs/breadcrumb-item.js +5 -4
- package/dist/components/breadcrumbs/breadcrumb-link.js +3 -3
- package/dist/components/breadcrumbs/breadcrumbs.d.ts.map +1 -1
- package/dist/components/breadcrumbs/breadcrumbs.js +23 -23
- package/dist/components/button/button.d.ts +1 -1
- package/dist/components/button/button.js +5 -5
- package/dist/components/checkbox/checkbox-icon.js +3 -3
- package/dist/components/checkbox/checkbox.js +7 -7
- package/dist/components/checkbox-group/checkbox-group.js +3 -3
- package/dist/components/collapsible/collapsible.d.ts +1 -1
- package/dist/components/collapsible/collapsible.d.ts.map +1 -1
- package/dist/components/collapsible/collapsible.js +30 -29
- package/dist/components/collapsible/collapsible.translations.d.ts +6 -0
- package/dist/components/collapsible/collapsible.translations.d.ts.map +1 -0
- package/dist/components/collapsible/collapsible.translations.js +54 -0
- package/dist/components/collapsible/types.d.ts +0 -6
- package/dist/components/collapsible/types.d.ts.map +1 -1
- package/dist/components/combobox/combobox-button.d.ts +1 -1
- package/dist/components/combobox/combobox-button.d.ts.map +1 -1
- package/dist/components/combobox/combobox-button.js +66 -64
- package/dist/components/combobox/combobox-item.js +8 -8
- package/dist/components/combobox/combobox-menu.d.ts.map +1 -1
- package/dist/components/combobox/combobox-menu.js +95 -94
- package/dist/components/combobox/combobox.d.ts +1 -1
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/combobox/combobox.js +91 -91
- package/dist/components/combobox/combobox.translations.d.ts +10 -0
- package/dist/components/combobox/combobox.translations.d.ts.map +1 -0
- package/dist/components/combobox/combobox.translations.js +102 -0
- package/dist/components/combobox/index.d.ts +1 -1
- package/dist/components/combobox/index.d.ts.map +1 -1
- package/dist/components/combobox/types.d.ts +0 -15
- package/dist/components/combobox/types.d.ts.map +1 -1
- package/dist/components/date-picker/base-date-picker.d.ts +1 -1
- package/dist/components/date-picker/base-date-picker.d.ts.map +1 -1
- package/dist/components/date-picker/base-date-picker.js +163 -162
- package/dist/components/date-picker/date-multi-picker.d.ts +1 -1
- package/dist/components/date-picker/date-multi-picker.d.ts.map +1 -1
- package/dist/components/date-picker/date-multi-picker.js +20 -21
- package/dist/components/date-picker/date-picker-date-cell.js +27 -27
- package/dist/components/date-picker/date-picker-header.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker-header.js +84 -116
- package/dist/components/date-picker/date-picker-week-cell.js +4 -4
- package/dist/components/date-picker/date-picker.composition.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker.d.ts +1 -1
- package/dist/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker.js +20 -21
- package/dist/components/date-picker/date-picker.translations.d.ts +6 -0
- package/dist/components/date-picker/date-picker.translations.d.ts.map +1 -0
- package/dist/components/date-picker/date-picker.translations.js +54 -0
- package/dist/components/date-picker/date-range-picker.d.ts +1 -1
- package/dist/components/date-picker/date-range-picker.d.ts.map +1 -1
- package/dist/components/date-picker/date-range-picker.js +15 -16
- package/dist/components/date-picker/date-week-picker.d.ts +1 -1
- package/dist/components/date-picker/date-week-picker.d.ts.map +1 -1
- package/dist/components/date-picker/date-week-picker.js +13 -14
- package/dist/components/date-picker/types.d.ts +4 -10
- package/dist/components/date-picker/types.d.ts.map +1 -1
- package/dist/components/divider/divider.js +3 -3
- package/dist/components/drawer/drawer.js +6 -6
- package/dist/components/drawer/inline-drawer.js +4 -4
- package/dist/components/fieldset/fieldset-error-text.js +3 -3
- package/dist/components/fieldset/fieldset-helper-text.js +3 -3
- package/dist/components/fieldset/fieldset-legend.js +3 -3
- package/dist/components/fieldset/fieldset.js +3 -3
- package/dist/components/flex/flex.js +3 -3
- package/dist/components/form-control/form-control.js +3 -3
- package/dist/components/form-control/form-error-message.js +3 -3
- package/dist/components/form-control/form-helper-text.js +3 -3
- package/dist/components/form-control/form-label.js +5 -5
- package/dist/components/grid/grid-item.js +3 -3
- package/dist/components/grid/grid.js +3 -3
- package/dist/components/heading/heading.js +3 -3
- package/dist/components/highlight/highlight.js +3 -3
- package/dist/components/icon/create-icon.js +7 -7
- package/dist/components/icon-button/icon-button.js +4 -4
- package/dist/components/image/image.js +3 -3
- package/dist/components/image-upload/image-upload-dropzone.d.ts +1 -3
- package/dist/components/image-upload/image-upload-dropzone.d.ts.map +1 -1
- package/dist/components/image-upload/image-upload-dropzone.js +75 -74
- package/dist/components/image-upload/image-upload-icons.js +11 -11
- package/dist/components/image-upload/image-upload-modal.d.ts +2 -3
- package/dist/components/image-upload/image-upload-modal.d.ts.map +1 -1
- package/dist/components/image-upload/image-upload-modal.js +69 -69
- package/dist/components/image-upload/image-upload.d.ts +1 -1
- package/dist/components/image-upload/image-upload.d.ts.map +1 -1
- package/dist/components/image-upload/image-upload.js +43 -44
- package/dist/components/image-upload/image-upload.translations.d.ts +12 -0
- package/dist/components/image-upload/image-upload.translations.d.ts.map +1 -0
- package/dist/components/image-upload/image-upload.translations.js +126 -0
- package/dist/components/image-upload/types.d.ts +0 -3
- package/dist/components/image-upload/types.d.ts.map +1 -1
- package/dist/components/input/input.d.ts +1 -1
- package/dist/components/input/input.js +5 -5
- package/dist/components/link/link.js +3 -3
- package/dist/components/list/list-item.js +3 -3
- package/dist/components/list/list.js +3 -3
- package/dist/components/menu/menu-box-button.js +4 -4
- package/dist/components/menu/menu-button.js +4 -4
- package/dist/components/menu/menu-group.js +11 -11
- package/dist/components/menu/menu-icon-button.js +4 -4
- package/dist/components/menu/menu-item.js +7 -7
- package/dist/components/menu/menu-list.js +3 -3
- package/dist/components/menu/menu.js +4 -4
- package/dist/components/message/message.js +8 -8
- package/dist/components/modal/modal-body.js +3 -3
- package/dist/components/modal/modal-close-button.js +5 -5
- package/dist/components/modal/modal-footer.js +3 -3
- package/dist/components/modal/modal-header.js +3 -3
- package/dist/components/modal/modal.js +8 -8
- package/dist/components/navigation-list/navigation-list-item.js +10 -10
- package/dist/components/navigation-list/navigation-list.js +4 -4
- package/dist/components/paginator/paginator.composition.d.ts.map +1 -1
- package/dist/components/paginator/paginator.d.ts +1 -4
- package/dist/components/paginator/paginator.d.ts.map +1 -1
- package/dist/components/paginator/paginator.js +31 -30
- package/dist/components/paginator/paginator.translations.d.ts +7 -0
- package/dist/components/paginator/paginator.translations.d.ts.map +1 -0
- package/dist/components/paginator/paginator.translations.js +66 -0
- package/dist/components/phone-input/country-data.d.ts +2 -2
- package/dist/components/phone-input/country-data.d.ts.map +1 -1
- package/dist/components/phone-input/country-list.js +6 -6
- package/dist/components/phone-input/country-selector.d.ts +1 -4
- package/dist/components/phone-input/country-selector.d.ts.map +1 -1
- package/dist/components/phone-input/country-selector.js +86 -84
- package/dist/components/phone-input/phone-input-helpers.d.ts +4 -5
- package/dist/components/phone-input/phone-input-helpers.d.ts.map +1 -1
- package/dist/components/phone-input/phone-input-helpers.js +33 -34
- package/dist/components/phone-input/phone-input.d.ts +1 -1
- package/dist/components/phone-input/phone-input.d.ts.map +1 -1
- package/dist/components/phone-input/phone-input.js +38 -38
- package/dist/components/phone-input/phone-input.translations.d.ts +10 -0
- package/dist/components/phone-input/phone-input.translations.d.ts.map +1 -0
- package/dist/components/phone-input/phone-input.translations.js +102 -0
- package/dist/components/phone-input/types.d.ts +0 -3
- package/dist/components/phone-input/types.d.ts.map +1 -1
- package/dist/components/phone-input/use-phone-input.d.ts +0 -3
- package/dist/components/phone-input/use-phone-input.d.ts.map +1 -1
- package/dist/components/phone-input/use-phone-input.js +82 -81
- package/dist/components/quantity-button/quantity-button.js +12 -12
- package/dist/components/radio/radio-group.js +4 -4
- package/dist/components/radio/radio.d.ts +1 -1
- package/dist/components/radio/radio.js +14 -14
- package/dist/components/radio-card/radio-card-group.js +3 -3
- package/dist/components/radio-card/radio-card.d.ts +1 -1
- package/dist/components/radio-card/radio-card.js +7 -7
- package/dist/components/rich-text-editor/index.d.ts +1 -1
- package/dist/components/rich-text-editor/index.d.ts.map +1 -1
- package/dist/components/rich-text-editor/rich-text-editor-context.d.ts +0 -2
- package/dist/components/rich-text-editor/rich-text-editor-context.d.ts.map +1 -1
- package/dist/components/rich-text-editor/rich-text-editor-control.d.ts.map +1 -1
- package/dist/components/rich-text-editor/rich-text-editor-control.js +129 -128
- package/dist/components/rich-text-editor/rich-text-editor.d.ts +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.d.ts.map +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.js +22 -25
- package/dist/components/rich-text-editor/{translations.d.ts → rich-text-editor.translations.d.ts} +3 -5
- package/dist/components/rich-text-editor/rich-text-editor.translations.d.ts.map +1 -0
- package/dist/components/rich-text-editor/rich-text-editor.translations.js +234 -0
- package/dist/components/rich-text-editor/rich-text-renderer.js +4 -4
- package/dist/components/rich-text-editor/types.d.ts +0 -2
- package/dist/components/rich-text-editor/types.d.ts.map +1 -1
- package/dist/components/segmented-control/segmented-control.js +5 -5
- package/dist/components/select/select.js +5 -5
- package/dist/components/skeleton/skeleton-text.js +3 -3
- package/dist/components/skeleton/skeleton.js +3 -3
- package/dist/components/spinner/spinner.js +5 -5
- package/dist/components/stack/stack.d.ts +1 -1
- package/dist/components/stack/stack.js +3 -3
- package/dist/components/stepper/step.js +25 -25
- package/dist/components/stepper/stepper.js +8 -8
- package/dist/components/switch/switch.js +6 -6
- package/dist/components/table/table-cell.d.ts +1 -3
- package/dist/components/table/table-cell.d.ts.map +1 -1
- package/dist/components/table/table-cell.js +43 -46
- package/dist/components/table/table-column-resize-handle.d.ts.map +1 -1
- package/dist/components/table/table-column-resize-handle.js +22 -21
- package/dist/components/table/table-content.d.ts.map +1 -1
- package/dist/components/table/table-content.js +81 -79
- package/dist/components/table/table-context-provider.d.ts +1 -4
- package/dist/components/table/table-context-provider.d.ts.map +1 -1
- package/dist/components/table/table-context-provider.js +137 -140
- package/dist/components/table/table-drag-accessibility.d.ts +3 -3
- package/dist/components/table/table-drag-accessibility.d.ts.map +1 -1
- package/dist/components/table/table-drag-accessibility.js +10 -14
- package/dist/components/table/table-filter.d.ts.map +1 -1
- package/dist/components/table/table-filter.js +59 -59
- package/dist/components/table/table-header-dropdown.d.ts +0 -2
- package/dist/components/table/table-header-dropdown.d.ts.map +1 -1
- package/dist/components/table/table-header-dropdown.js +28 -27
- package/dist/components/table/table-header-row.d.ts.map +1 -1
- package/dist/components/table/table-header-row.js +53 -56
- package/dist/components/table/table-row-drag-handle.d.ts +1 -3
- package/dist/components/table/table-row-drag-handle.d.ts.map +1 -1
- package/dist/components/table/table-row-drag-handle.js +10 -9
- package/dist/components/table/table-row-expand-toggle-button.d.ts +1 -3
- package/dist/components/table/table-row-expand-toggle-button.d.ts.map +1 -1
- package/dist/components/table/table-row-expand-toggle-button.js +9 -8
- package/dist/components/table/table-row.d.ts.map +1 -1
- package/dist/components/table/table-row.js +5 -6
- package/dist/components/table/table-sorted-reorder-prompt.d.ts +1 -3
- package/dist/components/table/table-sorted-reorder-prompt.d.ts.map +1 -1
- package/dist/components/table/table-sorted-reorder-prompt.js +26 -25
- package/dist/components/table/table-toolbar-actions.d.ts.map +1 -1
- package/dist/components/table/table-toolbar-actions.js +4 -4
- package/dist/components/table/table-toolbar-add-button.d.ts.map +1 -1
- package/dist/components/table/table-toolbar-add-button.js +4 -4
- package/dist/components/table/table-toolbar-settings.d.ts.map +1 -1
- package/dist/components/table/table-toolbar-settings.js +110 -108
- package/dist/components/table/table-toolbar.js +11 -11
- package/dist/components/table/table.composition.d.ts.map +1 -1
- package/dist/components/table/table.d.ts +1 -1
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/table/table.js +31 -32
- package/dist/components/table/table.translations.d.ts +45 -0
- package/dist/components/table/table.translations.d.ts.map +1 -0
- package/dist/components/table/table.translations.js +522 -0
- package/dist/components/table/types.d.ts +0 -5
- package/dist/components/table/types.d.ts.map +1 -1
- package/dist/components/tabs/tab-list.js +3 -3
- package/dist/components/tabs/tab-panel.js +3 -3
- package/dist/components/tabs/tab-panels.js +3 -3
- package/dist/components/tabs/tab-with-image.js +10 -10
- package/dist/components/tabs/tab.js +4 -4
- package/dist/components/tabs/tabs.js +3 -3
- package/dist/components/tag/tag.js +28 -28
- package/dist/components/text/text.js +3 -3
- package/dist/components/textarea/textarea.js +3 -3
- package/dist/components/toaster/toaster.js +9 -9
- package/dist/components/toggle-button/toggle-button.js +3 -3
- package/dist/components/toggle-button/use-button-children.js +10 -10
- package/dist/components/tooltip/tooltip.d.ts +1 -1
- package/dist/components/tooltip/tooltip.js +8 -8
- package/dist/index.js +404 -402
- package/dist/node_modules/libphonenumber-js/metadata.mobile.json.js +13 -19
- package/dist/test-utils/render-with-theme.d.ts +5 -1
- package/dist/test-utils/render-with-theme.d.ts.map +1 -1
- package/dist/theme/index.d.ts +4 -0
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/locale-provider.d.ts +9 -0
- package/dist/theme/locale-provider.d.ts.map +1 -0
- package/dist/theme/locale-provider.js +14 -0
- package/dist/theme/locale-provider.spec.d.ts +2 -0
- package/dist/theme/locale-provider.spec.d.ts.map +1 -0
- package/dist/theme/theme-locale.d.ts +7 -0
- package/dist/theme/theme-locale.d.ts.map +1 -0
- package/dist/theme/theme-locale.js +8 -0
- package/dist/theme/theme-provider.d.ts +4 -1
- package/dist/theme/theme-provider.d.ts.map +1 -1
- package/dist/theme/theme-provider.js +30 -25
- package/dist/theme/translations.d.ts +14 -0
- package/dist/theme/translations.d.ts.map +1 -0
- package/dist/theme/translations.js +10 -0
- package/dist/theme/translations.spec.d.ts +2 -0
- package/dist/theme/translations.spec.d.ts.map +1 -0
- package/package.json +5 -5
- package/dist/components/collapsible/translations.d.ts +0 -32
- package/dist/components/collapsible/translations.d.ts.map +0 -1
- package/dist/components/collapsible/translations.js +0 -30
- package/dist/components/combobox/translations.d.ts +0 -9
- package/dist/components/combobox/translations.d.ts.map +0 -1
- package/dist/components/combobox/translations.js +0 -57
- package/dist/components/image-upload/translations.d.ts +0 -73
- package/dist/components/image-upload/translations.d.ts.map +0 -1
- package/dist/components/image-upload/translations.js +0 -66
- package/dist/components/paginator/translations.d.ts +0 -9
- package/dist/components/paginator/translations.d.ts.map +0 -1
- package/dist/components/paginator/translations.js +0 -36
- package/dist/components/phone-input/translations.d.ts +0 -60
- package/dist/components/phone-input/translations.d.ts.map +0 -1
- package/dist/components/phone-input/translations.js +0 -54
- package/dist/components/rich-text-editor/translations.d.ts.map +0 -1
- package/dist/components/rich-text-editor/translations.js +0 -120
- package/dist/components/table/translations.d.ts +0 -308
- package/dist/components/table/translations.d.ts.map +0 -1
- package/dist/components/table/translations.js +0 -267
|
@@ -4,5 +4,5 @@ import { DateMultiPickerProps } from './types.js';
|
|
|
4
4
|
*
|
|
5
5
|
* @see Docs https://caspeco.github.io/casper-ui-library/components/date-picker#datemultipicker
|
|
6
6
|
*/
|
|
7
|
-
export declare const DateMultiPicker: ({
|
|
7
|
+
export declare const DateMultiPicker: ({ canSelectPastDates, dots, isExpanded, markSundayRed, onMonthChange, weekNumbers, showDaysOutsideMonth, selectedMonth, onDatesChange, selectedDates, shouldDisableDate, strikeThroughDates, isDisabled, redDays, disablePastMonths, disableBackwardNavigation, disableForwardNavigation, }: DateMultiPickerProps) => import('react').JSX.Element;
|
|
8
8
|
//# sourceMappingURL=date-multi-picker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-multi-picker.d.ts","sourceRoot":"","sources":["../../../lib/components/date-picker/date-multi-picker.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD;;;;GAIG;AAEH,eAAO,MAAM,eAAe,GAAI,
|
|
1
|
+
{"version":3,"file":"date-multi-picker.d.ts","sourceRoot":"","sources":["../../../lib/components/date-picker/date-multi-picker.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD;;;;GAIG;AAEH,eAAO,MAAM,eAAe,GAAI,6RAkB7B,oBAAoB,gCA6BtB,CAAC"}
|
|
@@ -3,34 +3,33 @@ import { BaseDatePicker as t } from "./base-date-picker.js";
|
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
4
|
//#region lib/components/date-picker/date-multi-picker.tsx
|
|
5
5
|
var r = e(), i = (e) => {
|
|
6
|
-
let i = (0, r.c)(
|
|
7
|
-
return i[0] !==
|
|
6
|
+
let i = (0, r.c)(18), { canSelectPastDates: a, dots: o, isExpanded: s, markSundayRed: c, onMonthChange: l, weekNumbers: u, showDaysOutsideMonth: d, selectedMonth: f, onDatesChange: p, selectedDates: m, shouldDisableDate: h, strikeThroughDates: g, isDisabled: _, redDays: v, disablePastMonths: y, disableBackwardNavigation: b, disableForwardNavigation: x } = e, S;
|
|
7
|
+
return i[0] !== a || i[1] !== b || i[2] !== x || i[3] !== y || i[4] !== o || i[5] !== _ || i[6] !== s || i[7] !== c || i[8] !== p || i[9] !== l || i[10] !== v || i[11] !== m || i[12] !== f || i[13] !== h || i[14] !== d || i[15] !== g || i[16] !== u ? (S = /* @__PURE__ */ n(t, {
|
|
8
8
|
isMultiSelect: !0,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
redDays: y,
|
|
9
|
+
canSelectPastDates: a,
|
|
10
|
+
dots: o,
|
|
11
|
+
isExpanded: s,
|
|
12
|
+
markSundayRed: c,
|
|
13
|
+
onMonthChange: l,
|
|
14
|
+
weekNumbers: u,
|
|
15
|
+
showDaysOutsideMonth: d,
|
|
16
|
+
selectedMonth: f,
|
|
17
|
+
onDatesChange: p,
|
|
18
|
+
selectedDates: m,
|
|
19
|
+
shouldDisableDate: h,
|
|
20
|
+
strikeThroughDates: g,
|
|
21
|
+
redDays: v,
|
|
23
22
|
isRangeDate: !1,
|
|
24
23
|
selectWeek: !1,
|
|
25
|
-
isDisabled:
|
|
24
|
+
isDisabled: _,
|
|
26
25
|
selectedDate: void 0,
|
|
27
26
|
onDateChange: void 0,
|
|
28
27
|
dateRange: void 0,
|
|
29
28
|
onRangeChange: void 0,
|
|
30
|
-
disablePastMonths:
|
|
31
|
-
disableBackwardNavigation:
|
|
32
|
-
disableForwardNavigation:
|
|
33
|
-
}), i[0] =
|
|
29
|
+
disablePastMonths: y,
|
|
30
|
+
disableBackwardNavigation: b,
|
|
31
|
+
disableForwardNavigation: x
|
|
32
|
+
}), i[0] = a, i[1] = b, i[2] = x, i[3] = y, i[4] = o, i[5] = _, i[6] = s, i[7] = c, i[8] = p, i[9] = l, i[10] = v, i[11] = m, i[12] = f, i[13] = h, i[14] = d, i[15] = g, i[16] = u, i[17] = S) : S = i[17], S;
|
|
34
33
|
};
|
|
35
34
|
//#endregion
|
|
36
35
|
export { i as DateMultiPicker };
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { require_compiler_runtime as
|
|
2
|
-
import { ThemeRadiusToken as
|
|
3
|
-
import { ThemeColorVariable as
|
|
1
|
+
import { require_compiler_runtime as ee } from "../../node_modules/react/compiler-runtime.js";
|
|
2
|
+
import { ThemeRadiusToken as e } from "../../theme/theme-tokens.js";
|
|
3
|
+
import { ThemeColorVariable as t, ThemeSpaceVariable as n } from "../../theme/theme-types.js";
|
|
4
4
|
import te from "../../node_modules/date-fns/format.js";
|
|
5
5
|
import r from "../../node_modules/date-fns/isToday.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { Fragment as ne, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
|
+
import { Box as o, Button as re, Stack as ie, useRecipe as ae } from "@chakra-ui/react";
|
|
8
8
|
//#region lib/components/date-picker/date-picker-date-cell.tsx
|
|
9
|
-
var oe =
|
|
10
|
-
let s = (0, oe.c)(63), { gridColumn: c, gridRow: l, gridIndex: se, day: u, handleDateChange: d, variant: f, isDisabled: ce, isStrikeThrough: p, hasBlueDot: m, hasYellowDot: h, hasGreenDot: g, hasGreyDot: _, hasRedDot: v, selectWeek: y, isHoliday: b } =
|
|
9
|
+
var oe = ee(), s = (ee) => {
|
|
10
|
+
let s = (0, oe.c)(63), { gridColumn: c, gridRow: l, gridIndex: se, day: u, handleDateChange: d, variant: f, isDisabled: ce, isStrikeThrough: p, hasBlueDot: m, hasYellowDot: h, hasGreenDot: g, hasGreyDot: _, hasRedDot: v, selectWeek: y, isHoliday: b } = ee, x = y ? "dateCellWeek" : "dateCell", S;
|
|
11
11
|
s[0] === x ? S = s[1] : (S = { key: x }, s[0] = x, s[1] = S);
|
|
12
|
-
let C =
|
|
12
|
+
let C = ae(S), w;
|
|
13
13
|
s[2] !== C || s[3] !== f ? (w = C({ variant: f }), s[2] = C, s[3] = f, s[4] = w) : w = s[4];
|
|
14
14
|
let T = w, E = ce || p, D = (f === "selectedDay" || f === "startDateRange" || f === "endDateRange") && !y, O = se % 7 == 6, k;
|
|
15
15
|
s[5] !== O || s[6] !== y || s[7] !== f ? (k = y && f === "selectedDay" && O ? {
|
|
16
|
-
borderTopRightRadius:
|
|
17
|
-
borderBottomRightRadius:
|
|
16
|
+
borderTopRightRadius: e.Medium,
|
|
17
|
+
borderBottomRightRadius: e.Medium
|
|
18
18
|
} : {}, s[5] = O, s[6] = y, s[7] = f, s[8] = k) : k = s[8];
|
|
19
19
|
let A = k, j = D ? "solid 1.5px white" : "", M = D ? "7.5px" : "6px", N = D ? "7.5px" : "6px", P;
|
|
20
20
|
s[9] !== j || s[10] !== M || s[11] !== N ? (P = {
|
|
@@ -32,7 +32,7 @@ var oe = e(), s = (e) => {
|
|
|
32
32
|
...T,
|
|
33
33
|
...A
|
|
34
34
|
}, s[17] = A, s[18] = T, s[19] = R) : R = s[19];
|
|
35
|
-
let z = b ? "holiday" : void 0, B = b ?
|
|
35
|
+
let z = b ? "holiday" : void 0, B = b ? t.Error : "inherit", V;
|
|
36
36
|
s[20] === B ? V = s[21] : (V = {
|
|
37
37
|
lineHeight: "1.5",
|
|
38
38
|
color: B
|
|
@@ -40,7 +40,7 @@ var oe = e(), s = (e) => {
|
|
|
40
40
|
let H = r(u) ? "bold" : "normal", U = r(u) ? "underline" : "none", W;
|
|
41
41
|
s[22] === u ? W = s[23] : (W = te(u, "d"), s[22] = u, s[23] = W);
|
|
42
42
|
let G;
|
|
43
|
-
s[24] !== z || s[25] !== V || s[26] !== H || s[27] !== U || s[28] !== W ? (G = /* @__PURE__ */
|
|
43
|
+
s[24] !== z || s[25] !== V || s[26] !== H || s[27] !== U || s[28] !== W ? (G = /* @__PURE__ */ i(o, {
|
|
44
44
|
"data-testid": z,
|
|
45
45
|
css: V,
|
|
46
46
|
fontWeight: H,
|
|
@@ -48,38 +48,38 @@ var oe = e(), s = (e) => {
|
|
|
48
48
|
children: W
|
|
49
49
|
}), s[24] = z, s[25] = V, s[26] = H, s[27] = U, s[28] = W, s[29] = G) : G = s[29];
|
|
50
50
|
let K;
|
|
51
|
-
s[30] === p ? K = s[31] : (K = p && /* @__PURE__ */
|
|
51
|
+
s[30] === p ? K = s[31] : (K = p && /* @__PURE__ */ i("span", {}), s[30] = p, s[31] = K);
|
|
52
52
|
let q;
|
|
53
|
-
s[32] !== F || s[33] !== m ? (q = m && /* @__PURE__ */
|
|
53
|
+
s[32] !== F || s[33] !== m ? (q = m && /* @__PURE__ */ i(o, { css: {
|
|
54
54
|
...F,
|
|
55
|
-
backgroundColor:
|
|
55
|
+
backgroundColor: t.Info
|
|
56
56
|
} }), s[32] = F, s[33] = m, s[34] = q) : q = s[34];
|
|
57
57
|
let J;
|
|
58
|
-
s[35] !== F || s[36] !== g ? (J = g && /* @__PURE__ */
|
|
58
|
+
s[35] !== F || s[36] !== g ? (J = g && /* @__PURE__ */ i(o, { css: {
|
|
59
59
|
...F,
|
|
60
|
-
backgroundColor:
|
|
60
|
+
backgroundColor: t.Success
|
|
61
61
|
} }), s[35] = F, s[36] = g, s[37] = J) : J = s[37];
|
|
62
62
|
let Y;
|
|
63
|
-
s[38] !== F || s[39] !== h ? (Y = h && /* @__PURE__ */
|
|
63
|
+
s[38] !== F || s[39] !== h ? (Y = h && /* @__PURE__ */ i(o, { css: {
|
|
64
64
|
...F,
|
|
65
|
-
backgroundColor:
|
|
65
|
+
backgroundColor: t.Warning
|
|
66
66
|
} }), s[38] = F, s[39] = h, s[40] = Y) : Y = s[40];
|
|
67
67
|
let X;
|
|
68
|
-
s[41] !== F || s[42] !== _ ? (X = _ && /* @__PURE__ */
|
|
68
|
+
s[41] !== F || s[42] !== _ ? (X = _ && /* @__PURE__ */ i(o, { css: {
|
|
69
69
|
...F,
|
|
70
|
-
backgroundColor:
|
|
70
|
+
backgroundColor: t.Neutral
|
|
71
71
|
} }), s[41] = F, s[42] = _, s[43] = X) : X = s[43];
|
|
72
72
|
let Z;
|
|
73
|
-
s[44] !== F || s[45] !== v ? (Z = v && /* @__PURE__ */
|
|
73
|
+
s[44] !== F || s[45] !== v ? (Z = v && /* @__PURE__ */ i(o, { css: {
|
|
74
74
|
...F,
|
|
75
|
-
backgroundColor:
|
|
75
|
+
backgroundColor: t.Error
|
|
76
76
|
} }), s[44] = F, s[45] = v, s[46] = Z) : Z = s[46];
|
|
77
77
|
let Q;
|
|
78
|
-
s[47] !== q || s[48] !== J || s[49] !== Y || s[50] !== X || s[51] !== Z ? (Q = /* @__PURE__ */
|
|
78
|
+
s[47] !== q || s[48] !== J || s[49] !== Y || s[50] !== X || s[51] !== Z ? (Q = /* @__PURE__ */ a(ie, {
|
|
79
79
|
position: "absolute",
|
|
80
|
-
bottom:
|
|
80
|
+
bottom: n.XSmall,
|
|
81
81
|
direction: "row",
|
|
82
|
-
gap:
|
|
82
|
+
gap: n.XSmall,
|
|
83
83
|
children: [
|
|
84
84
|
q,
|
|
85
85
|
J,
|
|
@@ -89,7 +89,7 @@ var oe = e(), s = (e) => {
|
|
|
89
89
|
]
|
|
90
90
|
}), s[47] = q, s[48] = J, s[49] = Y, s[50] = X, s[51] = Z, s[52] = Q) : Q = s[52];
|
|
91
91
|
let $;
|
|
92
|
-
return s[53] !== E || s[54] !== c || s[55] !== l || s[56] !== L || s[57] !== R || s[58] !== G || s[59] !== K || s[60] !== Q || s[61] !== f ? ($ = /* @__PURE__ */
|
|
92
|
+
return s[53] !== E || s[54] !== c || s[55] !== l || s[56] !== L || s[57] !== R || s[58] !== G || s[59] !== K || s[60] !== Q || s[61] !== f ? ($ = /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ a(re, {
|
|
93
93
|
css: R,
|
|
94
94
|
type: "button",
|
|
95
95
|
disabled: E,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker-header.d.ts","sourceRoot":"","sources":["../../../lib/components/date-picker/date-picker-header.tsx"],"names":[],"mappings":"AAKA,OAAO,EAeN,KAAK,MAAM,EACX,MAAM,UAAU,CAAC;AAGlB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"date-picker-header.d.ts","sourceRoot":"","sources":["../../../lib/components/date-picker/date-picker-header.tsx"],"names":[],"mappings":"AAKA,OAAO,EAeN,KAAK,MAAM,EACX,MAAM,UAAU,CAAC;AAGlB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIzC,KAAK,qBAAqB,GAAG;IAC5B,aAAa,EAAE,IAAI,CAAC;IACpB,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACpC,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,IAAI,CAAC;IACnB,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,OAAO,CAAC;IAC3B,yBAAyB,EAAE,OAAO,CAAC;IACnC,wBAAwB,EAAE,OAAO,CAAC;IAClC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;CAC/C,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,wMAc9B,qBAAqB,gCA+GvB,CAAC"}
|
|
@@ -1,157 +1,125 @@
|
|
|
1
1
|
import { require_compiler_runtime as e } from "../../node_modules/react/compiler-runtime.js";
|
|
2
|
-
import { ThemeFontSizeVariable as
|
|
3
|
-
import { BackIcon as
|
|
4
|
-
import { ForwardIcon as
|
|
5
|
-
import { Button as
|
|
6
|
-
import { IconButton as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import _e from "../../node_modules/date-fns/locale/nb.js";
|
|
27
|
-
import ve from "../../node_modules/date-fns/locale/nl-BE.js";
|
|
28
|
-
import ye from "../../node_modules/date-fns/locale/sv.js";
|
|
29
|
-
import { firstLetterUpperCase as be } from "./helper.js";
|
|
30
|
-
import { Flex as u, Text as xe } from "@chakra-ui/react";
|
|
2
|
+
import { ThemeFontSizeVariable as t, ThemeFontVariable as ee, ThemeSpaceVariable as n } from "../../theme/theme-types.js";
|
|
3
|
+
import { BackIcon as te } from "../icon/icons/back-icon.js";
|
|
4
|
+
import { ForwardIcon as ne } from "../icon/icons/forward-icon.js";
|
|
5
|
+
import { Button as re } from "../button/button.js";
|
|
6
|
+
import { IconButton as r } from "../icon-button/icon-button.js";
|
|
7
|
+
import { useComponentTranslations as i } from "../../theme/translations.js";
|
|
8
|
+
import { addDays as a } from "../../node_modules/date-fns/addDays.js";
|
|
9
|
+
import { addMonths as ie } from "../../node_modules/date-fns/addMonths.js";
|
|
10
|
+
import ae from "../../node_modules/date-fns/startOfDay.js";
|
|
11
|
+
import { addWeeks as oe } from "../../node_modules/date-fns/addWeeks.js";
|
|
12
|
+
import se from "../../node_modules/date-fns/isSameDay.js";
|
|
13
|
+
import o from "../../node_modules/date-fns/startOfMonth.js";
|
|
14
|
+
import ce from "../../node_modules/date-fns/locale/en-US.js";
|
|
15
|
+
import le from "../../node_modules/date-fns/getISOWeek.js";
|
|
16
|
+
import s from "../../node_modules/date-fns/format.js";
|
|
17
|
+
import ue from "../../node_modules/date-fns/isBefore.js";
|
|
18
|
+
import de from "../../node_modules/date-fns/isSameMonth.js";
|
|
19
|
+
import c from "../../node_modules/date-fns/isSameYear.js";
|
|
20
|
+
import l from "../../node_modules/date-fns/subDays.js";
|
|
21
|
+
import fe from "../../node_modules/date-fns/subMonths.js";
|
|
22
|
+
import pe from "../../node_modules/date-fns/subWeeks.js";
|
|
23
|
+
import me from "../../node_modules/date-fns/locale/en-GB.js";
|
|
24
|
+
import { firstLetterUpperCase as u } from "./helper.js";
|
|
25
|
+
import { datePickerTranslations as he } from "./date-picker.translations.js";
|
|
31
26
|
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
27
|
+
import { Flex as p, Text as ge } from "@chakra-ui/react";
|
|
32
28
|
//#region lib/components/date-picker/date-picker-header.tsx
|
|
33
|
-
var
|
|
34
|
-
let
|
|
35
|
-
|
|
36
|
-
switch (e) {
|
|
37
|
-
case _e: return "Uke";
|
|
38
|
-
case s: return "Uge";
|
|
39
|
-
case ye: return "Vecka";
|
|
40
|
-
case ge: return "Semaine";
|
|
41
|
-
case c: return "Woche";
|
|
42
|
-
case ve:
|
|
43
|
-
case i:
|
|
44
|
-
case l:
|
|
45
|
-
default: return "Week";
|
|
46
|
-
}
|
|
47
|
-
}, p[0] = D) : D = p[0];
|
|
48
|
-
let Ce = D, O;
|
|
49
|
-
p[1] === Symbol.for("react.memo_cache_sentinel") ? (O = function(e) {
|
|
50
|
-
switch (e) {
|
|
51
|
-
case _e:
|
|
52
|
-
case s:
|
|
53
|
-
case ye: return "I dag";
|
|
54
|
-
case ge: return "Aujourd'hui";
|
|
55
|
-
case ve: return "Vandaag";
|
|
56
|
-
case c: return "Heute";
|
|
57
|
-
case i:
|
|
58
|
-
case l:
|
|
59
|
-
default: return "Today";
|
|
60
|
-
}
|
|
61
|
-
}, p[1] = O) : O = p[1];
|
|
62
|
-
let we = O, k;
|
|
63
|
-
p[2] === Symbol.for("react.memo_cache_sentinel") ? (k = function(e) {
|
|
29
|
+
var _e = e(), m = (e) => {
|
|
30
|
+
let m = (0, _e.c)(66), { onMonthChange: h, selectedMonth: g, month: _, selectWeek: v, locale: y, selectedDate: b, onDateChange: x, isExpanded: S, disablePastMonths: C, disableBackwardNavigation: w, disableForwardNavigation: T, dateRange: E, onRangeChange: D } = e, O = i(he), k;
|
|
31
|
+
m[0] === Symbol.for("react.memo_cache_sentinel") ? (k = function(e) {
|
|
64
32
|
return !!e?.startDate && !!e?.endDate;
|
|
65
|
-
},
|
|
66
|
-
let A = !
|
|
67
|
-
|
|
68
|
-
return
|
|
69
|
-
},
|
|
33
|
+
}, m[0] = k) : k = m[0];
|
|
34
|
+
let A = !v && k(E) && D, j;
|
|
35
|
+
m[1] === y ? j = m[2] : (j = function(e) {
|
|
36
|
+
return c(e.startDate, e.endDate) ? y === me || y === ce ? "MMM d" : "d MMM" : "PP";
|
|
37
|
+
}, m[1] = y, m[2] = j);
|
|
70
38
|
let M = j, N;
|
|
71
|
-
|
|
72
|
-
if (
|
|
73
|
-
if (
|
|
39
|
+
m[3] !== E || m[4] !== M || m[5] !== A || m[6] !== S || m[7] !== y || m[8] !== _ || m[9] !== v || m[10] !== b || m[11] !== O ? (N = () => {
|
|
40
|
+
if (S) return u(_);
|
|
41
|
+
if (v) return O.week(le(b));
|
|
74
42
|
if (A) {
|
|
75
|
-
let e = M(
|
|
76
|
-
return `${
|
|
43
|
+
let e = M(E);
|
|
44
|
+
return `${s(E.startDate, e, { locale: y })} - ${s(E.endDate, e, { locale: y })}`.replace(/\./g, "");
|
|
77
45
|
}
|
|
78
|
-
return
|
|
79
|
-
},
|
|
46
|
+
return b ? s(b, "dd MMMM", { locale: y }) : u(_);
|
|
47
|
+
}, m[3] = E, m[4] = M, m[5] = A, m[6] = S, m[7] = y, m[8] = _, m[9] = v, m[10] = b, m[11] = O, m[12] = N) : N = m[12];
|
|
80
48
|
let P = N, F;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
startDate:
|
|
84
|
-
endDate:
|
|
85
|
-
}) :
|
|
86
|
-
},
|
|
49
|
+
m[13] !== E || m[14] !== A || m[15] !== S || m[16] !== x || m[17] !== h || m[18] !== D || m[19] !== v || m[20] !== b || m[21] !== g ? (F = () => {
|
|
50
|
+
S ? h(fe(o(g), 1)) : v ? x(pe(b, 1)) : A ? D({
|
|
51
|
+
startDate: l(E.startDate, 1),
|
|
52
|
+
endDate: l(E.endDate, 1)
|
|
53
|
+
}) : x(l(b, 1));
|
|
54
|
+
}, m[13] = E, m[14] = A, m[15] = S, m[16] = x, m[17] = h, m[18] = D, m[19] = v, m[20] = b, m[21] = g, m[22] = F) : F = m[22];
|
|
87
55
|
let I = F, L;
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
startDate:
|
|
91
|
-
endDate:
|
|
92
|
-
}) :
|
|
93
|
-
},
|
|
56
|
+
m[23] !== E || m[24] !== A || m[25] !== S || m[26] !== x || m[27] !== h || m[28] !== D || m[29] !== v || m[30] !== b || m[31] !== g ? (L = () => {
|
|
57
|
+
S ? h(ie(o(g), 1)) : v ? x(oe(b, 1)) : A ? D({
|
|
58
|
+
startDate: a(E.startDate, 1),
|
|
59
|
+
endDate: a(E.endDate, 1)
|
|
60
|
+
}) : x(a(b, 1));
|
|
61
|
+
}, m[23] = E, m[24] = A, m[25] = S, m[26] = x, m[27] = h, m[28] = D, m[29] = v, m[30] = b, m[31] = g, m[32] = L) : L = m[32];
|
|
94
62
|
let R = L, z;
|
|
95
|
-
if (
|
|
96
|
-
let e =
|
|
97
|
-
z =
|
|
98
|
-
} else z =
|
|
63
|
+
if (m[33] !== w || m[34] !== C || m[35] !== g) {
|
|
64
|
+
let e = o(/* @__PURE__ */ new Date());
|
|
65
|
+
z = w || C && (ue(g, e) || de(g, e)), m[33] = w, m[34] = C, m[35] = g, m[36] = z;
|
|
66
|
+
} else z = m[36];
|
|
99
67
|
let B = z, V, H;
|
|
100
|
-
|
|
68
|
+
m[37] === b ? (V = m[38], H = m[39]) : (H = ae(/* @__PURE__ */ new Date()), V = se(b, H), m[37] = b, m[38] = V, m[39] = H);
|
|
101
69
|
let U = !V, W;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
},
|
|
70
|
+
m[40] !== x || m[41] !== H ? (W = () => {
|
|
71
|
+
x(H);
|
|
72
|
+
}, m[40] = x, m[41] = H, m[42] = W) : W = m[42];
|
|
105
73
|
let G = W, K;
|
|
106
|
-
|
|
74
|
+
m[43] === P ? K = m[44] : (K = P(), m[43] = P, m[44] = K);
|
|
107
75
|
let q;
|
|
108
|
-
|
|
76
|
+
m[45] === K ? q = m[46] : (q = /* @__PURE__ */ d(ge, {
|
|
109
77
|
fontWeight: "500",
|
|
110
|
-
fontFamily:
|
|
111
|
-
fontSize:
|
|
78
|
+
fontFamily: ee.SubHeader,
|
|
79
|
+
fontSize: t.Large,
|
|
112
80
|
children: K
|
|
113
|
-
}),
|
|
81
|
+
}), m[45] = K, m[46] = q);
|
|
114
82
|
let J;
|
|
115
|
-
|
|
83
|
+
m[47] !== U || m[48] !== G || m[49] !== O ? (J = U && /* @__PURE__ */ d(re, {
|
|
116
84
|
variant: "ghost",
|
|
117
85
|
size: "sm",
|
|
118
86
|
onClick: G,
|
|
119
|
-
children:
|
|
120
|
-
}),
|
|
87
|
+
children: O.today
|
|
88
|
+
}), m[47] = U, m[48] = G, m[49] = O, m[50] = J) : J = m[50];
|
|
121
89
|
let Y;
|
|
122
|
-
|
|
123
|
-
icon:
|
|
90
|
+
m[51] !== I || m[52] !== B ? (Y = /* @__PURE__ */ d(r, {
|
|
91
|
+
icon: te,
|
|
124
92
|
"aria-label": "Back",
|
|
125
93
|
variant: "ghost",
|
|
126
94
|
onClick: I,
|
|
127
95
|
isDisabled: B
|
|
128
|
-
}),
|
|
96
|
+
}), m[51] = I, m[52] = B, m[53] = Y) : Y = m[53];
|
|
129
97
|
let X;
|
|
130
|
-
|
|
131
|
-
icon:
|
|
98
|
+
m[54] !== T || m[55] !== R ? (X = /* @__PURE__ */ d(r, {
|
|
99
|
+
icon: ne,
|
|
132
100
|
"aria-label": "Forward",
|
|
133
101
|
variant: "ghost",
|
|
134
102
|
onClick: R,
|
|
135
|
-
isDisabled:
|
|
136
|
-
}),
|
|
103
|
+
isDisabled: T
|
|
104
|
+
}), m[54] = T, m[55] = R, m[56] = X) : X = m[56];
|
|
137
105
|
let Z;
|
|
138
|
-
|
|
106
|
+
m[57] !== Y || m[58] !== X ? (Z = /* @__PURE__ */ f(p, {
|
|
139
107
|
align: "center",
|
|
140
108
|
children: [Y, X]
|
|
141
|
-
}),
|
|
109
|
+
}), m[57] = Y, m[58] = X, m[59] = Z) : Z = m[59];
|
|
142
110
|
let Q;
|
|
143
|
-
|
|
111
|
+
m[60] !== J || m[61] !== Z ? (Q = /* @__PURE__ */ f(p, {
|
|
144
112
|
align: "center",
|
|
145
|
-
gap:
|
|
113
|
+
gap: n.Small,
|
|
146
114
|
children: [J, Z]
|
|
147
|
-
}),
|
|
115
|
+
}), m[60] = J, m[61] = Z, m[62] = Q) : Q = m[62];
|
|
148
116
|
let $;
|
|
149
|
-
return
|
|
117
|
+
return m[63] !== q || m[64] !== Q ? ($ = /* @__PURE__ */ f(p, {
|
|
150
118
|
justify: "space-between",
|
|
151
119
|
align: "center",
|
|
152
|
-
mb:
|
|
120
|
+
mb: n.Small,
|
|
153
121
|
children: [q, Q]
|
|
154
|
-
}),
|
|
122
|
+
}), m[63] = q, m[64] = Q, m[65] = $) : $ = m[65], $;
|
|
155
123
|
};
|
|
156
124
|
//#endregion
|
|
157
|
-
export {
|
|
125
|
+
export { m as DatePickerHeader };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { require_compiler_runtime as e } from "../../node_modules/react/compiler-runtime.js";
|
|
2
2
|
import { ThemeColorVariable as t, ThemeRadiusVariable as n, ThemeSpaceVariable as r } from "../../theme/theme-types.js";
|
|
3
3
|
import i from "../../node_modules/date-fns/getISOWeek.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
5
|
+
import { Button as o, useRecipe as s } from "@chakra-ui/react";
|
|
6
6
|
//#region lib/components/date-picker/date-picker-week-cell.tsx
|
|
7
7
|
var c = e(), l = (e) => {
|
|
8
8
|
let l = (0, c.c)(21), { gridIndex: u, handleWeekChange: d, variant: f, date: p, selectWeek: m, isDisabled: h } = e, g;
|
|
9
9
|
l[0] === Symbol.for("react.memo_cache_sentinel") ? (g = { key: "dateCell" }, l[0] = g) : g = l[0];
|
|
10
|
-
let _ =
|
|
10
|
+
let _ = s(g), v;
|
|
11
11
|
l[1] !== _ || l[2] !== f ? (v = _({ variant: f }), l[1] = _, l[2] = f, l[3] = v) : v = l[3];
|
|
12
12
|
let y = v, b = Math.floor(u / 7) + 1, x = f === "selectedDay" ? t.OnAccent : t.OnSurfaceSubdued, S;
|
|
13
13
|
l[4] !== y || l[5] !== x ? (S = {
|
|
@@ -23,7 +23,7 @@ var c = e(), l = (e) => {
|
|
|
23
23
|
let T = `week-number-${w}`, E = !m || h, D;
|
|
24
24
|
l[12] === p ? D = l[13] : (D = i(p), l[12] = p, l[13] = D);
|
|
25
25
|
let O;
|
|
26
|
-
return l[14] !== b || l[15] !== S || l[16] !== C || l[17] !== T || l[18] !== E || l[19] !== D ? (O = /* @__PURE__ */
|
|
26
|
+
return l[14] !== b || l[15] !== S || l[16] !== C || l[17] !== T || l[18] !== E || l[19] !== D ? (O = /* @__PURE__ */ a(o, {
|
|
27
27
|
css: S,
|
|
28
28
|
borderRightRadius: 0,
|
|
29
29
|
borderTopLeftRadius: n.Medium,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.composition.d.ts","sourceRoot":"","sources":["../../../lib/components/date-picker/date-picker.composition.tsx"],"names":[],"mappings":"AASA,eAAO,MAAM,eAAe,GAAI,UAAU;IAAE,IAAI,CAAC,EAAE,IAAI,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"date-picker.composition.d.ts","sourceRoot":"","sources":["../../../lib/components/date-picker/date-picker.composition.tsx"],"names":[],"mappings":"AASA,eAAO,MAAM,eAAe,GAAI,UAAU;IAAE,IAAI,CAAC,EAAE,IAAI,CAAA;CAAE,gCAkDxD,CAAC;AAEF,eAAO,MAAM,oBAAoB,mCAoBhC,CAAC;AAEF,eAAO,MAAM,6BAA6B,mCAmBzC,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,UAAU;IAAE,IAAI,CAAC,EAAE,IAAI,CAAA;CAAE,gCAoB7D,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,UAAU;IAAE,IAAI,CAAC,EAAE,IAAI,CAAA;CAAE,gCA0ClE,CAAC"}
|
|
@@ -4,5 +4,5 @@ import { DatePickerProps } from './types.js';
|
|
|
4
4
|
*
|
|
5
5
|
* @see Docs https://caspeco.github.io/casper-ui-library/components/date-picker
|
|
6
6
|
*/
|
|
7
|
-
export declare const DatePicker: ({
|
|
7
|
+
export declare const DatePicker: ({ canSelectPastDates, dots, isExpanded, markSundayRed, onMonthChange, weekNumbers, showDaysOutsideMonth, selectedMonth, onDateChange, selectedDate, shouldDisableDate, strikeThroughDates, isDisabled, redDays, disablePastMonths, disableBackwardNavigation, disableForwardNavigation, }: DatePickerProps) => import('react').JSX.Element;
|
|
8
8
|
//# sourceMappingURL=date-picker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../../lib/components/date-picker/date-picker.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C;;;;GAIG;AAEH,eAAO,MAAM,UAAU,GAAI,
|
|
1
|
+
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../../lib/components/date-picker/date-picker.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C;;;;GAIG;AAEH,eAAO,MAAM,UAAU,GAAI,2RAkBxB,eAAe,gCA0BjB,CAAC"}
|
|
@@ -3,31 +3,30 @@ import { BaseDatePicker as t } from "./base-date-picker.js";
|
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
4
|
//#region lib/components/date-picker/date-picker.tsx
|
|
5
5
|
var r = e(), i = (e) => {
|
|
6
|
-
let i = (0, r.c)(
|
|
7
|
-
return i[0] !==
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
redDays: y,
|
|
6
|
+
let i = (0, r.c)(18), { canSelectPastDates: a, dots: o, isExpanded: s, markSundayRed: c, onMonthChange: l, weekNumbers: u, showDaysOutsideMonth: d, selectedMonth: f, onDateChange: p, selectedDate: m, shouldDisableDate: h, strikeThroughDates: g, isDisabled: _, redDays: v, disablePastMonths: y, disableBackwardNavigation: b, disableForwardNavigation: x } = e, S;
|
|
7
|
+
return i[0] !== a || i[1] !== b || i[2] !== x || i[3] !== y || i[4] !== o || i[5] !== _ || i[6] !== s || i[7] !== c || i[8] !== p || i[9] !== l || i[10] !== v || i[11] !== m || i[12] !== f || i[13] !== h || i[14] !== d || i[15] !== g || i[16] !== u ? (S = /* @__PURE__ */ n(t, {
|
|
8
|
+
canSelectPastDates: a,
|
|
9
|
+
dots: o,
|
|
10
|
+
isExpanded: s,
|
|
11
|
+
markSundayRed: c,
|
|
12
|
+
onMonthChange: l,
|
|
13
|
+
weekNumbers: u,
|
|
14
|
+
showDaysOutsideMonth: d,
|
|
15
|
+
selectedMonth: f,
|
|
16
|
+
onDateChange: p,
|
|
17
|
+
selectedDate: m,
|
|
18
|
+
shouldDisableDate: h,
|
|
19
|
+
strikeThroughDates: g,
|
|
20
|
+
redDays: v,
|
|
22
21
|
isRangeDate: !1,
|
|
23
22
|
selectWeek: !1,
|
|
24
|
-
isDisabled:
|
|
23
|
+
isDisabled: _,
|
|
25
24
|
dateRange: void 0,
|
|
26
25
|
onRangeChange: void 0,
|
|
27
|
-
disablePastMonths:
|
|
28
|
-
disableBackwardNavigation:
|
|
29
|
-
disableForwardNavigation:
|
|
30
|
-
}), i[0] =
|
|
26
|
+
disablePastMonths: y,
|
|
27
|
+
disableBackwardNavigation: b,
|
|
28
|
+
disableForwardNavigation: x
|
|
29
|
+
}), i[0] = a, i[1] = b, i[2] = x, i[3] = y, i[4] = o, i[5] = _, i[6] = s, i[7] = c, i[8] = p, i[9] = l, i[10] = v, i[11] = m, i[12] = f, i[13] = h, i[14] = d, i[15] = g, i[16] = u, i[17] = S) : S = i[17], S;
|
|
31
30
|
};
|
|
32
31
|
//#endregion
|
|
33
32
|
export { i as DatePicker };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type DatePickerTranslation = {
|
|
2
|
+
today: string;
|
|
3
|
+
week: (week: number) => string;
|
|
4
|
+
};
|
|
5
|
+
export declare const datePickerTranslations: import('../../theme/translations.js').ComponentTranslations<DatePickerTranslation>;
|
|
6
|
+
//# sourceMappingURL=date-picker.translations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-picker.translations.d.ts","sourceRoot":"","sources":["../../../lib/components/date-picker/date-picker.translations.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,qBAAqB,GAAG;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,sBAAsB,6EAiDjC,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { defineTranslations as e } from "../../theme/translations.js";
|
|
2
|
+
//#region lib/components/date-picker/date-picker.translations.ts
|
|
3
|
+
var t = e({
|
|
4
|
+
en: {
|
|
5
|
+
today: "Today",
|
|
6
|
+
week: (e) => `Week ${e}`
|
|
7
|
+
},
|
|
8
|
+
sv: {
|
|
9
|
+
today: "I dag",
|
|
10
|
+
week: (e) => `Vecka ${e}`
|
|
11
|
+
},
|
|
12
|
+
nb: {
|
|
13
|
+
today: "I dag",
|
|
14
|
+
week: (e) => `Uke ${e}`
|
|
15
|
+
},
|
|
16
|
+
da: {
|
|
17
|
+
today: "I dag",
|
|
18
|
+
week: (e) => `Uge ${e}`
|
|
19
|
+
},
|
|
20
|
+
fr: {
|
|
21
|
+
today: "Aujourd'hui",
|
|
22
|
+
week: (e) => `Semaine ${e}`
|
|
23
|
+
},
|
|
24
|
+
nl: {
|
|
25
|
+
today: "Vandaag",
|
|
26
|
+
week: (e) => `Week ${e}`
|
|
27
|
+
},
|
|
28
|
+
de: {
|
|
29
|
+
today: "Heute",
|
|
30
|
+
week: (e) => `Woche ${e}`
|
|
31
|
+
},
|
|
32
|
+
fi: {
|
|
33
|
+
today: "Tänään",
|
|
34
|
+
week: (e) => `Viikko ${e}`
|
|
35
|
+
},
|
|
36
|
+
es: {
|
|
37
|
+
today: "Hoy",
|
|
38
|
+
week: (e) => `Semana ${e}`
|
|
39
|
+
},
|
|
40
|
+
et: {
|
|
41
|
+
today: "Täna",
|
|
42
|
+
week: (e) => `Nädal ${e}`
|
|
43
|
+
},
|
|
44
|
+
lt: {
|
|
45
|
+
today: "Šiandien",
|
|
46
|
+
week: (e) => `Savaitė ${e}`
|
|
47
|
+
},
|
|
48
|
+
lv: {
|
|
49
|
+
today: "Šodien",
|
|
50
|
+
week: (e) => `Nedēļa ${e}`
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
//#endregion
|
|
54
|
+
export { t as datePickerTranslations };
|