@noambz/ui 0.7.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/README.md +230 -0
- package/dist/__test-setup__.d.ts +2 -0
- package/dist/__test-setup__.d.ts.map +1 -0
- package/dist/components/atoms/avatar/avatar.d.ts +16 -0
- package/dist/components/atoms/avatar/avatar.d.ts.map +1 -0
- package/dist/components/atoms/avatar/avatar.js +58 -0
- package/dist/components/atoms/avatar/avatar.js.map +1 -0
- package/dist/components/atoms/avatar/avatar.stories.d.ts +9 -0
- package/dist/components/atoms/avatar/avatar.stories.d.ts.map +1 -0
- package/dist/components/atoms/avatar/index.d.ts +3 -0
- package/dist/components/atoms/avatar/index.d.ts.map +1 -0
- package/dist/components/atoms/avatar/index.js +7 -0
- package/dist/components/atoms/avatar/index.js.map +1 -0
- package/dist/components/atoms/checkbox/checkbox.d.ts +15 -0
- package/dist/components/atoms/checkbox/checkbox.d.ts.map +1 -0
- package/dist/components/atoms/checkbox/checkbox.js +44 -0
- package/dist/components/atoms/checkbox/checkbox.js.map +1 -0
- package/dist/components/atoms/checkbox/checkbox.stories.d.ts +11 -0
- package/dist/components/atoms/checkbox/checkbox.stories.d.ts.map +1 -0
- package/dist/components/atoms/checkbox/index.d.ts +3 -0
- package/dist/components/atoms/checkbox/index.d.ts.map +1 -0
- package/dist/components/atoms/checkbox/index.js +5 -0
- package/dist/components/atoms/checkbox/index.js.map +1 -0
- package/dist/components/atoms/index.d.ts +17 -0
- package/dist/components/atoms/index.d.ts.map +1 -0
- package/dist/components/atoms/index.js +17 -0
- package/dist/components/atoms/index.js.map +1 -0
- package/dist/components/atoms/input/index.d.ts +4 -0
- package/dist/components/atoms/input/index.d.ts.map +1 -0
- package/dist/components/atoms/input/index.js +9 -0
- package/dist/components/atoms/input/index.js.map +1 -0
- package/dist/components/atoms/input/input.d.ts +16 -0
- package/dist/components/atoms/input/input.d.ts.map +1 -0
- package/dist/components/atoms/input/input.js +45 -0
- package/dist/components/atoms/input/input.js.map +1 -0
- package/dist/components/atoms/input/input.stories.d.ts +13 -0
- package/dist/components/atoms/input/input.stories.d.ts.map +1 -0
- package/dist/components/atoms/input/input.type.d.ts +10 -0
- package/dist/components/atoms/input/input.type.d.ts.map +1 -0
- package/dist/components/atoms/input/input.type.js +16 -0
- package/dist/components/atoms/input/input.type.js.map +1 -0
- package/dist/components/atoms/kbd/index.d.ts +3 -0
- package/dist/components/atoms/kbd/index.d.ts.map +1 -0
- package/dist/components/atoms/kbd/index.js +5 -0
- package/dist/components/atoms/kbd/index.js.map +1 -0
- package/dist/components/atoms/kbd/kbd.d.ts +10 -0
- package/dist/components/atoms/kbd/kbd.d.ts.map +1 -0
- package/dist/components/atoms/kbd/kbd.js +21 -0
- package/dist/components/atoms/kbd/kbd.js.map +1 -0
- package/dist/components/atoms/kbd/kbd.stories.d.ts +9 -0
- package/dist/components/atoms/kbd/kbd.stories.d.ts.map +1 -0
- package/dist/components/atoms/label/index.d.ts +3 -0
- package/dist/components/atoms/label/index.d.ts.map +1 -0
- package/dist/components/atoms/label/index.js +5 -0
- package/dist/components/atoms/label/index.js.map +1 -0
- package/dist/components/atoms/label/label.d.ts +16 -0
- package/dist/components/atoms/label/label.d.ts.map +1 -0
- package/dist/components/atoms/label/label.js +28 -0
- package/dist/components/atoms/label/label.js.map +1 -0
- package/dist/components/atoms/label/label.stories.d.ts +9 -0
- package/dist/components/atoms/label/label.stories.d.ts.map +1 -0
- package/dist/components/atoms/popover/index.d.ts +2 -0
- package/dist/components/atoms/popover/index.d.ts.map +1 -0
- package/dist/components/atoms/popover/index.js +9 -0
- package/dist/components/atoms/popover/index.js.map +1 -0
- package/dist/components/atoms/popover/popover.d.ts +7 -0
- package/dist/components/atoms/popover/popover.d.ts.map +1 -0
- package/dist/components/atoms/popover/popover.js +31 -0
- package/dist/components/atoms/popover/popover.js.map +1 -0
- package/dist/components/atoms/popover/popover.stories.d.ts +7 -0
- package/dist/components/atoms/popover/popover.stories.d.ts.map +1 -0
- package/dist/components/atoms/radio-group/index.d.ts +3 -0
- package/dist/components/atoms/radio-group/index.d.ts.map +1 -0
- package/dist/components/atoms/radio-group/index.js +6 -0
- package/dist/components/atoms/radio-group/index.js.map +1 -0
- package/dist/components/atoms/radio-group/radio-group.d.ts +13 -0
- package/dist/components/atoms/radio-group/radio-group.d.ts.map +1 -0
- package/dist/components/atoms/radio-group/radio-group.js +30 -0
- package/dist/components/atoms/radio-group/radio-group.js.map +1 -0
- package/dist/components/atoms/radio-group/radio-group.stories.d.ts +7 -0
- package/dist/components/atoms/radio-group/radio-group.stories.d.ts.map +1 -0
- package/dist/components/atoms/separator/index.d.ts +3 -0
- package/dist/components/atoms/separator/index.d.ts.map +1 -0
- package/dist/components/atoms/separator/index.js +5 -0
- package/dist/components/atoms/separator/index.js.map +1 -0
- package/dist/components/atoms/separator/separator.d.ts +10 -0
- package/dist/components/atoms/separator/separator.d.ts.map +1 -0
- package/dist/components/atoms/separator/separator.js +26 -0
- package/dist/components/atoms/separator/separator.js.map +1 -0
- package/dist/components/atoms/separator/separator.stories.d.ts +8 -0
- package/dist/components/atoms/separator/separator.stories.d.ts.map +1 -0
- package/dist/components/atoms/skeleton/index.d.ts +3 -0
- package/dist/components/atoms/skeleton/index.d.ts.map +1 -0
- package/dist/components/atoms/skeleton/index.js +6 -0
- package/dist/components/atoms/skeleton/index.js.map +1 -0
- package/dist/components/atoms/skeleton/skeleton.d.ts +30 -0
- package/dist/components/atoms/skeleton/skeleton.d.ts.map +1 -0
- package/dist/components/atoms/skeleton/skeleton.js +53 -0
- package/dist/components/atoms/skeleton/skeleton.js.map +1 -0
- package/dist/components/atoms/skeleton/skeleton.stories.d.ts +10 -0
- package/dist/components/atoms/skeleton/skeleton.stories.d.ts.map +1 -0
- package/dist/components/atoms/spinner/index.d.ts +3 -0
- package/dist/components/atoms/spinner/index.d.ts.map +1 -0
- package/dist/components/atoms/spinner/index.js +5 -0
- package/dist/components/atoms/spinner/index.js.map +1 -0
- package/dist/components/atoms/spinner/spinner.d.ts +16 -0
- package/dist/components/atoms/spinner/spinner.d.ts.map +1 -0
- package/dist/components/atoms/spinner/spinner.js +43 -0
- package/dist/components/atoms/spinner/spinner.js.map +1 -0
- package/dist/components/atoms/spinner/spinner.stories.d.ts +9 -0
- package/dist/components/atoms/spinner/spinner.stories.d.ts.map +1 -0
- package/dist/components/atoms/switch/index.d.ts +3 -0
- package/dist/components/atoms/switch/index.d.ts.map +1 -0
- package/dist/components/atoms/switch/index.js +5 -0
- package/dist/components/atoms/switch/index.js.map +1 -0
- package/dist/components/atoms/switch/switch.d.ts +10 -0
- package/dist/components/atoms/switch/switch.d.ts.map +1 -0
- package/dist/components/atoms/switch/switch.js +35 -0
- package/dist/components/atoms/switch/switch.js.map +1 -0
- package/dist/components/atoms/tag/index.d.ts +4 -0
- package/dist/components/atoms/tag/index.d.ts.map +1 -0
- package/dist/components/atoms/tag/index.js +10 -0
- package/dist/components/atoms/tag/index.js.map +1 -0
- package/dist/components/atoms/tag/tag.d.ts +22 -0
- package/dist/components/atoms/tag/tag.d.ts.map +1 -0
- package/dist/components/atoms/tag/tag.js +50 -0
- package/dist/components/atoms/tag/tag.js.map +1 -0
- package/dist/components/atoms/tag/tag.stories.d.ts +9 -0
- package/dist/components/atoms/tag/tag.stories.d.ts.map +1 -0
- package/dist/components/atoms/tag/tag.type.d.ts +13 -0
- package/dist/components/atoms/tag/tag.type.d.ts.map +1 -0
- package/dist/components/atoms/tag/tag.type.js +19 -0
- package/dist/components/atoms/tag/tag.type.js.map +1 -0
- package/dist/components/atoms/textarea/index.d.ts +3 -0
- package/dist/components/atoms/textarea/index.d.ts.map +1 -0
- package/dist/components/atoms/textarea/index.js +6 -0
- package/dist/components/atoms/textarea/index.js.map +1 -0
- package/dist/components/atoms/textarea/textarea.d.ts +15 -0
- package/dist/components/atoms/textarea/textarea.d.ts.map +1 -0
- package/dist/components/atoms/textarea/textarea.js +43 -0
- package/dist/components/atoms/textarea/textarea.js.map +1 -0
- package/dist/components/atoms/textarea/textarea.stories.d.ts +11 -0
- package/dist/components/atoms/textarea/textarea.stories.d.ts.map +1 -0
- package/dist/components/atoms/toggle/index.d.ts +3 -0
- package/dist/components/atoms/toggle/index.d.ts.map +1 -0
- package/dist/components/atoms/toggle/index.js +5 -0
- package/dist/components/atoms/toggle/index.js.map +1 -0
- package/dist/components/atoms/toggle/toggle.d.ts +15 -0
- package/dist/components/atoms/toggle/toggle.d.ts.map +1 -0
- package/dist/components/atoms/toggle/toggle.js +44 -0
- package/dist/components/atoms/toggle/toggle.js.map +1 -0
- package/dist/components/atoms/toggle/toggle.stories.d.ts +10 -0
- package/dist/components/atoms/toggle/toggle.stories.d.ts.map +1 -0
- package/dist/components/atoms/typography/index.d.ts +3 -0
- package/dist/components/atoms/typography/index.d.ts.map +1 -0
- package/dist/components/atoms/typography/index.js +5 -0
- package/dist/components/atoms/typography/index.js.map +1 -0
- package/dist/components/atoms/typography/typography.d.ts +22 -0
- package/dist/components/atoms/typography/typography.d.ts.map +1 -0
- package/dist/components/atoms/typography/typography.js +55 -0
- package/dist/components/atoms/typography/typography.js.map +1 -0
- package/dist/components/atoms/typography/typography.stories.d.ts +8 -0
- package/dist/components/atoms/typography/typography.stories.d.ts.map +1 -0
- package/dist/components/atoms/visually-hidden/index.d.ts +3 -0
- package/dist/components/atoms/visually-hidden/index.d.ts.map +1 -0
- package/dist/components/atoms/visually-hidden/index.js +5 -0
- package/dist/components/atoms/visually-hidden/index.js.map +1 -0
- package/dist/components/atoms/visually-hidden/visually-hidden.d.ts +9 -0
- package/dist/components/atoms/visually-hidden/visually-hidden.d.ts.map +1 -0
- package/dist/components/atoms/visually-hidden/visually-hidden.js +10 -0
- package/dist/components/atoms/visually-hidden/visually-hidden.js.map +1 -0
- package/dist/components/atoms/visually-hidden/visually-hidden.stories.d.ts +6 -0
- package/dist/components/atoms/visually-hidden/visually-hidden.stories.d.ts.map +1 -0
- package/dist/components/index.d.ts +5 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +5 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/molecules/accordion/accordion.d.ts +6 -0
- package/dist/components/molecules/accordion/accordion.d.ts.map +1 -0
- package/dist/components/molecules/accordion/accordion.js +52 -0
- package/dist/components/molecules/accordion/accordion.js.map +1 -0
- package/dist/components/molecules/accordion/accordion.stories.d.ts +7 -0
- package/dist/components/molecules/accordion/accordion.stories.d.ts.map +1 -0
- package/dist/components/molecules/accordion/index.d.ts +2 -0
- package/dist/components/molecules/accordion/index.d.ts.map +1 -0
- package/dist/components/molecules/accordion/index.js +8 -0
- package/dist/components/molecules/accordion/index.js.map +1 -0
- package/dist/components/molecules/alert/alert.d.ts +21 -0
- package/dist/components/molecules/alert/alert.d.ts.map +1 -0
- package/dist/components/molecules/alert/alert.js +70 -0
- package/dist/components/molecules/alert/alert.js.map +1 -0
- package/dist/components/molecules/alert/alert.stories.d.ts +12 -0
- package/dist/components/molecules/alert/alert.stories.d.ts.map +1 -0
- package/dist/components/molecules/alert/index.d.ts +3 -0
- package/dist/components/molecules/alert/index.d.ts.map +1 -0
- package/dist/components/molecules/alert/index.js +5 -0
- package/dist/components/molecules/alert/index.js.map +1 -0
- package/dist/components/molecules/breadcrumbs/breadcrumbs.d.ts +23 -0
- package/dist/components/molecules/breadcrumbs/breadcrumbs.d.ts.map +1 -0
- package/dist/components/molecules/breadcrumbs/breadcrumbs.js +27 -0
- package/dist/components/molecules/breadcrumbs/breadcrumbs.js.map +1 -0
- package/dist/components/molecules/breadcrumbs/breadcrumbs.stories.d.ts +8 -0
- package/dist/components/molecules/breadcrumbs/breadcrumbs.stories.d.ts.map +1 -0
- package/dist/components/molecules/breadcrumbs/index.d.ts +3 -0
- package/dist/components/molecules/breadcrumbs/index.d.ts.map +1 -0
- package/dist/components/molecules/breadcrumbs/index.js +5 -0
- package/dist/components/molecules/breadcrumbs/index.js.map +1 -0
- package/dist/components/molecules/button/button.d.ts +26 -0
- package/dist/components/molecules/button/button.d.ts.map +1 -0
- package/dist/components/molecules/button/button.js +73 -0
- package/dist/components/molecules/button/button.js.map +1 -0
- package/dist/components/molecules/button/button.stories.d.ts +12 -0
- package/dist/components/molecules/button/button.stories.d.ts.map +1 -0
- package/dist/components/molecules/button/button.type.d.ts +15 -0
- package/dist/components/molecules/button/button.type.d.ts.map +1 -0
- package/dist/components/molecules/button/button.type.js +21 -0
- package/dist/components/molecules/button/button.type.js.map +1 -0
- package/dist/components/molecules/button/index.d.ts +4 -0
- package/dist/components/molecules/button/index.d.ts.map +1 -0
- package/dist/components/molecules/button/index.js +9 -0
- package/dist/components/molecules/button/index.js.map +1 -0
- package/dist/components/molecules/card/card.d.ts +19 -0
- package/dist/components/molecules/card/card.d.ts.map +1 -0
- package/dist/components/molecules/card/card.js +61 -0
- package/dist/components/molecules/card/card.js.map +1 -0
- package/dist/components/molecules/card/card.stories.d.ts +8 -0
- package/dist/components/molecules/card/card.stories.d.ts.map +1 -0
- package/dist/components/molecules/card/index.d.ts +3 -0
- package/dist/components/molecules/card/index.d.ts.map +1 -0
- package/dist/components/molecules/card/index.js +21 -0
- package/dist/components/molecules/card/index.js.map +1 -0
- package/dist/components/molecules/dropdown-menu/dropdown-menu.d.ts +21 -0
- package/dist/components/molecules/dropdown-menu/dropdown-menu.d.ts.map +1 -0
- package/dist/components/molecules/dropdown-menu/dropdown-menu.js +103 -0
- package/dist/components/molecules/dropdown-menu/dropdown-menu.js.map +1 -0
- package/dist/components/molecules/dropdown-menu/dropdown-menu.stories.d.ts +8 -0
- package/dist/components/molecules/dropdown-menu/dropdown-menu.stories.d.ts.map +1 -0
- package/dist/components/molecules/dropdown-menu/index.d.ts +3 -0
- package/dist/components/molecules/dropdown-menu/index.d.ts.map +1 -0
- package/dist/components/molecules/dropdown-menu/index.js +35 -0
- package/dist/components/molecules/dropdown-menu/index.js.map +1 -0
- package/dist/components/molecules/empty-state/empty-state.d.ts +19 -0
- package/dist/components/molecules/empty-state/empty-state.d.ts.map +1 -0
- package/dist/components/molecules/empty-state/empty-state.js +41 -0
- package/dist/components/molecules/empty-state/empty-state.js.map +1 -0
- package/dist/components/molecules/empty-state/empty-state.stories.d.ts +9 -0
- package/dist/components/molecules/empty-state/empty-state.stories.d.ts.map +1 -0
- package/dist/components/molecules/empty-state/index.d.ts +3 -0
- package/dist/components/molecules/empty-state/index.d.ts.map +1 -0
- package/dist/components/molecules/empty-state/index.js +6 -0
- package/dist/components/molecules/empty-state/index.js.map +1 -0
- package/dist/components/molecules/form/form.d.ts +98 -0
- package/dist/components/molecules/form/form.d.ts.map +1 -0
- package/dist/components/molecules/form/form.js +151 -0
- package/dist/components/molecules/form/form.js.map +1 -0
- package/dist/components/molecules/form/form.stories.d.ts +6 -0
- package/dist/components/molecules/form/form.stories.d.ts.map +1 -0
- package/dist/components/molecules/form/form.test.d.ts +2 -0
- package/dist/components/molecules/form/form.test.d.ts.map +1 -0
- package/dist/components/molecules/form/index.d.ts +3 -0
- package/dist/components/molecules/form/index.d.ts.map +1 -0
- package/dist/components/molecules/form/index.js +7 -0
- package/dist/components/molecules/form/index.js.map +1 -0
- package/dist/components/molecules/form-field/form-field.d.ts +16 -0
- package/dist/components/molecules/form-field/form-field.d.ts.map +1 -0
- package/dist/components/molecules/form-field/form-field.js +34 -0
- package/dist/components/molecules/form-field/form-field.js.map +1 -0
- package/dist/components/molecules/form-field/form-field.stories.d.ts +9 -0
- package/dist/components/molecules/form-field/form-field.stories.d.ts.map +1 -0
- package/dist/components/molecules/form-field/index.d.ts +3 -0
- package/dist/components/molecules/form-field/index.d.ts.map +1 -0
- package/dist/components/molecules/form-field/index.js +5 -0
- package/dist/components/molecules/form-field/index.js.map +1 -0
- package/dist/components/molecules/index.d.ts +29 -0
- package/dist/components/molecules/index.d.ts.map +1 -0
- package/dist/components/molecules/index.js +29 -0
- package/dist/components/molecules/index.js.map +1 -0
- package/dist/components/molecules/labeled-switch/index.d.ts +2 -0
- package/dist/components/molecules/labeled-switch/index.d.ts.map +1 -0
- package/dist/components/molecules/labeled-switch/index.js +2 -0
- package/dist/components/molecules/labeled-switch/index.js.map +1 -0
- package/dist/components/molecules/labeled-switch/labeled-switch.d.ts +14 -0
- package/dist/components/molecules/labeled-switch/labeled-switch.d.ts.map +1 -0
- package/dist/components/molecules/labeled-switch/labeled-switch.js +26 -0
- package/dist/components/molecules/labeled-switch/labeled-switch.js.map +1 -0
- package/dist/components/molecules/language-toggle/index.d.ts +3 -0
- package/dist/components/molecules/language-toggle/index.d.ts.map +1 -0
- package/dist/components/molecules/language-toggle/index.js +5 -0
- package/dist/components/molecules/language-toggle/index.js.map +1 -0
- package/dist/components/molecules/language-toggle/language-toggle.d.ts +18 -0
- package/dist/components/molecules/language-toggle/language-toggle.d.ts.map +1 -0
- package/dist/components/molecules/language-toggle/language-toggle.js +27 -0
- package/dist/components/molecules/language-toggle/language-toggle.js.map +1 -0
- package/dist/components/molecules/language-toggle/language-toggle.stories.d.ts +9 -0
- package/dist/components/molecules/language-toggle/language-toggle.stories.d.ts.map +1 -0
- package/dist/components/molecules/multi-toggle/index.d.ts +3 -0
- package/dist/components/molecules/multi-toggle/index.d.ts.map +1 -0
- package/dist/components/molecules/multi-toggle/index.js +5 -0
- package/dist/components/molecules/multi-toggle/index.js.map +1 -0
- package/dist/components/molecules/multi-toggle/multi-toggle.d.ts +26 -0
- package/dist/components/molecules/multi-toggle/multi-toggle.d.ts.map +1 -0
- package/dist/components/molecules/multi-toggle/multi-toggle.js +75 -0
- package/dist/components/molecules/multi-toggle/multi-toggle.js.map +1 -0
- package/dist/components/molecules/multi-toggle/multi-toggle.stories.d.ts +9 -0
- package/dist/components/molecules/multi-toggle/multi-toggle.stories.d.ts.map +1 -0
- package/dist/components/molecules/number-input/index.d.ts +2 -0
- package/dist/components/molecules/number-input/index.d.ts.map +1 -0
- package/dist/components/molecules/number-input/index.js +5 -0
- package/dist/components/molecules/number-input/index.js.map +1 -0
- package/dist/components/molecules/number-input/number-input.d.ts +22 -0
- package/dist/components/molecules/number-input/number-input.d.ts.map +1 -0
- package/dist/components/molecules/number-input/number-input.js +115 -0
- package/dist/components/molecules/number-input/number-input.js.map +1 -0
- package/dist/components/molecules/number-input/number-input.stories.d.ts +10 -0
- package/dist/components/molecules/number-input/number-input.stories.d.ts.map +1 -0
- package/dist/components/molecules/number-input/number-input.test.d.ts +2 -0
- package/dist/components/molecules/number-input/number-input.test.d.ts.map +1 -0
- package/dist/components/molecules/otp-input/index.d.ts +2 -0
- package/dist/components/molecules/otp-input/index.d.ts.map +1 -0
- package/dist/components/molecules/otp-input/index.js +5 -0
- package/dist/components/molecules/otp-input/index.js.map +1 -0
- package/dist/components/molecules/otp-input/otp-input.d.ts +27 -0
- package/dist/components/molecules/otp-input/otp-input.d.ts.map +1 -0
- package/dist/components/molecules/otp-input/otp-input.js +134 -0
- package/dist/components/molecules/otp-input/otp-input.js.map +1 -0
- package/dist/components/molecules/otp-input/otp-input.stories.d.ts +10 -0
- package/dist/components/molecules/otp-input/otp-input.stories.d.ts.map +1 -0
- package/dist/components/molecules/otp-input/otp-input.test.d.ts +2 -0
- package/dist/components/molecules/otp-input/otp-input.test.d.ts.map +1 -0
- package/dist/components/molecules/page-header/index.d.ts +2 -0
- package/dist/components/molecules/page-header/index.d.ts.map +1 -0
- package/dist/components/molecules/page-header/index.js +2 -0
- package/dist/components/molecules/page-header/index.js.map +1 -0
- package/dist/components/molecules/page-header/page-header.d.ts +12 -0
- package/dist/components/molecules/page-header/page-header.d.ts.map +1 -0
- package/dist/components/molecules/page-header/page-header.js +18 -0
- package/dist/components/molecules/page-header/page-header.js.map +1 -0
- package/dist/components/molecules/pagination/index.d.ts +3 -0
- package/dist/components/molecules/pagination/index.d.ts.map +1 -0
- package/dist/components/molecules/pagination/index.js +5 -0
- package/dist/components/molecules/pagination/index.js.map +1 -0
- package/dist/components/molecules/pagination/pagination.d.ts +19 -0
- package/dist/components/molecules/pagination/pagination.d.ts.map +1 -0
- package/dist/components/molecules/pagination/pagination.js +45 -0
- package/dist/components/molecules/pagination/pagination.js.map +1 -0
- package/dist/components/molecules/pagination/pagination.stories.d.ts +11 -0
- package/dist/components/molecules/pagination/pagination.stories.d.ts.map +1 -0
- package/dist/components/molecules/progress/index.d.ts +3 -0
- package/dist/components/molecules/progress/index.d.ts.map +1 -0
- package/dist/components/molecules/progress/index.js +5 -0
- package/dist/components/molecules/progress/index.js.map +1 -0
- package/dist/components/molecules/progress/progress.d.ts +20 -0
- package/dist/components/molecules/progress/progress.d.ts.map +1 -0
- package/dist/components/molecules/progress/progress.js +63 -0
- package/dist/components/molecules/progress/progress.js.map +1 -0
- package/dist/components/molecules/progress/progress.stories.d.ts +12 -0
- package/dist/components/molecules/progress/progress.stories.d.ts.map +1 -0
- package/dist/components/molecules/query-state/index.d.ts +2 -0
- package/dist/components/molecules/query-state/index.d.ts.map +1 -0
- package/dist/components/molecules/query-state/index.js +2 -0
- package/dist/components/molecules/query-state/index.js.map +1 -0
- package/dist/components/molecules/query-state/query-state.d.ts +18 -0
- package/dist/components/molecules/query-state/query-state.d.ts.map +1 -0
- package/dist/components/molecules/query-state/query-state.js +54 -0
- package/dist/components/molecules/query-state/query-state.js.map +1 -0
- package/dist/components/molecules/search-input/index.d.ts +2 -0
- package/dist/components/molecules/search-input/index.d.ts.map +1 -0
- package/dist/components/molecules/search-input/index.js +5 -0
- package/dist/components/molecules/search-input/index.js.map +1 -0
- package/dist/components/molecules/search-input/search-input.d.ts +22 -0
- package/dist/components/molecules/search-input/search-input.d.ts.map +1 -0
- package/dist/components/molecules/search-input/search-input.js +127 -0
- package/dist/components/molecules/search-input/search-input.js.map +1 -0
- package/dist/components/molecules/search-input/search-input.stories.d.ts +9 -0
- package/dist/components/molecules/search-input/search-input.stories.d.ts.map +1 -0
- package/dist/components/molecules/search-input/search-input.test.d.ts +2 -0
- package/dist/components/molecules/search-input/search-input.test.d.ts.map +1 -0
- package/dist/components/molecules/signal-card/index.d.ts +3 -0
- package/dist/components/molecules/signal-card/index.d.ts.map +1 -0
- package/dist/components/molecules/signal-card/index.js +5 -0
- package/dist/components/molecules/signal-card/index.js.map +1 -0
- package/dist/components/molecules/signal-card/signal-card.d.ts +32 -0
- package/dist/components/molecules/signal-card/signal-card.d.ts.map +1 -0
- package/dist/components/molecules/signal-card/signal-card.js +80 -0
- package/dist/components/molecules/signal-card/signal-card.js.map +1 -0
- package/dist/components/molecules/signal-card/signal-card.stories.d.ts +9 -0
- package/dist/components/molecules/signal-card/signal-card.stories.d.ts.map +1 -0
- package/dist/components/molecules/signal-severity-badge/index.d.ts +4 -0
- package/dist/components/molecules/signal-severity-badge/index.d.ts.map +1 -0
- package/dist/components/molecules/signal-severity-badge/index.js +7 -0
- package/dist/components/molecules/signal-severity-badge/index.js.map +1 -0
- package/dist/components/molecules/signal-severity-badge/signal-severity-badge.d.ts +19 -0
- package/dist/components/molecules/signal-severity-badge/signal-severity-badge.d.ts.map +1 -0
- package/dist/components/molecules/signal-severity-badge/signal-severity-badge.js +49 -0
- package/dist/components/molecules/signal-severity-badge/signal-severity-badge.js.map +1 -0
- package/dist/components/molecules/signal-severity-badge/signal-severity-badge.stories.d.ts +9 -0
- package/dist/components/molecules/signal-severity-badge/signal-severity-badge.stories.d.ts.map +1 -0
- package/dist/components/molecules/signal-severity-badge/signal-severity-badge.type.d.ts +7 -0
- package/dist/components/molecules/signal-severity-badge/signal-severity-badge.type.d.ts.map +1 -0
- package/dist/components/molecules/signal-severity-badge/signal-severity-badge.type.js +11 -0
- package/dist/components/molecules/signal-severity-badge/signal-severity-badge.type.js.map +1 -0
- package/dist/components/molecules/stat-grid/index.d.ts +2 -0
- package/dist/components/molecules/stat-grid/index.d.ts.map +1 -0
- package/dist/components/molecules/stat-grid/index.js +2 -0
- package/dist/components/molecules/stat-grid/index.js.map +1 -0
- package/dist/components/molecules/stat-grid/stat-grid.d.ts +15 -0
- package/dist/components/molecules/stat-grid/stat-grid.d.ts.map +1 -0
- package/dist/components/molecules/stat-grid/stat-grid.js +19 -0
- package/dist/components/molecules/stat-grid/stat-grid.js.map +1 -0
- package/dist/components/molecules/summary-header/index.d.ts +3 -0
- package/dist/components/molecules/summary-header/index.d.ts.map +1 -0
- package/dist/components/molecules/summary-header/index.js +5 -0
- package/dist/components/molecules/summary-header/index.js.map +1 -0
- package/dist/components/molecules/summary-header/summary-header.d.ts +23 -0
- package/dist/components/molecules/summary-header/summary-header.d.ts.map +1 -0
- package/dist/components/molecules/summary-header/summary-header.js +57 -0
- package/dist/components/molecules/summary-header/summary-header.js.map +1 -0
- package/dist/components/molecules/summary-header/summary-header.stories.d.ts +8 -0
- package/dist/components/molecules/summary-header/summary-header.stories.d.ts.map +1 -0
- package/dist/components/molecules/tabs/index.d.ts +2 -0
- package/dist/components/molecules/tabs/index.d.ts.map +1 -0
- package/dist/components/molecules/tabs/index.js +8 -0
- package/dist/components/molecules/tabs/index.js.map +1 -0
- package/dist/components/molecules/tabs/tabs.d.ts +6 -0
- package/dist/components/molecules/tabs/tabs.d.ts.map +1 -0
- package/dist/components/molecules/tabs/tabs.js +46 -0
- package/dist/components/molecules/tabs/tabs.js.map +1 -0
- package/dist/components/molecules/tabs/tabs.stories.d.ts +7 -0
- package/dist/components/molecules/tabs/tabs.stories.d.ts.map +1 -0
- package/dist/components/molecules/tag-input/index.d.ts +2 -0
- package/dist/components/molecules/tag-input/index.d.ts.map +1 -0
- package/dist/components/molecules/tag-input/index.js +5 -0
- package/dist/components/molecules/tag-input/index.js.map +1 -0
- package/dist/components/molecules/tag-input/tag-input.d.ts +27 -0
- package/dist/components/molecules/tag-input/tag-input.d.ts.map +1 -0
- package/dist/components/molecules/tag-input/tag-input.js +143 -0
- package/dist/components/molecules/tag-input/tag-input.js.map +1 -0
- package/dist/components/molecules/tag-input/tag-input.stories.d.ts +10 -0
- package/dist/components/molecules/tag-input/tag-input.stories.d.ts.map +1 -0
- package/dist/components/molecules/tag-input/tag-input.test.d.ts +2 -0
- package/dist/components/molecules/tag-input/tag-input.test.d.ts.map +1 -0
- package/dist/components/molecules/text-artifact-card/index.d.ts +2 -0
- package/dist/components/molecules/text-artifact-card/index.d.ts.map +1 -0
- package/dist/components/molecules/text-artifact-card/index.js +2 -0
- package/dist/components/molecules/text-artifact-card/index.js.map +1 -0
- package/dist/components/molecules/text-artifact-card/text-artifact-card.d.ts +16 -0
- package/dist/components/molecules/text-artifact-card/text-artifact-card.d.ts.map +1 -0
- package/dist/components/molecules/text-artifact-card/text-artifact-card.js +49 -0
- package/dist/components/molecules/text-artifact-card/text-artifact-card.js.map +1 -0
- package/dist/components/molecules/theme-toggle/index.d.ts +6 -0
- package/dist/components/molecules/theme-toggle/index.d.ts.map +1 -0
- package/dist/components/molecules/theme-toggle/index.js +10 -0
- package/dist/components/molecules/theme-toggle/index.js.map +1 -0
- package/dist/components/molecules/theme-toggle/theme-toggle-connected.d.ts +10 -0
- package/dist/components/molecules/theme-toggle/theme-toggle-connected.d.ts.map +1 -0
- package/dist/components/molecules/theme-toggle/theme-toggle-connected.js +12 -0
- package/dist/components/molecules/theme-toggle/theme-toggle-connected.js.map +1 -0
- package/dist/components/molecules/theme-toggle/theme-toggle.d.ts +19 -0
- package/dist/components/molecules/theme-toggle/theme-toggle.d.ts.map +1 -0
- package/dist/components/molecules/theme-toggle/theme-toggle.js +100 -0
- package/dist/components/molecules/theme-toggle/theme-toggle.js.map +1 -0
- package/dist/components/molecules/theme-toggle/theme-toggle.stories.d.ts +10 -0
- package/dist/components/molecules/theme-toggle/theme-toggle.stories.d.ts.map +1 -0
- package/dist/components/molecules/theme-toggle/theme-toggle.type.d.ts +11 -0
- package/dist/components/molecules/theme-toggle/theme-toggle.type.d.ts.map +1 -0
- package/dist/components/molecules/theme-toggle/theme-toggle.type.js +17 -0
- package/dist/components/molecules/theme-toggle/theme-toggle.type.js.map +1 -0
- package/dist/components/molecules/tooltip/index.d.ts +3 -0
- package/dist/components/molecules/tooltip/index.d.ts.map +1 -0
- package/dist/components/molecules/tooltip/index.js +19 -0
- package/dist/components/molecules/tooltip/index.js.map +1 -0
- package/dist/components/molecules/tooltip/tooltip.d.ts +27 -0
- package/dist/components/molecules/tooltip/tooltip.d.ts.map +1 -0
- package/dist/components/molecules/tooltip/tooltip.js +39 -0
- package/dist/components/molecules/tooltip/tooltip.js.map +1 -0
- package/dist/components/molecules/tooltip/tooltip.stories.d.ts +8 -0
- package/dist/components/molecules/tooltip/tooltip.stories.d.ts.map +1 -0
- package/dist/components/organisms/app-shell/app-shell-layout.d.ts +23 -0
- package/dist/components/organisms/app-shell/app-shell-layout.d.ts.map +1 -0
- package/dist/components/organisms/app-shell/app-shell-layout.js +46 -0
- package/dist/components/organisms/app-shell/app-shell-layout.js.map +1 -0
- package/dist/components/organisms/app-shell/app-shell-preset.d.ts +44 -0
- package/dist/components/organisms/app-shell/app-shell-preset.d.ts.map +1 -0
- package/dist/components/organisms/app-shell/app-shell-preset.js +137 -0
- package/dist/components/organisms/app-shell/app-shell-preset.js.map +1 -0
- package/dist/components/organisms/app-shell/app-shell.stories.d.ts +9 -0
- package/dist/components/organisms/app-shell/app-shell.stories.d.ts.map +1 -0
- package/dist/components/organisms/app-shell/index.d.ts +9 -0
- package/dist/components/organisms/app-shell/index.d.ts.map +1 -0
- package/dist/components/organisms/app-shell/index.js +11 -0
- package/dist/components/organisms/app-shell/index.js.map +1 -0
- package/dist/components/organisms/app-shell/module-subnav.d.ts +21 -0
- package/dist/components/organisms/app-shell/module-subnav.d.ts.map +1 -0
- package/dist/components/organisms/app-shell/module-subnav.js +33 -0
- package/dist/components/organisms/app-shell/module-subnav.js.map +1 -0
- package/dist/components/organisms/app-shell/module-subnav.stories.d.ts +8 -0
- package/dist/components/organisms/app-shell/module-subnav.stories.d.ts.map +1 -0
- package/dist/components/organisms/app-shell/module-subnav.test.d.ts +2 -0
- package/dist/components/organisms/app-shell/module-subnav.test.d.ts.map +1 -0
- package/dist/components/organisms/app-shell/sidebar-nav.d.ts +21 -0
- package/dist/components/organisms/app-shell/sidebar-nav.d.ts.map +1 -0
- package/dist/components/organisms/app-shell/sidebar-nav.js +25 -0
- package/dist/components/organisms/app-shell/sidebar-nav.js.map +1 -0
- package/dist/components/organisms/app-shell/sidebar-nav.stories.d.ts +7 -0
- package/dist/components/organisms/app-shell/sidebar-nav.stories.d.ts.map +1 -0
- package/dist/components/organisms/app-shell/sidebar-nav.test.d.ts +2 -0
- package/dist/components/organisms/app-shell/sidebar-nav.test.d.ts.map +1 -0
- package/dist/components/organisms/autocomplete/autocomplete.d.ts +43 -0
- package/dist/components/organisms/autocomplete/autocomplete.d.ts.map +1 -0
- package/dist/components/organisms/autocomplete/autocomplete.js +276 -0
- package/dist/components/organisms/autocomplete/autocomplete.js.map +1 -0
- package/dist/components/organisms/autocomplete/autocomplete.stories.d.ts +14 -0
- package/dist/components/organisms/autocomplete/autocomplete.stories.d.ts.map +1 -0
- package/dist/components/organisms/autocomplete/index.d.ts +3 -0
- package/dist/components/organisms/autocomplete/index.d.ts.map +1 -0
- package/dist/components/organisms/autocomplete/index.js +5 -0
- package/dist/components/organisms/autocomplete/index.js.map +1 -0
- package/dist/components/organisms/charts/bar-chart.d.ts +24 -0
- package/dist/components/organisms/charts/bar-chart.d.ts.map +1 -0
- package/dist/components/organisms/charts/bar-chart.js +83 -0
- package/dist/components/organisms/charts/bar-chart.js.map +1 -0
- package/dist/components/organisms/charts/charts.stories.d.ts +8 -0
- package/dist/components/organisms/charts/charts.stories.d.ts.map +1 -0
- package/dist/components/organisms/charts/index.d.ts +7 -0
- package/dist/components/organisms/charts/index.d.ts.map +1 -0
- package/dist/components/organisms/charts/index.js +9 -0
- package/dist/components/organisms/charts/index.js.map +1 -0
- package/dist/components/organisms/charts/line-chart.d.ts +27 -0
- package/dist/components/organisms/charts/line-chart.d.ts.map +1 -0
- package/dist/components/organisms/charts/line-chart.js +114 -0
- package/dist/components/organisms/charts/line-chart.js.map +1 -0
- package/dist/components/organisms/charts/sparkline.d.ts +19 -0
- package/dist/components/organisms/charts/sparkline.d.ts.map +1 -0
- package/dist/components/organisms/charts/sparkline.js +52 -0
- package/dist/components/organisms/charts/sparkline.js.map +1 -0
- package/dist/components/organisms/command-palette/command-palette.d.ts +94 -0
- package/dist/components/organisms/command-palette/command-palette.d.ts.map +1 -0
- package/dist/components/organisms/command-palette/command-palette.js +143 -0
- package/dist/components/organisms/command-palette/command-palette.js.map +1 -0
- package/dist/components/organisms/command-palette/command-palette.stories.d.ts +8 -0
- package/dist/components/organisms/command-palette/command-palette.stories.d.ts.map +1 -0
- package/dist/components/organisms/command-palette/index.d.ts +2 -0
- package/dist/components/organisms/command-palette/index.d.ts.map +1 -0
- package/dist/components/organisms/command-palette/index.js +23 -0
- package/dist/components/organisms/command-palette/index.js.map +1 -0
- package/dist/components/organisms/custom-select/custom-select.d.ts +18 -0
- package/dist/components/organisms/custom-select/custom-select.d.ts.map +1 -0
- package/dist/components/organisms/custom-select/custom-select.js +69 -0
- package/dist/components/organisms/custom-select/custom-select.js.map +1 -0
- package/dist/components/organisms/custom-select/index.d.ts +3 -0
- package/dist/components/organisms/custom-select/index.d.ts.map +1 -0
- package/dist/components/organisms/custom-select/index.js +5 -0
- package/dist/components/organisms/custom-select/index.js.map +1 -0
- package/dist/components/organisms/data-grid/data-grid.d.ts +74 -0
- package/dist/components/organisms/data-grid/data-grid.d.ts.map +1 -0
- package/dist/components/organisms/data-grid/data-grid.js +289 -0
- package/dist/components/organisms/data-grid/data-grid.js.map +1 -0
- package/dist/components/organisms/data-grid/data-grid.stories.d.ts +19 -0
- package/dist/components/organisms/data-grid/data-grid.stories.d.ts.map +1 -0
- package/dist/components/organisms/data-grid/data-grid.type.d.ts +10 -0
- package/dist/components/organisms/data-grid/data-grid.type.d.ts.map +1 -0
- package/dist/components/organisms/data-grid/data-grid.type.js +16 -0
- package/dist/components/organisms/data-grid/data-grid.type.js.map +1 -0
- package/dist/components/organisms/data-grid/index.d.ts +4 -0
- package/dist/components/organisms/data-grid/index.d.ts.map +1 -0
- package/dist/components/organisms/data-grid/index.js +8 -0
- package/dist/components/organisms/data-grid/index.js.map +1 -0
- package/dist/components/organisms/date-picker/calendar.d.ts +16 -0
- package/dist/components/organisms/date-picker/calendar.d.ts.map +1 -0
- package/dist/components/organisms/date-picker/calendar.js +60 -0
- package/dist/components/organisms/date-picker/calendar.js.map +1 -0
- package/dist/components/organisms/date-picker/date-picker.d.ts +35 -0
- package/dist/components/organisms/date-picker/date-picker.d.ts.map +1 -0
- package/dist/components/organisms/date-picker/date-picker.js +110 -0
- package/dist/components/organisms/date-picker/date-picker.js.map +1 -0
- package/dist/components/organisms/date-picker/date-picker.stories.d.ts +8 -0
- package/dist/components/organisms/date-picker/date-picker.stories.d.ts.map +1 -0
- package/dist/components/organisms/date-picker/index.d.ts +5 -0
- package/dist/components/organisms/date-picker/index.d.ts.map +1 -0
- package/dist/components/organisms/date-picker/index.js +8 -0
- package/dist/components/organisms/date-picker/index.js.map +1 -0
- package/dist/components/organisms/drawer/drawer.d.ts +55 -0
- package/dist/components/organisms/drawer/drawer.d.ts.map +1 -0
- package/dist/components/organisms/drawer/drawer.js +137 -0
- package/dist/components/organisms/drawer/drawer.js.map +1 -0
- package/dist/components/organisms/drawer/drawer.stories.d.ts +9 -0
- package/dist/components/organisms/drawer/drawer.stories.d.ts.map +1 -0
- package/dist/components/organisms/drawer/index.d.ts +3 -0
- package/dist/components/organisms/drawer/index.d.ts.map +1 -0
- package/dist/components/organisms/drawer/index.js +29 -0
- package/dist/components/organisms/drawer/index.js.map +1 -0
- package/dist/components/organisms/file-upload/file-upload.d.ts +38 -0
- package/dist/components/organisms/file-upload/file-upload.d.ts.map +1 -0
- package/dist/components/organisms/file-upload/file-upload.js +192 -0
- package/dist/components/organisms/file-upload/file-upload.js.map +1 -0
- package/dist/components/organisms/file-upload/file-upload.stories.d.ts +10 -0
- package/dist/components/organisms/file-upload/file-upload.stories.d.ts.map +1 -0
- package/dist/components/organisms/file-upload/index.d.ts +2 -0
- package/dist/components/organisms/file-upload/index.d.ts.map +1 -0
- package/dist/components/organisms/file-upload/index.js +5 -0
- package/dist/components/organisms/file-upload/index.js.map +1 -0
- package/dist/components/organisms/index.d.ts +15 -0
- package/dist/components/organisms/index.d.ts.map +1 -0
- package/dist/components/organisms/index.js +15 -0
- package/dist/components/organisms/index.js.map +1 -0
- package/dist/components/organisms/modal/index.d.ts +3 -0
- package/dist/components/organisms/modal/index.d.ts.map +1 -0
- package/dist/components/organisms/modal/index.js +27 -0
- package/dist/components/organisms/modal/index.js.map +1 -0
- package/dist/components/organisms/modal/modal.d.ts +38 -0
- package/dist/components/organisms/modal/modal.d.ts.map +1 -0
- package/dist/components/organisms/modal/modal.js +100 -0
- package/dist/components/organisms/modal/modal.js.map +1 -0
- package/dist/components/organisms/modal/modal.stories.d.ts +8 -0
- package/dist/components/organisms/modal/modal.stories.d.ts.map +1 -0
- package/dist/components/organisms/page-scaffolds/full-page-error.d.ts +22 -0
- package/dist/components/organisms/page-scaffolds/full-page-error.d.ts.map +1 -0
- package/dist/components/organisms/page-scaffolds/full-page-error.js +75 -0
- package/dist/components/organisms/page-scaffolds/full-page-error.js.map +1 -0
- package/dist/components/organisms/page-scaffolds/full-page-loading.d.ts +13 -0
- package/dist/components/organisms/page-scaffolds/full-page-loading.d.ts.map +1 -0
- package/dist/components/organisms/page-scaffolds/full-page-loading.js +30 -0
- package/dist/components/organisms/page-scaffolds/full-page-loading.js.map +1 -0
- package/dist/components/organisms/page-scaffolds/index.d.ts +4 -0
- package/dist/components/organisms/page-scaffolds/index.d.ts.map +1 -0
- package/dist/components/organisms/page-scaffolds/index.js +15 -0
- package/dist/components/organisms/page-scaffolds/index.js.map +1 -0
- package/dist/components/organisms/page-scaffolds/not-found-state.d.ts +17 -0
- package/dist/components/organisms/page-scaffolds/not-found-state.d.ts.map +1 -0
- package/dist/components/organisms/page-scaffolds/not-found-state.js +43 -0
- package/dist/components/organisms/page-scaffolds/not-found-state.js.map +1 -0
- package/dist/components/organisms/page-scaffolds/page-scaffolds.stories.d.ts +8 -0
- package/dist/components/organisms/page-scaffolds/page-scaffolds.stories.d.ts.map +1 -0
- package/dist/components/organisms/paginated-data-grid/index.d.ts +2 -0
- package/dist/components/organisms/paginated-data-grid/index.d.ts.map +1 -0
- package/dist/components/organisms/paginated-data-grid/index.js +7 -0
- package/dist/components/organisms/paginated-data-grid/index.js.map +1 -0
- package/dist/components/organisms/paginated-data-grid/paginated-data-grid.d.ts +24 -0
- package/dist/components/organisms/paginated-data-grid/paginated-data-grid.d.ts.map +1 -0
- package/dist/components/organisms/paginated-data-grid/paginated-data-grid.js +40 -0
- package/dist/components/organisms/paginated-data-grid/paginated-data-grid.js.map +1 -0
- package/dist/components/organisms/paginated-data-grid/paginated-data-grid.stories.d.ts +14 -0
- package/dist/components/organisms/paginated-data-grid/paginated-data-grid.stories.d.ts.map +1 -0
- package/dist/components/organisms/select/index.d.ts +2 -0
- package/dist/components/organisms/select/index.d.ts.map +1 -0
- package/dist/components/organisms/select/index.js +21 -0
- package/dist/components/organisms/select/index.js.map +1 -0
- package/dist/components/organisms/select/select.d.ts +10 -0
- package/dist/components/organisms/select/select.d.ts.map +1 -0
- package/dist/components/organisms/select/select.js +85 -0
- package/dist/components/organisms/select/select.js.map +1 -0
- package/dist/components/organisms/select/select.stories.d.ts +8 -0
- package/dist/components/organisms/select/select.stories.d.ts.map +1 -0
- package/dist/components/organisms/shortcut-help-overlay/index.d.ts +3 -0
- package/dist/components/organisms/shortcut-help-overlay/index.d.ts.map +1 -0
- package/dist/components/organisms/shortcut-help-overlay/index.js +5 -0
- package/dist/components/organisms/shortcut-help-overlay/index.js.map +1 -0
- package/dist/components/organisms/shortcut-help-overlay/shortcut-help-overlay.d.ts +21 -0
- package/dist/components/organisms/shortcut-help-overlay/shortcut-help-overlay.d.ts.map +1 -0
- package/dist/components/organisms/shortcut-help-overlay/shortcut-help-overlay.js +70 -0
- package/dist/components/organisms/shortcut-help-overlay/shortcut-help-overlay.js.map +1 -0
- package/dist/components/organisms/shortcut-help-overlay/shortcut-help-overlay.stories.d.ts +7 -0
- package/dist/components/organisms/shortcut-help-overlay/shortcut-help-overlay.stories.d.ts.map +1 -0
- package/dist/components/utility-wrappers/index.d.ts +8 -0
- package/dist/components/utility-wrappers/index.d.ts.map +1 -0
- package/dist/components/utility-wrappers/index.js +8 -0
- package/dist/components/utility-wrappers/index.js.map +1 -0
- package/dist/components/utility-wrappers/install-prompt/index.d.ts +3 -0
- package/dist/components/utility-wrappers/install-prompt/index.d.ts.map +1 -0
- package/dist/components/utility-wrappers/install-prompt/index.js +5 -0
- package/dist/components/utility-wrappers/install-prompt/index.js.map +1 -0
- package/dist/components/utility-wrappers/install-prompt/install-prompt.d.ts +21 -0
- package/dist/components/utility-wrappers/install-prompt/install-prompt.d.ts.map +1 -0
- package/dist/components/utility-wrappers/install-prompt/install-prompt.js +82 -0
- package/dist/components/utility-wrappers/install-prompt/install-prompt.js.map +1 -0
- package/dist/components/utility-wrappers/locale-sync/index.d.ts +3 -0
- package/dist/components/utility-wrappers/locale-sync/index.d.ts.map +1 -0
- package/dist/components/utility-wrappers/locale-sync/index.js +5 -0
- package/dist/components/utility-wrappers/locale-sync/index.js.map +1 -0
- package/dist/components/utility-wrappers/locale-sync/locale-sync.d.ts +12 -0
- package/dist/components/utility-wrappers/locale-sync/locale-sync.d.ts.map +1 -0
- package/dist/components/utility-wrappers/locale-sync/locale-sync.js +15 -0
- package/dist/components/utility-wrappers/locale-sync/locale-sync.js.map +1 -0
- package/dist/components/utility-wrappers/query-provider/index.d.ts +3 -0
- package/dist/components/utility-wrappers/query-provider/index.d.ts.map +1 -0
- package/dist/components/utility-wrappers/query-provider/index.js +5 -0
- package/dist/components/utility-wrappers/query-provider/index.js.map +1 -0
- package/dist/components/utility-wrappers/query-provider/query-provider.d.ts +14 -0
- package/dist/components/utility-wrappers/query-provider/query-provider.d.ts.map +1 -0
- package/dist/components/utility-wrappers/query-provider/query-provider.js +29 -0
- package/dist/components/utility-wrappers/query-provider/query-provider.js.map +1 -0
- package/dist/components/utility-wrappers/service-worker-registration/index.d.ts +3 -0
- package/dist/components/utility-wrappers/service-worker-registration/index.d.ts.map +1 -0
- package/dist/components/utility-wrappers/service-worker-registration/index.js +5 -0
- package/dist/components/utility-wrappers/service-worker-registration/index.js.map +1 -0
- package/dist/components/utility-wrappers/service-worker-registration/service-worker-registration.d.ts +15 -0
- package/dist/components/utility-wrappers/service-worker-registration/service-worker-registration.d.ts.map +1 -0
- package/dist/components/utility-wrappers/service-worker-registration/service-worker-registration.js +35 -0
- package/dist/components/utility-wrappers/service-worker-registration/service-worker-registration.js.map +1 -0
- package/dist/components/utility-wrappers/theme-provider/index.d.ts +3 -0
- package/dist/components/utility-wrappers/theme-provider/index.d.ts.map +1 -0
- package/dist/components/utility-wrappers/theme-provider/index.js +5 -0
- package/dist/components/utility-wrappers/theme-provider/index.js.map +1 -0
- package/dist/components/utility-wrappers/theme-provider/theme-provider.d.ts +14 -0
- package/dist/components/utility-wrappers/theme-provider/theme-provider.d.ts.map +1 -0
- package/dist/components/utility-wrappers/theme-provider/theme-provider.js +29 -0
- package/dist/components/utility-wrappers/theme-provider/theme-provider.js.map +1 -0
- package/dist/components/utility-wrappers/theme-provider/theme-provider.stories.d.ts +6 -0
- package/dist/components/utility-wrappers/theme-provider/theme-provider.stories.d.ts.map +1 -0
- package/dist/components/utility-wrappers/themed-toaster/index.d.ts +3 -0
- package/dist/components/utility-wrappers/themed-toaster/index.d.ts.map +1 -0
- package/dist/components/utility-wrappers/themed-toaster/index.js +5 -0
- package/dist/components/utility-wrappers/themed-toaster/index.js.map +1 -0
- package/dist/components/utility-wrappers/themed-toaster/themed-toaster.d.ts +12 -0
- package/dist/components/utility-wrappers/themed-toaster/themed-toaster.d.ts.map +1 -0
- package/dist/components/utility-wrappers/themed-toaster/themed-toaster.js +24 -0
- package/dist/components/utility-wrappers/themed-toaster/themed-toaster.js.map +1 -0
- package/dist/components/utility-wrappers/toast/index.d.ts +3 -0
- package/dist/components/utility-wrappers/toast/index.d.ts.map +1 -0
- package/dist/components/utility-wrappers/toast/index.js +7 -0
- package/dist/components/utility-wrappers/toast/index.js.map +1 -0
- package/dist/hooks/index.d.ts +17 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +21 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/useClickOutside.d.ts +15 -0
- package/dist/hooks/useClickOutside.d.ts.map +1 -0
- package/dist/hooks/useClickOutside.js +24 -0
- package/dist/hooks/useClickOutside.js.map +1 -0
- package/dist/hooks/useCopyToClipboard.d.ts +15 -0
- package/dist/hooks/useCopyToClipboard.d.ts.map +1 -0
- package/dist/hooks/useCopyToClipboard.js +38 -0
- package/dist/hooks/useCopyToClipboard.js.map +1 -0
- package/dist/hooks/useDebounce.d.ts +10 -0
- package/dist/hooks/useDebounce.d.ts.map +1 -0
- package/dist/hooks/useDebounce.js +15 -0
- package/dist/hooks/useDebounce.js.map +1 -0
- package/dist/hooks/useDisclosure.d.ts +17 -0
- package/dist/hooks/useDisclosure.d.ts.map +1 -0
- package/dist/hooks/useDisclosure.js +13 -0
- package/dist/hooks/useDisclosure.js.map +1 -0
- package/dist/hooks/useKeyboardShortcuts.d.ts +27 -0
- package/dist/hooks/useKeyboardShortcuts.d.ts.map +1 -0
- package/dist/hooks/useKeyboardShortcuts.js +34 -0
- package/dist/hooks/useKeyboardShortcuts.js.map +1 -0
- package/dist/hooks/useLocalStorage.d.ts +18 -0
- package/dist/hooks/useLocalStorage.d.ts.map +1 -0
- package/dist/hooks/useLocalStorage.js +62 -0
- package/dist/hooks/useLocalStorage.js.map +1 -0
- package/dist/hooks/useLocale.d.ts +14 -0
- package/dist/hooks/useLocale.d.ts.map +1 -0
- package/dist/hooks/useLocale.js +45 -0
- package/dist/hooks/useLocale.js.map +1 -0
- package/dist/hooks/useMediaQuery.d.ts +10 -0
- package/dist/hooks/useMediaQuery.d.ts.map +1 -0
- package/dist/hooks/useMediaQuery.js +20 -0
- package/dist/hooks/useMediaQuery.js.map +1 -0
- package/dist/hooks/usePaginatedQuery.d.ts +31 -0
- package/dist/hooks/usePaginatedQuery.d.ts.map +1 -0
- package/dist/hooks/usePaginatedQuery.js +44 -0
- package/dist/hooks/usePaginatedQuery.js.map +1 -0
- package/dist/i18n/createI18n.d.ts +16 -0
- package/dist/i18n/createI18n.d.ts.map +1 -0
- package/dist/i18n/createI18n.js +26 -0
- package/dist/i18n/createI18n.js.map +1 -0
- package/dist/i18n/index.d.ts +3 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +5 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/utils/api-client.d.ts +33 -0
- package/dist/utils/api-client.d.ts.map +1 -0
- package/dist/utils/api-client.js +69 -0
- package/dist/utils/api-client.js.map +1 -0
- package/dist/utils/cn.d.ts +12 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils/cn.js +9 -0
- package/dist/utils/cn.js.map +1 -0
- package/dist/utils/format.d.ts +69 -0
- package/dist/utils/format.d.ts.map +1 -0
- package/dist/utils/format.js +141 -0
- package/dist/utils/format.js.map +1 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +28 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/pagination.d.ts +34 -0
- package/dist/utils/pagination.d.ts.map +1 -0
- package/dist/utils/pagination.js +28 -0
- package/dist/utils/pagination.js.map +1 -0
- package/package.json +148 -0
- package/src/styles/theme.css +130 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface IPaginatedResponse<T> {
|
|
2
|
+
data: T[];
|
|
3
|
+
total: number;
|
|
4
|
+
page: number;
|
|
5
|
+
pageSize: number;
|
|
6
|
+
totalPages: number;
|
|
7
|
+
}
|
|
8
|
+
export interface IUsePaginatedQueryOptions {
|
|
9
|
+
enabled?: boolean;
|
|
10
|
+
refetchInterval?: number;
|
|
11
|
+
staleTimeMs?: number;
|
|
12
|
+
}
|
|
13
|
+
type QueryParamValue = string | number | boolean | undefined | null;
|
|
14
|
+
/**
|
|
15
|
+
* Generic paginated data-fetching hook. Builds a URL with query params from
|
|
16
|
+
* `params`, fetches the `IPaginatedResponse<T>` envelope, and returns it
|
|
17
|
+
* alongside React Query state.
|
|
18
|
+
*/
|
|
19
|
+
export declare function usePaginatedQuery<T>(key: readonly unknown[], url: string, params: Record<string, QueryParamValue>, options?: IUsePaginatedQueryOptions): {
|
|
20
|
+
isLoading: boolean;
|
|
21
|
+
isFetching: boolean;
|
|
22
|
+
error: Error | null;
|
|
23
|
+
dataUpdatedAt: number;
|
|
24
|
+
data: T[];
|
|
25
|
+
total: number;
|
|
26
|
+
page: number;
|
|
27
|
+
pageSize: number;
|
|
28
|
+
totalPages: number;
|
|
29
|
+
};
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=usePaginatedQuery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePaginatedQuery.d.ts","sourceRoot":"","sources":["../../src/hooks/usePaginatedQuery.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACnC,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,yBAAyB;IACxC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAYD,KAAK,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC;AAEpE;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EACjC,GAAG,EAAE,SAAS,OAAO,EAAE,EACvB,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,EACvC,OAAO,CAAC,EAAE,yBAAyB;;;;;;WAjC5B,MAAM;UACP,MAAM;cACF,MAAM;gBACJ,MAAM;EA+DnB"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { keepPreviousData, useQuery } from "@tanstack/react-query";
|
|
3
|
+
const DEFAULT_PAGE_SIZE = 20;
|
|
4
|
+
const EMPTY = {
|
|
5
|
+
data: [],
|
|
6
|
+
total: 0,
|
|
7
|
+
page: 1,
|
|
8
|
+
pageSize: DEFAULT_PAGE_SIZE,
|
|
9
|
+
totalPages: 1
|
|
10
|
+
};
|
|
11
|
+
function usePaginatedQuery(key, url, params, options) {
|
|
12
|
+
const searchParams = new URLSearchParams();
|
|
13
|
+
for (const [k, v] of Object.entries(params)) {
|
|
14
|
+
if (v != null && v !== "" && v !== false) {
|
|
15
|
+
searchParams.set(k, String(v));
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
const qs = searchParams.toString();
|
|
19
|
+
const fullUrl = qs ? `${url}?${qs}` : url;
|
|
20
|
+
const query = useQuery({
|
|
21
|
+
queryKey: [...key, params],
|
|
22
|
+
queryFn: async () => {
|
|
23
|
+
const res = await fetch(fullUrl);
|
|
24
|
+
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
25
|
+
return res.json();
|
|
26
|
+
},
|
|
27
|
+
placeholderData: keepPreviousData,
|
|
28
|
+
enabled: options?.enabled,
|
|
29
|
+
refetchInterval: options?.refetchInterval,
|
|
30
|
+
staleTime: options?.staleTimeMs
|
|
31
|
+
});
|
|
32
|
+
const result = query.data ?? EMPTY;
|
|
33
|
+
return {
|
|
34
|
+
...result,
|
|
35
|
+
isLoading: query.isLoading,
|
|
36
|
+
isFetching: query.isFetching,
|
|
37
|
+
error: query.error,
|
|
38
|
+
dataUpdatedAt: query.dataUpdatedAt
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
usePaginatedQuery
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=usePaginatedQuery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/usePaginatedQuery.ts"],"sourcesContent":["\"use client\";\n\nimport { keepPreviousData, useQuery } from \"@tanstack/react-query\";\n\nexport interface IPaginatedResponse<T> {\n data: T[];\n total: number;\n page: number;\n pageSize: number;\n totalPages: number;\n}\n\nexport interface IUsePaginatedQueryOptions {\n enabled?: boolean;\n refetchInterval?: number;\n staleTimeMs?: number;\n}\n\nconst DEFAULT_PAGE_SIZE = 20;\n\nconst EMPTY: IPaginatedResponse<never> = {\n data: [],\n total: 0,\n page: 1,\n pageSize: DEFAULT_PAGE_SIZE,\n totalPages: 1,\n};\n\ntype QueryParamValue = string | number | boolean | undefined | null;\n\n/**\n * Generic paginated data-fetching hook. Builds a URL with query params from\n * `params`, fetches the `IPaginatedResponse<T>` envelope, and returns it\n * alongside React Query state.\n */\nexport function usePaginatedQuery<T>(\n key: readonly unknown[],\n url: string,\n params: Record<string, QueryParamValue>,\n options?: IUsePaginatedQueryOptions,\n) {\n const searchParams = new URLSearchParams();\n for (const [k, v] of Object.entries(params)) {\n if (v != null && v !== \"\" && v !== false) {\n searchParams.set(k, String(v));\n }\n }\n const qs = searchParams.toString();\n const fullUrl = qs ? `${url}?${qs}` : url;\n\n const query = useQuery<IPaginatedResponse<T>>({\n queryKey: [...key, params],\n queryFn: async () => {\n const res = await fetch(fullUrl);\n if (!res.ok) throw new Error(`HTTP ${res.status}`);\n return res.json();\n },\n placeholderData: keepPreviousData,\n enabled: options?.enabled,\n refetchInterval: options?.refetchInterval,\n staleTime: options?.staleTimeMs,\n });\n\n const result = query.data ?? (EMPTY as IPaginatedResponse<T>);\n\n return {\n ...result,\n isLoading: query.isLoading,\n isFetching: query.isFetching,\n error: query.error,\n dataUpdatedAt: query.dataUpdatedAt,\n };\n}\n"],"mappings":";AAEA,SAAS,kBAAkB,gBAAgB;AAgB3C,MAAM,oBAAoB;AAE1B,MAAM,QAAmC;AAAA,EACvC,MAAM,CAAC;AAAA,EACP,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU;AAAA,EACV,YAAY;AACd;AASO,SAAS,kBACd,KACA,KACA,QACA,SACA;AACA,QAAM,eAAe,IAAI,gBAAgB;AACzC,aAAW,CAAC,GAAG,CAAC,KAAK,OAAO,QAAQ,MAAM,GAAG;AAC3C,QAAI,KAAK,QAAQ,MAAM,MAAM,MAAM,OAAO;AACxC,mBAAa,IAAI,GAAG,OAAO,CAAC,CAAC;AAAA,IAC/B;AAAA,EACF;AACA,QAAM,KAAK,aAAa,SAAS;AACjC,QAAM,UAAU,KAAK,GAAG,GAAG,IAAI,EAAE,KAAK;AAEtC,QAAM,QAAQ,SAAgC;AAAA,IAC5C,UAAU,CAAC,GAAG,KAAK,MAAM;AAAA,IACzB,SAAS,YAAY;AACnB,YAAM,MAAM,MAAM,MAAM,OAAO;AAC/B,UAAI,CAAC,IAAI,GAAI,OAAM,IAAI,MAAM,QAAQ,IAAI,MAAM,EAAE;AACjD,aAAO,IAAI,KAAK;AAAA,IAClB;AAAA,IACA,iBAAiB;AAAA,IACjB,SAAS,SAAS;AAAA,IAClB,iBAAiB,SAAS;AAAA,IAC1B,WAAW,SAAS;AAAA,EACtB,CAAC;AAED,QAAM,SAAS,MAAM,QAAS;AAE9B,SAAO;AAAA,IACL,GAAG;AAAA,IACH,WAAW,MAAM;AAAA,IACjB,YAAY,MAAM;AAAA,IAClB,OAAO,MAAM;AAAA,IACb,eAAe,MAAM;AAAA,EACvB;AACF;","names":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type NestedKeyOf<T> = T extends object ? {
|
|
2
|
+
[K in keyof T & string]: T[K] extends object ? `${K}.${NestedKeyOf<T[K]>}` : K;
|
|
3
|
+
}[keyof T & string] : never;
|
|
4
|
+
export interface II18n<TLocale extends string, TKey extends string> {
|
|
5
|
+
getTranslation: (locale: TLocale) => (key: TKey) => string;
|
|
6
|
+
isRtl: (locale: TLocale) => boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Create a strongly-typed i18n helper from a translations object. The first
|
|
10
|
+
* locale's keys are used to infer the TKey union, so consumers get
|
|
11
|
+
* IntelliSense and compile-time safety on translation keys.
|
|
12
|
+
*
|
|
13
|
+
* Missing keys fall back to the key string itself so rendering never throws.
|
|
14
|
+
*/
|
|
15
|
+
export declare function createI18n<TMessages extends object, TLocale extends string = string>(translations: Record<TLocale, TMessages>, rtlLocales?: readonly string[]): II18n<TLocale, NestedKeyOf<TMessages>>;
|
|
16
|
+
//# sourceMappingURL=createI18n.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createI18n.d.ts","sourceRoot":"","sources":["../../src/i18n/createI18n.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,GACzC;KACG,CAAC,IAAI,MAAM,CAAC,GAAG,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GACxC,GAAG,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GAC3B,CAAC;CACN,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,GACnB,KAAK,CAAC;AAIV,MAAM,WAAW,KAAK,CAAC,OAAO,SAAS,MAAM,EAAE,IAAI,SAAS,MAAM;IAChE,cAAc,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,CAAC,GAAG,EAAE,IAAI,KAAK,MAAM,CAAC;IAC3D,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC;CACrC;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,SAAS,SAAS,MAAM,EACxB,OAAO,SAAS,MAAM,GAAG,MAAM,EAE/B,YAAY,EAAE,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,EACxC,UAAU,GAAE,SAAS,MAAM,EAAwB,GAClD,KAAK,CAAC,OAAO,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC,CAwBxC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const DEFAULT_RTL_LOCALES = ["he", "ar", "fa", "ur"];
|
|
2
|
+
function createI18n(translations, rtlLocales = DEFAULT_RTL_LOCALES) {
|
|
3
|
+
function getTranslation(locale) {
|
|
4
|
+
const dict = translations[locale];
|
|
5
|
+
return (key) => {
|
|
6
|
+
const segments = key.split(".");
|
|
7
|
+
let value = dict;
|
|
8
|
+
for (const s of segments) {
|
|
9
|
+
if (value && typeof value === "object" && s in value) {
|
|
10
|
+
value = value[s];
|
|
11
|
+
} else {
|
|
12
|
+
return key;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return typeof value === "string" ? value : key;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function isRtl(locale) {
|
|
19
|
+
return rtlLocales.includes(locale);
|
|
20
|
+
}
|
|
21
|
+
return { getTranslation, isRtl };
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
createI18n
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=createI18n.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/i18n/createI18n.ts"],"sourcesContent":["export type NestedKeyOf<T> = T extends object\n ? {\n [K in keyof T & string]: T[K] extends object\n ? `${K}.${NestedKeyOf<T[K]>}`\n : K;\n }[keyof T & string]\n : never;\n\nconst DEFAULT_RTL_LOCALES = [\"he\", \"ar\", \"fa\", \"ur\"] as const;\n\nexport interface II18n<TLocale extends string, TKey extends string> {\n getTranslation: (locale: TLocale) => (key: TKey) => string;\n isRtl: (locale: TLocale) => boolean;\n}\n\n/**\n * Create a strongly-typed i18n helper from a translations object. The first\n * locale's keys are used to infer the TKey union, so consumers get\n * IntelliSense and compile-time safety on translation keys.\n *\n * Missing keys fall back to the key string itself so rendering never throws.\n */\nexport function createI18n<\n TMessages extends object,\n TLocale extends string = string,\n>(\n translations: Record<TLocale, TMessages>,\n rtlLocales: readonly string[] = DEFAULT_RTL_LOCALES,\n): II18n<TLocale, NestedKeyOf<TMessages>> {\n type TKey = NestedKeyOf<TMessages>;\n\n function getTranslation(locale: TLocale): (key: TKey) => string {\n const dict = translations[locale];\n return (key: TKey): string => {\n const segments = (key as string).split(\".\");\n let value: unknown = dict;\n for (const s of segments) {\n if (value && typeof value === \"object\" && s in (value as Record<string, unknown>)) {\n value = (value as Record<string, unknown>)[s];\n } else {\n return key as string;\n }\n }\n return typeof value === \"string\" ? value : (key as string);\n };\n }\n\n function isRtl(locale: TLocale): boolean {\n return rtlLocales.includes(locale);\n }\n\n return { getTranslation, isRtl };\n}\n"],"mappings":"AAQA,MAAM,sBAAsB,CAAC,MAAM,MAAM,MAAM,IAAI;AAc5C,SAAS,WAId,cACA,aAAgC,qBACQ;AAGxC,WAAS,eAAe,QAAwC;AAC9D,UAAM,OAAO,aAAa,MAAM;AAChC,WAAO,CAAC,QAAsB;AAC5B,YAAM,WAAY,IAAe,MAAM,GAAG;AAC1C,UAAI,QAAiB;AACrB,iBAAW,KAAK,UAAU;AACxB,YAAI,SAAS,OAAO,UAAU,YAAY,KAAM,OAAmC;AACjF,kBAAS,MAAkC,CAAC;AAAA,QAC9C,OAAO;AACL,iBAAO;AAAA,QACT;AAAA,MACF;AACA,aAAO,OAAO,UAAU,WAAW,QAAS;AAAA,IAC9C;AAAA,EACF;AAEA,WAAS,MAAM,QAA0B;AACvC,WAAO,WAAW,SAAS,MAAM;AAAA,EACnC;AAEA,SAAO,EAAE,gBAAgB,MAAM;AACjC;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/i18n/index.ts"],"sourcesContent":["export { createI18n } from \"./createI18n.js\";\nexport type { II18n, NestedKeyOf } from \"./createI18n.js\";\n"],"mappings":"AAAA,SAAS,kBAAkB;","names":[]}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from \"./components/index.js\";\nexport * from \"./hooks/index.js\";\nexport * from \"./i18n/index.js\";\nexport * from \"./utils/index.js\";\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface IApiError<TBody = unknown> extends Error {
|
|
2
|
+
status: number;
|
|
3
|
+
body: TBody;
|
|
4
|
+
url: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Construct an Error that carries HTTP metadata. Use instead of throwing a
|
|
8
|
+
* plain Error so callers can branch on `err.status` or introspect `err.body`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function createApiError<TBody = unknown>(params: {
|
|
11
|
+
message: string;
|
|
12
|
+
status: number;
|
|
13
|
+
body: TBody;
|
|
14
|
+
url: string;
|
|
15
|
+
}): IApiError<TBody>;
|
|
16
|
+
export interface IApiFetchOptions extends Omit<RequestInit, "body"> {
|
|
17
|
+
/** JSON-serializable request body. Automatically stringified with JSON content-type. */
|
|
18
|
+
json?: unknown;
|
|
19
|
+
/** Alternative to `json` — raw body passthrough (form data, streams, etc.). */
|
|
20
|
+
body?: BodyInit | null;
|
|
21
|
+
/** Abort after the specified number of milliseconds. */
|
|
22
|
+
timeoutMs?: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Thin wrapper around `fetch` that:
|
|
26
|
+
* - JSON-serializes the body when you pass `json`
|
|
27
|
+
* - Sets sensible defaults (`Accept: application/json`, credentials: include)
|
|
28
|
+
* - Throws an `IApiError` for non-2xx responses with the parsed body attached
|
|
29
|
+
* - Parses JSON responses automatically; returns `null` for empty 204s
|
|
30
|
+
* - Optional abort-on-timeout with `timeoutMs`
|
|
31
|
+
*/
|
|
32
|
+
export declare function apiFetch<TResponse = unknown>(url: string, options?: IApiFetchOptions): Promise<TResponse>;
|
|
33
|
+
//# sourceMappingURL=api-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../../src/utils/api-client.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,SAAS,CAAC,KAAK,GAAG,OAAO,CAAE,SAAQ,KAAK;IACvD,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,KAAK,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,GAAG,OAAO,EAAE,MAAM,EAAE;IACtD,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,KAAK,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb,GAAG,SAAS,CAAC,KAAK,CAAC,CAMnB;AAeD,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC;IACjE,wFAAwF;IACxF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,+EAA+E;IAC/E,IAAI,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IACvB,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,wBAAsB,QAAQ,CAAC,SAAS,GAAG,OAAO,EAChD,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,SAAS,CAAC,CAiDpB"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
const JSON_CONTENT_TYPE = "application/json";
|
|
2
|
+
const DEFAULT_ACCEPT = "application/json";
|
|
3
|
+
const NETWORK_ERROR_STATUS = 0;
|
|
4
|
+
function createApiError(params) {
|
|
5
|
+
const err = new Error(params.message);
|
|
6
|
+
err.status = params.status;
|
|
7
|
+
err.body = params.body;
|
|
8
|
+
err.url = params.url;
|
|
9
|
+
return err;
|
|
10
|
+
}
|
|
11
|
+
async function parseResponseBody(response) {
|
|
12
|
+
const contentType = response.headers.get("content-type") ?? "";
|
|
13
|
+
if (contentType.includes("application/json")) {
|
|
14
|
+
try {
|
|
15
|
+
return await response.json();
|
|
16
|
+
} catch {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
const text = await response.text();
|
|
21
|
+
return text.length > 0 ? text : null;
|
|
22
|
+
}
|
|
23
|
+
async function apiFetch(url, options = {}) {
|
|
24
|
+
const { json, body, timeoutMs, headers, signal, ...rest } = options;
|
|
25
|
+
const controller = timeoutMs ? new AbortController() : void 0;
|
|
26
|
+
const timeoutId = controller ? setTimeout(() => controller.abort(), timeoutMs) : void 0;
|
|
27
|
+
const mergedHeaders = new Headers(headers);
|
|
28
|
+
if (!mergedHeaders.has("Accept")) mergedHeaders.set("Accept", DEFAULT_ACCEPT);
|
|
29
|
+
if (json !== void 0 && !mergedHeaders.has("Content-Type")) {
|
|
30
|
+
mergedHeaders.set("Content-Type", JSON_CONTENT_TYPE);
|
|
31
|
+
}
|
|
32
|
+
try {
|
|
33
|
+
const response = await fetch(url, {
|
|
34
|
+
credentials: "include",
|
|
35
|
+
...rest,
|
|
36
|
+
headers: mergedHeaders,
|
|
37
|
+
body: json !== void 0 ? JSON.stringify(json) : body,
|
|
38
|
+
signal: signal ?? controller?.signal
|
|
39
|
+
});
|
|
40
|
+
const parsedBody = await parseResponseBody(response);
|
|
41
|
+
if (!response.ok) {
|
|
42
|
+
throw createApiError({
|
|
43
|
+
message: `HTTP ${response.status} on ${url}`,
|
|
44
|
+
status: response.status,
|
|
45
|
+
body: parsedBody,
|
|
46
|
+
url
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return parsedBody;
|
|
50
|
+
} catch (error) {
|
|
51
|
+
if (error instanceof Error && error.status !== void 0) throw error;
|
|
52
|
+
if (error instanceof Error) {
|
|
53
|
+
throw createApiError({
|
|
54
|
+
message: error.message,
|
|
55
|
+
status: NETWORK_ERROR_STATUS,
|
|
56
|
+
body: null,
|
|
57
|
+
url
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
throw error;
|
|
61
|
+
} finally {
|
|
62
|
+
if (timeoutId) clearTimeout(timeoutId);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
apiFetch,
|
|
67
|
+
createApiError
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=api-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/api-client.ts"],"sourcesContent":["const JSON_CONTENT_TYPE = \"application/json\";\nconst DEFAULT_ACCEPT = \"application/json\";\nconst NETWORK_ERROR_STATUS = 0;\n\nexport interface IApiError<TBody = unknown> extends Error {\n status: number;\n body: TBody;\n url: string;\n}\n\n/**\n * Construct an Error that carries HTTP metadata. Use instead of throwing a\n * plain Error so callers can branch on `err.status` or introspect `err.body`.\n */\nexport function createApiError<TBody = unknown>(params: {\n message: string;\n status: number;\n body: TBody;\n url: string;\n}): IApiError<TBody> {\n const err = new Error(params.message) as IApiError<TBody>;\n err.status = params.status;\n err.body = params.body;\n err.url = params.url;\n return err;\n}\n\nasync function parseResponseBody(response: Response): Promise<unknown> {\n const contentType = response.headers.get(\"content-type\") ?? \"\";\n if (contentType.includes(\"application/json\")) {\n try {\n return await response.json();\n } catch {\n return null;\n }\n }\n const text = await response.text();\n return text.length > 0 ? text : null;\n}\n\nexport interface IApiFetchOptions extends Omit<RequestInit, \"body\"> {\n /** JSON-serializable request body. Automatically stringified with JSON content-type. */\n json?: unknown;\n /** Alternative to `json` — raw body passthrough (form data, streams, etc.). */\n body?: BodyInit | null;\n /** Abort after the specified number of milliseconds. */\n timeoutMs?: number;\n}\n\n/**\n * Thin wrapper around `fetch` that:\n * - JSON-serializes the body when you pass `json`\n * - Sets sensible defaults (`Accept: application/json`, credentials: include)\n * - Throws an `IApiError` for non-2xx responses with the parsed body attached\n * - Parses JSON responses automatically; returns `null` for empty 204s\n * - Optional abort-on-timeout with `timeoutMs`\n */\nexport async function apiFetch<TResponse = unknown>(\n url: string,\n options: IApiFetchOptions = {},\n): Promise<TResponse> {\n const { json, body, timeoutMs, headers, signal, ...rest } = options;\n\n const controller = timeoutMs ? new AbortController() : undefined;\n const timeoutId = controller\n ? setTimeout(() => controller.abort(), timeoutMs)\n : undefined;\n\n const mergedHeaders = new Headers(headers);\n if (!mergedHeaders.has(\"Accept\")) mergedHeaders.set(\"Accept\", DEFAULT_ACCEPT);\n if (json !== undefined && !mergedHeaders.has(\"Content-Type\")) {\n mergedHeaders.set(\"Content-Type\", JSON_CONTENT_TYPE);\n }\n\n try {\n const response = await fetch(url, {\n credentials: \"include\",\n ...rest,\n headers: mergedHeaders,\n body: json !== undefined ? JSON.stringify(json) : body,\n signal: signal ?? controller?.signal,\n });\n\n const parsedBody = await parseResponseBody(response);\n\n if (!response.ok) {\n throw createApiError({\n message: `HTTP ${response.status} on ${url}`,\n status: response.status,\n body: parsedBody,\n url,\n });\n }\n\n return parsedBody as TResponse;\n } catch (error) {\n if (error instanceof Error && (error as IApiError).status !== undefined) throw error;\n if (error instanceof Error) {\n throw createApiError({\n message: error.message,\n status: NETWORK_ERROR_STATUS,\n body: null,\n url,\n });\n }\n throw error;\n } finally {\n if (timeoutId) clearTimeout(timeoutId);\n }\n}\n"],"mappings":"AAAA,MAAM,oBAAoB;AAC1B,MAAM,iBAAiB;AACvB,MAAM,uBAAuB;AAYtB,SAAS,eAAgC,QAK3B;AACnB,QAAM,MAAM,IAAI,MAAM,OAAO,OAAO;AACpC,MAAI,SAAS,OAAO;AACpB,MAAI,OAAO,OAAO;AAClB,MAAI,MAAM,OAAO;AACjB,SAAO;AACT;AAEA,eAAe,kBAAkB,UAAsC;AACrE,QAAM,cAAc,SAAS,QAAQ,IAAI,cAAc,KAAK;AAC5D,MAAI,YAAY,SAAS,kBAAkB,GAAG;AAC5C,QAAI;AACF,aAAO,MAAM,SAAS,KAAK;AAAA,IAC7B,QAAQ;AACN,aAAO;AAAA,IACT;AAAA,EACF;AACA,QAAM,OAAO,MAAM,SAAS,KAAK;AACjC,SAAO,KAAK,SAAS,IAAI,OAAO;AAClC;AAmBA,eAAsB,SACpB,KACA,UAA4B,CAAC,GACT;AACpB,QAAM,EAAE,MAAM,MAAM,WAAW,SAAS,QAAQ,GAAG,KAAK,IAAI;AAE5D,QAAM,aAAa,YAAY,IAAI,gBAAgB,IAAI;AACvD,QAAM,YAAY,aACd,WAAW,MAAM,WAAW,MAAM,GAAG,SAAS,IAC9C;AAEJ,QAAM,gBAAgB,IAAI,QAAQ,OAAO;AACzC,MAAI,CAAC,cAAc,IAAI,QAAQ,EAAG,eAAc,IAAI,UAAU,cAAc;AAC5E,MAAI,SAAS,UAAa,CAAC,cAAc,IAAI,cAAc,GAAG;AAC5D,kBAAc,IAAI,gBAAgB,iBAAiB;AAAA,EACrD;AAEA,MAAI;AACF,UAAM,WAAW,MAAM,MAAM,KAAK;AAAA,MAChC,aAAa;AAAA,MACb,GAAG;AAAA,MACH,SAAS;AAAA,MACT,MAAM,SAAS,SAAY,KAAK,UAAU,IAAI,IAAI;AAAA,MAClD,QAAQ,UAAU,YAAY;AAAA,IAChC,CAAC;AAED,UAAM,aAAa,MAAM,kBAAkB,QAAQ;AAEnD,QAAI,CAAC,SAAS,IAAI;AAChB,YAAM,eAAe;AAAA,QACnB,SAAS,QAAQ,SAAS,MAAM,OAAO,GAAG;AAAA,QAC1C,QAAQ,SAAS;AAAA,QACjB,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,IACH;AAEA,WAAO;AAAA,EACT,SAAS,OAAO;AACd,QAAI,iBAAiB,SAAU,MAAoB,WAAW,OAAW,OAAM;AAC/E,QAAI,iBAAiB,OAAO;AAC1B,YAAM,eAAe;AAAA,QACnB,SAAS,MAAM;AAAA,QACf,QAAQ;AAAA,QACR,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,IACH;AACA,UAAM;AAAA,EACR,UAAE;AACA,QAAI,UAAW,cAAa,SAAS;AAAA,EACvC;AACF;","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ClassValue } from "clsx";
|
|
2
|
+
/**
|
|
3
|
+
* Compose Tailwind class names with automatic de-duplication.
|
|
4
|
+
*
|
|
5
|
+
* Combines `clsx` (for conditional class handling) with `tailwind-merge` (for
|
|
6
|
+
* collapsing conflicting utilities — e.g. `px-2 px-4` resolves to `px-4`).
|
|
7
|
+
* Every component in this package authored after 0.2.0 composes classes
|
|
8
|
+
* through this helper so consumers can pass overriding `className` props
|
|
9
|
+
* without fighting specificity.
|
|
10
|
+
*/
|
|
11
|
+
export declare function cn(...inputs: ClassValue[]): string;
|
|
12
|
+
//# sourceMappingURL=cn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../src/utils/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAC;AAG7C;;;;;;;;GAQG;AACH,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAElD"}
|
package/dist/utils/cn.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/cn.ts"],"sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Compose Tailwind class names with automatic de-duplication.\n *\n * Combines `clsx` (for conditional class handling) with `tailwind-merge` (for\n * collapsing conflicting utilities — e.g. `px-2 px-4` resolves to `px-4`).\n * Every component in this package authored after 0.2.0 composes classes\n * through this helper so consumers can pass overriding `className` props\n * without fighting specificity.\n */\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n"],"mappings":"AAAA,SAA0B,YAAY;AACtC,SAAS,eAAe;AAWjB,SAAS,MAAM,QAA8B;AAClD,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;","names":[]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export interface IRelativeDurationLabels {
|
|
2
|
+
justNow: string;
|
|
3
|
+
secondsAgo: (n: number) => string;
|
|
4
|
+
minutesAgo: (n: number) => string;
|
|
5
|
+
hoursAgo: (n: number) => string;
|
|
6
|
+
daysAgo: (n: number) => string;
|
|
7
|
+
weeksAgo: (n: number) => string;
|
|
8
|
+
monthsAgo: (n: number) => string;
|
|
9
|
+
yearsAgo: (n: number) => string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Format a past timestamp as a compact relative duration (e.g. "5m ago").
|
|
13
|
+
* Pass `labels` for localization; defaults to short English.
|
|
14
|
+
*/
|
|
15
|
+
export declare function formatRelativeDuration(timestamp: number | Date, now?: number | Date, labels?: IRelativeDurationLabels): string;
|
|
16
|
+
/**
|
|
17
|
+
* Convert a `dd/mm` user-typed date to an ISO `YYYY-MM-DD` string by assuming
|
|
18
|
+
* the nearest upcoming occurrence of that day/month. Useful for flight-search
|
|
19
|
+
* date inputs where users type compact dates without a year.
|
|
20
|
+
*/
|
|
21
|
+
export declare function ddmmToISO(input: string, referenceDate?: Date): string | null;
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated Use `formatDate(iso, { style: "medium", locale })` instead.
|
|
24
|
+
* Format an ISO date (`YYYY-MM-DD`) as a short display string via Intl.
|
|
25
|
+
*/
|
|
26
|
+
export declare function formatIsoDate(iso: string, locale?: string): string;
|
|
27
|
+
export type IFormatDateStyle = "short" | "medium" | "long" | "full" | "iso" | "time" | "datetime" | "relative";
|
|
28
|
+
export interface IFormatDateOptions {
|
|
29
|
+
style?: IFormatDateStyle;
|
|
30
|
+
locale?: string;
|
|
31
|
+
/** `date-fns` format string. When provided, `style` is ignored. */
|
|
32
|
+
pattern?: string;
|
|
33
|
+
/** Reference point for `style: "relative"` (defaults to now). */
|
|
34
|
+
now?: number | Date;
|
|
35
|
+
relativeLabels?: IRelativeDurationLabels;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Format a date value (Date, timestamp ms, or ISO string) for display.
|
|
39
|
+
*
|
|
40
|
+
* Styles map to `Intl.DateTimeFormat` where possible; `iso` returns
|
|
41
|
+
* `YYYY-MM-DD`, `relative` delegates to `formatRelativeDuration`, and
|
|
42
|
+
* `pattern` uses a raw `date-fns` format string.
|
|
43
|
+
*/
|
|
44
|
+
export declare function formatDate(input: string | number | Date, options?: IFormatDateOptions): string;
|
|
45
|
+
export interface IFormatCurrencyOptions {
|
|
46
|
+
locale?: string;
|
|
47
|
+
minimumFractionDigits?: number;
|
|
48
|
+
maximumFractionDigits?: number;
|
|
49
|
+
compact?: boolean;
|
|
50
|
+
signDisplay?: Intl.NumberFormatOptions["signDisplay"];
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Format a numeric amount as localized currency using `Intl.NumberFormat`.
|
|
54
|
+
* Pass `compact: true` to get "$1.2K" / "$3.4M" style output.
|
|
55
|
+
*/
|
|
56
|
+
export declare function formatCurrency(amount: number, currency?: string, options?: IFormatCurrencyOptions): string;
|
|
57
|
+
export interface IFormatNumberOptions {
|
|
58
|
+
locale?: string;
|
|
59
|
+
decimals?: number;
|
|
60
|
+
compact?: boolean;
|
|
61
|
+
percentage?: boolean;
|
|
62
|
+
signDisplay?: Intl.NumberFormatOptions["signDisplay"];
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Format a number for display: `"1,234.5"`, `"1.2K"`, `"42.1%"`, etc.
|
|
66
|
+
* When `percentage: true`, the value is multiplied by 100 (matching Intl).
|
|
67
|
+
*/
|
|
68
|
+
export declare function formatNumber(value: number, options?: IFormatNumberOptions): string;
|
|
69
|
+
//# sourceMappingURL=format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/utils/format.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAClC,UAAU,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAClC,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAChC,OAAO,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/B,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAChC,SAAS,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IACjC,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;CACjC;AAaD;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,GAAG,GAAE,MAAM,GAAG,IAAiB,EAC/B,MAAM,GAAE,uBAA2C,GAClD,MAAM,CAeR;AAOD;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,GAAE,IAAiB,GAAG,MAAM,GAAG,IAAI,CAsBxF;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAU,GAAG,MAAM,CAKnE;AAED,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,UAAU,GAAG,UAAU,CAAC;AAE/G,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iEAAiE;IACjE,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,cAAc,CAAC,EAAE,uBAAuB,CAAC;CAC1C;AA8BD;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,EAC7B,OAAO,GAAE,kBAAuB,GAC/B,MAAM,CAiBR;AAED,MAAM,WAAW,sBAAsB;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAC,aAAa,CAAC,CAAC;CACvD;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,QAAQ,GAAE,MAAc,EACxB,OAAO,GAAE,sBAA2B,GACnC,MAAM,CAiBR;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAC,aAAa,CAAC,CAAC;CACvD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,oBAAyB,GACjC,MAAM,CASR"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { format as dfFormat, parseISO, isValid } from "date-fns";
|
|
2
|
+
const ONE_SECOND_MS = 1e3;
|
|
3
|
+
const ONE_MINUTE_MS = 60 * ONE_SECOND_MS;
|
|
4
|
+
const ONE_HOUR_MS = 60 * ONE_MINUTE_MS;
|
|
5
|
+
const ONE_DAY_MS = 24 * ONE_HOUR_MS;
|
|
6
|
+
const ONE_WEEK_MS = 7 * ONE_DAY_MS;
|
|
7
|
+
const ONE_MONTH_MS = 30 * ONE_DAY_MS;
|
|
8
|
+
const ONE_YEAR_MS = 365 * ONE_DAY_MS;
|
|
9
|
+
const JUST_NOW_SECONDS_THRESHOLD = 5;
|
|
10
|
+
const DEFAULT_EN_LABELS = {
|
|
11
|
+
justNow: "just now",
|
|
12
|
+
secondsAgo: (n) => `${n}s ago`,
|
|
13
|
+
minutesAgo: (n) => `${n}m ago`,
|
|
14
|
+
hoursAgo: (n) => `${n}h ago`,
|
|
15
|
+
daysAgo: (n) => `${n}d ago`,
|
|
16
|
+
weeksAgo: (n) => `${n}w ago`,
|
|
17
|
+
monthsAgo: (n) => `${n}mo ago`,
|
|
18
|
+
yearsAgo: (n) => `${n}y ago`
|
|
19
|
+
};
|
|
20
|
+
function formatRelativeDuration(timestamp, now = Date.now(), labels = DEFAULT_EN_LABELS) {
|
|
21
|
+
const then = timestamp instanceof Date ? timestamp.getTime() : timestamp;
|
|
22
|
+
const ref = now instanceof Date ? now.getTime() : now;
|
|
23
|
+
const diff = Math.max(0, ref - then);
|
|
24
|
+
if (diff < ONE_MINUTE_MS) {
|
|
25
|
+
const seconds = Math.floor(diff / ONE_SECOND_MS);
|
|
26
|
+
return seconds < JUST_NOW_SECONDS_THRESHOLD ? labels.justNow : labels.secondsAgo(seconds);
|
|
27
|
+
}
|
|
28
|
+
if (diff < ONE_HOUR_MS) return labels.minutesAgo(Math.floor(diff / ONE_MINUTE_MS));
|
|
29
|
+
if (diff < ONE_DAY_MS) return labels.hoursAgo(Math.floor(diff / ONE_HOUR_MS));
|
|
30
|
+
if (diff < ONE_WEEK_MS) return labels.daysAgo(Math.floor(diff / ONE_DAY_MS));
|
|
31
|
+
if (diff < ONE_MONTH_MS) return labels.weeksAgo(Math.floor(diff / ONE_WEEK_MS));
|
|
32
|
+
if (diff < ONE_YEAR_MS) return labels.monthsAgo(Math.floor(diff / ONE_MONTH_MS));
|
|
33
|
+
return labels.yearsAgo(Math.floor(diff / ONE_YEAR_MS));
|
|
34
|
+
}
|
|
35
|
+
const DD_MM_LENGTH = 5;
|
|
36
|
+
const ISO_DATE_LENGTH = 10;
|
|
37
|
+
const MAX_MONTH = 12;
|
|
38
|
+
const MAX_DAY = 31;
|
|
39
|
+
function ddmmToISO(input, referenceDate = /* @__PURE__ */ new Date()) {
|
|
40
|
+
if (input.length !== DD_MM_LENGTH) return null;
|
|
41
|
+
const [ddRaw, mmRaw] = input.split("/");
|
|
42
|
+
const dd = Number(ddRaw);
|
|
43
|
+
const mm = Number(mmRaw);
|
|
44
|
+
if (!Number.isInteger(dd) || !Number.isInteger(mm)) return null;
|
|
45
|
+
if (mm < 1 || mm > MAX_MONTH || dd < 1 || dd > MAX_DAY) return null;
|
|
46
|
+
const year = referenceDate.getFullYear();
|
|
47
|
+
const candidate = new Date(year, mm - 1, dd);
|
|
48
|
+
candidate.setHours(0, 0, 0, 0);
|
|
49
|
+
const reference = new Date(referenceDate);
|
|
50
|
+
reference.setHours(0, 0, 0, 0);
|
|
51
|
+
if (candidate.getTime() < reference.getTime()) {
|
|
52
|
+
candidate.setFullYear(year + 1);
|
|
53
|
+
}
|
|
54
|
+
const isoYear = candidate.getFullYear();
|
|
55
|
+
const isoMonth = String(candidate.getMonth() + 1).padStart(2, "0");
|
|
56
|
+
const isoDay = String(candidate.getDate()).padStart(2, "0");
|
|
57
|
+
return `${isoYear}-${isoMonth}-${isoDay}`;
|
|
58
|
+
}
|
|
59
|
+
function formatIsoDate(iso, locale = "en-US") {
|
|
60
|
+
if (iso.length !== ISO_DATE_LENGTH) return iso;
|
|
61
|
+
const date = /* @__PURE__ */ new Date(`${iso}T00:00:00`);
|
|
62
|
+
if (Number.isNaN(date.getTime())) return iso;
|
|
63
|
+
return date.toLocaleDateString(locale, { year: "numeric", month: "short", day: "numeric" });
|
|
64
|
+
}
|
|
65
|
+
const DATE_STYLE_INTL_MAP = {
|
|
66
|
+
short: { year: "numeric", month: "numeric", day: "numeric" },
|
|
67
|
+
medium: { year: "numeric", month: "short", day: "numeric" },
|
|
68
|
+
long: { year: "numeric", month: "long", day: "numeric" },
|
|
69
|
+
full: { weekday: "long", year: "numeric", month: "long", day: "numeric" }
|
|
70
|
+
};
|
|
71
|
+
const TIME_INTL_OPTIONS = { hour: "numeric", minute: "2-digit" };
|
|
72
|
+
const DATETIME_INTL_OPTIONS = {
|
|
73
|
+
year: "numeric",
|
|
74
|
+
month: "short",
|
|
75
|
+
day: "numeric",
|
|
76
|
+
hour: "numeric",
|
|
77
|
+
minute: "2-digit"
|
|
78
|
+
};
|
|
79
|
+
function toDate(input) {
|
|
80
|
+
if (input instanceof Date) return isValid(input) ? input : null;
|
|
81
|
+
if (typeof input === "number") {
|
|
82
|
+
const d = new Date(input);
|
|
83
|
+
return isValid(d) ? d : null;
|
|
84
|
+
}
|
|
85
|
+
const iso = parseISO(input);
|
|
86
|
+
if (isValid(iso)) return iso;
|
|
87
|
+
const fallback = new Date(input);
|
|
88
|
+
return isValid(fallback) ? fallback : null;
|
|
89
|
+
}
|
|
90
|
+
function formatDate(input, options = {}) {
|
|
91
|
+
const { style = "medium", locale = "en-US", pattern, now, relativeLabels } = options;
|
|
92
|
+
const date = toDate(input);
|
|
93
|
+
if (!date) return typeof input === "string" ? input : "";
|
|
94
|
+
if (pattern) return dfFormat(date, pattern);
|
|
95
|
+
if (style === "iso") {
|
|
96
|
+
const y = date.getFullYear();
|
|
97
|
+
const m = String(date.getMonth() + 1).padStart(2, "0");
|
|
98
|
+
const d = String(date.getDate()).padStart(2, "0");
|
|
99
|
+
return `${y}-${m}-${d}`;
|
|
100
|
+
}
|
|
101
|
+
if (style === "time") return date.toLocaleTimeString(locale, TIME_INTL_OPTIONS);
|
|
102
|
+
if (style === "datetime") return date.toLocaleString(locale, DATETIME_INTL_OPTIONS);
|
|
103
|
+
if (style === "relative") return formatRelativeDuration(date, now, relativeLabels);
|
|
104
|
+
return date.toLocaleDateString(locale, DATE_STYLE_INTL_MAP[style]);
|
|
105
|
+
}
|
|
106
|
+
function formatCurrency(amount, currency = "USD", options = {}) {
|
|
107
|
+
const {
|
|
108
|
+
locale = "en-US",
|
|
109
|
+
minimumFractionDigits,
|
|
110
|
+
maximumFractionDigits,
|
|
111
|
+
compact = false,
|
|
112
|
+
signDisplay
|
|
113
|
+
} = options;
|
|
114
|
+
return new Intl.NumberFormat(locale, {
|
|
115
|
+
style: "currency",
|
|
116
|
+
currency,
|
|
117
|
+
minimumFractionDigits,
|
|
118
|
+
maximumFractionDigits,
|
|
119
|
+
notation: compact ? "compact" : "standard",
|
|
120
|
+
signDisplay
|
|
121
|
+
}).format(amount);
|
|
122
|
+
}
|
|
123
|
+
function formatNumber(value, options = {}) {
|
|
124
|
+
const { locale = "en-US", decimals, compact = false, percentage = false, signDisplay } = options;
|
|
125
|
+
return new Intl.NumberFormat(locale, {
|
|
126
|
+
style: percentage ? "percent" : "decimal",
|
|
127
|
+
notation: compact ? "compact" : "standard",
|
|
128
|
+
minimumFractionDigits: decimals,
|
|
129
|
+
maximumFractionDigits: decimals,
|
|
130
|
+
signDisplay
|
|
131
|
+
}).format(value);
|
|
132
|
+
}
|
|
133
|
+
export {
|
|
134
|
+
ddmmToISO,
|
|
135
|
+
formatCurrency,
|
|
136
|
+
formatDate,
|
|
137
|
+
formatIsoDate,
|
|
138
|
+
formatNumber,
|
|
139
|
+
formatRelativeDuration
|
|
140
|
+
};
|
|
141
|
+
//# sourceMappingURL=format.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/format.ts"],"sourcesContent":["import { format as dfFormat, parseISO, isValid } from \"date-fns\";\n\nconst ONE_SECOND_MS = 1000;\nconst ONE_MINUTE_MS = 60 * ONE_SECOND_MS;\nconst ONE_HOUR_MS = 60 * ONE_MINUTE_MS;\nconst ONE_DAY_MS = 24 * ONE_HOUR_MS;\nconst ONE_WEEK_MS = 7 * ONE_DAY_MS;\nconst ONE_MONTH_MS = 30 * ONE_DAY_MS;\nconst ONE_YEAR_MS = 365 * ONE_DAY_MS;\nconst JUST_NOW_SECONDS_THRESHOLD = 5;\n\nexport interface IRelativeDurationLabels {\n justNow: string;\n secondsAgo: (n: number) => string;\n minutesAgo: (n: number) => string;\n hoursAgo: (n: number) => string;\n daysAgo: (n: number) => string;\n weeksAgo: (n: number) => string;\n monthsAgo: (n: number) => string;\n yearsAgo: (n: number) => string;\n}\n\nconst DEFAULT_EN_LABELS: IRelativeDurationLabels = {\n justNow: \"just now\",\n secondsAgo: (n) => `${n}s ago`,\n minutesAgo: (n) => `${n}m ago`,\n hoursAgo: (n) => `${n}h ago`,\n daysAgo: (n) => `${n}d ago`,\n weeksAgo: (n) => `${n}w ago`,\n monthsAgo: (n) => `${n}mo ago`,\n yearsAgo: (n) => `${n}y ago`,\n};\n\n/**\n * Format a past timestamp as a compact relative duration (e.g. \"5m ago\").\n * Pass `labels` for localization; defaults to short English.\n */\nexport function formatRelativeDuration(\n timestamp: number | Date,\n now: number | Date = Date.now(),\n labels: IRelativeDurationLabels = DEFAULT_EN_LABELS,\n): string {\n const then = timestamp instanceof Date ? timestamp.getTime() : timestamp;\n const ref = now instanceof Date ? now.getTime() : now;\n const diff = Math.max(0, ref - then);\n\n if (diff < ONE_MINUTE_MS) {\n const seconds = Math.floor(diff / ONE_SECOND_MS);\n return seconds < JUST_NOW_SECONDS_THRESHOLD ? labels.justNow : labels.secondsAgo(seconds);\n }\n if (diff < ONE_HOUR_MS) return labels.minutesAgo(Math.floor(diff / ONE_MINUTE_MS));\n if (diff < ONE_DAY_MS) return labels.hoursAgo(Math.floor(diff / ONE_HOUR_MS));\n if (diff < ONE_WEEK_MS) return labels.daysAgo(Math.floor(diff / ONE_DAY_MS));\n if (diff < ONE_MONTH_MS) return labels.weeksAgo(Math.floor(diff / ONE_WEEK_MS));\n if (diff < ONE_YEAR_MS) return labels.monthsAgo(Math.floor(diff / ONE_MONTH_MS));\n return labels.yearsAgo(Math.floor(diff / ONE_YEAR_MS));\n}\n\nconst DD_MM_LENGTH = 5;\nconst ISO_DATE_LENGTH = 10;\nconst MAX_MONTH = 12;\nconst MAX_DAY = 31;\n\n/**\n * Convert a `dd/mm` user-typed date to an ISO `YYYY-MM-DD` string by assuming\n * the nearest upcoming occurrence of that day/month. Useful for flight-search\n * date inputs where users type compact dates without a year.\n */\nexport function ddmmToISO(input: string, referenceDate: Date = new Date()): string | null {\n if (input.length !== DD_MM_LENGTH) return null;\n const [ddRaw, mmRaw] = input.split(\"/\");\n const dd = Number(ddRaw);\n const mm = Number(mmRaw);\n if (!Number.isInteger(dd) || !Number.isInteger(mm)) return null;\n if (mm < 1 || mm > MAX_MONTH || dd < 1 || dd > MAX_DAY) return null;\n\n const year = referenceDate.getFullYear();\n const candidate = new Date(year, mm - 1, dd);\n candidate.setHours(0, 0, 0, 0);\n const reference = new Date(referenceDate);\n reference.setHours(0, 0, 0, 0);\n\n if (candidate.getTime() < reference.getTime()) {\n candidate.setFullYear(year + 1);\n }\n\n const isoYear = candidate.getFullYear();\n const isoMonth = String(candidate.getMonth() + 1).padStart(2, \"0\");\n const isoDay = String(candidate.getDate()).padStart(2, \"0\");\n return `${isoYear}-${isoMonth}-${isoDay}`;\n}\n\n/**\n * @deprecated Use `formatDate(iso, { style: \"medium\", locale })` instead.\n * Format an ISO date (`YYYY-MM-DD`) as a short display string via Intl.\n */\nexport function formatIsoDate(iso: string, locale = \"en-US\"): string {\n if (iso.length !== ISO_DATE_LENGTH) return iso;\n const date = new Date(`${iso}T00:00:00`);\n if (Number.isNaN(date.getTime())) return iso;\n return date.toLocaleDateString(locale, { year: \"numeric\", month: \"short\", day: \"numeric\" });\n}\n\nexport type IFormatDateStyle = \"short\" | \"medium\" | \"long\" | \"full\" | \"iso\" | \"time\" | \"datetime\" | \"relative\";\n\nexport interface IFormatDateOptions {\n style?: IFormatDateStyle;\n locale?: string;\n /** `date-fns` format string. When provided, `style` is ignored. */\n pattern?: string;\n /** Reference point for `style: \"relative\"` (defaults to now). */\n now?: number | Date;\n relativeLabels?: IRelativeDurationLabels;\n}\n\nconst DATE_STYLE_INTL_MAP: Record<Exclude<IFormatDateStyle, \"iso\" | \"time\" | \"datetime\" | \"relative\">, Intl.DateTimeFormatOptions> = {\n short: { year: \"numeric\", month: \"numeric\", day: \"numeric\" },\n medium: { year: \"numeric\", month: \"short\", day: \"numeric\" },\n long: { year: \"numeric\", month: \"long\", day: \"numeric\" },\n full: { weekday: \"long\", year: \"numeric\", month: \"long\", day: \"numeric\" },\n};\n\nconst TIME_INTL_OPTIONS: Intl.DateTimeFormatOptions = { hour: \"numeric\", minute: \"2-digit\" };\nconst DATETIME_INTL_OPTIONS: Intl.DateTimeFormatOptions = {\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"2-digit\",\n};\n\nfunction toDate(input: string | number | Date): Date | null {\n if (input instanceof Date) return isValid(input) ? input : null;\n if (typeof input === \"number\") {\n const d = new Date(input);\n return isValid(d) ? d : null;\n }\n const iso = parseISO(input);\n if (isValid(iso)) return iso;\n const fallback = new Date(input);\n return isValid(fallback) ? fallback : null;\n}\n\n/**\n * Format a date value (Date, timestamp ms, or ISO string) for display.\n *\n * Styles map to `Intl.DateTimeFormat` where possible; `iso` returns\n * `YYYY-MM-DD`, `relative` delegates to `formatRelativeDuration`, and\n * `pattern` uses a raw `date-fns` format string.\n */\nexport function formatDate(\n input: string | number | Date,\n options: IFormatDateOptions = {},\n): string {\n const { style = \"medium\", locale = \"en-US\", pattern, now, relativeLabels } = options;\n const date = toDate(input);\n if (!date) return typeof input === \"string\" ? input : \"\";\n\n if (pattern) return dfFormat(date, pattern);\n if (style === \"iso\") {\n const y = date.getFullYear();\n const m = String(date.getMonth() + 1).padStart(2, \"0\");\n const d = String(date.getDate()).padStart(2, \"0\");\n return `${y}-${m}-${d}`;\n }\n if (style === \"time\") return date.toLocaleTimeString(locale, TIME_INTL_OPTIONS);\n if (style === \"datetime\") return date.toLocaleString(locale, DATETIME_INTL_OPTIONS);\n if (style === \"relative\") return formatRelativeDuration(date, now, relativeLabels);\n\n return date.toLocaleDateString(locale, DATE_STYLE_INTL_MAP[style]);\n}\n\nexport interface IFormatCurrencyOptions {\n locale?: string;\n minimumFractionDigits?: number;\n maximumFractionDigits?: number;\n compact?: boolean;\n signDisplay?: Intl.NumberFormatOptions[\"signDisplay\"];\n}\n\n/**\n * Format a numeric amount as localized currency using `Intl.NumberFormat`.\n * Pass `compact: true` to get \"$1.2K\" / \"$3.4M\" style output.\n */\nexport function formatCurrency(\n amount: number,\n currency: string = \"USD\",\n options: IFormatCurrencyOptions = {},\n): string {\n const {\n locale = \"en-US\",\n minimumFractionDigits,\n maximumFractionDigits,\n compact = false,\n signDisplay,\n } = options;\n\n return new Intl.NumberFormat(locale, {\n style: \"currency\",\n currency,\n minimumFractionDigits,\n maximumFractionDigits,\n notation: compact ? \"compact\" : \"standard\",\n signDisplay,\n }).format(amount);\n}\n\nexport interface IFormatNumberOptions {\n locale?: string;\n decimals?: number;\n compact?: boolean;\n percentage?: boolean;\n signDisplay?: Intl.NumberFormatOptions[\"signDisplay\"];\n}\n\n/**\n * Format a number for display: `\"1,234.5\"`, `\"1.2K\"`, `\"42.1%\"`, etc.\n * When `percentage: true`, the value is multiplied by 100 (matching Intl).\n */\nexport function formatNumber(\n value: number,\n options: IFormatNumberOptions = {},\n): string {\n const { locale = \"en-US\", decimals, compact = false, percentage = false, signDisplay } = options;\n return new Intl.NumberFormat(locale, {\n style: percentage ? \"percent\" : \"decimal\",\n notation: compact ? \"compact\" : \"standard\",\n minimumFractionDigits: decimals,\n maximumFractionDigits: decimals,\n signDisplay,\n }).format(value);\n}\n"],"mappings":"AAAA,SAAS,UAAU,UAAU,UAAU,eAAe;AAEtD,MAAM,gBAAgB;AACtB,MAAM,gBAAgB,KAAK;AAC3B,MAAM,cAAc,KAAK;AACzB,MAAM,aAAa,KAAK;AACxB,MAAM,cAAc,IAAI;AACxB,MAAM,eAAe,KAAK;AAC1B,MAAM,cAAc,MAAM;AAC1B,MAAM,6BAA6B;AAanC,MAAM,oBAA6C;AAAA,EACjD,SAAS;AAAA,EACT,YAAY,CAAC,MAAM,GAAG,CAAC;AAAA,EACvB,YAAY,CAAC,MAAM,GAAG,CAAC;AAAA,EACvB,UAAU,CAAC,MAAM,GAAG,CAAC;AAAA,EACrB,SAAS,CAAC,MAAM,GAAG,CAAC;AAAA,EACpB,UAAU,CAAC,MAAM,GAAG,CAAC;AAAA,EACrB,WAAW,CAAC,MAAM,GAAG,CAAC;AAAA,EACtB,UAAU,CAAC,MAAM,GAAG,CAAC;AACvB;AAMO,SAAS,uBACd,WACA,MAAqB,KAAK,IAAI,GAC9B,SAAkC,mBAC1B;AACR,QAAM,OAAO,qBAAqB,OAAO,UAAU,QAAQ,IAAI;AAC/D,QAAM,MAAM,eAAe,OAAO,IAAI,QAAQ,IAAI;AAClD,QAAM,OAAO,KAAK,IAAI,GAAG,MAAM,IAAI;AAEnC,MAAI,OAAO,eAAe;AACxB,UAAM,UAAU,KAAK,MAAM,OAAO,aAAa;AAC/C,WAAO,UAAU,6BAA6B,OAAO,UAAU,OAAO,WAAW,OAAO;AAAA,EAC1F;AACA,MAAI,OAAO,YAAa,QAAO,OAAO,WAAW,KAAK,MAAM,OAAO,aAAa,CAAC;AACjF,MAAI,OAAO,WAAY,QAAO,OAAO,SAAS,KAAK,MAAM,OAAO,WAAW,CAAC;AAC5E,MAAI,OAAO,YAAa,QAAO,OAAO,QAAQ,KAAK,MAAM,OAAO,UAAU,CAAC;AAC3E,MAAI,OAAO,aAAc,QAAO,OAAO,SAAS,KAAK,MAAM,OAAO,WAAW,CAAC;AAC9E,MAAI,OAAO,YAAa,QAAO,OAAO,UAAU,KAAK,MAAM,OAAO,YAAY,CAAC;AAC/E,SAAO,OAAO,SAAS,KAAK,MAAM,OAAO,WAAW,CAAC;AACvD;AAEA,MAAM,eAAe;AACrB,MAAM,kBAAkB;AACxB,MAAM,YAAY;AAClB,MAAM,UAAU;AAOT,SAAS,UAAU,OAAe,gBAAsB,oBAAI,KAAK,GAAkB;AACxF,MAAI,MAAM,WAAW,aAAc,QAAO;AAC1C,QAAM,CAAC,OAAO,KAAK,IAAI,MAAM,MAAM,GAAG;AACtC,QAAM,KAAK,OAAO,KAAK;AACvB,QAAM,KAAK,OAAO,KAAK;AACvB,MAAI,CAAC,OAAO,UAAU,EAAE,KAAK,CAAC,OAAO,UAAU,EAAE,EAAG,QAAO;AAC3D,MAAI,KAAK,KAAK,KAAK,aAAa,KAAK,KAAK,KAAK,QAAS,QAAO;AAE/D,QAAM,OAAO,cAAc,YAAY;AACvC,QAAM,YAAY,IAAI,KAAK,MAAM,KAAK,GAAG,EAAE;AAC3C,YAAU,SAAS,GAAG,GAAG,GAAG,CAAC;AAC7B,QAAM,YAAY,IAAI,KAAK,aAAa;AACxC,YAAU,SAAS,GAAG,GAAG,GAAG,CAAC;AAE7B,MAAI,UAAU,QAAQ,IAAI,UAAU,QAAQ,GAAG;AAC7C,cAAU,YAAY,OAAO,CAAC;AAAA,EAChC;AAEA,QAAM,UAAU,UAAU,YAAY;AACtC,QAAM,WAAW,OAAO,UAAU,SAAS,IAAI,CAAC,EAAE,SAAS,GAAG,GAAG;AACjE,QAAM,SAAS,OAAO,UAAU,QAAQ,CAAC,EAAE,SAAS,GAAG,GAAG;AAC1D,SAAO,GAAG,OAAO,IAAI,QAAQ,IAAI,MAAM;AACzC;AAMO,SAAS,cAAc,KAAa,SAAS,SAAiB;AACnE,MAAI,IAAI,WAAW,gBAAiB,QAAO;AAC3C,QAAM,OAAO,oBAAI,KAAK,GAAG,GAAG,WAAW;AACvC,MAAI,OAAO,MAAM,KAAK,QAAQ,CAAC,EAAG,QAAO;AACzC,SAAO,KAAK,mBAAmB,QAAQ,EAAE,MAAM,WAAW,OAAO,SAAS,KAAK,UAAU,CAAC;AAC5F;AAcA,MAAM,sBAA+H;AAAA,EACnI,OAAO,EAAE,MAAM,WAAW,OAAO,WAAW,KAAK,UAAU;AAAA,EAC3D,QAAQ,EAAE,MAAM,WAAW,OAAO,SAAS,KAAK,UAAU;AAAA,EAC1D,MAAM,EAAE,MAAM,WAAW,OAAO,QAAQ,KAAK,UAAU;AAAA,EACvD,MAAM,EAAE,SAAS,QAAQ,MAAM,WAAW,OAAO,QAAQ,KAAK,UAAU;AAC1E;AAEA,MAAM,oBAAgD,EAAE,MAAM,WAAW,QAAQ,UAAU;AAC3F,MAAM,wBAAoD;AAAA,EACxD,MAAM;AAAA,EACN,OAAO;AAAA,EACP,KAAK;AAAA,EACL,MAAM;AAAA,EACN,QAAQ;AACV;AAEA,SAAS,OAAO,OAA4C;AAC1D,MAAI,iBAAiB,KAAM,QAAO,QAAQ,KAAK,IAAI,QAAQ;AAC3D,MAAI,OAAO,UAAU,UAAU;AAC7B,UAAM,IAAI,IAAI,KAAK,KAAK;AACxB,WAAO,QAAQ,CAAC,IAAI,IAAI;AAAA,EAC1B;AACA,QAAM,MAAM,SAAS,KAAK;AAC1B,MAAI,QAAQ,GAAG,EAAG,QAAO;AACzB,QAAM,WAAW,IAAI,KAAK,KAAK;AAC/B,SAAO,QAAQ,QAAQ,IAAI,WAAW;AACxC;AASO,SAAS,WACd,OACA,UAA8B,CAAC,GACvB;AACR,QAAM,EAAE,QAAQ,UAAU,SAAS,SAAS,SAAS,KAAK,eAAe,IAAI;AAC7E,QAAM,OAAO,OAAO,KAAK;AACzB,MAAI,CAAC,KAAM,QAAO,OAAO,UAAU,WAAW,QAAQ;AAEtD,MAAI,QAAS,QAAO,SAAS,MAAM,OAAO;AAC1C,MAAI,UAAU,OAAO;AACnB,UAAM,IAAI,KAAK,YAAY;AAC3B,UAAM,IAAI,OAAO,KAAK,SAAS,IAAI,CAAC,EAAE,SAAS,GAAG,GAAG;AACrD,UAAM,IAAI,OAAO,KAAK,QAAQ,CAAC,EAAE,SAAS,GAAG,GAAG;AAChD,WAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;AAAA,EACvB;AACA,MAAI,UAAU,OAAQ,QAAO,KAAK,mBAAmB,QAAQ,iBAAiB;AAC9E,MAAI,UAAU,WAAY,QAAO,KAAK,eAAe,QAAQ,qBAAqB;AAClF,MAAI,UAAU,WAAY,QAAO,uBAAuB,MAAM,KAAK,cAAc;AAEjF,SAAO,KAAK,mBAAmB,QAAQ,oBAAoB,KAAK,CAAC;AACnE;AAcO,SAAS,eACd,QACA,WAAmB,OACnB,UAAkC,CAAC,GAC3B;AACR,QAAM;AAAA,IACJ,SAAS;AAAA,IACT;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV;AAAA,EACF,IAAI;AAEJ,SAAO,IAAI,KAAK,aAAa,QAAQ;AAAA,IACnC,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU,UAAU,YAAY;AAAA,IAChC;AAAA,EACF,CAAC,EAAE,OAAO,MAAM;AAClB;AAcO,SAAS,aACd,OACA,UAAgC,CAAC,GACzB;AACR,QAAM,EAAE,SAAS,SAAS,UAAU,UAAU,OAAO,aAAa,OAAO,YAAY,IAAI;AACzF,SAAO,IAAI,KAAK,aAAa,QAAQ;AAAA,IACnC,OAAO,aAAa,YAAY;AAAA,IAChC,UAAU,UAAU,YAAY;AAAA,IAChC,uBAAuB;AAAA,IACvB,uBAAuB;AAAA,IACvB;AAAA,EACF,CAAC,EAAE,OAAO,KAAK;AACjB;","names":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { cn } from "./cn.js";
|
|
2
|
+
export { apiFetch, createApiError } from "./api-client.js";
|
|
3
|
+
export type { IApiError, IApiFetchOptions } from "./api-client.js";
|
|
4
|
+
export { parsePaginationParams, buildPaginatedResponse, } from "./pagination.js";
|
|
5
|
+
export type { IPaginationParams, IPaginatedSlice } from "./pagination.js";
|
|
6
|
+
export { formatRelativeDuration, ddmmToISO, formatIsoDate, formatDate, formatCurrency, formatNumber, } from "./format.js";
|
|
7
|
+
export type { IRelativeDurationLabels, IFormatDateOptions, IFormatDateStyle, IFormatCurrencyOptions, IFormatNumberOptions, } from "./format.js";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAE7B,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC3D,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnE,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAE1E,OAAO,EACL,sBAAsB,EACtB,SAAS,EACT,aAAa,EACb,UAAU,EACV,cAAc,EACd,YAAY,GACb,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,EAChB,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { cn } from "./cn.js";
|
|
2
|
+
import { apiFetch, createApiError } from "./api-client.js";
|
|
3
|
+
import {
|
|
4
|
+
parsePaginationParams,
|
|
5
|
+
buildPaginatedResponse
|
|
6
|
+
} from "./pagination.js";
|
|
7
|
+
import {
|
|
8
|
+
formatRelativeDuration,
|
|
9
|
+
ddmmToISO,
|
|
10
|
+
formatIsoDate,
|
|
11
|
+
formatDate,
|
|
12
|
+
formatCurrency,
|
|
13
|
+
formatNumber
|
|
14
|
+
} from "./format.js";
|
|
15
|
+
export {
|
|
16
|
+
apiFetch,
|
|
17
|
+
buildPaginatedResponse,
|
|
18
|
+
cn,
|
|
19
|
+
createApiError,
|
|
20
|
+
ddmmToISO,
|
|
21
|
+
formatCurrency,
|
|
22
|
+
formatDate,
|
|
23
|
+
formatIsoDate,
|
|
24
|
+
formatNumber,
|
|
25
|
+
formatRelativeDuration,
|
|
26
|
+
parsePaginationParams
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/index.ts"],"sourcesContent":["export { cn } from \"./cn.js\";\n\nexport { apiFetch, createApiError } from \"./api-client.js\";\nexport type { IApiError, IApiFetchOptions } from \"./api-client.js\";\n\nexport {\n parsePaginationParams,\n buildPaginatedResponse,\n} from \"./pagination.js\";\nexport type { IPaginationParams, IPaginatedSlice } from \"./pagination.js\";\n\nexport {\n formatRelativeDuration,\n ddmmToISO,\n formatIsoDate,\n formatDate,\n formatCurrency,\n formatNumber,\n} from \"./format.js\";\nexport type {\n IRelativeDurationLabels,\n IFormatDateOptions,\n IFormatDateStyle,\n IFormatCurrencyOptions,\n IFormatNumberOptions,\n} from \"./format.js\";\n"],"mappings":"AAAA,SAAS,UAAU;AAEnB,SAAS,UAAU,sBAAsB;AAGzC;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAGP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":[]}
|