@trsys-tech/matrix-library 0.3.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/LICENSE +21 -0
- package/README.md +67 -0
- package/dist/_commonjshelpers.es.js +7 -0
- package/dist/_commonjshelpers.es.js.map +1 -0
- package/dist/addleadingzeros.es.js +8 -0
- package/dist/addleadingzeros.es.js.map +1 -0
- package/dist/badge.es.js +29 -0
- package/dist/badge.es.js.map +1 -0
- package/dist/breadcrumb.es.js +33 -0
- package/dist/breadcrumb.es.js.map +1 -0
- package/dist/buildformatlongfn.es.js +10 -0
- package/dist/buildformatlongfn.es.js.map +1 -0
- package/dist/buildlocalizefn.es.js +19 -0
- package/dist/buildlocalizefn.es.js.map +1 -0
- package/dist/buildmatchfn.es.js +32 -0
- package/dist/buildmatchfn.es.js.map +1 -0
- package/dist/buildmatchpatternfn.es.js +16 -0
- package/dist/buildmatchpatternfn.es.js.map +1 -0
- package/dist/button.es.js +45 -0
- package/dist/button.es.js.map +1 -0
- package/dist/calendar.es.js +96 -0
- package/dist/calendar.es.js.map +1 -0
- package/dist/calendaricon.es.js +8 -0
- package/dist/calendaricon.es.js.map +1 -0
- package/dist/card.es.js +24 -0
- package/dist/card.es.js.map +1 -0
- package/dist/checkbox.es.js +28 -0
- package/dist/checkbox.es.js.map +1 -0
- package/dist/checkicon.es.js +8 -0
- package/dist/checkicon.es.js.map +1 -0
- package/dist/chevrondownicon.es.js +8 -0
- package/dist/chevrondownicon.es.js.map +1 -0
- package/dist/chevronlefticon.es.js +8 -0
- package/dist/chevronlefticon.es.js.map +1 -0
- package/dist/chevronrighticon.es.js +8 -0
- package/dist/chevronrighticon.es.js.map +1 -0
- package/dist/chevronsrighticon.es.js +8 -0
- package/dist/chevronsrighticon.es.js.map +1 -0
- package/dist/chevronupicon.es.js +8 -0
- package/dist/chevronupicon.es.js.map +1 -0
- package/dist/chip.es.js +42 -0
- package/dist/chip.es.js.map +1 -0
- package/dist/circleicon.es.js +8 -0
- package/dist/circleicon.es.js.map +1 -0
- package/dist/clonedeep.es.js +18 -0
- package/dist/clonedeep.es.js.map +1 -0
- package/dist/clonedeep.es2.js +5 -0
- package/dist/clonedeep.es2.js.map +1 -0
- package/dist/closecircleicon.es.js +8 -0
- package/dist/closecircleicon.es.js.map +1 -0
- package/dist/closeicon.es.js +8 -0
- package/dist/closeicon.es.js.map +1 -0
- package/dist/collapsible.es.js +24 -0
- package/dist/collapsible.es.js.map +1 -0
- package/dist/combobox.es.js +35 -0
- package/dist/combobox.es.js.map +1 -0
- package/dist/command.es.js +81 -0
- package/dist/command.es.js.map +1 -0
- package/dist/components/Icons/CalendarIcon.d.ts +3 -0
- package/dist/components/Icons/CalendarIcon.d.ts.map +1 -0
- package/dist/components/Icons/CheckIcon.d.ts +3 -0
- package/dist/components/Icons/CheckIcon.d.ts.map +1 -0
- package/dist/components/Icons/ChevronDownIcon.d.ts +3 -0
- package/dist/components/Icons/ChevronDownIcon.d.ts.map +1 -0
- package/dist/components/Icons/ChevronLeftIcon.d.ts +3 -0
- package/dist/components/Icons/ChevronLeftIcon.d.ts.map +1 -0
- package/dist/components/Icons/ChevronRightIcon.d.ts +3 -0
- package/dist/components/Icons/ChevronRightIcon.d.ts.map +1 -0
- package/dist/components/Icons/ChevronUpIcon.d.ts +3 -0
- package/dist/components/Icons/ChevronUpIcon.d.ts.map +1 -0
- package/dist/components/Icons/ChevronsRightIcon.d.ts +3 -0
- package/dist/components/Icons/ChevronsRightIcon.d.ts.map +1 -0
- package/dist/components/Icons/CircleIcon.d.ts +3 -0
- package/dist/components/Icons/CircleIcon.d.ts.map +1 -0
- package/dist/components/Icons/CloseCircleIcon.d.ts +3 -0
- package/dist/components/Icons/CloseCircleIcon.d.ts.map +1 -0
- package/dist/components/Icons/CloseIcon.d.ts +3 -0
- package/dist/components/Icons/CloseIcon.d.ts.map +1 -0
- package/dist/components/Icons/DangerCircleIcon.d.ts +3 -0
- package/dist/components/Icons/DangerCircleIcon.d.ts.map +1 -0
- package/dist/components/Icons/ElipsisHorizontal.d.ts +3 -0
- package/dist/components/Icons/ElipsisHorizontal.d.ts.map +1 -0
- package/dist/components/Icons/ElipsisVerticalIcon.d.ts +3 -0
- package/dist/components/Icons/ElipsisVerticalIcon.d.ts.map +1 -0
- package/dist/components/Icons/HomeIcon.d.ts +3 -0
- package/dist/components/Icons/HomeIcon.d.ts.map +1 -0
- package/dist/components/Icons/InfoCircleIcon.d.ts +3 -0
- package/dist/components/Icons/InfoCircleIcon.d.ts.map +1 -0
- package/dist/components/Icons/MinusIcon.d.ts +3 -0
- package/dist/components/Icons/MinusIcon.d.ts.map +1 -0
- package/dist/components/Icons/PlusIcon.d.ts +3 -0
- package/dist/components/Icons/PlusIcon.d.ts.map +1 -0
- package/dist/components/Icons/PrintIcon.d.ts +3 -0
- package/dist/components/Icons/PrintIcon.d.ts.map +1 -0
- package/dist/components/Icons/RefreshIcon.d.ts +3 -0
- package/dist/components/Icons/RefreshIcon.d.ts.map +1 -0
- package/dist/components/Icons/SearchIcon.d.ts +3 -0
- package/dist/components/Icons/SearchIcon.d.ts.map +1 -0
- package/dist/components/Icons/SnowflakeIcon.d.ts +3 -0
- package/dist/components/Icons/SnowflakeIcon.d.ts.map +1 -0
- package/dist/components/Icons/SpinnerIcon.d.ts +3 -0
- package/dist/components/Icons/SpinnerIcon.d.ts.map +1 -0
- package/dist/components/Icons/StartIcon.d.ts +3 -0
- package/dist/components/Icons/StartIcon.d.ts.map +1 -0
- package/dist/components/Icons/SuccessCircleIcon.d.ts +3 -0
- package/dist/components/Icons/SuccessCircleIcon.d.ts.map +1 -0
- package/dist/components/Icons/TrashcanIcon.d.ts +3 -0
- package/dist/components/Icons/TrashcanIcon.d.ts.map +1 -0
- package/dist/components/Icons/WarningCircleIcon.d.ts +3 -0
- package/dist/components/Icons/WarningCircleIcon.d.ts.map +1 -0
- package/dist/components/accordion/Accordion.d.ts +8 -0
- package/dist/components/accordion/Accordion.d.ts.map +1 -0
- package/dist/components/avatar/Avatar.d.ts +7 -0
- package/dist/components/avatar/Avatar.d.ts.map +1 -0
- package/dist/components/badge/Badge.d.ts +116 -0
- package/dist/components/badge/Badge.d.ts.map +1 -0
- package/dist/components/breadcrumb/Breadcrumb.d.ts +20 -0
- package/dist/components/breadcrumb/Breadcrumb.d.ts.map +1 -0
- package/dist/components/button/Button.d.ts +143 -0
- package/dist/components/button/Button.d.ts.map +1 -0
- package/dist/components/card/Card.d.ts +16 -0
- package/dist/components/card/Card.d.ts.map +1 -0
- package/dist/components/checkbox/Checkbox.d.ts +6 -0
- package/dist/components/checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/chip/Chip.d.ts +81 -0
- package/dist/components/chip/Chip.d.ts.map +1 -0
- package/dist/components/collapsible/Collapsible.d.ts +8 -0
- package/dist/components/collapsible/Collapsible.d.ts.map +1 -0
- package/dist/components/combobox/Combobox.d.ts +62 -0
- package/dist/components/combobox/Combobox.d.ts.map +1 -0
- package/dist/components/command/Command.d.ts +81 -0
- package/dist/components/command/Command.d.ts.map +1 -0
- package/dist/components/confirm/Confirm.d.ts +25 -0
- package/dist/components/confirm/Confirm.d.ts.map +1 -0
- package/dist/components/context-menu/ContextMenu.d.ts +28 -0
- package/dist/components/context-menu/ContextMenu.d.ts.map +1 -0
- package/dist/components/data-grid/DataGrid.d.ts +58 -0
- package/dist/components/data-grid/DataGrid.d.ts.map +1 -0
- package/dist/components/date-picker/DatePicker.d.ts +7 -0
- package/dist/components/date-picker/DatePicker.d.ts.map +1 -0
- package/dist/components/date-picker/DateRangePicker.d.ts +7 -0
- package/dist/components/date-picker/DateRangePicker.d.ts.map +1 -0
- package/dist/components/date-picker/DesktopDatePicker.d.ts +13 -0
- package/dist/components/date-picker/DesktopDatePicker.d.ts.map +1 -0
- package/dist/components/date-picker/DesktopDateRangePicker.d.ts +12 -0
- package/dist/components/date-picker/DesktopDateRangePicker.d.ts.map +1 -0
- package/dist/components/date-picker/DesktopTimePicker.d.ts +12 -0
- package/dist/components/date-picker/DesktopTimePicker.d.ts.map +1 -0
- package/dist/components/date-picker/MobileDatePicker.d.ts +15 -0
- package/dist/components/date-picker/MobileDatePicker.d.ts.map +1 -0
- package/dist/components/date-picker/MobileDateRangePicker.d.ts +15 -0
- package/dist/components/date-picker/MobileDateRangePicker.d.ts.map +1 -0
- package/dist/components/date-picker/MobileTimePicker.d.ts +12 -0
- package/dist/components/date-picker/MobileTimePicker.d.ts.map +1 -0
- package/dist/components/date-picker/TimePicker.d.ts +8 -0
- package/dist/components/date-picker/TimePicker.d.ts.map +1 -0
- package/dist/components/date-picker/TimePickerContent.d.ts +17 -0
- package/dist/components/date-picker/TimePickerContent.d.ts.map +1 -0
- package/dist/components/date-picker/calendar.d.ts +8 -0
- package/dist/components/date-picker/calendar.d.ts.map +1 -0
- package/dist/components/dialog/Dialog.d.ts +22 -0
- package/dist/components/dialog/Dialog.d.ts.map +1 -0
- package/dist/components/drawer/Drawer.d.ts +76 -0
- package/dist/components/drawer/Drawer.d.ts.map +1 -0
- package/dist/components/drawer/SwipableDrawer.d.ts +30 -0
- package/dist/components/drawer/SwipableDrawer.d.ts.map +1 -0
- package/dist/components/form/Form.d.ts +12 -0
- package/dist/components/form/Form.d.ts.map +1 -0
- package/dist/components/form-checkbox/FormCheckbox.d.ts +18 -0
- package/dist/components/form-checkbox/FormCheckbox.d.ts.map +1 -0
- package/dist/components/form-combobox/FormCombobox.d.ts +28 -0
- package/dist/components/form-combobox/FormCombobox.d.ts.map +1 -0
- package/dist/components/form-input/FormInput.d.ts +18 -0
- package/dist/components/form-input/FormInput.d.ts.map +1 -0
- package/dist/components/form-multi-select/FormMultiSelect.d.ts +19 -0
- package/dist/components/form-multi-select/FormMultiSelect.d.ts.map +1 -0
- package/dist/components/form-rating/FormRating.d.ts +20 -0
- package/dist/components/form-rating/FormRating.d.ts.map +1 -0
- package/dist/components/form-select/FormSelect.d.ts +27 -0
- package/dist/components/form-select/FormSelect.d.ts.map +1 -0
- package/dist/components/form-switch/FormSwitch.d.ts +18 -0
- package/dist/components/form-switch/FormSwitch.d.ts.map +1 -0
- package/dist/components/form-textarea/FormTextarea.d.ts +18 -0
- package/dist/components/form-textarea/FormTextarea.d.ts.map +1 -0
- package/dist/components/icon-botton/IconButton.d.ts +116 -0
- package/dist/components/icon-botton/IconButton.d.ts.map +1 -0
- package/dist/components/label/Label.d.ts +7 -0
- package/dist/components/label/Label.d.ts.map +1 -0
- package/dist/components/modal/Modal.d.ts +25 -0
- package/dist/components/modal/Modal.d.ts.map +1 -0
- package/dist/components/multi-select/MultiSelect.d.ts +144 -0
- package/dist/components/multi-select/MultiSelect.d.ts.map +1 -0
- package/dist/components/popover/Popover.d.ts +9 -0
- package/dist/components/popover/Popover.d.ts.map +1 -0
- package/dist/components/radio-group/RadioGroup.d.ts +7 -0
- package/dist/components/radio-group/RadioGroup.d.ts.map +1 -0
- package/dist/components/rating/Rating.d.ts +124 -0
- package/dist/components/rating/Rating.d.ts.map +1 -0
- package/dist/components/select/Select.d.ts +28 -0
- package/dist/components/select/Select.d.ts.map +1 -0
- package/dist/components/separator/Separator.d.ts +5 -0
- package/dist/components/separator/Separator.d.ts.map +1 -0
- package/dist/components/sheet/Sheet.d.ts +77 -0
- package/dist/components/sheet/Sheet.d.ts.map +1 -0
- package/dist/components/sidebar/Sidebar.d.ts +160 -0
- package/dist/components/sidebar/Sidebar.d.ts.map +1 -0
- package/dist/components/skeleton/Skeleton.d.ts +7 -0
- package/dist/components/skeleton/Skeleton.d.ts.map +1 -0
- package/dist/components/switch/Switch.d.ts +52 -0
- package/dist/components/switch/Switch.d.ts.map +1 -0
- package/dist/components/tabs/Tabs.d.ts +8 -0
- package/dist/components/tabs/Tabs.d.ts.map +1 -0
- package/dist/components/text-field/TextField.d.ts +61 -0
- package/dist/components/text-field/TextField.d.ts.map +1 -0
- package/dist/components/textarea/Textarea.d.ts +6 -0
- package/dist/components/textarea/Textarea.d.ts.map +1 -0
- package/dist/components/toast/Toast.d.ts +19 -0
- package/dist/components/toast/Toast.d.ts.map +1 -0
- package/dist/components/toast/toast-components.d.ts +129 -0
- package/dist/components/toast/toast-components.d.ts.map +1 -0
- package/dist/components/toast/use-toast.d.ts +24 -0
- package/dist/components/toast/use-toast.d.ts.map +1 -0
- package/dist/components/tooltip/Tooltip.d.ts +9 -0
- package/dist/components/tooltip/Tooltip.d.ts.map +1 -0
- package/dist/config.es.js +1066 -0
- package/dist/config.es.js.map +1 -0
- package/dist/confirm.es.js +67 -0
- package/dist/confirm.es.js.map +1 -0
- package/dist/constants.es.js +7 -0
- package/dist/constants.es.js.map +1 -0
- package/dist/constructfrom.es.js +9 -0
- package/dist/constructfrom.es.js.map +1 -0
- package/dist/dangercircleicon.es.js +17 -0
- package/dist/dangercircleicon.es.js.map +1 -0
- package/dist/datagrid.es.js +221 -0
- package/dist/datagrid.es.js.map +1 -0
- package/dist/datepicker.es.js +24 -0
- package/dist/datepicker.es.js.map +1 -0
- package/dist/daterangepicker.es.js +22 -0
- package/dist/daterangepicker.es.js.map +1 -0
- package/dist/default-theme.es.js +22 -0
- package/dist/default-theme.es.js.map +1 -0
- package/dist/default-theme.es2.js +5 -0
- package/dist/default-theme.es2.js.map +1 -0
- package/dist/defaultoptions.es.js +8 -0
- package/dist/defaultoptions.es.js.map +1 -0
- package/dist/defaulttheme.es.js +10 -0
- package/dist/defaulttheme.es.js.map +1 -0
- package/dist/desktopdatepicker.es.js +54 -0
- package/dist/desktopdatepicker.es.js.map +1 -0
- package/dist/desktopdaterangepicker.es.js +59 -0
- package/dist/desktopdaterangepicker.es.js.map +1 -0
- package/dist/desktoptimepicker.es.js +25 -0
- package/dist/desktoptimepicker.es.js.map +1 -0
- package/dist/dialog.es.js +62 -0
- package/dist/dialog.es.js.map +1 -0
- package/dist/differenceincalendardays.es.js +17 -0
- package/dist/differenceincalendardays.es.js.map +1 -0
- package/dist/drawer.es.js +66 -0
- package/dist/drawer.es.js.map +1 -0
- package/dist/elipsishorizontal.es.js +8 -0
- package/dist/elipsishorizontal.es.js.map +1 -0
- package/dist/elipsisverticalicon.es.js +8 -0
- package/dist/elipsisverticalicon.es.js.map +1 -0
- package/dist/en-us.es.js +22 -0
- package/dist/en-us.es.js.map +1 -0
- package/dist/form.es.js +66 -0
- package/dist/form.es.js.map +1 -0
- package/dist/format.es.js +59 -0
- package/dist/format.es.js.map +1 -0
- package/dist/formatdistance.es.js +71 -0
- package/dist/formatdistance.es.js.map +1 -0
- package/dist/formatlong.es.js +34 -0
- package/dist/formatlong.es.js.map +1 -0
- package/dist/formatrelative.es.js +12 -0
- package/dist/formatrelative.es.js.map +1 -0
- package/dist/formatters.es.js +518 -0
- package/dist/formatters.es.js.map +1 -0
- package/dist/formcheckbox.es.js +47 -0
- package/dist/formcheckbox.es.js.map +1 -0
- package/dist/formcombobox.es.js +116 -0
- package/dist/formcombobox.es.js.map +1 -0
- package/dist/forminput.es.js +35 -0
- package/dist/forminput.es.js.map +1 -0
- package/dist/formmultiselect.es.js +60 -0
- package/dist/formmultiselect.es.js.map +1 -0
- package/dist/formrating.es.js +53 -0
- package/dist/formrating.es.js.map +1 -0
- package/dist/formselect.es.js +88 -0
- package/dist/formselect.es.js.map +1 -0
- package/dist/formswitch.es.js +47 -0
- package/dist/formswitch.es.js.map +1 -0
- package/dist/getdayofyear.es.js +12 -0
- package/dist/getdayofyear.es.js.map +1 -0
- package/dist/getisoweek.es.js +13 -0
- package/dist/getisoweek.es.js.map +1 -0
- package/dist/getisoweekyear.es.js +16 -0
- package/dist/getisoweekyear.es.js.map +1 -0
- package/dist/gettimezoneoffsetinmilliseconds.es.js +19 -0
- package/dist/gettimezoneoffsetinmilliseconds.es.js.map +1 -0
- package/dist/getweek.es.js +13 -0
- package/dist/getweek.es.js.map +1 -0
- package/dist/getweekyear.es.js +17 -0
- package/dist/getweekyear.es.js.map +1 -0
- package/dist/iconbutton.es.js +38 -0
- package/dist/iconbutton.es.js.map +1 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.es.js +201 -0
- package/dist/index.es.js.map +1 -0
- package/dist/infocircleicon.es.js +17 -0
- package/dist/infocircleicon.es.js.map +1 -0
- package/dist/isdate.es.js +8 -0
- package/dist/isdate.es.js.map +1 -0
- package/dist/isvalid.es.js +10 -0
- package/dist/isvalid.es.js.map +1 -0
- package/dist/label.es.js +12 -0
- package/dist/label.es.js.map +1 -0
- package/dist/lib/hooks/use-mobile.d.ts +2 -0
- package/dist/lib/hooks/use-mobile.d.ts.map +1 -0
- package/dist/lib/printHtml.d.ts +2 -0
- package/dist/lib/printHtml.d.ts.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lightformatters.es.js +60 -0
- package/dist/lightformatters.es.js.map +1 -0
- package/dist/localize.es.js +156 -0
- package/dist/localize.es.js.map +1 -0
- package/dist/longformatters.es.js +53 -0
- package/dist/longformatters.es.js.map +1 -0
- package/dist/match.es.js +111 -0
- package/dist/match.es.js.map +1 -0
- package/dist/minusicon.es.js +8 -0
- package/dist/minusicon.es.js.map +1 -0
- package/dist/mobiledatepicker.es.js +64 -0
- package/dist/mobiledatepicker.es.js.map +1 -0
- package/dist/mobiledaterangepicker.es.js +83 -0
- package/dist/mobiledaterangepicker.es.js.map +1 -0
- package/dist/mobiletimepicker.es.js +33 -0
- package/dist/mobiletimepicker.es.js.map +1 -0
- package/dist/modal.es.js +78 -0
- package/dist/modal.es.js.map +1 -0
- package/dist/multiselect.es.js +203 -0
- package/dist/multiselect.es.js.map +1 -0
- package/dist/normalizedates.es.js +12 -0
- package/dist/normalizedates.es.js.map +1 -0
- package/dist/popover.es.js +25 -0
- package/dist/popover.es.js.map +1 -0
- package/dist/printhtml.es.js +13 -0
- package/dist/printhtml.es.js.map +1 -0
- package/dist/printicon.es.js +8 -0
- package/dist/printicon.es.js.map +1 -0
- package/dist/protectedtokens.es.js +21 -0
- package/dist/protectedtokens.es.js.map +1 -0
- package/dist/radiogroup.es.js +25 -0
- package/dist/radiogroup.es.js.map +1 -0
- package/dist/rating.es.js +164 -0
- package/dist/rating.es.js.map +1 -0
- package/dist/refreshicon.es.js +8 -0
- package/dist/refreshicon.es.js.map +1 -0
- package/dist/searchicon.es.js +8 -0
- package/dist/searchicon.es.js.map +1 -0
- package/dist/select.es.js +109 -0
- package/dist/select.es.js.map +1 -0
- package/dist/separator.es.js +21 -0
- package/dist/separator.es.js.map +1 -0
- package/dist/sheet.es.js +69 -0
- package/dist/sheet.es.js.map +1 -0
- package/dist/sidebar.es.js +428 -0
- package/dist/sidebar.es.js.map +1 -0
- package/dist/skeleton.es.js +10 -0
- package/dist/skeleton.es.js.map +1 -0
- package/dist/snowflakeicon.es.js +8 -0
- package/dist/snowflakeicon.es.js.map +1 -0
- package/dist/spinnericon.es.js +18 -0
- package/dist/spinnericon.es.js.map +1 -0
- package/dist/starticon.es.js +23 -0
- package/dist/starticon.es.js.map +1 -0
- package/dist/startofday.es.js +10 -0
- package/dist/startofday.es.js.map +1 -0
- package/dist/startofisoweek.es.js +9 -0
- package/dist/startofisoweek.es.js.map +1 -0
- package/dist/startofisoweekyear.es.js +12 -0
- package/dist/startofisoweekyear.es.js.map +1 -0
- package/dist/startofweek.es.js +11 -0
- package/dist/startofweek.es.js.map +1 -0
- package/dist/startofweekyear.es.js +13 -0
- package/dist/startofweekyear.es.js.map +1 -0
- package/dist/startofyear.es.js +10 -0
- package/dist/startofyear.es.js.map +1 -0
- package/dist/style.css +1 -0
- package/dist/successcircleicon.es.js +17 -0
- package/dist/successcircleicon.es.js.map +1 -0
- package/dist/swipabledrawer.es.js +47 -0
- package/dist/swipabledrawer.es.js.map +1 -0
- package/dist/switch.es.js +30 -0
- package/dist/switch.es.js.map +1 -0
- package/dist/tabs.es.js +41 -0
- package/dist/tabs.es.js.map +1 -0
- package/dist/textfield.es.js +43 -0
- package/dist/textfield.es.js.map +1 -0
- package/dist/timepicker.es.js +22 -0
- package/dist/timepicker.es.js.map +1 -0
- package/dist/timepickercontent.es.js +73 -0
- package/dist/timepickercontent.es.js.map +1 -0
- package/dist/toast-components.es.js +66 -0
- package/dist/toast-components.es.js.map +1 -0
- package/dist/toast.es.js +44 -0
- package/dist/toast.es.js.map +1 -0
- package/dist/todate.es.js +9 -0
- package/dist/todate.es.js.map +1 -0
- package/dist/tooltip.es.js +30 -0
- package/dist/tooltip.es.js.map +1 -0
- package/dist/trashcanicon.es.js +6 -0
- package/dist/trashcanicon.es.js.map +1 -0
- package/dist/use-mobile.es.js +15 -0
- package/dist/use-mobile.es.js.map +1 -0
- package/dist/use-toast.es.js +25 -0
- package/dist/use-toast.es.js.map +1 -0
- package/dist/utils.es.js +9 -0
- package/dist/utils.es.js.map +1 -0
- package/dist/warningcircleicon.es.js +17 -0
- package/dist/warningcircleicon.es.js.map +1 -0
- package/package.json +132 -0
|
@@ -0,0 +1,518 @@
|
|
|
1
|
+
import { getDayOfYear as m } from "./getdayofyear.es.js";
|
|
2
|
+
import { getISOWeek as g } from "./getisoweek.es.js";
|
|
3
|
+
import { getISOWeekYear as w } from "./getisoweekyear.es.js";
|
|
4
|
+
import { getWeek as b } from "./getweek.es.js";
|
|
5
|
+
import { getWeekYear as x } from "./getweekyear.es.js";
|
|
6
|
+
import { addLeadingZeros as i } from "./addleadingzeros.es.js";
|
|
7
|
+
import { lightFormatters as u } from "./lightformatters.es.js";
|
|
8
|
+
const s = {
|
|
9
|
+
am: "am",
|
|
10
|
+
pm: "pm",
|
|
11
|
+
midnight: "midnight",
|
|
12
|
+
noon: "noon",
|
|
13
|
+
morning: "morning",
|
|
14
|
+
afternoon: "afternoon",
|
|
15
|
+
evening: "evening",
|
|
16
|
+
night: "night"
|
|
17
|
+
}, L = {
|
|
18
|
+
// Era
|
|
19
|
+
G: function(n, r, e) {
|
|
20
|
+
const t = n.getFullYear() > 0 ? 1 : 0;
|
|
21
|
+
switch (r) {
|
|
22
|
+
case "G":
|
|
23
|
+
case "GG":
|
|
24
|
+
case "GGG":
|
|
25
|
+
return e.era(t, { width: "abbreviated" });
|
|
26
|
+
case "GGGGG":
|
|
27
|
+
return e.era(t, { width: "narrow" });
|
|
28
|
+
case "GGGG":
|
|
29
|
+
default:
|
|
30
|
+
return e.era(t, { width: "wide" });
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
// Year
|
|
34
|
+
y: function(n, r, e) {
|
|
35
|
+
if (r === "yo") {
|
|
36
|
+
const t = n.getFullYear(), a = t > 0 ? t : 1 - t;
|
|
37
|
+
return e.ordinalNumber(a, { unit: "year" });
|
|
38
|
+
}
|
|
39
|
+
return u.y(n, r);
|
|
40
|
+
},
|
|
41
|
+
// Local week-numbering year
|
|
42
|
+
Y: function(n, r, e, t) {
|
|
43
|
+
const a = x(n, t), o = a > 0 ? a : 1 - a;
|
|
44
|
+
if (r === "YY") {
|
|
45
|
+
const h = o % 100;
|
|
46
|
+
return i(h, 2);
|
|
47
|
+
}
|
|
48
|
+
return r === "Yo" ? e.ordinalNumber(o, { unit: "year" }) : i(o, r.length);
|
|
49
|
+
},
|
|
50
|
+
// ISO week-numbering year
|
|
51
|
+
R: function(n, r) {
|
|
52
|
+
const e = w(n);
|
|
53
|
+
return i(e, r.length);
|
|
54
|
+
},
|
|
55
|
+
// Extended year. This is a single number designating the year of this calendar system.
|
|
56
|
+
// The main difference between `y` and `u` localizers are B.C. years:
|
|
57
|
+
// | Year | `y` | `u` |
|
|
58
|
+
// |------|-----|-----|
|
|
59
|
+
// | AC 1 | 1 | 1 |
|
|
60
|
+
// | BC 1 | 1 | 0 |
|
|
61
|
+
// | BC 2 | 2 | -1 |
|
|
62
|
+
// Also `yy` always returns the last two digits of a year,
|
|
63
|
+
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
64
|
+
u: function(n, r) {
|
|
65
|
+
const e = n.getFullYear();
|
|
66
|
+
return i(e, r.length);
|
|
67
|
+
},
|
|
68
|
+
// Quarter
|
|
69
|
+
Q: function(n, r, e) {
|
|
70
|
+
const t = Math.ceil((n.getMonth() + 1) / 3);
|
|
71
|
+
switch (r) {
|
|
72
|
+
case "Q":
|
|
73
|
+
return String(t);
|
|
74
|
+
case "QQ":
|
|
75
|
+
return i(t, 2);
|
|
76
|
+
case "Qo":
|
|
77
|
+
return e.ordinalNumber(t, { unit: "quarter" });
|
|
78
|
+
case "QQQ":
|
|
79
|
+
return e.quarter(t, {
|
|
80
|
+
width: "abbreviated",
|
|
81
|
+
context: "formatting"
|
|
82
|
+
});
|
|
83
|
+
case "QQQQQ":
|
|
84
|
+
return e.quarter(t, {
|
|
85
|
+
width: "narrow",
|
|
86
|
+
context: "formatting"
|
|
87
|
+
});
|
|
88
|
+
case "QQQQ":
|
|
89
|
+
default:
|
|
90
|
+
return e.quarter(t, {
|
|
91
|
+
width: "wide",
|
|
92
|
+
context: "formatting"
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
// Stand-alone quarter
|
|
97
|
+
q: function(n, r, e) {
|
|
98
|
+
const t = Math.ceil((n.getMonth() + 1) / 3);
|
|
99
|
+
switch (r) {
|
|
100
|
+
case "q":
|
|
101
|
+
return String(t);
|
|
102
|
+
case "qq":
|
|
103
|
+
return i(t, 2);
|
|
104
|
+
case "qo":
|
|
105
|
+
return e.ordinalNumber(t, { unit: "quarter" });
|
|
106
|
+
case "qqq":
|
|
107
|
+
return e.quarter(t, {
|
|
108
|
+
width: "abbreviated",
|
|
109
|
+
context: "standalone"
|
|
110
|
+
});
|
|
111
|
+
case "qqqqq":
|
|
112
|
+
return e.quarter(t, {
|
|
113
|
+
width: "narrow",
|
|
114
|
+
context: "standalone"
|
|
115
|
+
});
|
|
116
|
+
case "qqqq":
|
|
117
|
+
default:
|
|
118
|
+
return e.quarter(t, {
|
|
119
|
+
width: "wide",
|
|
120
|
+
context: "standalone"
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
// Month
|
|
125
|
+
M: function(n, r, e) {
|
|
126
|
+
const t = n.getMonth();
|
|
127
|
+
switch (r) {
|
|
128
|
+
case "M":
|
|
129
|
+
case "MM":
|
|
130
|
+
return u.M(n, r);
|
|
131
|
+
case "Mo":
|
|
132
|
+
return e.ordinalNumber(t + 1, { unit: "month" });
|
|
133
|
+
case "MMM":
|
|
134
|
+
return e.month(t, {
|
|
135
|
+
width: "abbreviated",
|
|
136
|
+
context: "formatting"
|
|
137
|
+
});
|
|
138
|
+
case "MMMMM":
|
|
139
|
+
return e.month(t, {
|
|
140
|
+
width: "narrow",
|
|
141
|
+
context: "formatting"
|
|
142
|
+
});
|
|
143
|
+
case "MMMM":
|
|
144
|
+
default:
|
|
145
|
+
return e.month(t, { width: "wide", context: "formatting" });
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
// Stand-alone month
|
|
149
|
+
L: function(n, r, e) {
|
|
150
|
+
const t = n.getMonth();
|
|
151
|
+
switch (r) {
|
|
152
|
+
case "L":
|
|
153
|
+
return String(t + 1);
|
|
154
|
+
case "LL":
|
|
155
|
+
return i(t + 1, 2);
|
|
156
|
+
case "Lo":
|
|
157
|
+
return e.ordinalNumber(t + 1, { unit: "month" });
|
|
158
|
+
case "LLL":
|
|
159
|
+
return e.month(t, {
|
|
160
|
+
width: "abbreviated",
|
|
161
|
+
context: "standalone"
|
|
162
|
+
});
|
|
163
|
+
case "LLLLL":
|
|
164
|
+
return e.month(t, {
|
|
165
|
+
width: "narrow",
|
|
166
|
+
context: "standalone"
|
|
167
|
+
});
|
|
168
|
+
case "LLLL":
|
|
169
|
+
default:
|
|
170
|
+
return e.month(t, { width: "wide", context: "standalone" });
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
// Local week of year
|
|
174
|
+
w: function(n, r, e, t) {
|
|
175
|
+
const a = b(n, t);
|
|
176
|
+
return r === "wo" ? e.ordinalNumber(a, { unit: "week" }) : i(a, r.length);
|
|
177
|
+
},
|
|
178
|
+
// ISO week of year
|
|
179
|
+
I: function(n, r, e) {
|
|
180
|
+
const t = g(n);
|
|
181
|
+
return r === "Io" ? e.ordinalNumber(t, { unit: "week" }) : i(t, r.length);
|
|
182
|
+
},
|
|
183
|
+
// Day of the month
|
|
184
|
+
d: function(n, r, e) {
|
|
185
|
+
return r === "do" ? e.ordinalNumber(n.getDate(), { unit: "date" }) : u.d(n, r);
|
|
186
|
+
},
|
|
187
|
+
// Day of year
|
|
188
|
+
D: function(n, r, e) {
|
|
189
|
+
const t = m(n);
|
|
190
|
+
return r === "Do" ? e.ordinalNumber(t, { unit: "dayOfYear" }) : i(t, r.length);
|
|
191
|
+
},
|
|
192
|
+
// Day of week
|
|
193
|
+
E: function(n, r, e) {
|
|
194
|
+
const t = n.getDay();
|
|
195
|
+
switch (r) {
|
|
196
|
+
case "E":
|
|
197
|
+
case "EE":
|
|
198
|
+
case "EEE":
|
|
199
|
+
return e.day(t, {
|
|
200
|
+
width: "abbreviated",
|
|
201
|
+
context: "formatting"
|
|
202
|
+
});
|
|
203
|
+
case "EEEEE":
|
|
204
|
+
return e.day(t, {
|
|
205
|
+
width: "narrow",
|
|
206
|
+
context: "formatting"
|
|
207
|
+
});
|
|
208
|
+
case "EEEEEE":
|
|
209
|
+
return e.day(t, {
|
|
210
|
+
width: "short",
|
|
211
|
+
context: "formatting"
|
|
212
|
+
});
|
|
213
|
+
case "EEEE":
|
|
214
|
+
default:
|
|
215
|
+
return e.day(t, {
|
|
216
|
+
width: "wide",
|
|
217
|
+
context: "formatting"
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
// Local day of week
|
|
222
|
+
e: function(n, r, e, t) {
|
|
223
|
+
const a = n.getDay(), o = (a - t.weekStartsOn + 8) % 7 || 7;
|
|
224
|
+
switch (r) {
|
|
225
|
+
case "e":
|
|
226
|
+
return String(o);
|
|
227
|
+
case "ee":
|
|
228
|
+
return i(o, 2);
|
|
229
|
+
case "eo":
|
|
230
|
+
return e.ordinalNumber(o, { unit: "day" });
|
|
231
|
+
case "eee":
|
|
232
|
+
return e.day(a, {
|
|
233
|
+
width: "abbreviated",
|
|
234
|
+
context: "formatting"
|
|
235
|
+
});
|
|
236
|
+
case "eeeee":
|
|
237
|
+
return e.day(a, {
|
|
238
|
+
width: "narrow",
|
|
239
|
+
context: "formatting"
|
|
240
|
+
});
|
|
241
|
+
case "eeeeee":
|
|
242
|
+
return e.day(a, {
|
|
243
|
+
width: "short",
|
|
244
|
+
context: "formatting"
|
|
245
|
+
});
|
|
246
|
+
case "eeee":
|
|
247
|
+
default:
|
|
248
|
+
return e.day(a, {
|
|
249
|
+
width: "wide",
|
|
250
|
+
context: "formatting"
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
// Stand-alone local day of week
|
|
255
|
+
c: function(n, r, e, t) {
|
|
256
|
+
const a = n.getDay(), o = (a - t.weekStartsOn + 8) % 7 || 7;
|
|
257
|
+
switch (r) {
|
|
258
|
+
case "c":
|
|
259
|
+
return String(o);
|
|
260
|
+
case "cc":
|
|
261
|
+
return i(o, r.length);
|
|
262
|
+
case "co":
|
|
263
|
+
return e.ordinalNumber(o, { unit: "day" });
|
|
264
|
+
case "ccc":
|
|
265
|
+
return e.day(a, {
|
|
266
|
+
width: "abbreviated",
|
|
267
|
+
context: "standalone"
|
|
268
|
+
});
|
|
269
|
+
case "ccccc":
|
|
270
|
+
return e.day(a, {
|
|
271
|
+
width: "narrow",
|
|
272
|
+
context: "standalone"
|
|
273
|
+
});
|
|
274
|
+
case "cccccc":
|
|
275
|
+
return e.day(a, {
|
|
276
|
+
width: "short",
|
|
277
|
+
context: "standalone"
|
|
278
|
+
});
|
|
279
|
+
case "cccc":
|
|
280
|
+
default:
|
|
281
|
+
return e.day(a, {
|
|
282
|
+
width: "wide",
|
|
283
|
+
context: "standalone"
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
// ISO day of week
|
|
288
|
+
i: function(n, r, e) {
|
|
289
|
+
const t = n.getDay(), a = t === 0 ? 7 : t;
|
|
290
|
+
switch (r) {
|
|
291
|
+
case "i":
|
|
292
|
+
return String(a);
|
|
293
|
+
case "ii":
|
|
294
|
+
return i(a, r.length);
|
|
295
|
+
case "io":
|
|
296
|
+
return e.ordinalNumber(a, { unit: "day" });
|
|
297
|
+
case "iii":
|
|
298
|
+
return e.day(t, {
|
|
299
|
+
width: "abbreviated",
|
|
300
|
+
context: "formatting"
|
|
301
|
+
});
|
|
302
|
+
case "iiiii":
|
|
303
|
+
return e.day(t, {
|
|
304
|
+
width: "narrow",
|
|
305
|
+
context: "formatting"
|
|
306
|
+
});
|
|
307
|
+
case "iiiiii":
|
|
308
|
+
return e.day(t, {
|
|
309
|
+
width: "short",
|
|
310
|
+
context: "formatting"
|
|
311
|
+
});
|
|
312
|
+
case "iiii":
|
|
313
|
+
default:
|
|
314
|
+
return e.day(t, {
|
|
315
|
+
width: "wide",
|
|
316
|
+
context: "formatting"
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
// AM or PM
|
|
321
|
+
a: function(n, r, e) {
|
|
322
|
+
const a = n.getHours() / 12 >= 1 ? "pm" : "am";
|
|
323
|
+
switch (r) {
|
|
324
|
+
case "a":
|
|
325
|
+
case "aa":
|
|
326
|
+
return e.dayPeriod(a, {
|
|
327
|
+
width: "abbreviated",
|
|
328
|
+
context: "formatting"
|
|
329
|
+
});
|
|
330
|
+
case "aaa":
|
|
331
|
+
return e.dayPeriod(a, {
|
|
332
|
+
width: "abbreviated",
|
|
333
|
+
context: "formatting"
|
|
334
|
+
}).toLowerCase();
|
|
335
|
+
case "aaaaa":
|
|
336
|
+
return e.dayPeriod(a, {
|
|
337
|
+
width: "narrow",
|
|
338
|
+
context: "formatting"
|
|
339
|
+
});
|
|
340
|
+
case "aaaa":
|
|
341
|
+
default:
|
|
342
|
+
return e.dayPeriod(a, {
|
|
343
|
+
width: "wide",
|
|
344
|
+
context: "formatting"
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
// AM, PM, midnight, noon
|
|
349
|
+
b: function(n, r, e) {
|
|
350
|
+
const t = n.getHours();
|
|
351
|
+
let a;
|
|
352
|
+
switch (t === 12 ? a = s.noon : t === 0 ? a = s.midnight : a = t / 12 >= 1 ? "pm" : "am", r) {
|
|
353
|
+
case "b":
|
|
354
|
+
case "bb":
|
|
355
|
+
return e.dayPeriod(a, {
|
|
356
|
+
width: "abbreviated",
|
|
357
|
+
context: "formatting"
|
|
358
|
+
});
|
|
359
|
+
case "bbb":
|
|
360
|
+
return e.dayPeriod(a, {
|
|
361
|
+
width: "abbreviated",
|
|
362
|
+
context: "formatting"
|
|
363
|
+
}).toLowerCase();
|
|
364
|
+
case "bbbbb":
|
|
365
|
+
return e.dayPeriod(a, {
|
|
366
|
+
width: "narrow",
|
|
367
|
+
context: "formatting"
|
|
368
|
+
});
|
|
369
|
+
case "bbbb":
|
|
370
|
+
default:
|
|
371
|
+
return e.dayPeriod(a, {
|
|
372
|
+
width: "wide",
|
|
373
|
+
context: "formatting"
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
// in the morning, in the afternoon, in the evening, at night
|
|
378
|
+
B: function(n, r, e) {
|
|
379
|
+
const t = n.getHours();
|
|
380
|
+
let a;
|
|
381
|
+
switch (t >= 17 ? a = s.evening : t >= 12 ? a = s.afternoon : t >= 4 ? a = s.morning : a = s.night, r) {
|
|
382
|
+
case "B":
|
|
383
|
+
case "BB":
|
|
384
|
+
case "BBB":
|
|
385
|
+
return e.dayPeriod(a, {
|
|
386
|
+
width: "abbreviated",
|
|
387
|
+
context: "formatting"
|
|
388
|
+
});
|
|
389
|
+
case "BBBBB":
|
|
390
|
+
return e.dayPeriod(a, {
|
|
391
|
+
width: "narrow",
|
|
392
|
+
context: "formatting"
|
|
393
|
+
});
|
|
394
|
+
case "BBBB":
|
|
395
|
+
default:
|
|
396
|
+
return e.dayPeriod(a, {
|
|
397
|
+
width: "wide",
|
|
398
|
+
context: "formatting"
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
// Hour [1-12]
|
|
403
|
+
h: function(n, r, e) {
|
|
404
|
+
if (r === "ho") {
|
|
405
|
+
let t = n.getHours() % 12;
|
|
406
|
+
return t === 0 && (t = 12), e.ordinalNumber(t, { unit: "hour" });
|
|
407
|
+
}
|
|
408
|
+
return u.h(n, r);
|
|
409
|
+
},
|
|
410
|
+
// Hour [0-23]
|
|
411
|
+
H: function(n, r, e) {
|
|
412
|
+
return r === "Ho" ? e.ordinalNumber(n.getHours(), { unit: "hour" }) : u.H(n, r);
|
|
413
|
+
},
|
|
414
|
+
// Hour [0-11]
|
|
415
|
+
K: function(n, r, e) {
|
|
416
|
+
const t = n.getHours() % 12;
|
|
417
|
+
return r === "Ko" ? e.ordinalNumber(t, { unit: "hour" }) : i(t, r.length);
|
|
418
|
+
},
|
|
419
|
+
// Hour [1-24]
|
|
420
|
+
k: function(n, r, e) {
|
|
421
|
+
let t = n.getHours();
|
|
422
|
+
return t === 0 && (t = 24), r === "ko" ? e.ordinalNumber(t, { unit: "hour" }) : i(t, r.length);
|
|
423
|
+
},
|
|
424
|
+
// Minute
|
|
425
|
+
m: function(n, r, e) {
|
|
426
|
+
return r === "mo" ? e.ordinalNumber(n.getMinutes(), { unit: "minute" }) : u.m(n, r);
|
|
427
|
+
},
|
|
428
|
+
// Second
|
|
429
|
+
s: function(n, r, e) {
|
|
430
|
+
return r === "so" ? e.ordinalNumber(n.getSeconds(), { unit: "second" }) : u.s(n, r);
|
|
431
|
+
},
|
|
432
|
+
// Fraction of second
|
|
433
|
+
S: function(n, r) {
|
|
434
|
+
return u.S(n, r);
|
|
435
|
+
},
|
|
436
|
+
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
437
|
+
X: function(n, r, e) {
|
|
438
|
+
const t = n.getTimezoneOffset();
|
|
439
|
+
if (t === 0)
|
|
440
|
+
return "Z";
|
|
441
|
+
switch (r) {
|
|
442
|
+
case "X":
|
|
443
|
+
return f(t);
|
|
444
|
+
case "XXXX":
|
|
445
|
+
case "XX":
|
|
446
|
+
return c(t);
|
|
447
|
+
case "XXXXX":
|
|
448
|
+
case "XXX":
|
|
449
|
+
default:
|
|
450
|
+
return c(t, ":");
|
|
451
|
+
}
|
|
452
|
+
},
|
|
453
|
+
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
454
|
+
x: function(n, r, e) {
|
|
455
|
+
const t = n.getTimezoneOffset();
|
|
456
|
+
switch (r) {
|
|
457
|
+
case "x":
|
|
458
|
+
return f(t);
|
|
459
|
+
case "xxxx":
|
|
460
|
+
case "xx":
|
|
461
|
+
return c(t);
|
|
462
|
+
case "xxxxx":
|
|
463
|
+
case "xxx":
|
|
464
|
+
default:
|
|
465
|
+
return c(t, ":");
|
|
466
|
+
}
|
|
467
|
+
},
|
|
468
|
+
// Timezone (GMT)
|
|
469
|
+
O: function(n, r, e) {
|
|
470
|
+
const t = n.getTimezoneOffset();
|
|
471
|
+
switch (r) {
|
|
472
|
+
case "O":
|
|
473
|
+
case "OO":
|
|
474
|
+
case "OOO":
|
|
475
|
+
return "GMT" + d(t, ":");
|
|
476
|
+
case "OOOO":
|
|
477
|
+
default:
|
|
478
|
+
return "GMT" + c(t, ":");
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
// Timezone (specific non-location)
|
|
482
|
+
z: function(n, r, e) {
|
|
483
|
+
const t = n.getTimezoneOffset();
|
|
484
|
+
switch (r) {
|
|
485
|
+
case "z":
|
|
486
|
+
case "zz":
|
|
487
|
+
case "zzz":
|
|
488
|
+
return "GMT" + d(t, ":");
|
|
489
|
+
case "zzzz":
|
|
490
|
+
default:
|
|
491
|
+
return "GMT" + c(t, ":");
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
|
+
// Seconds timestamp
|
|
495
|
+
t: function(n, r, e) {
|
|
496
|
+
const t = Math.trunc(+n / 1e3);
|
|
497
|
+
return i(t, r.length);
|
|
498
|
+
},
|
|
499
|
+
// Milliseconds timestamp
|
|
500
|
+
T: function(n, r, e) {
|
|
501
|
+
return i(+n, r.length);
|
|
502
|
+
}
|
|
503
|
+
};
|
|
504
|
+
function d(n, r = "") {
|
|
505
|
+
const e = n > 0 ? "-" : "+", t = Math.abs(n), a = Math.trunc(t / 60), o = t % 60;
|
|
506
|
+
return o === 0 ? e + String(a) : e + String(a) + r + i(o, 2);
|
|
507
|
+
}
|
|
508
|
+
function f(n, r) {
|
|
509
|
+
return n % 60 === 0 ? (n > 0 ? "-" : "+") + i(Math.abs(n) / 60, 2) : c(n, r);
|
|
510
|
+
}
|
|
511
|
+
function c(n, r = "") {
|
|
512
|
+
const e = n > 0 ? "-" : "+", t = Math.abs(n), a = i(Math.trunc(t / 60), 2), o = i(t % 60, 2);
|
|
513
|
+
return e + a + r + o;
|
|
514
|
+
}
|
|
515
|
+
export {
|
|
516
|
+
L as formatters
|
|
517
|
+
};
|
|
518
|
+
//# sourceMappingURL=formatters.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatters.es.js","sources":["../node_modules/date-fns/_lib/format/formatters.js"],"sourcesContent":["import { getDayOfYear } from \"../../getDayOfYear.js\";\nimport { getISOWeek } from \"../../getISOWeek.js\";\nimport { getISOWeekYear } from \"../../getISOWeekYear.js\";\nimport { getWeek } from \"../../getWeek.js\";\nimport { getWeekYear } from \"../../getWeekYear.js\";\n\nimport { addLeadingZeros } from \"../addLeadingZeros.js\";\nimport { lightFormatters } from \"./lightFormatters.js\";\n\nconst dayPeriodEnum = {\n am: \"am\",\n pm: \"pm\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n};\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O | Timezone (GMT) |\n * | p! | Long localized time | P! | Long localized date |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\n\nexport const formatters = {\n // Era\n G: function (date, token, localize) {\n const era = date.getFullYear() > 0 ? 1 : 0;\n switch (token) {\n // AD, BC\n case \"G\":\n case \"GG\":\n case \"GGG\":\n return localize.era(era, { width: \"abbreviated\" });\n // A, B\n case \"GGGGG\":\n return localize.era(era, { width: \"narrow\" });\n // Anno Domini, Before Christ\n case \"GGGG\":\n default:\n return localize.era(era, { width: \"wide\" });\n }\n },\n\n // Year\n y: function (date, token, localize) {\n // Ordinal number\n if (token === \"yo\") {\n const signedYear = date.getFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const year = signedYear > 0 ? signedYear : 1 - signedYear;\n return localize.ordinalNumber(year, { unit: \"year\" });\n }\n\n return lightFormatters.y(date, token);\n },\n\n // Local week-numbering year\n Y: function (date, token, localize, options) {\n const signedWeekYear = getWeekYear(date, options);\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;\n\n // Two digit year\n if (token === \"YY\") {\n const twoDigitYear = weekYear % 100;\n return addLeadingZeros(twoDigitYear, 2);\n }\n\n // Ordinal number\n if (token === \"Yo\") {\n return localize.ordinalNumber(weekYear, { unit: \"year\" });\n }\n\n // Padding\n return addLeadingZeros(weekYear, token.length);\n },\n\n // ISO week-numbering year\n R: function (date, token) {\n const isoWeekYear = getISOWeekYear(date);\n\n // Padding\n return addLeadingZeros(isoWeekYear, token.length);\n },\n\n // Extended year. This is a single number designating the year of this calendar system.\n // The main difference between `y` and `u` localizers are B.C. years:\n // | Year | `y` | `u` |\n // |------|-----|-----|\n // | AC 1 | 1 | 1 |\n // | BC 1 | 1 | 0 |\n // | BC 2 | 2 | -1 |\n // Also `yy` always returns the last two digits of a year,\n // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n u: function (date, token) {\n const year = date.getFullYear();\n return addLeadingZeros(year, token.length);\n },\n\n // Quarter\n Q: function (date, token, localize) {\n const quarter = Math.ceil((date.getMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case \"Q\":\n return String(quarter);\n // 01, 02, 03, 04\n case \"QQ\":\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case \"Qo\":\n return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"QQQ\":\n return localize.quarter(quarter, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"QQQQQ\":\n return localize.quarter(quarter, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"QQQQ\":\n default:\n return localize.quarter(quarter, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Stand-alone quarter\n q: function (date, token, localize) {\n const quarter = Math.ceil((date.getMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case \"q\":\n return String(quarter);\n // 01, 02, 03, 04\n case \"qq\":\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case \"qo\":\n return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"qqq\":\n return localize.quarter(quarter, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"qqqqq\":\n return localize.quarter(quarter, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"qqqq\":\n default:\n return localize.quarter(quarter, {\n width: \"wide\",\n context: \"standalone\",\n });\n }\n },\n\n // Month\n M: function (date, token, localize) {\n const month = date.getMonth();\n switch (token) {\n case \"M\":\n case \"MM\":\n return lightFormatters.M(date, token);\n // 1st, 2nd, ..., 12th\n case \"Mo\":\n return localize.ordinalNumber(month + 1, { unit: \"month\" });\n // Jan, Feb, ..., Dec\n case \"MMM\":\n return localize.month(month, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // J, F, ..., D\n case \"MMMMM\":\n return localize.month(month, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // January, February, ..., December\n case \"MMMM\":\n default:\n return localize.month(month, { width: \"wide\", context: \"formatting\" });\n }\n },\n\n // Stand-alone month\n L: function (date, token, localize) {\n const month = date.getMonth();\n switch (token) {\n // 1, 2, ..., 12\n case \"L\":\n return String(month + 1);\n // 01, 02, ..., 12\n case \"LL\":\n return addLeadingZeros(month + 1, 2);\n // 1st, 2nd, ..., 12th\n case \"Lo\":\n return localize.ordinalNumber(month + 1, { unit: \"month\" });\n // Jan, Feb, ..., Dec\n case \"LLL\":\n return localize.month(month, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // J, F, ..., D\n case \"LLLLL\":\n return localize.month(month, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // January, February, ..., December\n case \"LLLL\":\n default:\n return localize.month(month, { width: \"wide\", context: \"standalone\" });\n }\n },\n\n // Local week of year\n w: function (date, token, localize, options) {\n const week = getWeek(date, options);\n\n if (token === \"wo\") {\n return localize.ordinalNumber(week, { unit: \"week\" });\n }\n\n return addLeadingZeros(week, token.length);\n },\n\n // ISO week of year\n I: function (date, token, localize) {\n const isoWeek = getISOWeek(date);\n\n if (token === \"Io\") {\n return localize.ordinalNumber(isoWeek, { unit: \"week\" });\n }\n\n return addLeadingZeros(isoWeek, token.length);\n },\n\n // Day of the month\n d: function (date, token, localize) {\n if (token === \"do\") {\n return localize.ordinalNumber(date.getDate(), { unit: \"date\" });\n }\n\n return lightFormatters.d(date, token);\n },\n\n // Day of year\n D: function (date, token, localize) {\n const dayOfYear = getDayOfYear(date);\n\n if (token === \"Do\") {\n return localize.ordinalNumber(dayOfYear, { unit: \"dayOfYear\" });\n }\n\n return addLeadingZeros(dayOfYear, token.length);\n },\n\n // Day of week\n E: function (date, token, localize) {\n const dayOfWeek = date.getDay();\n switch (token) {\n // Tue\n case \"E\":\n case \"EE\":\n case \"EEE\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"EEEEE\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"EEEEEE\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"EEEE\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Local day of week\n e: function (date, token, localize, options) {\n const dayOfWeek = date.getDay();\n const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (Nth day of week with current locale or weekStartsOn)\n case \"e\":\n return String(localDayOfWeek);\n // Padded numerical value\n case \"ee\":\n return addLeadingZeros(localDayOfWeek, 2);\n // 1st, 2nd, ..., 7th\n case \"eo\":\n return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n case \"eee\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"eeeee\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"eeeeee\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"eeee\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Stand-alone local day of week\n c: function (date, token, localize, options) {\n const dayOfWeek = date.getDay();\n const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (same as in `e`)\n case \"c\":\n return String(localDayOfWeek);\n // Padded numerical value\n case \"cc\":\n return addLeadingZeros(localDayOfWeek, token.length);\n // 1st, 2nd, ..., 7th\n case \"co\":\n return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n case \"ccc\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // T\n case \"ccccc\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // Tu\n case \"cccccc\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"standalone\",\n });\n // Tuesday\n case \"cccc\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"standalone\",\n });\n }\n },\n\n // ISO day of week\n i: function (date, token, localize) {\n const dayOfWeek = date.getDay();\n const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n switch (token) {\n // 2\n case \"i\":\n return String(isoDayOfWeek);\n // 02\n case \"ii\":\n return addLeadingZeros(isoDayOfWeek, token.length);\n // 2nd\n case \"io\":\n return localize.ordinalNumber(isoDayOfWeek, { unit: \"day\" });\n // Tue\n case \"iii\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"iiiii\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"iiiiii\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"iiii\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // AM or PM\n a: function (date, token, localize) {\n const hours = date.getHours();\n const dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n\n switch (token) {\n case \"a\":\n case \"aa\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"aaa\":\n return localize\n .dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n })\n .toLowerCase();\n case \"aaaaa\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"aaaa\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // AM, PM, midnight, noon\n b: function (date, token, localize) {\n const hours = date.getHours();\n let dayPeriodEnumValue;\n if (hours === 12) {\n dayPeriodEnumValue = dayPeriodEnum.noon;\n } else if (hours === 0) {\n dayPeriodEnumValue = dayPeriodEnum.midnight;\n } else {\n dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n }\n\n switch (token) {\n case \"b\":\n case \"bb\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"bbb\":\n return localize\n .dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n })\n .toLowerCase();\n case \"bbbbb\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"bbbb\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // in the morning, in the afternoon, in the evening, at night\n B: function (date, token, localize) {\n const hours = date.getHours();\n let dayPeriodEnumValue;\n if (hours >= 17) {\n dayPeriodEnumValue = dayPeriodEnum.evening;\n } else if (hours >= 12) {\n dayPeriodEnumValue = dayPeriodEnum.afternoon;\n } else if (hours >= 4) {\n dayPeriodEnumValue = dayPeriodEnum.morning;\n } else {\n dayPeriodEnumValue = dayPeriodEnum.night;\n }\n\n switch (token) {\n case \"B\":\n case \"BB\":\n case \"BBB\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"BBBBB\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"BBBB\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Hour [1-12]\n h: function (date, token, localize) {\n if (token === \"ho\") {\n let hours = date.getHours() % 12;\n if (hours === 0) hours = 12;\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return lightFormatters.h(date, token);\n },\n\n // Hour [0-23]\n H: function (date, token, localize) {\n if (token === \"Ho\") {\n return localize.ordinalNumber(date.getHours(), { unit: \"hour\" });\n }\n\n return lightFormatters.H(date, token);\n },\n\n // Hour [0-11]\n K: function (date, token, localize) {\n const hours = date.getHours() % 12;\n\n if (token === \"Ko\") {\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n\n // Hour [1-24]\n k: function (date, token, localize) {\n let hours = date.getHours();\n if (hours === 0) hours = 24;\n\n if (token === \"ko\") {\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n\n // Minute\n m: function (date, token, localize) {\n if (token === \"mo\") {\n return localize.ordinalNumber(date.getMinutes(), { unit: \"minute\" });\n }\n\n return lightFormatters.m(date, token);\n },\n\n // Second\n s: function (date, token, localize) {\n if (token === \"so\") {\n return localize.ordinalNumber(date.getSeconds(), { unit: \"second\" });\n }\n\n return lightFormatters.s(date, token);\n },\n\n // Fraction of second\n S: function (date, token) {\n return lightFormatters.S(date, token);\n },\n\n // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n X: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n if (timezoneOffset === 0) {\n return \"Z\";\n }\n\n switch (token) {\n // Hours and optional minutes\n case \"X\":\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XX`\n case \"XXXX\":\n case \"XX\": // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XXX`\n case \"XXXXX\":\n case \"XXX\": // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n x: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Hours and optional minutes\n case \"x\":\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xx`\n case \"xxxx\":\n case \"xx\": // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xxx`\n case \"xxxxx\":\n case \"xxx\": // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (GMT)\n O: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Short\n case \"O\":\n case \"OO\":\n case \"OOO\":\n return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n // Long\n case \"OOOO\":\n default:\n return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (specific non-location)\n z: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Short\n case \"z\":\n case \"zz\":\n case \"zzz\":\n return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n // Long\n case \"zzzz\":\n default:\n return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Seconds timestamp\n t: function (date, token, _localize) {\n const timestamp = Math.trunc(+date / 1000);\n return addLeadingZeros(timestamp, token.length);\n },\n\n // Milliseconds timestamp\n T: function (date, token, _localize) {\n return addLeadingZeros(+date, token.length);\n },\n};\n\nfunction formatTimezoneShort(offset, delimiter = \"\") {\n const sign = offset > 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(offset);\n const hours = Math.trunc(absOffset / 60);\n const minutes = absOffset % 60;\n if (minutes === 0) {\n return sign + String(hours);\n }\n return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, delimiter) {\n if (offset % 60 === 0) {\n const sign = offset > 0 ? \"-\" : \"+\";\n return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n }\n return formatTimezone(offset, delimiter);\n}\n\nfunction formatTimezone(offset, delimiter = \"\") {\n const sign = offset > 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(offset);\n const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);\n const minutes = addLeadingZeros(absOffset % 60, 2);\n return sign + hours + delimiter + minutes;\n}\n"],"names":["dayPeriodEnum","formatters","date","token","localize","era","signedYear","year","lightFormatters","options","signedWeekYear","getWeekYear","weekYear","twoDigitYear","addLeadingZeros","isoWeekYear","getISOWeekYear","quarter","month","week","getWeek","isoWeek","getISOWeek","dayOfYear","getDayOfYear","dayOfWeek","localDayOfWeek","isoDayOfWeek","dayPeriodEnumValue","hours","_localize","timezoneOffset","formatTimezoneWithOptionalMinutes","formatTimezone","formatTimezoneShort","timestamp","offset","delimiter","sign","absOffset","minutes"],"mappings":";;;;;;;AASA,MAAMA,IAAgB;AAAA,EACpB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,UAAU;AAAA,EACV,MAAM;AAAA,EACN,SAAS;AAAA,EACT,WAAW;AAAA,EACX,SAAS;AAAA,EACT,OAAO;AACT,GAgDaC,IAAa;AAAA;AAAA,EAExB,GAAG,SAAUC,GAAMC,GAAOC,GAAU;AAClC,UAAMC,IAAMH,EAAK,YAAa,IAAG,IAAI,IAAI;AACzC,YAAQC,GAAK;AAAA,MAEX,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AACH,eAAOC,EAAS,IAAIC,GAAK,EAAE,OAAO,cAAa,CAAE;AAAA,MAEnD,KAAK;AACH,eAAOD,EAAS,IAAIC,GAAK,EAAE,OAAO,SAAQ,CAAE;AAAA,MAE9C,KAAK;AAAA,MACL;AACE,eAAOD,EAAS,IAAIC,GAAK,EAAE,OAAO,OAAM,CAAE;AAAA,IAClD;AAAA,EACG;AAAA;AAAA,EAGD,GAAG,SAAUH,GAAMC,GAAOC,GAAU;AAElC,QAAID,MAAU,MAAM;AAClB,YAAMG,IAAaJ,EAAK,YAAa,GAE/BK,IAAOD,IAAa,IAAIA,IAAa,IAAIA;AAC/C,aAAOF,EAAS,cAAcG,GAAM,EAAE,MAA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IAAIsB,CAAM,IAAI,IAAI,CAAC,IAEjDH,EAAeG,GAAQC,CAAS;AACzC;AAEA,SAASJ,EAAeG,GAAQC,IAAY,IAAI;AAC9C,QAAMC,IAAOF,IAAS,IAAI,MAAM,KAC1BG,IAAY,KAAK,IAAIH,CAAM,GAC3BP,IAAQf,EAAgB,KAAK,MAAMyB,IAAY,EAAE,GAAG,CAAC,GACrDC,IAAU1B,EAAgByB,IAAY,IAAI,CAAC;AACjD,SAAOD,IAAOT,IAAQQ,IAAYG;AACpC;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx as r, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { FormField as x, FormItem as C, FormControl as b, FormLabel as g, FormMessage as k } from "./form.es.js";
|
|
3
|
+
import { useController as F } from "react-hook-form";
|
|
4
|
+
import { Checkbox as P } from "./checkbox.es.js";
|
|
5
|
+
import { useCallback as N } from "react";
|
|
6
|
+
import { cn as j } from "./utils.es.js";
|
|
7
|
+
const U = (p) => {
|
|
8
|
+
const { name: t, control: a, defaultValue: m, disabled: s, rules: l, shouldUnregister: n, label: f, slotProps: e, required: c, ...h } = p, { field: i } = F({ name: t, control: a, rules: l, defaultValue: m, disabled: s, shouldUnregister: n }), u = N(
|
|
9
|
+
(o) => {
|
|
10
|
+
i.onChange(o);
|
|
11
|
+
},
|
|
12
|
+
[i]
|
|
13
|
+
);
|
|
14
|
+
return /* @__PURE__ */ r(
|
|
15
|
+
x,
|
|
16
|
+
{
|
|
17
|
+
control: a,
|
|
18
|
+
name: t,
|
|
19
|
+
defaultValue: m,
|
|
20
|
+
disabled: s,
|
|
21
|
+
rules: l,
|
|
22
|
+
shouldUnregister: n,
|
|
23
|
+
render: ({ field: o }) => /* @__PURE__ */ d(C, { ...h, className: "flex items-center gap-2 justify-start space-y-0", children: [
|
|
24
|
+
/* @__PURE__ */ r(b, { ...e?.formControlProps ?? {}, children: /* @__PURE__ */ r(
|
|
25
|
+
P,
|
|
26
|
+
{
|
|
27
|
+
...e?.checkboxProps ?? {},
|
|
28
|
+
...o,
|
|
29
|
+
checked: o.value,
|
|
30
|
+
onCheckedChange: u,
|
|
31
|
+
"aria-required": c,
|
|
32
|
+
disabled: s
|
|
33
|
+
}
|
|
34
|
+
) }),
|
|
35
|
+
/* @__PURE__ */ d(g, { ...e?.formLabelProps ?? {}, className: j("text-text", e?.formLabelProps?.className), children: [
|
|
36
|
+
f,
|
|
37
|
+
c && /* @__PURE__ */ r("span", { className: "text-danger text-sm", children: "*" })
|
|
38
|
+
] }),
|
|
39
|
+
/* @__PURE__ */ r(k, { ...e?.formMessageProps ?? {} })
|
|
40
|
+
] })
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
U as FormCheckbox
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=formcheckbox.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formcheckbox.es.js","sources":["../src/components/form-checkbox/FormCheckbox.tsx"],"sourcesContent":["import { FormControl, FormField, FormItem, FormLabel, FormMessage } from \"../form/Form\";\r\nimport { SlotProps } from \"@radix-ui/react-slot\";\r\nimport { Control, ControllerProps, FieldPath, FieldValues, useController } from \"react-hook-form\";\r\nimport { Checkbox, CheckboxProps } from \"../checkbox/Checkbox\";\r\nimport { useCallback } from \"react\";\r\nimport { cn } from \"../../lib/utils\";\r\n\r\ntype FormCheckboxProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = Omit<\r\n ControllerProps<TFieldValues, TName>,\r\n \"render\"\r\n> &\r\n React.ComponentProps<typeof FormItem> & {\r\n label: string;\r\n control: Control<TFieldValues>;\r\n required?: boolean;\r\n slotProps?: {\r\n formLabelProps?: React.HTMLAttributes<HTMLLabelElement> & React.RefAttributes<HTMLLabelElement>;\r\n formMessageProps?: React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>;\r\n formControlProps?: Omit<SlotProps & React.RefAttributes<HTMLElement>, \"ref\"> & React.RefAttributes<HTMLElement>;\r\n checkboxProps?: CheckboxProps;\r\n };\r\n };\r\n\r\nconst FormCheckbox = <TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>(props: FormCheckboxProps<TFieldValues, TName>) => {\r\n const { name, control, defaultValue, disabled, rules, shouldUnregister, label, slotProps, required, ...formItemProps } = props;\r\n const { field } = useController({ name, control, rules, defaultValue, disabled, shouldUnregister });\r\n\r\n const handleCheckChanged = useCallback(\r\n (checked: boolean) => {\r\n field.onChange(checked);\r\n },\r\n [field],\r\n );\r\n\r\n return (\r\n <FormField\r\n control={control}\r\n name={name}\r\n defaultValue={defaultValue}\r\n disabled={disabled}\r\n rules={rules}\r\n shouldUnregister={shouldUnregister}\r\n render={({ field }) => {\r\n return (\r\n <FormItem {...formItemProps} className=\"flex items-center gap-2 justify-start space-y-0\">\r\n <FormControl {...(slotProps?.formControlProps ?? {})}>\r\n <Checkbox\r\n {...(slotProps?.checkboxProps ?? {})}\r\n {...field}\r\n checked={field.value}\r\n onCheckedChange={handleCheckChanged}\r\n aria-required={required}\r\n disabled={disabled}\r\n />\r\n </FormControl>\r\n <FormLabel {...(slotProps?.formLabelProps ?? {})} className={cn(\"text-text\", slotProps?.formLabelProps?.className)}>\r\n {label}\r\n {required && <span className=\"text-danger text-sm\">*</span>}\r\n </FormLabel>\r\n <FormMessage {...(slotProps?.formMessageProps ?? {})} />\r\n </FormItem>\r\n );\r\n }}\r\n />\r\n );\r\n};\r\nexport { FormCheckbox, type FormCheckboxProps };\r\n"],"names":["FormCheckbox","props","name","control","defaultValue","disabled","rules","shouldUnregister","label","slotProps","required","formItemProps","field","useController","handleCheckChanged","useCallback","checked","jsx","FormField","jsxs","FormItem","FormControl","Checkbox","FormLabel","cn","FormMessage"],"mappings":";;;;;;AAuBM,MAAAA,IAAe,CAA0EC,MAAkD;AAC/I,QAAM,EAAE,MAAAC,GAAM,SAAAC,GAAS,cAA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