@handijitcom/ui 0.0.0-stage → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +1025 -2
- package/build/base.css +1 -0
- package/build/calendar.cjs +2 -0
- package/build/calendar.cjs.map +1 -0
- package/build/calendar.css +1 -0
- package/build/calendar.js +741 -0
- package/build/calendar.js.map +1 -0
- package/build/charts.cjs +2 -0
- package/build/charts.cjs.map +1 -0
- package/build/charts.css +1 -0
- package/build/charts.js +1866 -0
- package/build/charts.js.map +1 -0
- package/build/chat.cjs +4 -0
- package/build/chat.cjs.map +1 -0
- package/build/chat.css +1 -0
- package/build/chat.js +1126 -0
- package/build/chat.js.map +1 -0
- package/build/components/Accordion/index.cjs +2 -0
- package/build/components/Accordion/index.cjs.map +1 -0
- package/build/components/Accordion/index.d.cts +29 -0
- package/build/components/Accordion/index.d.ts +29 -0
- package/build/components/Accordion/index.js +42 -0
- package/build/components/Accordion/index.js.map +1 -0
- package/build/components/Accordion/style.css +1 -0
- package/build/components/Alert/index.cjs +2 -0
- package/build/components/Alert/index.cjs.map +1 -0
- package/build/components/Alert/index.d.cts +15 -0
- package/build/components/Alert/index.d.ts +15 -0
- package/build/components/Alert/index.js +32 -0
- package/build/components/Alert/index.js.map +1 -0
- package/build/components/Alert/style.css +1 -0
- package/build/components/Avatar/index.cjs +2 -0
- package/build/components/Avatar/index.cjs.map +1 -0
- package/build/components/Avatar/index.d.cts +26 -0
- package/build/components/Avatar/index.d.ts +26 -0
- package/build/components/Avatar/index.js +57 -0
- package/build/components/Avatar/index.js.map +1 -0
- package/build/components/Avatar/style.css +1 -0
- package/build/components/Badge/index.cjs +2 -0
- package/build/components/Badge/index.cjs.map +1 -0
- package/build/components/Badge/index.d.cts +21 -0
- package/build/components/Badge/index.d.ts +21 -0
- package/build/components/Badge/index.js +26 -0
- package/build/components/Badge/index.js.map +1 -0
- package/build/components/Badge/style.css +1 -0
- package/build/components/BottomSheet/index.cjs +2 -0
- package/build/components/BottomSheet/index.cjs.map +1 -0
- package/build/components/BottomSheet/index.d.cts +21 -0
- package/build/components/BottomSheet/index.d.ts +21 -0
- package/build/components/BottomSheet/index.js +85 -0
- package/build/components/BottomSheet/index.js.map +1 -0
- package/build/components/BottomSheet/style.css +1 -0
- package/build/components/Breadcrumb/index.cjs +2 -0
- package/build/components/Breadcrumb/index.cjs.map +1 -0
- package/build/components/Breadcrumb/index.d.cts +20 -0
- package/build/components/Breadcrumb/index.d.ts +20 -0
- package/build/components/Breadcrumb/index.js +31 -0
- package/build/components/Breadcrumb/index.js.map +1 -0
- package/build/components/Breadcrumb/style.css +1 -0
- package/build/components/Button/index.cjs +2 -0
- package/build/components/Button/index.cjs.map +1 -0
- package/build/components/Button/index.d.cts +32 -0
- package/build/components/Button/index.d.ts +32 -0
- package/build/components/Button/index.js +88 -0
- package/build/components/Button/index.js.map +1 -0
- package/build/components/Button/style.css +1 -0
- package/build/components/Card/index.cjs +2 -0
- package/build/components/Card/index.cjs.map +1 -0
- package/build/components/Card/index.d.cts +51 -0
- package/build/components/Card/index.d.ts +51 -0
- package/build/components/Card/index.js +58 -0
- package/build/components/Card/index.js.map +1 -0
- package/build/components/Card/style.css +1 -0
- package/build/components/Carousel/index.cjs +2 -0
- package/build/components/Carousel/index.cjs.map +1 -0
- package/build/components/Carousel/index.d.cts +24 -0
- package/build/components/Carousel/index.d.ts +24 -0
- package/build/components/Carousel/index.js +111 -0
- package/build/components/Carousel/index.js.map +1 -0
- package/build/components/Carousel/style.css +1 -0
- package/build/components/Checkbox/index.cjs +2 -0
- package/build/components/Checkbox/index.cjs.map +1 -0
- package/build/components/Checkbox/index.d.cts +15 -0
- package/build/components/Checkbox/index.d.ts +15 -0
- package/build/components/Checkbox/index.js +50 -0
- package/build/components/Checkbox/index.js.map +1 -0
- package/build/components/Checkbox/style.css +1 -0
- package/build/components/Chip/index.cjs +2 -0
- package/build/components/Chip/index.cjs.map +1 -0
- package/build/components/Chip/index.d.cts +27 -0
- package/build/components/Chip/index.d.ts +27 -0
- package/build/components/Chip/index.js +67 -0
- package/build/components/Chip/index.js.map +1 -0
- package/build/components/Chip/style.css +1 -0
- package/build/components/ChipGroup/index.cjs +2 -0
- package/build/components/ChipGroup/index.cjs.map +1 -0
- package/build/components/ChipGroup/index.d.cts +53 -0
- package/build/components/ChipGroup/index.d.ts +53 -0
- package/build/components/ChipGroup/index.js +81 -0
- package/build/components/ChipGroup/index.js.map +1 -0
- package/build/components/ChipGroup/style.css +1 -0
- package/build/components/CodeBadge/index.cjs +2 -0
- package/build/components/CodeBadge/index.cjs.map +1 -0
- package/build/components/CodeBadge/index.d.cts +36 -0
- package/build/components/CodeBadge/index.d.ts +36 -0
- package/build/components/CodeBadge/index.js +62 -0
- package/build/components/CodeBadge/index.js.map +1 -0
- package/build/components/CodeBadge/style.css +1 -0
- package/build/components/Combobox/index.cjs +2 -0
- package/build/components/Combobox/index.cjs.map +1 -0
- package/build/components/Combobox/index.d.cts +8 -0
- package/build/components/Combobox/index.d.ts +8 -0
- package/build/components/Combobox/index.js +332 -0
- package/build/components/Combobox/index.js.map +1 -0
- package/build/components/Combobox/style.css +1 -0
- package/build/components/CommandPalette/index.cjs +2 -0
- package/build/components/CommandPalette/index.cjs.map +1 -0
- package/build/components/CommandPalette/index.d.cts +37 -0
- package/build/components/CommandPalette/index.d.ts +37 -0
- package/build/components/CommandPalette/index.js +181 -0
- package/build/components/CommandPalette/index.js.map +1 -0
- package/build/components/CommandPalette/style.css +1 -0
- package/build/components/ConfirmDialog/index.cjs +2 -0
- package/build/components/ConfirmDialog/index.cjs.map +1 -0
- package/build/components/ConfirmDialog/index.d.cts +34 -0
- package/build/components/ConfirmDialog/index.d.ts +34 -0
- package/build/components/ConfirmDialog/index.js +85 -0
- package/build/components/ConfirmDialog/index.js.map +1 -0
- package/build/components/CopyField/index.cjs +2 -0
- package/build/components/CopyField/index.cjs.map +1 -0
- package/build/components/CopyField/index.d.cts +20 -0
- package/build/components/CopyField/index.d.ts +20 -0
- package/build/components/CopyField/index.js +44 -0
- package/build/components/CopyField/index.js.map +1 -0
- package/build/components/CopyField/style.css +1 -0
- package/build/components/DataTable/index.cjs +2 -0
- package/build/components/DataTable/index.cjs.map +1 -0
- package/build/components/DataTable/index.d.cts +60 -0
- package/build/components/DataTable/index.d.ts +60 -0
- package/build/components/DataTable/index.js +109 -0
- package/build/components/DataTable/index.js.map +1 -0
- package/build/components/DataTable/style.css +1 -0
- package/build/components/DateField/index.cjs +2 -0
- package/build/components/DateField/index.cjs.map +1 -0
- package/build/components/DateField/index.d.cts +57 -0
- package/build/components/DateField/index.d.ts +57 -0
- package/build/components/DateField/index.js +90 -0
- package/build/components/DateField/index.js.map +1 -0
- package/build/components/DateField/style.css +1 -0
- package/build/components/Directory/index.cjs +2 -0
- package/build/components/Directory/index.cjs.map +1 -0
- package/build/components/Directory/index.d.cts +51 -0
- package/build/components/Directory/index.d.ts +51 -0
- package/build/components/Directory/index.js +46 -0
- package/build/components/Directory/index.js.map +1 -0
- package/build/components/Directory/style.css +1 -0
- package/build/components/Disclosure/index.cjs +2 -0
- package/build/components/Disclosure/index.cjs.map +1 -0
- package/build/components/Disclosure/index.d.cts +34 -0
- package/build/components/Disclosure/index.d.ts +34 -0
- package/build/components/Disclosure/index.js +64 -0
- package/build/components/Disclosure/index.js.map +1 -0
- package/build/components/Disclosure/style.css +1 -0
- package/build/components/Divider/index.cjs +2 -0
- package/build/components/Divider/index.cjs.map +1 -0
- package/build/components/Divider/index.d.cts +10 -0
- package/build/components/Divider/index.d.ts +10 -0
- package/build/components/Divider/index.js +24 -0
- package/build/components/Divider/index.js.map +1 -0
- package/build/components/Divider/style.css +1 -0
- package/build/components/Drawer/index.cjs +2 -0
- package/build/components/Drawer/index.cjs.map +1 -0
- package/build/components/Drawer/index.d.cts +29 -0
- package/build/components/Drawer/index.d.ts +29 -0
- package/build/components/Drawer/index.js +91 -0
- package/build/components/Drawer/index.js.map +1 -0
- package/build/components/Drawer/style.css +1 -0
- package/build/components/EmptyState/index.cjs +2 -0
- package/build/components/EmptyState/index.cjs.map +1 -0
- package/build/components/EmptyState/index.d.cts +19 -0
- package/build/components/EmptyState/index.d.ts +19 -0
- package/build/components/EmptyState/index.js +35 -0
- package/build/components/EmptyState/index.js.map +1 -0
- package/build/components/EmptyState/style.css +1 -0
- package/build/components/Field/index.cjs +2 -0
- package/build/components/Field/index.cjs.map +1 -0
- package/build/components/Field/index.d.cts +37 -0
- package/build/components/Field/index.d.ts +37 -0
- package/build/components/Field/index.js +54 -0
- package/build/components/Field/index.js.map +1 -0
- package/build/components/Field/style.css +1 -0
- package/build/components/FileUpload/index.cjs +2 -0
- package/build/components/FileUpload/index.cjs.map +1 -0
- package/build/components/FileUpload/index.d.cts +42 -0
- package/build/components/FileUpload/index.d.ts +42 -0
- package/build/components/FileUpload/index.js +145 -0
- package/build/components/FileUpload/index.js.map +1 -0
- package/build/components/FileUpload/style.css +1 -0
- package/build/components/FilterBar/index.cjs +2 -0
- package/build/components/FilterBar/index.cjs.map +1 -0
- package/build/components/FilterBar/index.d.cts +28 -0
- package/build/components/FilterBar/index.d.ts +28 -0
- package/build/components/FilterBar/index.js +35 -0
- package/build/components/FilterBar/index.js.map +1 -0
- package/build/components/FilterBar/style.css +1 -0
- package/build/components/IconButton/index.cjs +2 -0
- package/build/components/IconButton/index.cjs.map +1 -0
- package/build/components/IconButton/index.d.cts +26 -0
- package/build/components/IconButton/index.d.ts +26 -0
- package/build/components/IconButton/index.js +61 -0
- package/build/components/IconButton/index.js.map +1 -0
- package/build/components/IconButton/style.css +1 -0
- package/build/components/Input/index.cjs +2 -0
- package/build/components/Input/index.cjs.map +1 -0
- package/build/components/Input/index.d.cts +15 -0
- package/build/components/Input/index.d.ts +15 -0
- package/build/components/Input/index.js +52 -0
- package/build/components/Input/index.js.map +1 -0
- package/build/components/Input/style.css +1 -0
- package/build/components/Kbd/index.cjs +2 -0
- package/build/components/Kbd/index.cjs.map +1 -0
- package/build/components/Kbd/index.d.cts +12 -0
- package/build/components/Kbd/index.d.ts +12 -0
- package/build/components/Kbd/index.js +13 -0
- package/build/components/Kbd/index.js.map +1 -0
- package/build/components/Kbd/style.css +1 -0
- package/build/components/Link/index.cjs +2 -0
- package/build/components/Link/index.cjs.map +1 -0
- package/build/components/Link/index.d.cts +5 -0
- package/build/components/Link/index.d.ts +5 -0
- package/build/components/Link/index.js +11 -0
- package/build/components/Link/index.js.map +1 -0
- package/build/components/Menu/index.cjs +2 -0
- package/build/components/Menu/index.cjs.map +1 -0
- package/build/components/Menu/index.d.cts +46 -0
- package/build/components/Menu/index.d.ts +46 -0
- package/build/components/Menu/index.js +241 -0
- package/build/components/Menu/index.js.map +1 -0
- package/build/components/Menu/style.css +1 -0
- package/build/components/Modal/index.cjs +2 -0
- package/build/components/Modal/index.cjs.map +1 -0
- package/build/components/Modal/index.d.cts +35 -0
- package/build/components/Modal/index.d.ts +35 -0
- package/build/components/Modal/index.js +95 -0
- package/build/components/Modal/index.js.map +1 -0
- package/build/components/Modal/style.css +1 -0
- package/build/components/MoneyInput/index.cjs +2 -0
- package/build/components/MoneyInput/index.cjs.map +1 -0
- package/build/components/MoneyInput/index.d.cts +17 -0
- package/build/components/MoneyInput/index.d.ts +17 -0
- package/build/components/MoneyInput/index.js +22 -0
- package/build/components/MoneyInput/index.js.map +1 -0
- package/build/components/PageHeader/index.cjs +2 -0
- package/build/components/PageHeader/index.cjs.map +1 -0
- package/build/components/PageHeader/index.d.cts +24 -0
- package/build/components/PageHeader/index.d.ts +24 -0
- package/build/components/PageHeader/index.js +34 -0
- package/build/components/PageHeader/index.js.map +1 -0
- package/build/components/PageHeader/style.css +1 -0
- package/build/components/Pagination/index.cjs +2 -0
- package/build/components/Pagination/index.cjs.map +1 -0
- package/build/components/Pagination/index.d.cts +39 -0
- package/build/components/Pagination/index.d.ts +39 -0
- package/build/components/Pagination/index.js +128 -0
- package/build/components/Pagination/index.js.map +1 -0
- package/build/components/Pagination/style.css +1 -0
- package/build/components/Panel/index.cjs +2 -0
- package/build/components/Panel/index.cjs.map +1 -0
- package/build/components/Panel/index.d.cts +43 -0
- package/build/components/Panel/index.d.ts +43 -0
- package/build/components/Panel/index.js +55 -0
- package/build/components/Panel/index.js.map +1 -0
- package/build/components/Panel/style.css +1 -0
- package/build/components/PasswordInput/index.cjs +2 -0
- package/build/components/PasswordInput/index.cjs.map +1 -0
- package/build/components/PasswordInput/index.d.cts +14 -0
- package/build/components/PasswordInput/index.d.ts +14 -0
- package/build/components/PasswordInput/index.js +40 -0
- package/build/components/PasswordInput/index.js.map +1 -0
- package/build/components/PasswordInput/style.css +1 -0
- package/build/components/PercentInput/index.cjs +2 -0
- package/build/components/PercentInput/index.cjs.map +1 -0
- package/build/components/PercentInput/index.d.cts +10 -0
- package/build/components/PercentInput/index.d.ts +10 -0
- package/build/components/PercentInput/index.js +14 -0
- package/build/components/PercentInput/index.js.map +1 -0
- package/build/components/Popover/index.cjs +2 -0
- package/build/components/Popover/index.cjs.map +1 -0
- package/build/components/Popover/index.d.cts +26 -0
- package/build/components/Popover/index.d.ts +26 -0
- package/build/components/Popover/index.js +106 -0
- package/build/components/Popover/index.js.map +1 -0
- package/build/components/Popover/style.css +1 -0
- package/build/components/Price/index.cjs +2 -0
- package/build/components/Price/index.cjs.map +1 -0
- package/build/components/Price/index.d.cts +22 -0
- package/build/components/Price/index.d.ts +22 -0
- package/build/components/Price/index.js +46 -0
- package/build/components/Price/index.js.map +1 -0
- package/build/components/Price/style.css +1 -0
- package/build/components/Progress/index.cjs +2 -0
- package/build/components/Progress/index.cjs.map +1 -0
- package/build/components/Progress/index.d.cts +59 -0
- package/build/components/Progress/index.d.ts +59 -0
- package/build/components/Progress/index.js +124 -0
- package/build/components/Progress/index.js.map +1 -0
- package/build/components/Progress/style.css +1 -0
- package/build/components/PromptDialog/index.cjs +2 -0
- package/build/components/PromptDialog/index.cjs.map +1 -0
- package/build/components/PromptDialog/index.d.cts +36 -0
- package/build/components/PromptDialog/index.d.ts +36 -0
- package/build/components/PromptDialog/index.js +119 -0
- package/build/components/PromptDialog/index.js.map +1 -0
- package/build/components/PromptDialog/style.css +1 -0
- package/build/components/QuantityInput/index.cjs +2 -0
- package/build/components/QuantityInput/index.cjs.map +1 -0
- package/build/components/QuantityInput/index.d.cts +17 -0
- package/build/components/QuantityInput/index.d.ts +17 -0
- package/build/components/QuantityInput/index.js +23 -0
- package/build/components/QuantityInput/index.js.map +1 -0
- package/build/components/QuantityStepper/index.cjs +2 -0
- package/build/components/QuantityStepper/index.cjs.map +1 -0
- package/build/components/QuantityStepper/index.d.cts +37 -0
- package/build/components/QuantityStepper/index.d.ts +37 -0
- package/build/components/QuantityStepper/index.js +118 -0
- package/build/components/QuantityStepper/index.js.map +1 -0
- package/build/components/QuantityStepper/style.css +1 -0
- package/build/components/Radio/index.cjs +2 -0
- package/build/components/Radio/index.cjs.map +1 -0
- package/build/components/Radio/index.d.cts +18 -0
- package/build/components/Radio/index.d.ts +18 -0
- package/build/components/Radio/index.js +53 -0
- package/build/components/Radio/index.js.map +1 -0
- package/build/components/Radio/style.css +1 -0
- package/build/components/RadioCard/index.cjs +2 -0
- package/build/components/RadioCard/index.cjs.map +1 -0
- package/build/components/RadioCard/index.d.cts +16 -0
- package/build/components/RadioCard/index.d.ts +16 -0
- package/build/components/RadioCard/index.js +48 -0
- package/build/components/RadioCard/index.js.map +1 -0
- package/build/components/RadioCard/style.css +1 -0
- package/build/components/RangeSlider/index.cjs +2 -0
- package/build/components/RangeSlider/index.cjs.map +1 -0
- package/build/components/RangeSlider/index.d.cts +45 -0
- package/build/components/RangeSlider/index.d.ts +45 -0
- package/build/components/RangeSlider/index.js +121 -0
- package/build/components/RangeSlider/index.js.map +1 -0
- package/build/components/RangeSlider/style.css +1 -0
- package/build/components/RateInput/index.cjs +2 -0
- package/build/components/RateInput/index.cjs.map +1 -0
- package/build/components/RateInput/index.d.cts +9 -0
- package/build/components/RateInput/index.d.ts +9 -0
- package/build/components/RateInput/index.js +18 -0
- package/build/components/RateInput/index.js.map +1 -0
- package/build/components/Rating/index.cjs +2 -0
- package/build/components/Rating/index.cjs.map +1 -0
- package/build/components/Rating/index.d.cts +16 -0
- package/build/components/Rating/index.d.ts +16 -0
- package/build/components/Rating/index.js +29 -0
- package/build/components/Rating/index.js.map +1 -0
- package/build/components/Rating/style.css +1 -0
- package/build/components/RatingInput/index.cjs +2 -0
- package/build/components/RatingInput/index.cjs.map +1 -0
- package/build/components/RatingInput/index.d.cts +34 -0
- package/build/components/RatingInput/index.d.ts +34 -0
- package/build/components/RatingInput/index.js +89 -0
- package/build/components/RatingInput/index.js.map +1 -0
- package/build/components/RatingInput/style.css +1 -0
- package/build/components/ScaledInput/index.cjs +2 -0
- package/build/components/ScaledInput/index.cjs.map +1 -0
- package/build/components/ScaledInput/index.d.cts +77 -0
- package/build/components/ScaledInput/index.d.ts +77 -0
- package/build/components/ScaledInput/index.js +77 -0
- package/build/components/ScaledInput/index.js.map +1 -0
- package/build/components/ScaledInput/style.css +1 -0
- package/build/components/ScrollArea/index.cjs +2 -0
- package/build/components/ScrollArea/index.cjs.map +1 -0
- package/build/components/ScrollArea/index.d.cts +23 -0
- package/build/components/ScrollArea/index.d.ts +23 -0
- package/build/components/ScrollArea/index.js +65 -0
- package/build/components/ScrollArea/index.js.map +1 -0
- package/build/components/ScrollArea/style.css +1 -0
- package/build/components/SectionHeader/index.cjs +2 -0
- package/build/components/SectionHeader/index.cjs.map +1 -0
- package/build/components/SectionHeader/index.d.cts +17 -0
- package/build/components/SectionHeader/index.d.ts +17 -0
- package/build/components/SectionHeader/index.js +25 -0
- package/build/components/SectionHeader/index.js.map +1 -0
- package/build/components/SectionHeader/style.css +1 -0
- package/build/components/SegmentedControl/index.cjs +2 -0
- package/build/components/SegmentedControl/index.cjs.map +1 -0
- package/build/components/SegmentedControl/index.d.cts +39 -0
- package/build/components/SegmentedControl/index.d.ts +39 -0
- package/build/components/SegmentedControl/index.js +84 -0
- package/build/components/SegmentedControl/index.js.map +1 -0
- package/build/components/SegmentedControl/style.css +1 -0
- package/build/components/Select/index.cjs +2 -0
- package/build/components/Select/index.cjs.map +1 -0
- package/build/components/Select/index.d.cts +52 -0
- package/build/components/Select/index.d.ts +52 -0
- package/build/components/Select/index.js +206 -0
- package/build/components/Select/index.js.map +1 -0
- package/build/components/Select/style.css +1 -0
- package/build/components/Skeleton/index.cjs +2 -0
- package/build/components/Skeleton/index.cjs.map +1 -0
- package/build/components/Skeleton/index.d.cts +25 -0
- package/build/components/Skeleton/index.d.ts +25 -0
- package/build/components/Skeleton/index.js +50 -0
- package/build/components/Skeleton/index.js.map +1 -0
- package/build/components/Skeleton/style.css +1 -0
- package/build/components/Spinner/index.cjs +2 -0
- package/build/components/Spinner/index.cjs.map +1 -0
- package/build/components/Spinner/index.d.cts +16 -0
- package/build/components/Spinner/index.d.ts +16 -0
- package/build/components/Spinner/index.js +15 -0
- package/build/components/Spinner/index.js.map +1 -0
- package/build/components/Spinner/style.css +1 -0
- package/build/components/Stat/index.cjs +2 -0
- package/build/components/Stat/index.cjs.map +1 -0
- package/build/components/Stat/index.d.cts +34 -0
- package/build/components/Stat/index.d.ts +34 -0
- package/build/components/Stat/index.js +72 -0
- package/build/components/Stat/index.js.map +1 -0
- package/build/components/Stat/style.css +1 -0
- package/build/components/StatusDot/index.cjs +2 -0
- package/build/components/StatusDot/index.cjs.map +1 -0
- package/build/components/StatusDot/index.d.cts +23 -0
- package/build/components/StatusDot/index.d.ts +23 -0
- package/build/components/StatusDot/index.js +23 -0
- package/build/components/StatusDot/index.js.map +1 -0
- package/build/components/StatusDot/style.css +1 -0
- package/build/components/Steps/index.cjs +2 -0
- package/build/components/Steps/index.cjs.map +1 -0
- package/build/components/Steps/index.d.cts +23 -0
- package/build/components/Steps/index.d.ts +23 -0
- package/build/components/Steps/index.js +69 -0
- package/build/components/Steps/index.js.map +1 -0
- package/build/components/Steps/style.css +1 -0
- package/build/components/SummaryCard/index.cjs +2 -0
- package/build/components/SummaryCard/index.cjs.map +1 -0
- package/build/components/SummaryCard/index.d.cts +24 -0
- package/build/components/SummaryCard/index.d.ts +24 -0
- package/build/components/SummaryCard/index.js +33 -0
- package/build/components/SummaryCard/index.js.map +1 -0
- package/build/components/SummaryCard/style.css +1 -0
- package/build/components/Switch/index.cjs +2 -0
- package/build/components/Switch/index.cjs.map +1 -0
- package/build/components/Switch/index.d.cts +21 -0
- package/build/components/Switch/index.d.ts +21 -0
- package/build/components/Switch/index.js +60 -0
- package/build/components/Switch/index.js.map +1 -0
- package/build/components/Switch/style.css +1 -0
- package/build/components/Table/index.cjs +2 -0
- package/build/components/Table/index.cjs.map +1 -0
- package/build/components/Table/index.d.cts +28 -0
- package/build/components/Table/index.d.ts +28 -0
- package/build/components/Table/index.js +58 -0
- package/build/components/Table/index.js.map +1 -0
- package/build/components/Table/style.css +1 -0
- package/build/components/TableCheckbox/index.cjs +2 -0
- package/build/components/TableCheckbox/index.cjs.map +1 -0
- package/build/components/TableCheckbox/index.d.cts +15 -0
- package/build/components/TableCheckbox/index.d.ts +15 -0
- package/build/components/TableCheckbox/index.js +31 -0
- package/build/components/TableCheckbox/index.js.map +1 -0
- package/build/components/TableCheckbox/style.css +1 -0
- package/build/components/Tabs/index.cjs +2 -0
- package/build/components/Tabs/index.cjs.map +1 -0
- package/build/components/Tabs/index.d.cts +27 -0
- package/build/components/Tabs/index.d.ts +27 -0
- package/build/components/Tabs/index.js +102 -0
- package/build/components/Tabs/index.js.map +1 -0
- package/build/components/Tabs/style.css +1 -0
- package/build/components/TagInput/index.cjs +2 -0
- package/build/components/TagInput/index.cjs.map +1 -0
- package/build/components/TagInput/index.d.cts +43 -0
- package/build/components/TagInput/index.d.ts +43 -0
- package/build/components/TagInput/index.js +134 -0
- package/build/components/TagInput/index.js.map +1 -0
- package/build/components/TagInput/style.css +1 -0
- package/build/components/TextLink/index.cjs +2 -0
- package/build/components/TextLink/index.cjs.map +1 -0
- package/build/components/TextLink/index.d.cts +16 -0
- package/build/components/TextLink/index.d.ts +16 -0
- package/build/components/TextLink/index.js +32 -0
- package/build/components/TextLink/index.js.map +1 -0
- package/build/components/TextLink/style.css +1 -0
- package/build/components/Textarea/index.cjs +2 -0
- package/build/components/Textarea/index.cjs.map +1 -0
- package/build/components/Textarea/index.d.cts +20 -0
- package/build/components/Textarea/index.d.ts +20 -0
- package/build/components/Textarea/index.js +68 -0
- package/build/components/Textarea/index.js.map +1 -0
- package/build/components/Textarea/style.css +1 -0
- package/build/components/Tile/index.cjs +2 -0
- package/build/components/Tile/index.cjs.map +1 -0
- package/build/components/Tile/index.d.cts +19 -0
- package/build/components/Tile/index.d.ts +19 -0
- package/build/components/Tile/index.js +24 -0
- package/build/components/Tile/index.js.map +1 -0
- package/build/components/Tile/style.css +1 -0
- package/build/components/Timeline/index.cjs +2 -0
- package/build/components/Timeline/index.cjs.map +1 -0
- package/build/components/Timeline/index.d.cts +24 -0
- package/build/components/Timeline/index.d.ts +24 -0
- package/build/components/Timeline/index.js +56 -0
- package/build/components/Timeline/index.js.map +1 -0
- package/build/components/Timeline/style.css +1 -0
- package/build/components/Toast/index.cjs +2 -0
- package/build/components/Toast/index.cjs.map +1 -0
- package/build/components/Toast/index.d.cts +63 -0
- package/build/components/Toast/index.d.ts +63 -0
- package/build/components/Toast/index.js +159 -0
- package/build/components/Toast/index.js.map +1 -0
- package/build/components/Toast/style.css +1 -0
- package/build/components/ToastPortal/index.cjs +2 -0
- package/build/components/ToastPortal/index.cjs.map +1 -0
- package/build/components/ToastPortal/index.d.cts +10 -0
- package/build/components/ToastPortal/index.d.ts +10 -0
- package/build/components/ToastPortal/index.js +15 -0
- package/build/components/ToastPortal/index.js.map +1 -0
- package/build/components/Tooltip/index.cjs +2 -0
- package/build/components/Tooltip/index.cjs.map +1 -0
- package/build/components/Tooltip/index.d.cts +23 -0
- package/build/components/Tooltip/index.d.ts +23 -0
- package/build/components/Tooltip/index.js +116 -0
- package/build/components/Tooltip/index.js.map +1 -0
- package/build/components/Tooltip/style.css +1 -0
- package/build/constants/breakpoint.constants.cjs +2 -0
- package/build/constants/breakpoint.constants.cjs.map +1 -0
- package/build/constants/breakpoint.constants.d.cts +15 -0
- package/build/constants/breakpoint.constants.d.ts +15 -0
- package/build/constants/breakpoint.constants.js +12 -0
- package/build/constants/breakpoint.constants.js.map +1 -0
- package/build/constants/combobox.constants.cjs +2 -0
- package/build/constants/combobox.constants.cjs.map +1 -0
- package/build/constants/combobox.constants.d.cts +11 -0
- package/build/constants/combobox.constants.d.ts +11 -0
- package/build/constants/combobox.constants.js +7 -0
- package/build/constants/combobox.constants.js.map +1 -0
- package/build/constants/scale.constants.cjs +2 -0
- package/build/constants/scale.constants.cjs.map +1 -0
- package/build/constants/scale.constants.d.cts +10 -0
- package/build/constants/scale.constants.d.ts +10 -0
- package/build/constants/scale.constants.js +8 -0
- package/build/constants/scale.constants.js.map +1 -0
- package/build/constants/scroll.constants.cjs +2 -0
- package/build/constants/scroll.constants.cjs.map +1 -0
- package/build/constants/scroll.constants.d.cts +7 -0
- package/build/constants/scroll.constants.d.ts +7 -0
- package/build/constants/scroll.constants.js +5 -0
- package/build/constants/scroll.constants.js.map +1 -0
- package/build/design/fonts/LICENSE-archivo.txt +93 -0
- package/build/design/fonts/LICENSE-ibm-plex-mono.txt +93 -0
- package/build/design/fonts/LICENSE-inter.txt +93 -0
- package/build/design/fonts/archivo-latin-ext-wdth-normal.woff2 +0 -0
- package/build/design/fonts/archivo-latin-wdth-normal.woff2 +0 -0
- package/build/design/fonts/ibm-plex-mono-latin-400-normal.woff2 +0 -0
- package/build/design/fonts/ibm-plex-mono-latin-500-normal.woff2 +0 -0
- package/build/design/fonts/ibm-plex-mono-latin-ext-400-normal.woff2 +0 -0
- package/build/design/fonts/ibm-plex-mono-latin-ext-500-normal.woff2 +0 -0
- package/build/design/fonts/inter-latin-ext-wght-normal.woff2 +0 -0
- package/build/design/fonts/inter-latin-wght-normal.woff2 +0 -0
- package/build/design/fonts.css +75 -0
- package/build/design/fonts.d.css.ts +1 -0
- package/build/design/index.cjs +778 -0
- package/build/design/index.cjs.map +1 -0
- package/build/design/index.d.cts +263 -0
- package/build/design/index.d.mts +263 -0
- package/build/design/index.mjs +751 -0
- package/build/design/index.mjs.map +1 -0
- package/build/design/index.umd.cjs +2 -0
- package/build/design/index.umd.cjs.map +1 -0
- package/build/design/logos/horizontal.svg +1 -0
- package/build/design/logos/mark.svg +1 -0
- package/build/design/tokens.css +477 -0
- package/build/design/tokens.d.css.ts +1 -0
- package/build/design/tokens.json +542 -0
- package/build/design/tokens.scss +616 -0
- package/build/enums/ui-size.enum.cjs +2 -0
- package/build/enums/ui-size.enum.cjs.map +1 -0
- package/build/enums/ui-size.enum.d.cts +12 -0
- package/build/enums/ui-size.enum.d.ts +12 -0
- package/build/enums/ui-size.enum.js +5 -0
- package/build/enums/ui-size.enum.js.map +1 -0
- package/build/enums/ui-variant.enum.cjs +2 -0
- package/build/enums/ui-variant.enum.cjs.map +1 -0
- package/build/enums/ui-variant.enum.d.cts +20 -0
- package/build/enums/ui-variant.enum.d.ts +20 -0
- package/build/enums/ui-variant.enum.js +5 -0
- package/build/enums/ui-variant.enum.js.map +1 -0
- package/build/helpers/aria.helper.cjs +2 -0
- package/build/helpers/aria.helper.cjs.map +1 -0
- package/build/helpers/aria.helper.d.cts +7 -0
- package/build/helpers/aria.helper.d.ts +7 -0
- package/build/helpers/aria.helper.js +5 -0
- package/build/helpers/aria.helper.js.map +1 -0
- package/build/helpers/class-name.helper.cjs +2 -0
- package/build/helpers/class-name.helper.cjs.map +1 -0
- package/build/helpers/class-name.helper.d.cts +3 -0
- package/build/helpers/class-name.helper.d.ts +3 -0
- package/build/helpers/class-name.helper.js +10 -0
- package/build/helpers/class-name.helper.js.map +1 -0
- package/build/helpers/component.helper.cjs +2 -0
- package/build/helpers/component.helper.cjs.map +1 -0
- package/build/helpers/component.helper.d.cts +13 -0
- package/build/helpers/component.helper.d.ts +13 -0
- package/build/helpers/component.helper.js +5 -0
- package/build/helpers/component.helper.js.map +1 -0
- package/build/helpers/focus.helper.cjs +2 -0
- package/build/helpers/focus.helper.cjs.map +1 -0
- package/build/helpers/focus.helper.d.cts +90 -0
- package/build/helpers/focus.helper.d.ts +90 -0
- package/build/helpers/focus.helper.js +83 -0
- package/build/helpers/focus.helper.js.map +1 -0
- package/build/helpers/label.helper.cjs +2 -0
- package/build/helpers/label.helper.cjs.map +1 -0
- package/build/helpers/label.helper.d.cts +11 -0
- package/build/helpers/label.helper.d.ts +11 -0
- package/build/helpers/label.helper.js +11 -0
- package/build/helpers/label.helper.js.map +1 -0
- package/build/helpers/portal.helper.cjs +2 -0
- package/build/helpers/portal.helper.cjs.map +1 -0
- package/build/helpers/portal.helper.d.cts +28 -0
- package/build/helpers/portal.helper.d.ts +28 -0
- package/build/helpers/portal.helper.js +36 -0
- package/build/helpers/portal.helper.js.map +1 -0
- package/build/helpers/ref.helper.cjs +2 -0
- package/build/helpers/ref.helper.cjs.map +1 -0
- package/build/helpers/ref.helper.d.cts +3 -0
- package/build/helpers/ref.helper.d.ts +3 -0
- package/build/helpers/ref.helper.js +7 -0
- package/build/helpers/ref.helper.js.map +1 -0
- package/build/helpers/scaled-number.helper.cjs +2 -0
- package/build/helpers/scaled-number.helper.cjs.map +1 -0
- package/build/helpers/scaled-number.helper.d.cts +54 -0
- package/build/helpers/scaled-number.helper.d.ts +54 -0
- package/build/helpers/scaled-number.helper.js +34 -0
- package/build/helpers/scaled-number.helper.js.map +1 -0
- package/build/helpers/scroll.helper.cjs +2 -0
- package/build/helpers/scroll.helper.cjs.map +1 -0
- package/build/helpers/scroll.helper.d.cts +8 -0
- package/build/helpers/scroll.helper.d.ts +8 -0
- package/build/helpers/scroll.helper.js +11 -0
- package/build/helpers/scroll.helper.js.map +1 -0
- package/build/helpers/text.helper.cjs +2 -0
- package/build/helpers/text.helper.cjs.map +1 -0
- package/build/helpers/text.helper.d.cts +5 -0
- package/build/helpers/text.helper.d.ts +5 -0
- package/build/helpers/text.helper.js +6 -0
- package/build/helpers/text.helper.js.map +1 -0
- package/build/helpers/theme.helper.cjs +2 -0
- package/build/helpers/theme.helper.cjs.map +1 -0
- package/build/helpers/theme.helper.d.cts +18 -0
- package/build/helpers/theme.helper.d.ts +18 -0
- package/build/helpers/theme.helper.js +37 -0
- package/build/helpers/theme.helper.js.map +1 -0
- package/build/hooks/useAnnounce.cjs +2 -0
- package/build/hooks/useAnnounce.cjs.map +1 -0
- package/build/hooks/useAnnounce.d.cts +4 -0
- package/build/hooks/useAnnounce.d.ts +4 -0
- package/build/hooks/useAnnounce.js +23 -0
- package/build/hooks/useAnnounce.js.map +1 -0
- package/build/hooks/useAsyncSearch.cjs +2 -0
- package/build/hooks/useAsyncSearch.cjs.map +1 -0
- package/build/hooks/useAsyncSearch.d.cts +11 -0
- package/build/hooks/useAsyncSearch.d.ts +11 -0
- package/build/hooks/useAsyncSearch.js +17 -0
- package/build/hooks/useAsyncSearch.js.map +1 -0
- package/build/hooks/useCopyFeedback.cjs +2 -0
- package/build/hooks/useCopyFeedback.cjs.map +1 -0
- package/build/hooks/useCopyFeedback.d.cts +10 -0
- package/build/hooks/useCopyFeedback.d.ts +10 -0
- package/build/hooks/useCopyFeedback.js +25 -0
- package/build/hooks/useCopyFeedback.js.map +1 -0
- package/build/hooks/useDismissOnEscape.cjs +2 -0
- package/build/hooks/useDismissOnEscape.cjs.map +1 -0
- package/build/hooks/useDismissOnEscape.d.cts +16 -0
- package/build/hooks/useDismissOnEscape.d.ts +16 -0
- package/build/hooks/useDismissOnEscape.js +18 -0
- package/build/hooks/useDismissOnEscape.js.map +1 -0
- package/build/hooks/useListboxNavigation.cjs +2 -0
- package/build/hooks/useListboxNavigation.cjs.map +1 -0
- package/build/hooks/useListboxNavigation.d.cts +7 -0
- package/build/hooks/useListboxNavigation.d.ts +7 -0
- package/build/hooks/useListboxNavigation.js +53 -0
- package/build/hooks/useListboxNavigation.js.map +1 -0
- package/build/hooks/usePortalSurface.cjs +2 -0
- package/build/hooks/usePortalSurface.cjs.map +1 -0
- package/build/hooks/usePortalSurface.d.cts +25 -0
- package/build/hooks/usePortalSurface.d.ts +25 -0
- package/build/hooks/usePortalSurface.js +19 -0
- package/build/hooks/usePortalSurface.js.map +1 -0
- package/build/hooks/usePositioning.cjs +2 -0
- package/build/hooks/usePositioning.cjs.map +1 -0
- package/build/hooks/usePositioning.d.cts +13 -0
- package/build/hooks/usePositioning.d.ts +13 -0
- package/build/hooks/usePositioning.js +74 -0
- package/build/hooks/usePositioning.js.map +1 -0
- package/build/hooks/useScrollLock.cjs +2 -0
- package/build/hooks/useScrollLock.cjs.map +1 -0
- package/build/hooks/useScrollLock.d.cts +2 -0
- package/build/hooks/useScrollLock.d.ts +2 -0
- package/build/hooks/useScrollLock.js +34 -0
- package/build/hooks/useScrollLock.js.map +1 -0
- package/build/hooks/useSheetViewport.cjs +2 -0
- package/build/hooks/useSheetViewport.cjs.map +1 -0
- package/build/hooks/useSheetViewport.d.cts +6 -0
- package/build/hooks/useSheetViewport.d.ts +6 -0
- package/build/hooks/useSheetViewport.js +29 -0
- package/build/hooks/useSheetViewport.js.map +1 -0
- package/build/hooks/useStickToBottom.cjs +2 -0
- package/build/hooks/useStickToBottom.cjs.map +1 -0
- package/build/hooks/useStickToBottom.d.cts +12 -0
- package/build/hooks/useStickToBottom.d.ts +12 -0
- package/build/hooks/useStickToBottom.js +39 -0
- package/build/hooks/useStickToBottom.js.map +1 -0
- package/build/hooks/useUiTheme.cjs +2 -0
- package/build/hooks/useUiTheme.cjs.map +1 -0
- package/build/hooks/useUiTheme.d.cts +10 -0
- package/build/hooks/useUiTheme.d.ts +10 -0
- package/build/hooks/useUiTheme.js +42 -0
- package/build/hooks/useUiTheme.js.map +1 -0
- package/build/hooks/useUiTokens.cjs +2 -0
- package/build/hooks/useUiTokens.cjs.map +1 -0
- package/build/hooks/useUiTokens.d.cts +11 -0
- package/build/hooks/useUiTokens.d.ts +11 -0
- package/build/hooks/useUiTokens.js +36 -0
- package/build/hooks/useUiTokens.js.map +1 -0
- package/build/hooks/useVirtualList.cjs +2 -0
- package/build/hooks/useVirtualList.cjs.map +1 -0
- package/build/hooks/useVirtualList.d.cts +13 -0
- package/build/hooks/useVirtualList.d.ts +13 -0
- package/build/hooks/useVirtualList.js +41 -0
- package/build/hooks/useVirtualList.js.map +1 -0
- package/build/index.cjs +2 -0
- package/build/index.cjs.map +1 -0
- package/build/index.d.cts +98 -0
- package/build/index.d.ts +98 -0
- package/build/index.js +209 -0
- package/build/index.js.map +1 -0
- package/build/scss/_index.scss +7 -0
- package/build/scss/_mixins.scss +861 -0
- package/build/scss/_variables.scss +245 -0
- package/build/styles/base.d.cts +0 -0
- package/build/styles/base.d.ts +0 -0
- package/build/styles.css +135 -0
- package/build/theme/UiProvider.cjs +2 -0
- package/build/theme/UiProvider.cjs.map +1 -0
- package/build/theme/UiProvider.d.cts +23 -0
- package/build/theme/UiProvider.d.ts +23 -0
- package/build/theme/UiProvider.js +12 -0
- package/build/theme/UiProvider.js.map +1 -0
- package/build/theme/UiThemeScript.cjs +2 -0
- package/build/theme/UiThemeScript.cjs.map +1 -0
- package/build/theme/UiThemeScript.d.cts +22 -0
- package/build/theme/UiThemeScript.d.ts +22 -0
- package/build/theme/UiThemeScript.js +8 -0
- package/build/theme/UiThemeScript.js.map +1 -0
- package/build/theme/context.cjs +2 -0
- package/build/theme/context.cjs.map +1 -0
- package/build/theme/context.d.cts +5 -0
- package/build/theme/context.d.ts +5 -0
- package/build/theme/context.js +8 -0
- package/build/theme/context.js.map +1 -0
- package/build/types/calendar/Calendar/EventBlock.d.cts +29 -0
- package/build/types/calendar/Calendar/EventBlock.d.ts +29 -0
- package/build/types/calendar/Calendar/MonthGrid.d.cts +28 -0
- package/build/types/calendar/Calendar/MonthGrid.d.ts +28 -0
- package/build/types/calendar/Calendar/TimeGrid.d.cts +37 -0
- package/build/types/calendar/Calendar/TimeGrid.d.ts +37 -0
- package/build/types/calendar/Calendar/index.d.cts +72 -0
- package/build/types/calendar/Calendar/index.d.ts +72 -0
- package/build/types/calendar/core/layout.d.cts +43 -0
- package/build/types/calendar/core/layout.d.ts +43 -0
- package/build/types/calendar/core/moves.d.cts +37 -0
- package/build/types/calendar/core/moves.d.ts +37 -0
- package/build/types/calendar/core/time.d.cts +19 -0
- package/build/types/calendar/core/time.d.ts +19 -0
- package/build/types/calendar/core/types.d.cts +75 -0
- package/build/types/calendar/core/types.d.ts +75 -0
- package/build/types/calendar/core/useCalendarDrag.d.cts +32 -0
- package/build/types/calendar/core/useCalendarDrag.d.ts +32 -0
- package/build/types/calendar/index.d.cts +13 -0
- package/build/types/calendar/index.d.ts +13 -0
- package/build/types/charts/AreaChart/index.d.cts +14 -0
- package/build/types/charts/AreaChart/index.d.ts +14 -0
- package/build/types/charts/BarChart/index.d.cts +16 -0
- package/build/types/charts/BarChart/index.d.ts +16 -0
- package/build/types/charts/BoxPlot/index.d.cts +43 -0
- package/build/types/charts/BoxPlot/index.d.ts +43 -0
- package/build/types/charts/ComposedChart/index.d.cts +16 -0
- package/build/types/charts/ComposedChart/index.d.ts +16 -0
- package/build/types/charts/Heatmap/index.d.cts +30 -0
- package/build/types/charts/Heatmap/index.d.ts +30 -0
- package/build/types/charts/Histogram/index.d.cts +29 -0
- package/build/types/charts/Histogram/index.d.ts +29 -0
- package/build/types/charts/LineChart/index.d.cts +14 -0
- package/build/types/charts/LineChart/index.d.ts +14 -0
- package/build/types/charts/PieChart/index.d.cts +36 -0
- package/build/types/charts/PieChart/index.d.ts +36 -0
- package/build/types/charts/RadarChart/index.d.cts +40 -0
- package/build/types/charts/RadarChart/index.d.ts +40 -0
- package/build/types/charts/ScatterPlot/index.d.cts +41 -0
- package/build/types/charts/ScatterPlot/index.d.ts +41 -0
- package/build/types/charts/core/CartesianChart.d.cts +43 -0
- package/build/types/charts/core/CartesianChart.d.ts +43 -0
- package/build/types/charts/core/ChartFrame.d.cts +55 -0
- package/build/types/charts/core/ChartFrame.d.ts +55 -0
- package/build/types/charts/core/axes.d.cts +37 -0
- package/build/types/charts/core/axes.d.ts +37 -0
- package/build/types/charts/core/cartesian.d.cts +80 -0
- package/build/types/charts/core/cartesian.d.ts +80 -0
- package/build/types/charts/core/format.d.cts +19 -0
- package/build/types/charts/core/format.d.ts +19 -0
- package/build/types/charts/core/margins.d.cts +9 -0
- package/build/types/charts/core/margins.d.ts +9 -0
- package/build/types/charts/core/palette.d.cts +11 -0
- package/build/types/charts/core/palette.d.ts +11 -0
- package/build/types/charts/core/path.d.cts +24 -0
- package/build/types/charts/core/path.d.ts +24 -0
- package/build/types/charts/core/scale.d.cts +40 -0
- package/build/types/charts/core/scale.d.ts +40 -0
- package/build/types/charts/core/series.d.cts +11 -0
- package/build/types/charts/core/series.d.ts +11 -0
- package/build/types/charts/core/spatial.d.cts +12 -0
- package/build/types/charts/core/spatial.d.ts +12 -0
- package/build/types/charts/core/stats.d.cts +34 -0
- package/build/types/charts/core/stats.d.ts +34 -0
- package/build/types/charts/core/types.d.cts +31 -0
- package/build/types/charts/core/types.d.ts +31 -0
- package/build/types/charts/core/useChartWidth.d.cts +7 -0
- package/build/types/charts/core/useChartWidth.d.ts +7 -0
- package/build/types/charts/index.d.cts +21 -0
- package/build/types/charts/index.d.ts +21 -0
- package/build/types/chat/ActionList/index.d.cts +46 -0
- package/build/types/chat/ActionList/index.d.ts +46 -0
- package/build/types/chat/AppBar/index.d.cts +21 -0
- package/build/types/chat/AppBar/index.d.ts +21 -0
- package/build/types/chat/ChatMessage/index.d.cts +24 -0
- package/build/types/chat/ChatMessage/index.d.ts +24 -0
- package/build/types/chat/ChatThread/index.d.cts +24 -0
- package/build/types/chat/ChatThread/index.d.ts +24 -0
- package/build/types/chat/Citation/index.d.cts +15 -0
- package/build/types/chat/Citation/index.d.ts +15 -0
- package/build/types/chat/CodeBlock/format.d.cts +7 -0
- package/build/types/chat/CodeBlock/format.d.ts +7 -0
- package/build/types/chat/CodeBlock/grammars.d.cts +44 -0
- package/build/types/chat/CodeBlock/grammars.d.ts +44 -0
- package/build/types/chat/CodeBlock/highlight.d.cts +22 -0
- package/build/types/chat/CodeBlock/highlight.d.ts +22 -0
- package/build/types/chat/CodeBlock/index.d.cts +33 -0
- package/build/types/chat/CodeBlock/index.d.ts +33 -0
- package/build/types/chat/DescriptionList/index.d.cts +16 -0
- package/build/types/chat/DescriptionList/index.d.ts +16 -0
- package/build/types/chat/Legend/index.d.cts +21 -0
- package/build/types/chat/Legend/index.d.ts +21 -0
- package/build/types/chat/MessageActions/index.d.cts +21 -0
- package/build/types/chat/MessageActions/index.d.ts +21 -0
- package/build/types/chat/PromptInput/index.d.cts +47 -0
- package/build/types/chat/PromptInput/index.d.ts +47 -0
- package/build/types/chat/PromptSuggestions/index.d.cts +25 -0
- package/build/types/chat/PromptSuggestions/index.d.ts +25 -0
- package/build/types/chat/Prose/index.d.cts +15 -0
- package/build/types/chat/Prose/index.d.ts +15 -0
- package/build/types/chat/ReasoningBlock/index.d.cts +24 -0
- package/build/types/chat/ReasoningBlock/index.d.ts +24 -0
- package/build/types/chat/ReasoningText/index.d.cts +14 -0
- package/build/types/chat/ReasoningText/index.d.ts +14 -0
- package/build/types/chat/SegmentBar/index.d.cts +46 -0
- package/build/types/chat/SegmentBar/index.d.ts +46 -0
- package/build/types/chat/SourceList/index.d.cts +25 -0
- package/build/types/chat/SourceList/index.d.ts +25 -0
- package/build/types/chat/TerminalOutput/index.d.cts +25 -0
- package/build/types/chat/TerminalOutput/index.d.ts +25 -0
- package/build/types/chat/ToolCall/index.d.cts +41 -0
- package/build/types/chat/ToolCall/index.d.ts +41 -0
- package/build/types/chat/index.d.cts +26 -0
- package/build/types/chat/index.d.ts +26 -0
- package/build/types/combobox.type.d.cts +65 -0
- package/build/types/combobox.type.d.ts +65 -0
- package/build/types/common-element-props.type.d.cts +8 -0
- package/build/types/common-element-props.type.d.ts +8 -0
- package/build/types/helpers/class-name.helper.d.cts +3 -0
- package/build/types/helpers/class-name.helper.d.ts +3 -0
- package/build/types/helpers/component.helper.d.cts +13 -0
- package/build/types/helpers/component.helper.d.ts +13 -0
- package/build/types/helpers/label.helper.d.cts +12 -0
- package/build/types/helpers/label.helper.d.ts +12 -0
- package/build/types/hook.type.d.cts +36 -0
- package/build/types/hook.type.d.ts +36 -0
- package/build/types/link.type.d.cts +14 -0
- package/build/types/link.type.d.ts +14 -0
- package/build/types/positioning.type.d.cts +38 -0
- package/build/types/positioning.type.d.ts +38 -0
- package/build/types/theme.type.d.cts +197 -0
- package/build/types/theme.type.d.ts +197 -0
- package/build/types/types/common-element-props.type.d.cts +8 -0
- package/build/types/types/common-element-props.type.d.ts +8 -0
- package/build/types/types/link.type.d.cts +14 -0
- package/build/types/types/link.type.d.ts +14 -0
- package/build/types/types/theme.type.d.cts +197 -0
- package/build/types/types/theme.type.d.ts +197 -0
- package/package.json +929 -4
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Portal hedefi çözümü — üst katman (top layer) farkındalığıyla.
|
|
3
|
+
* ⚠ `createPortal(..., document.body)` TEK BAŞINA YANLIŞ. `<dialog>.showModal()` elemanı
|
|
4
|
+
* tarayıcının **üst katmanına** taşır ve üst katman…
|
|
5
|
+
*/
|
|
6
|
+
/** Portal hedefi ve o hedefte üst katmana çıkmanın gerekip gerekmediği. */
|
|
7
|
+
export type PortalTarget = {
|
|
8
|
+
container: HTMLElement;
|
|
9
|
+
/** `true` ise yüzey `popover="manual"` taşımalı ve `showPopover()` çağırmalı. */
|
|
10
|
+
needsTopLayer: boolean;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* `anchor`ın en yakın açık `<dialog>` atası varsa oraya, yoksa `document.body`e.
|
|
14
|
+
* ⚠ `dialog[open]` yerine `:modal` denenmedi: `show()` ile açılan modalsız bir dialog üst katmana
|
|
15
|
+
* GİRMEZ, ama içine portallamak yine de…
|
|
16
|
+
*/
|
|
17
|
+
export declare const resolvePortalTarget: (anchor: Element | null | undefined) => PortalTarget;
|
|
18
|
+
/**
|
|
19
|
+
* Üst katman yüzeyini gösterir; temizleyiciyi döndürür.
|
|
20
|
+
* ⚠ UA stil sayfası `[popover]`a `inset: 0` ve `margin: auto` veriyor.
|
|
21
|
+
*/
|
|
22
|
+
export declare const POPOVER_RESET: {
|
|
23
|
+
readonly margin: 0;
|
|
24
|
+
readonly right: "auto";
|
|
25
|
+
readonly bottom: "auto";
|
|
26
|
+
};
|
|
27
|
+
/** `showPopover()` çağırır ve kapatma fonksiyonunu döndürür. */
|
|
28
|
+
export declare const showTopLayer: (element: HTMLElement | null) => (() => void);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Portal hedefi çözümü — üst katman (top layer) farkındalığıyla.
|
|
3
|
+
* ⚠ `createPortal(..., document.body)` TEK BAŞINA YANLIŞ. `<dialog>.showModal()` elemanı
|
|
4
|
+
* tarayıcının **üst katmanına** taşır ve üst katman…
|
|
5
|
+
*/
|
|
6
|
+
/** Portal hedefi ve o hedefte üst katmana çıkmanın gerekip gerekmediği. */
|
|
7
|
+
export type PortalTarget = {
|
|
8
|
+
container: HTMLElement;
|
|
9
|
+
/** `true` ise yüzey `popover="manual"` taşımalı ve `showPopover()` çağırmalı. */
|
|
10
|
+
needsTopLayer: boolean;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* `anchor`ın en yakın açık `<dialog>` atası varsa oraya, yoksa `document.body`e.
|
|
14
|
+
* ⚠ `dialog[open]` yerine `:modal` denenmedi: `show()` ile açılan modalsız bir dialog üst katmana
|
|
15
|
+
* GİRMEZ, ama içine portallamak yine de…
|
|
16
|
+
*/
|
|
17
|
+
export declare const resolvePortalTarget: (anchor: Element | null | undefined) => PortalTarget;
|
|
18
|
+
/**
|
|
19
|
+
* Üst katman yüzeyini gösterir; temizleyiciyi döndürür.
|
|
20
|
+
* ⚠ UA stil sayfası `[popover]`a `inset: 0` ve `margin: auto` veriyor.
|
|
21
|
+
*/
|
|
22
|
+
export declare const POPOVER_RESET: {
|
|
23
|
+
readonly margin: 0;
|
|
24
|
+
readonly right: "auto";
|
|
25
|
+
readonly bottom: "auto";
|
|
26
|
+
};
|
|
27
|
+
/** `showPopover()` çağırır ve kapatma fonksiyonunu döndürür. */
|
|
28
|
+
export declare const showTopLayer: (element: HTMLElement | null) => (() => void);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
const s = (t) => {
|
|
2
|
+
var r;
|
|
3
|
+
const o = ((r = t == null ? void 0 : t.closest) == null ? void 0 : r.call(t, "dialog")) ?? null;
|
|
4
|
+
return o && o.isConnected ? { container: o, needsTopLayer: e(o) } : { container: document.body, needsTopLayer: !1 };
|
|
5
|
+
}, e = (t) => {
|
|
6
|
+
try {
|
|
7
|
+
return t.matches(":modal");
|
|
8
|
+
} catch {
|
|
9
|
+
return t.hasAttribute("open");
|
|
10
|
+
}
|
|
11
|
+
}, n = {
|
|
12
|
+
margin: 0,
|
|
13
|
+
right: "auto",
|
|
14
|
+
bottom: "auto"
|
|
15
|
+
}, i = (t) => {
|
|
16
|
+
if (!t || typeof t.showPopover != "function") return () => {
|
|
17
|
+
};
|
|
18
|
+
try {
|
|
19
|
+
t.showPopover();
|
|
20
|
+
} catch {
|
|
21
|
+
return () => {
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
return () => {
|
|
25
|
+
try {
|
|
26
|
+
t.isConnected && t.hidePopover();
|
|
27
|
+
} catch {
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
n as POPOVER_RESET,
|
|
33
|
+
s as resolvePortalTarget,
|
|
34
|
+
i as showTopLayer
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=portal.helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portal.helper.js","sources":["../../src/helpers/portal.helper.ts"],"sourcesContent":["/**\n * Portal hedefi çözümü — üst katman (top layer) farkındalığıyla.\n * ⚠ `createPortal(..., document.body)` TEK BAŞINA YANLIŞ. `<dialog>.showModal()` elemanı\n * tarayıcının **üst katmanına** taşır ve üst katman…\n */\n\n/** Portal hedefi ve o hedefte üst katmana çıkmanın gerekip gerekmediği. */\nexport type PortalTarget = {\n container: HTMLElement;\n /** `true` ise yüzey `popover=\"manual\"` taşımalı ve `showPopover()` çağırmalı. */\n needsTopLayer: boolean;\n};\n\n/**\n * `anchor`ın en yakın açık `<dialog>` atası varsa oraya, yoksa `document.body`e.\n * ⚠ `dialog[open]` yerine `:modal` denenmedi: `show()` ile açılan modalsız bir dialog üst katmana\n * GİRMEZ, ama içine portallamak yine de…\n */\nexport const resolvePortalTarget = (anchor: Element | null | undefined): PortalTarget => {\n const dialog = anchor?.closest?.('dialog') ?? null;\n\n if (dialog && dialog.isConnected) {\n return { container: dialog, needsTopLayer: isTopLayerDialog(dialog) };\n }\n\n return { container: document.body, needsTopLayer: false };\n};\n\n/**\n * Dialog üst katmanda mı — yani `showModal()` ile mi açıldı.\n * ⚠ `:modal` bazı ortamlarda (jsdom) desteklenmiyor ve `matches` fırlatıyor\n */\nconst isTopLayerDialog = (dialog: Element): boolean => {\n try {\n return dialog.matches(':modal');\n } catch {\n return dialog.hasAttribute('open');\n }\n};\n\n/**\n * Üst katman yüzeyini gösterir; temizleyiciyi döndürür.\n * ⚠ UA stil sayfası `[popover]`a `inset: 0` ve `margin: auto` veriyor.\n */\nexport const POPOVER_RESET = {\n margin: 0,\n right: 'auto',\n bottom: 'auto',\n} as const;\n\n/*\n * Yenilemeyen tek şey satır içi stilin YAZMADIĞI kutu özellikleri: `usePositioning` yalnızca\n * `top`/`left` üretiyor, dolayısıyla UA'nın `inset: 0` +…\n * ⚠ SIFIRLAMA BİLİNÇLİ OLARAK ÜÇ ÖZELLİK.\n */\n\n/** `showPopover()` çağırır ve kapatma fonksiyonunu döndürür. */\nexport const showTopLayer = (element: HTMLElement | null): (() => void) => {\n if (!element || typeof element.showPopover !== 'function') return () => {};\n\n try {\n element.showPopover();\n } catch {\n /* Zaten görünürse veya eleman bağlı değilse: yapacak bir şey yok. */\n return () => {};\n }\n\n return () => {\n try {\n if (element.isConnected) element.hidePopover();\n } catch {\n /* Kapanış sırasında eleman zaten sökülmüş olabilir. */\n }\n };\n};\n"],"names":["resolvePortalTarget","anchor","_a","dialog","isTopLayerDialog","POPOVER_RESET","showTopLayer","element"],"mappings":"AAkBO,MAAMA,IAAsB,CAACC,MAAqD;AAAlF,MAAAC;AACL,QAAMC,MAASD,IAAAD,KAAA,gBAAAA,EAAQ,YAAR,gBAAAC,EAAA,KAAAD,GAAkB,cAAa;AAE9C,SAAIE,KAAUA,EAAO,cACZ,EAAE,WAAWA,GAAQ,eAAeC,EAAiBD,CAAM,EAAA,IAG7D,EAAE,WAAW,SAAS,MAAM,eAAe,GAAA;AACpD,GAMMC,IAAmB,CAACD,MAA6B;AACrD,MAAI;AACF,WAAOA,EAAO,QAAQ,QAAQ;AAAA,EAChC,QAAQ;AACN,WAAOA,EAAO,aAAa,MAAM;AAAA,EACnC;AACF,GAMaE,IAAgB;AAAA,EAC3B,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,QAAQ;AACV,GASaC,IAAe,CAACC,MAA8C;AACzE,MAAI,CAACA,KAAW,OAAOA,EAAQ,eAAgB,mBAAmB,MAAM;AAAA,EAAC;AAEzE,MAAI;AACF,IAAAA,EAAQ,YAAA;AAAA,EACV,QAAQ;AAEN,WAAO,MAAM;AAAA,IAAC;AAAA,EAChB;AAEA,SAAO,MAAM;AACX,QAAI;AACF,MAAIA,EAAQ,eAAaA,EAAQ,YAAA;AAAA,IACnC,QAAQ;AAAA,IAER;AAAA,EACF;AACF;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ref.helper.cjs","sources":["../../src/helpers/ref.helper.ts"],"sourcesContent":["import type { Ref } from 'react';\n\n/** Hands a node to a forwarded ref of either kind (callback or object). */\nexport const assignRef = <T>(ref: Ref<T> | undefined, node: T | null): void => {\n if (typeof ref === 'function') ref(node);\n else if (ref) (ref as { current: T | null }).current = node;\n};\n"],"names":["assignRef","ref","node"],"mappings":"gFAGO,MAAMA,EAAY,CAAIC,EAAyBC,IAAyB,CACzE,OAAOD,GAAQ,WAAYA,EAAIC,CAAI,EAC9BD,IAAMA,EAA8B,QAAUC,EACzD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ref.helper.js","sources":["../../src/helpers/ref.helper.ts"],"sourcesContent":["import type { Ref } from 'react';\n\n/** Hands a node to a forwarded ref of either kind (callback or object). */\nexport const assignRef = <T>(ref: Ref<T> | undefined, node: T | null): void => {\n if (typeof ref === 'function') ref(node);\n else if (ref) (ref as { current: T | null }).current = node;\n};\n"],"names":["assignRef","ref","node"],"mappings":"AAGO,MAAMA,IAAY,CAAIC,GAAyBC,MAAyB;AAC7E,EAAI,OAAOD,KAAQ,aAAYA,EAAIC,CAAI,IAC9BD,MAAMA,EAA8B,UAAUC;AACzD;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=Symbol("refused"),g=/^[1-9]\d{0,2}(\.\d{3})+$/,m=/^[1-9]\d{0,2}(\.\d{3})*\.\d{0,3}$/,f=i=>i.replace(/\s/g,"").replace(/^[^\d.,-]+|[^\d.,-]+$/g,""),p=i=>{const e=i.startsWith("-"),t=e?i.slice(1):i,[n,s,...r]=t.split(",");if(r.length>0||t.includes("-"))return null;if(s!==void 0)return s.includes(".")||n.includes(".")&&!g.test(n)?null:{isNegative:e,whole:n.replaceAll(".",""),fraction:s};if(g.test(n))return{isNegative:e,whole:n.replaceAll(".",""),fraction:""};const[c,o,...l]=n.split(".");return l.length>0?null:{isNegative:e,whole:c,fraction:o??""}},$=(i,e)=>{const t=f(i);if(/[^\d.,-]/.test(t))return a;const n=p(t);if(!n){const S=t.startsWith("-")?t.slice(1):t;return m.test(S)&&(e.min<0||!t.startsWith("-"))?null:a}const{isNegative:s,whole:r,fraction:c}=n;if(s&&e.min>=0)return a;const o=Math.min(e.maxFractionDigits,e.scaleDigits);if(c.length>o||o===0&&t.includes(","))return a;if(r===""&&c==="")return null;const l=BigInt(`${r}${c.padEnd(e.scaleDigits,"0")}`),d=s?-l:l,u=d>BigInt(Math.trunc(e.max)),h=d<BigInt(Math.trunc(Math.min(e.min,0)));return u||h?a:Number(d)+0},w=(i,e)=>{const{scaleDigits:t,minFractionDigits:n,isGrouped:s}=e,r=String(Math.abs(i)).padStart(t+1,"0"),c=r.slice(0,r.length-t),l=r.slice(r.length-t).replace(/0+$/,"").padEnd(Math.min(n,t),"0"),d=s?c.replace(/\B(?=(\d{3})+(?!\d))/g,"."):c;return`${i<0?"-":""}${d}${l===""?"":`,${l}`}`};exports.REFUSED=a;exports.cleanScaledText=f;exports.formatScaledValue=w;exports.readScaledText=$;
|
|
2
|
+
//# sourceMappingURL=scaled-number.helper.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scaled-number.helper.cjs","sources":["../../src/helpers/scaled-number.helper.ts"],"sourcesContent":["/**\n * A SCALED INTEGER as a person types and reads it — the text side of `ScaledInput` (2.4).\n *\n * The value is a safe integer that carries `scaleDigits` decimal places (`123456` at 2 is\n * \"1.234,56\"): the scaled types of the data contract (`Kurus`, `Qty4`, `Price4`, `Rate6`, `Pct2`).\n * Nothing here goes through a float: the digits are read as text and put together with `BigInt`,\n * so \"0,1\" at 2 is exactly `10`, never `10.000000000000002`.\n *\n * ⚠ The GRAMMAR is the data contract's (§4.3), pinned by the vectors in `__tests__/helpers/scaled-number.helper.test.ts`:\n * the comma is the decimal point; with a comma, dots may only group the whole part by three;\n * without one, a dot followed by groups of three groups thousands (\"1.250\" is 1250) unless the\n * first group starts with zero (\"0.250\" is 0,25), and any other single dot is the point (\"12.5\"\n * is 12,5 — the dot key of a number pad). `ui` depends on no decimal library; the test table is the\n * reference for the grammar.\n */\n\n/** Text the field cannot hold: the keystroke that produced it is refused. */\nexport const REFUSED = Symbol('refused');\n\nexport type ScaledReadOptions = {\n /** Decimal places the integer carries. */\n scaleDigits: number;\n /** Decimal places a person may type (≤ `scaleDigits`). */\n maxFractionDigits: number;\n /** The smallest value; a minus sign is refused when it is 0 or more. */\n min: number;\n /** The largest value; a keystroke past it is refused. */\n max: number;\n};\n\n/**\n * What the typed text means: a scaled integer, `null` (nothing yet, or a number still being\n * typed that is not one on its own: \"-\", \",\", \"1.250.0\"), or `REFUSED` (no number starts this\n * way, or it has more decimals than allowed, or it is out of range).\n */\nexport type ScaledReading = number | null | typeof REFUSED;\n\n/** The whole part grouped by three, every group complete: \"1.250\", \"12.345.678\". */\nconst THOUSANDS = /^[1-9]\\d{0,2}(\\.\\d{3})+$/;\n/** On the way to `THOUSANDS`: the last group may still be short (\"1.250.0\"). */\nconst THOUSANDS_PREFIX = /^[1-9]\\d{0,2}(\\.\\d{3})*\\.\\d{0,3}$/;\n\n/**\n * Drops spaces anywhere and signs around the number (a currency code, \"%\", a plus) — a pasted\n * \"1.234,56 TL\" reads. A letter INSIDE the number stays and refuses it: \"1e3\" is not 13.\n */\nexport const cleanScaledText = (input: string): string =>\n input.replace(/\\s/g, '').replace(/^[^\\d.,-]+|[^\\d.,-]+$/g, '');\n\n/** Sign, whole digits and fraction digits of a complete number, or `null`. */\nconst split = (text: string): { isNegative: boolean; whole: string; fraction: string } | null => {\n const isNegative = text.startsWith('-');\n const body = isNegative ? text.slice(1) : text;\n const [whole, fraction, ...more] = body.split(',') as [string, ...string[]];\n\n if (more.length > 0 || body.includes('-')) return null;\n\n if (fraction !== undefined) {\n if (fraction.includes('.')) return null;\n if (whole.includes('.') && !THOUSANDS.test(whole)) return null;\n\n return { isNegative, whole: whole.replaceAll('.', ''), fraction };\n }\n\n if (THOUSANDS.test(whole)) return { isNegative, whole: whole.replaceAll('.', ''), fraction: '' };\n\n const [integer, point, ...rest] = whole.split('.') as [string, ...string[]];\n if (rest.length > 0) return null;\n\n return { isNegative, whole: integer, fraction: point ?? '' };\n};\n\n/** Reads typed text as a scaled integer; see `ScaledReading`. */\nexport const readScaledText = (input: string, options: ScaledReadOptions): ScaledReading => {\n const text = cleanScaledText(input);\n if (/[^\\d.,-]/.test(text)) return REFUSED;\n const parts = split(text);\n\n if (!parts) {\n /* Not a number, but maybe the start of one: \"1.250.0\" on the way to \"1.250.000\". */\n const body = text.startsWith('-') ? text.slice(1) : text;\n return THOUSANDS_PREFIX.test(body) && (options.min < 0 || !text.startsWith('-'))\n ? null\n : REFUSED;\n }\n\n const { isNegative, whole, fraction } = parts;\n if (isNegative && options.min >= 0) return REFUSED;\n const allowedFraction = Math.min(options.maxFractionDigits, options.scaleDigits);\n if (fraction.length > allowedFraction) return REFUSED;\n /* A whole-number field takes no decimal comma at all — \"3,\" would wait for a digit it refuses. */\n if (allowedFraction === 0 && text.includes(',')) return REFUSED;\n if (whole === '' && fraction === '') return null;\n\n const magnitude = BigInt(`${whole}${fraction.padEnd(options.scaleDigits, '0')}`);\n const signed = isNegative ? -magnitude : magnitude;\n\n const isTooLarge = signed > BigInt(Math.trunc(options.max));\n /* Under a positive `min` the field still takes the digits on the way up (\"0\" towards \"5\"). */\n const isTooSmall = signed < BigInt(Math.trunc(Math.min(options.min, 0)));\n if (isTooLarge || isTooSmall) return REFUSED;\n\n /* No negative zero: \"-0\" is 0. */\n return Number(signed) + 0;\n};\n\nexport type ScaledFormatOptions = {\n /** Decimal places the integer carries. */\n scaleDigits: number;\n /** Decimal places always shown (\"12,50\" at 2); trailing zeros past them are dropped. */\n minFractionDigits: number;\n /** Groups the whole part by three with a dot (\"1.234,5\"); off while the field is edited. */\n isGrouped: boolean;\n};\n\n/**\n * A scaled integer as text: `123450` at 2 → \"1.234,50\" (min 2) or \"1234,5\" (min 0, ungrouped).\n * Every carried digit that is not a trailing zero is shown — the field never hides part of the\n * value it holds.\n */\nexport const formatScaledValue = (value: number, options: ScaledFormatOptions): string => {\n const { scaleDigits, minFractionDigits, isGrouped } = options;\n const digits = String(Math.abs(value)).padStart(scaleDigits + 1, '0');\n const whole = digits.slice(0, digits.length - scaleDigits);\n const fraction = digits.slice(digits.length - scaleDigits).replace(/0+$/, '');\n const shownFraction = fraction.padEnd(Math.min(minFractionDigits, scaleDigits), '0');\n const shownWhole = isGrouped ? whole.replace(/\\B(?=(\\d{3})+(?!\\d))/g, '.') : whole;\n const sign = value < 0 ? '-' : '';\n\n return `${sign}${shownWhole}${shownFraction === '' ? '' : `,${shownFraction}`}`;\n};\n"],"names":["REFUSED","THOUSANDS","THOUSANDS_PREFIX","cleanScaledText","input","split","text","isNegative","body","whole","fraction","more","integer","point","rest","readScaledText","options","parts","allowedFraction","magnitude","signed","isTooLarge","isTooSmall","formatScaledValue","value","scaleDigits","minFractionDigits","isGrouped","digits","shownFraction","shownWhole"],"mappings":"gFAiBO,MAAMA,EAAU,OAAO,SAAS,EAqBjCC,EAAY,2BAEZC,EAAmB,oCAMZC,EAAmBC,GAC9BA,EAAM,QAAQ,MAAO,EAAE,EAAE,QAAQ,yBAA0B,EAAE,EAGzDC,EAASC,GAAkF,CAC/F,MAAMC,EAAaD,EAAK,WAAW,GAAG,EAChCE,EAAOD,EAAaD,EAAK,MAAM,CAAC,EAAIA,EACpC,CAACG,EAAOC,EAAU,GAAGC,CAAI,EAAIH,EAAK,MAAM,GAAG,EAEjD,GAAIG,EAAK,OAAS,GAAKH,EAAK,SAAS,GAAG,EAAG,OAAO,KAElD,GAAIE,IAAa,OAEf,OADIA,EAAS,SAAS,GAAG,GACrBD,EAAM,SAAS,GAAG,GAAK,CAACR,EAAU,KAAKQ,CAAK,EAAU,KAEnD,CAAE,WAAAF,EAAY,MAAOE,EAAM,WAAW,IAAK,EAAE,EAAG,SAAAC,CAAA,EAGzD,GAAIT,EAAU,KAAKQ,CAAK,QAAU,CAAE,WAAAF,EAAY,MAAOE,EAAM,WAAW,IAAK,EAAE,EAAG,SAAU,EAAA,EAE5F,KAAM,CAACG,EAASC,EAAO,GAAGC,CAAI,EAAIL,EAAM,MAAM,GAAG,EACjD,OAAIK,EAAK,OAAS,EAAU,KAErB,CAAE,WAAAP,EAAY,MAAOK,EAAS,SAAUC,GAAS,EAAA,CAC1D,EAGaE,EAAiB,CAACX,EAAeY,IAA8C,CAC1F,MAAMV,EAAOH,EAAgBC,CAAK,EAClC,GAAI,WAAW,KAAKE,CAAI,EAAG,OAAON,EAClC,MAAMiB,EAAQZ,EAAMC,CAAI,EAExB,GAAI,CAACW,EAAO,CAEV,MAAMT,EAAOF,EAAK,WAAW,GAAG,EAAIA,EAAK,MAAM,CAAC,EAAIA,EACpD,OAAOJ,EAAiB,KAAKM,CAAI,IAAMQ,EAAQ,IAAM,GAAK,CAACV,EAAK,WAAW,GAAG,GAC1E,KACAN,CACN,CAEA,KAAM,CAAE,WAAAO,EAAY,MAAAE,EAAO,SAAAC,CAAA,EAAaO,EACxC,GAAIV,GAAcS,EAAQ,KAAO,EAAG,OAAOhB,EAC3C,MAAMkB,EAAkB,KAAK,IAAIF,EAAQ,kBAAmBA,EAAQ,WAAW,EAG/E,GAFIN,EAAS,OAASQ,GAElBA,IAAoB,GAAKZ,EAAK,SAAS,GAAG,EAAG,OAAON,EACxD,GAAIS,IAAU,IAAMC,IAAa,GAAI,OAAO,KAE5C,MAAMS,EAAY,OAAO,GAAGV,CAAK,GAAGC,EAAS,OAAOM,EAAQ,YAAa,GAAG,CAAC,EAAE,EACzEI,EAASb,EAAa,CAACY,EAAYA,EAEnCE,EAAaD,EAAS,OAAO,KAAK,MAAMJ,EAAQ,GAAG,CAAC,EAEpDM,EAAaF,EAAS,OAAO,KAAK,MAAM,KAAK,IAAIJ,EAAQ,IAAK,CAAC,CAAC,CAAC,EACvE,OAAIK,GAAcC,EAAmBtB,EAG9B,OAAOoB,CAAM,EAAI,CAC1B,EAgBaG,EAAoB,CAACC,EAAeR,IAAyC,CACxF,KAAM,CAAE,YAAAS,EAAa,kBAAAC,EAAmB,UAAAC,CAAA,EAAcX,EAChDY,EAAS,OAAO,KAAK,IAAIJ,CAAK,CAAC,EAAE,SAASC,EAAc,EAAG,GAAG,EAC9DhB,EAAQmB,EAAO,MAAM,EAAGA,EAAO,OAASH,CAAW,EAEnDI,EADWD,EAAO,MAAMA,EAAO,OAASH,CAAW,EAAE,QAAQ,MAAO,EAAE,EAC7C,OAAO,KAAK,IAAIC,EAAmBD,CAAW,EAAG,GAAG,EAC7EK,EAAaH,EAAYlB,EAAM,QAAQ,wBAAyB,GAAG,EAAIA,EAG7E,MAAO,GAFMe,EAAQ,EAAI,IAAM,EAEjB,GAAGM,CAAU,GAAGD,IAAkB,GAAK,GAAK,IAAIA,CAAa,EAAE,EAC/E"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A SCALED INTEGER as a person types and reads it — the text side of `ScaledInput` (2.4).
|
|
3
|
+
*
|
|
4
|
+
* The value is a safe integer that carries `scaleDigits` decimal places (`123456` at 2 is
|
|
5
|
+
* "1.234,56"): the scaled types of the data contract (`Kurus`, `Qty4`, `Price4`, `Rate6`, `Pct2`).
|
|
6
|
+
* Nothing here goes through a float: the digits are read as text and put together with `BigInt`,
|
|
7
|
+
* so "0,1" at 2 is exactly `10`, never `10.000000000000002`.
|
|
8
|
+
*
|
|
9
|
+
* ⚠ The GRAMMAR is the data contract's (§4.3), pinned by the vectors in `__tests__/helpers/scaled-number.helper.test.ts`:
|
|
10
|
+
* the comma is the decimal point; with a comma, dots may only group the whole part by three;
|
|
11
|
+
* without one, a dot followed by groups of three groups thousands ("1.250" is 1250) unless the
|
|
12
|
+
* first group starts with zero ("0.250" is 0,25), and any other single dot is the point ("12.5"
|
|
13
|
+
* is 12,5 — the dot key of a number pad). `ui` depends on no decimal library; the test table is the
|
|
14
|
+
* reference for the grammar.
|
|
15
|
+
*/
|
|
16
|
+
/** Text the field cannot hold: the keystroke that produced it is refused. */
|
|
17
|
+
export declare const REFUSED: unique symbol;
|
|
18
|
+
export type ScaledReadOptions = {
|
|
19
|
+
/** Decimal places the integer carries. */
|
|
20
|
+
scaleDigits: number;
|
|
21
|
+
/** Decimal places a person may type (≤ `scaleDigits`). */
|
|
22
|
+
maxFractionDigits: number;
|
|
23
|
+
/** The smallest value; a minus sign is refused when it is 0 or more. */
|
|
24
|
+
min: number;
|
|
25
|
+
/** The largest value; a keystroke past it is refused. */
|
|
26
|
+
max: number;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* What the typed text means: a scaled integer, `null` (nothing yet, or a number still being
|
|
30
|
+
* typed that is not one on its own: "-", ",", "1.250.0"), or `REFUSED` (no number starts this
|
|
31
|
+
* way, or it has more decimals than allowed, or it is out of range).
|
|
32
|
+
*/
|
|
33
|
+
export type ScaledReading = number | null | typeof REFUSED;
|
|
34
|
+
/**
|
|
35
|
+
* Drops spaces anywhere and signs around the number (a currency code, "%", a plus) — a pasted
|
|
36
|
+
* "1.234,56 TL" reads. A letter INSIDE the number stays and refuses it: "1e3" is not 13.
|
|
37
|
+
*/
|
|
38
|
+
export declare const cleanScaledText: (input: string) => string;
|
|
39
|
+
/** Reads typed text as a scaled integer; see `ScaledReading`. */
|
|
40
|
+
export declare const readScaledText: (input: string, options: ScaledReadOptions) => ScaledReading;
|
|
41
|
+
export type ScaledFormatOptions = {
|
|
42
|
+
/** Decimal places the integer carries. */
|
|
43
|
+
scaleDigits: number;
|
|
44
|
+
/** Decimal places always shown ("12,50" at 2); trailing zeros past them are dropped. */
|
|
45
|
+
minFractionDigits: number;
|
|
46
|
+
/** Groups the whole part by three with a dot ("1.234,5"); off while the field is edited. */
|
|
47
|
+
isGrouped: boolean;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* A scaled integer as text: `123450` at 2 → "1.234,50" (min 2) or "1234,5" (min 0, ungrouped).
|
|
51
|
+
* Every carried digit that is not a trailing zero is shown — the field never hides part of the
|
|
52
|
+
* value it holds.
|
|
53
|
+
*/
|
|
54
|
+
export declare const formatScaledValue: (value: number, options: ScaledFormatOptions) => string;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A SCALED INTEGER as a person types and reads it — the text side of `ScaledInput` (2.4).
|
|
3
|
+
*
|
|
4
|
+
* The value is a safe integer that carries `scaleDigits` decimal places (`123456` at 2 is
|
|
5
|
+
* "1.234,56"): the scaled types of the data contract (`Kurus`, `Qty4`, `Price4`, `Rate6`, `Pct2`).
|
|
6
|
+
* Nothing here goes through a float: the digits are read as text and put together with `BigInt`,
|
|
7
|
+
* so "0,1" at 2 is exactly `10`, never `10.000000000000002`.
|
|
8
|
+
*
|
|
9
|
+
* ⚠ The GRAMMAR is the data contract's (§4.3), pinned by the vectors in `__tests__/helpers/scaled-number.helper.test.ts`:
|
|
10
|
+
* the comma is the decimal point; with a comma, dots may only group the whole part by three;
|
|
11
|
+
* without one, a dot followed by groups of three groups thousands ("1.250" is 1250) unless the
|
|
12
|
+
* first group starts with zero ("0.250" is 0,25), and any other single dot is the point ("12.5"
|
|
13
|
+
* is 12,5 — the dot key of a number pad). `ui` depends on no decimal library; the test table is the
|
|
14
|
+
* reference for the grammar.
|
|
15
|
+
*/
|
|
16
|
+
/** Text the field cannot hold: the keystroke that produced it is refused. */
|
|
17
|
+
export declare const REFUSED: unique symbol;
|
|
18
|
+
export type ScaledReadOptions = {
|
|
19
|
+
/** Decimal places the integer carries. */
|
|
20
|
+
scaleDigits: number;
|
|
21
|
+
/** Decimal places a person may type (≤ `scaleDigits`). */
|
|
22
|
+
maxFractionDigits: number;
|
|
23
|
+
/** The smallest value; a minus sign is refused when it is 0 or more. */
|
|
24
|
+
min: number;
|
|
25
|
+
/** The largest value; a keystroke past it is refused. */
|
|
26
|
+
max: number;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* What the typed text means: a scaled integer, `null` (nothing yet, or a number still being
|
|
30
|
+
* typed that is not one on its own: "-", ",", "1.250.0"), or `REFUSED` (no number starts this
|
|
31
|
+
* way, or it has more decimals than allowed, or it is out of range).
|
|
32
|
+
*/
|
|
33
|
+
export type ScaledReading = number | null | typeof REFUSED;
|
|
34
|
+
/**
|
|
35
|
+
* Drops spaces anywhere and signs around the number (a currency code, "%", a plus) — a pasted
|
|
36
|
+
* "1.234,56 TL" reads. A letter INSIDE the number stays and refuses it: "1e3" is not 13.
|
|
37
|
+
*/
|
|
38
|
+
export declare const cleanScaledText: (input: string) => string;
|
|
39
|
+
/** Reads typed text as a scaled integer; see `ScaledReading`. */
|
|
40
|
+
export declare const readScaledText: (input: string, options: ScaledReadOptions) => ScaledReading;
|
|
41
|
+
export type ScaledFormatOptions = {
|
|
42
|
+
/** Decimal places the integer carries. */
|
|
43
|
+
scaleDigits: number;
|
|
44
|
+
/** Decimal places always shown ("12,50" at 2); trailing zeros past them are dropped. */
|
|
45
|
+
minFractionDigits: number;
|
|
46
|
+
/** Groups the whole part by three with a dot ("1.234,5"); off while the field is edited. */
|
|
47
|
+
isGrouped: boolean;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* A scaled integer as text: `123450` at 2 → "1.234,50" (min 2) or "1234,5" (min 0, ungrouped).
|
|
51
|
+
* Every carried digit that is not a trailing zero is shown — the field never hides part of the
|
|
52
|
+
* value it holds.
|
|
53
|
+
*/
|
|
54
|
+
export declare const formatScaledValue: (value: number, options: ScaledFormatOptions) => string;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const a = Symbol("refused"), g = /^[1-9]\d{0,2}(\.\d{3})+$/, m = /^[1-9]\d{0,2}(\.\d{3})*\.\d{0,3}$/, S = (i) => i.replace(/\s/g, "").replace(/^[^\d.,-]+|[^\d.,-]+$/g, ""), p = (i) => {
|
|
2
|
+
const n = i.startsWith("-"), t = n ? i.slice(1) : i, [e, s, ...r] = t.split(",");
|
|
3
|
+
if (r.length > 0 || t.includes("-")) return null;
|
|
4
|
+
if (s !== void 0)
|
|
5
|
+
return s.includes(".") || e.includes(".") && !g.test(e) ? null : { isNegative: n, whole: e.replaceAll(".", ""), fraction: s };
|
|
6
|
+
if (g.test(e)) return { isNegative: n, whole: e.replaceAll(".", ""), fraction: "" };
|
|
7
|
+
const [c, o, ...l] = e.split(".");
|
|
8
|
+
return l.length > 0 ? null : { isNegative: n, whole: c, fraction: o ?? "" };
|
|
9
|
+
}, $ = (i, n) => {
|
|
10
|
+
const t = S(i);
|
|
11
|
+
if (/[^\d.,-]/.test(t)) return a;
|
|
12
|
+
const e = p(t);
|
|
13
|
+
if (!e) {
|
|
14
|
+
const f = t.startsWith("-") ? t.slice(1) : t;
|
|
15
|
+
return m.test(f) && (n.min < 0 || !t.startsWith("-")) ? null : a;
|
|
16
|
+
}
|
|
17
|
+
const { isNegative: s, whole: r, fraction: c } = e;
|
|
18
|
+
if (s && n.min >= 0) return a;
|
|
19
|
+
const o = Math.min(n.maxFractionDigits, n.scaleDigits);
|
|
20
|
+
if (c.length > o || o === 0 && t.includes(",")) return a;
|
|
21
|
+
if (r === "" && c === "") return null;
|
|
22
|
+
const l = BigInt(`${r}${c.padEnd(n.scaleDigits, "0")}`), d = s ? -l : l, u = d > BigInt(Math.trunc(n.max)), h = d < BigInt(Math.trunc(Math.min(n.min, 0)));
|
|
23
|
+
return u || h ? a : Number(d) + 0;
|
|
24
|
+
}, w = (i, n) => {
|
|
25
|
+
const { scaleDigits: t, minFractionDigits: e, isGrouped: s } = n, r = String(Math.abs(i)).padStart(t + 1, "0"), c = r.slice(0, r.length - t), l = r.slice(r.length - t).replace(/0+$/, "").padEnd(Math.min(e, t), "0"), d = s ? c.replace(/\B(?=(\d{3})+(?!\d))/g, ".") : c;
|
|
26
|
+
return `${i < 0 ? "-" : ""}${d}${l === "" ? "" : `,${l}`}`;
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
a as REFUSED,
|
|
30
|
+
S as cleanScaledText,
|
|
31
|
+
w as formatScaledValue,
|
|
32
|
+
$ as readScaledText
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=scaled-number.helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scaled-number.helper.js","sources":["../../src/helpers/scaled-number.helper.ts"],"sourcesContent":["/**\n * A SCALED INTEGER as a person types and reads it — the text side of `ScaledInput` (2.4).\n *\n * The value is a safe integer that carries `scaleDigits` decimal places (`123456` at 2 is\n * \"1.234,56\"): the scaled types of the data contract (`Kurus`, `Qty4`, `Price4`, `Rate6`, `Pct2`).\n * Nothing here goes through a float: the digits are read as text and put together with `BigInt`,\n * so \"0,1\" at 2 is exactly `10`, never `10.000000000000002`.\n *\n * ⚠ The GRAMMAR is the data contract's (§4.3), pinned by the vectors in `__tests__/helpers/scaled-number.helper.test.ts`:\n * the comma is the decimal point; with a comma, dots may only group the whole part by three;\n * without one, a dot followed by groups of three groups thousands (\"1.250\" is 1250) unless the\n * first group starts with zero (\"0.250\" is 0,25), and any other single dot is the point (\"12.5\"\n * is 12,5 — the dot key of a number pad). `ui` depends on no decimal library; the test table is the\n * reference for the grammar.\n */\n\n/** Text the field cannot hold: the keystroke that produced it is refused. */\nexport const REFUSED = Symbol('refused');\n\nexport type ScaledReadOptions = {\n /** Decimal places the integer carries. */\n scaleDigits: number;\n /** Decimal places a person may type (≤ `scaleDigits`). */\n maxFractionDigits: number;\n /** The smallest value; a minus sign is refused when it is 0 or more. */\n min: number;\n /** The largest value; a keystroke past it is refused. */\n max: number;\n};\n\n/**\n * What the typed text means: a scaled integer, `null` (nothing yet, or a number still being\n * typed that is not one on its own: \"-\", \",\", \"1.250.0\"), or `REFUSED` (no number starts this\n * way, or it has more decimals than allowed, or it is out of range).\n */\nexport type ScaledReading = number | null | typeof REFUSED;\n\n/** The whole part grouped by three, every group complete: \"1.250\", \"12.345.678\". */\nconst THOUSANDS = /^[1-9]\\d{0,2}(\\.\\d{3})+$/;\n/** On the way to `THOUSANDS`: the last group may still be short (\"1.250.0\"). */\nconst THOUSANDS_PREFIX = /^[1-9]\\d{0,2}(\\.\\d{3})*\\.\\d{0,3}$/;\n\n/**\n * Drops spaces anywhere and signs around the number (a currency code, \"%\", a plus) — a pasted\n * \"1.234,56 TL\" reads. A letter INSIDE the number stays and refuses it: \"1e3\" is not 13.\n */\nexport const cleanScaledText = (input: string): string =>\n input.replace(/\\s/g, '').replace(/^[^\\d.,-]+|[^\\d.,-]+$/g, '');\n\n/** Sign, whole digits and fraction digits of a complete number, or `null`. */\nconst split = (text: string): { isNegative: boolean; whole: string; fraction: string } | null => {\n const isNegative = text.startsWith('-');\n const body = isNegative ? text.slice(1) : text;\n const [whole, fraction, ...more] = body.split(',') as [string, ...string[]];\n\n if (more.length > 0 || body.includes('-')) return null;\n\n if (fraction !== undefined) {\n if (fraction.includes('.')) return null;\n if (whole.includes('.') && !THOUSANDS.test(whole)) return null;\n\n return { isNegative, whole: whole.replaceAll('.', ''), fraction };\n }\n\n if (THOUSANDS.test(whole)) return { isNegative, whole: whole.replaceAll('.', ''), fraction: '' };\n\n const [integer, point, ...rest] = whole.split('.') as [string, ...string[]];\n if (rest.length > 0) return null;\n\n return { isNegative, whole: integer, fraction: point ?? '' };\n};\n\n/** Reads typed text as a scaled integer; see `ScaledReading`. */\nexport const readScaledText = (input: string, options: ScaledReadOptions): ScaledReading => {\n const text = cleanScaledText(input);\n if (/[^\\d.,-]/.test(text)) return REFUSED;\n const parts = split(text);\n\n if (!parts) {\n /* Not a number, but maybe the start of one: \"1.250.0\" on the way to \"1.250.000\". */\n const body = text.startsWith('-') ? text.slice(1) : text;\n return THOUSANDS_PREFIX.test(body) && (options.min < 0 || !text.startsWith('-'))\n ? null\n : REFUSED;\n }\n\n const { isNegative, whole, fraction } = parts;\n if (isNegative && options.min >= 0) return REFUSED;\n const allowedFraction = Math.min(options.maxFractionDigits, options.scaleDigits);\n if (fraction.length > allowedFraction) return REFUSED;\n /* A whole-number field takes no decimal comma at all — \"3,\" would wait for a digit it refuses. */\n if (allowedFraction === 0 && text.includes(',')) return REFUSED;\n if (whole === '' && fraction === '') return null;\n\n const magnitude = BigInt(`${whole}${fraction.padEnd(options.scaleDigits, '0')}`);\n const signed = isNegative ? -magnitude : magnitude;\n\n const isTooLarge = signed > BigInt(Math.trunc(options.max));\n /* Under a positive `min` the field still takes the digits on the way up (\"0\" towards \"5\"). */\n const isTooSmall = signed < BigInt(Math.trunc(Math.min(options.min, 0)));\n if (isTooLarge || isTooSmall) return REFUSED;\n\n /* No negative zero: \"-0\" is 0. */\n return Number(signed) + 0;\n};\n\nexport type ScaledFormatOptions = {\n /** Decimal places the integer carries. */\n scaleDigits: number;\n /** Decimal places always shown (\"12,50\" at 2); trailing zeros past them are dropped. */\n minFractionDigits: number;\n /** Groups the whole part by three with a dot (\"1.234,5\"); off while the field is edited. */\n isGrouped: boolean;\n};\n\n/**\n * A scaled integer as text: `123450` at 2 → \"1.234,50\" (min 2) or \"1234,5\" (min 0, ungrouped).\n * Every carried digit that is not a trailing zero is shown — the field never hides part of the\n * value it holds.\n */\nexport const formatScaledValue = (value: number, options: ScaledFormatOptions): string => {\n const { scaleDigits, minFractionDigits, isGrouped } = options;\n const digits = String(Math.abs(value)).padStart(scaleDigits + 1, '0');\n const whole = digits.slice(0, digits.length - scaleDigits);\n const fraction = digits.slice(digits.length - scaleDigits).replace(/0+$/, '');\n const shownFraction = fraction.padEnd(Math.min(minFractionDigits, scaleDigits), '0');\n const shownWhole = isGrouped ? whole.replace(/\\B(?=(\\d{3})+(?!\\d))/g, '.') : whole;\n const sign = value < 0 ? '-' : '';\n\n return `${sign}${shownWhole}${shownFraction === '' ? '' : `,${shownFraction}`}`;\n};\n"],"names":["REFUSED","THOUSANDS","THOUSANDS_PREFIX","cleanScaledText","input","split","text","isNegative","body","whole","fraction","more","integer","point","rest","readScaledText","options","parts","allowedFraction","magnitude","signed","isTooLarge","isTooSmall","formatScaledValue","value","scaleDigits","minFractionDigits","isGrouped","digits","shownFraction","shownWhole"],"mappings":"AAiBO,MAAMA,IAAU,OAAO,SAAS,GAqBjCC,IAAY,4BAEZC,IAAmB,qCAMZC,IAAkB,CAACC,MAC9BA,EAAM,QAAQ,OAAO,EAAE,EAAE,QAAQ,0BAA0B,EAAE,GAGzDC,IAAQ,CAACC,MAAkF;AAC/F,QAAMC,IAAaD,EAAK,WAAW,GAAG,GAChCE,IAAOD,IAAaD,EAAK,MAAM,CAAC,IAAIA,GACpC,CAACG,GAAOC,GAAU,GAAGC,CAAI,IAAIH,EAAK,MAAM,GAAG;AAEjD,MAAIG,EAAK,SAAS,KAAKH,EAAK,SAAS,GAAG,EAAG,QAAO;AAElD,MAAIE,MAAa;AAEf,WADIA,EAAS,SAAS,GAAG,KACrBD,EAAM,SAAS,GAAG,KAAK,CAACR,EAAU,KAAKQ,CAAK,IAAU,OAEnD,EAAE,YAAAF,GAAY,OAAOE,EAAM,WAAW,KAAK,EAAE,GAAG,UAAAC,EAAA;AAGzD,MAAIT,EAAU,KAAKQ,CAAK,UAAU,EAAE,YAAAF,GAAY,OAAOE,EAAM,WAAW,KAAK,EAAE,GAAG,UAAU,GAAA;AAE5F,QAAM,CAACG,GAASC,GAAO,GAAGC,CAAI,IAAIL,EAAM,MAAM,GAAG;AACjD,SAAIK,EAAK,SAAS,IAAU,OAErB,EAAE,YAAAP,GAAY,OAAOK,GAAS,UAAUC,KAAS,GAAA;AAC1D,GAGaE,IAAiB,CAACX,GAAeY,MAA8C;AAC1F,QAAMV,IAAOH,EAAgBC,CAAK;AAClC,MAAI,WAAW,KAAKE,CAAI,EAAG,QAAON;AAClC,QAAMiB,IAAQZ,EAAMC,CAAI;AAExB,MAAI,CAACW,GAAO;AAEV,UAAMT,IAAOF,EAAK,WAAW,GAAG,IAAIA,EAAK,MAAM,CAAC,IAAIA;AACpD,WAAOJ,EAAiB,KAAKM,CAAI,MAAMQ,EAAQ,MAAM,KAAK,CAACV,EAAK,WAAW,GAAG,KAC1E,OACAN;AAAA,EACN;AAEA,QAAM,EAAE,YAAAO,GAAY,OAAAE,GAAO,UAAAC,EAAA,IAAaO;AACxC,MAAIV,KAAcS,EAAQ,OAAO,EAAG,QAAOhB;AAC3C,QAAMkB,IAAkB,KAAK,IAAIF,EAAQ,mBAAmBA,EAAQ,WAAW;AAG/E,MAFIN,EAAS,SAASQ,KAElBA,MAAoB,KAAKZ,EAAK,SAAS,GAAG,EAAG,QAAON;AACxD,MAAIS,MAAU,MAAMC,MAAa,GAAI,QAAO;AAE5C,QAAMS,IAAY,OAAO,GAAGV,CAAK,GAAGC,EAAS,OAAOM,EAAQ,aAAa,GAAG,CAAC,EAAE,GACzEI,IAASb,IAAa,CAACY,IAAYA,GAEnCE,IAAaD,IAAS,OAAO,KAAK,MAAMJ,EAAQ,GAAG,CAAC,GAEpDM,IAAaF,IAAS,OAAO,KAAK,MAAM,KAAK,IAAIJ,EAAQ,KAAK,CAAC,CAAC,CAAC;AACvE,SAAIK,KAAcC,IAAmBtB,IAG9B,OAAOoB,CAAM,IAAI;AAC1B,GAgBaG,IAAoB,CAACC,GAAeR,MAAyC;AACxF,QAAM,EAAE,aAAAS,GAAa,mBAAAC,GAAmB,WAAAC,EAAA,IAAcX,GAChDY,IAAS,OAAO,KAAK,IAAIJ,CAAK,CAAC,EAAE,SAASC,IAAc,GAAG,GAAG,GAC9DhB,IAAQmB,EAAO,MAAM,GAAGA,EAAO,SAASH,CAAW,GAEnDI,IADWD,EAAO,MAAMA,EAAO,SAASH,CAAW,EAAE,QAAQ,OAAO,EAAE,EAC7C,OAAO,KAAK,IAAIC,GAAmBD,CAAW,GAAG,GAAG,GAC7EK,IAAaH,IAAYlB,EAAM,QAAQ,yBAAyB,GAAG,IAAIA;AAG7E,SAAO,GAFMe,IAAQ,IAAI,MAAM,EAEjB,GAAGM,CAAU,GAAGD,MAAkB,KAAK,KAAK,IAAIA,CAAa,EAAE;AAC/E;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@handijitcom/utils"),l=()=>{!s.isClient()||typeof window.scrollTo!="function"||window.scrollTo({top:0,left:0,behavior:"instant"})},t=(o,i)=>{typeof(o==null?void 0:o.scrollIntoView)=="function"&&o.scrollIntoView(i)};exports.scrollIntoViewIfPossible=t;exports.scrollWindowToTop=l;
|
|
2
|
+
//# sourceMappingURL=scroll.helper.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll.helper.cjs","sources":["../../src/helpers/scroll.helper.ts"],"sourcesContent":["/** Kaydırma yardımcıları. */\n\nimport { isClient } from '@handijitcom/utils';\n\n/**\n * Pencereyi en üste alır; ortam desteklemiyorsa sessizce geçer.\n * ⚠ Kaydırma ANIDIR.\n */\nexport const scrollWindowToTop = (): void => {\n if (!isClient() || typeof window.scrollTo !== 'function') return;\n\n window.scrollTo({ top: 0, left: 0, behavior: 'instant' });\n};\n\n/** Öğeyi görünür alana kaydırır; ortam desteklemiyorsa sessizce geçer. */\nexport const scrollIntoViewIfPossible = (\n element: Element | null | undefined,\n options?: ScrollIntoViewOptions,\n): void => {\n if (typeof element?.scrollIntoView === 'function') element.scrollIntoView(options);\n};\n"],"names":["scrollWindowToTop","isClient","scrollIntoViewIfPossible","element","options"],"mappings":"sHAQaA,EAAoB,IAAY,CACvC,CAACC,EAAAA,SAAA,GAAc,OAAO,OAAO,UAAa,YAE9C,OAAO,SAAS,CAAE,IAAK,EAAG,KAAM,EAAG,SAAU,UAAW,CAC1D,EAGaC,EAA2B,CACtCC,EACAC,IACS,CACL,OAAOD,GAAA,YAAAA,EAAS,iBAAmB,YAAYA,EAAQ,eAAeC,CAAO,CACnF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Kaydırma yardımcıları. */
|
|
2
|
+
/**
|
|
3
|
+
* Pencereyi en üste alır; ortam desteklemiyorsa sessizce geçer.
|
|
4
|
+
* ⚠ Kaydırma ANIDIR.
|
|
5
|
+
*/
|
|
6
|
+
export declare const scrollWindowToTop: () => void;
|
|
7
|
+
/** Öğeyi görünür alana kaydırır; ortam desteklemiyorsa sessizce geçer. */
|
|
8
|
+
export declare const scrollIntoViewIfPossible: (element: Element | null | undefined, options?: ScrollIntoViewOptions) => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Kaydırma yardımcıları. */
|
|
2
|
+
/**
|
|
3
|
+
* Pencereyi en üste alır; ortam desteklemiyorsa sessizce geçer.
|
|
4
|
+
* ⚠ Kaydırma ANIDIR.
|
|
5
|
+
*/
|
|
6
|
+
export declare const scrollWindowToTop: () => void;
|
|
7
|
+
/** Öğeyi görünür alana kaydırır; ortam desteklemiyorsa sessizce geçer. */
|
|
8
|
+
export declare const scrollIntoViewIfPossible: (element: Element | null | undefined, options?: ScrollIntoViewOptions) => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { isClient as r } from "@handijitcom/utils";
|
|
2
|
+
const t = () => {
|
|
3
|
+
!r() || typeof window.scrollTo != "function" || window.scrollTo({ top: 0, left: 0, behavior: "instant" });
|
|
4
|
+
}, n = (o, i) => {
|
|
5
|
+
typeof (o == null ? void 0 : o.scrollIntoView) == "function" && o.scrollIntoView(i);
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
n as scrollIntoViewIfPossible,
|
|
9
|
+
t as scrollWindowToTop
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=scroll.helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll.helper.js","sources":["../../src/helpers/scroll.helper.ts"],"sourcesContent":["/** Kaydırma yardımcıları. */\n\nimport { isClient } from '@handijitcom/utils';\n\n/**\n * Pencereyi en üste alır; ortam desteklemiyorsa sessizce geçer.\n * ⚠ Kaydırma ANIDIR.\n */\nexport const scrollWindowToTop = (): void => {\n if (!isClient() || typeof window.scrollTo !== 'function') return;\n\n window.scrollTo({ top: 0, left: 0, behavior: 'instant' });\n};\n\n/** Öğeyi görünür alana kaydırır; ortam desteklemiyorsa sessizce geçer. */\nexport const scrollIntoViewIfPossible = (\n element: Element | null | undefined,\n options?: ScrollIntoViewOptions,\n): void => {\n if (typeof element?.scrollIntoView === 'function') element.scrollIntoView(options);\n};\n"],"names":["scrollWindowToTop","isClient","scrollIntoViewIfPossible","element","options"],"mappings":";AAQO,MAAMA,IAAoB,MAAY;AAC3C,EAAI,CAACC,EAAA,KAAc,OAAO,OAAO,YAAa,cAE9C,OAAO,SAAS,EAAE,KAAK,GAAG,MAAM,GAAG,UAAU,WAAW;AAC1D,GAGaC,IAA2B,CACtCC,GACAC,MACS;AACT,EAAI,QAAOD,KAAA,gBAAAA,EAAS,mBAAmB,cAAYA,EAAQ,eAAeC,CAAO;AACnF;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=e=>e.replace(/İ/g,"i").replace(/I/g,"i").replace(/ı/g,"i").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/ş/g,"s").replace(/ğ/g,"g").replace(/ç/g,"c").replace(/ø/g,"o").replace(/æ/g,"ae").replace(/ß/g,"ss").replace(/đ/g,"d").replace(/ł/g,"l").replace(/\s+/g," ").trim(),c=(e,a)=>r(e).includes(r(a));exports.matchesSearch=c;exports.normalizeSearchTerm=r;
|
|
2
|
+
//# sourceMappingURL=text.helper.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.helper.cjs","sources":["../../src/helpers/text.helper.ts"],"sourcesContent":["/** Metin normalizasyonu — aksan ve büyük/küçük harf duyarsız arama. */\n\n/** Serbest metin arama anahtarı: */\nexport const normalizeSearchTerm = (value: string): string =>\n value\n .replace(/İ/g, 'i')\n .replace(/I/g, 'i')\n .replace(/ı/g, 'i')\n .toLowerCase()\n .normalize('NFD')\n /* Birlestirici aksan isaretleri (U+0300–U+036F). */\n .replace(/[\\u0300-\\u036f]/g, '')\n /* NFD'nin ayristirmadigi harfler: her biri tek kod noktasi. */\n .replace(/ş/g, 's')\n .replace(/ğ/g, 'g')\n .replace(/ç/g, 'c')\n .replace(/ø/g, 'o')\n .replace(/æ/g, 'ae')\n .replace(/ß/g, 'ss')\n .replace(/đ/g, 'd')\n .replace(/ł/g, 'l')\n .replace(/\\s+/g, ' ')\n .trim();\n\n/** Aranan metin, hedefin içinde geçiyor mu? */\nexport const matchesSearch = (haystack: string, needle: string): boolean =>\n normalizeSearchTerm(haystack).includes(normalizeSearchTerm(needle));\n"],"names":["normalizeSearchTerm","value","matchesSearch","haystack","needle"],"mappings":"gFAGO,MAAMA,EAAuBC,GAClCA,EACG,QAAQ,KAAM,GAAG,EACjB,QAAQ,KAAM,GAAG,EACjB,QAAQ,KAAM,GAAG,EACjB,YAAA,EACA,UAAU,KAAK,EAEf,QAAQ,mBAAoB,EAAE,EAE9B,QAAQ,KAAM,GAAG,EACjB,QAAQ,KAAM,GAAG,EACjB,QAAQ,KAAM,GAAG,EACjB,QAAQ,KAAM,GAAG,EACjB,QAAQ,KAAM,IAAI,EAClB,QAAQ,KAAM,IAAI,EAClB,QAAQ,KAAM,GAAG,EACjB,QAAQ,KAAM,GAAG,EACjB,QAAQ,OAAQ,GAAG,EACnB,KAAA,EAGQC,EAAgB,CAACC,EAAkBC,IAC9CJ,EAAoBG,CAAQ,EAAE,SAASH,EAAoBI,CAAM,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Metin normalizasyonu — aksan ve büyük/küçük harf duyarsız arama. */
|
|
2
|
+
/** Serbest metin arama anahtarı: */
|
|
3
|
+
export declare const normalizeSearchTerm: (value: string) => string;
|
|
4
|
+
/** Aranan metin, hedefin içinde geçiyor mu? */
|
|
5
|
+
export declare const matchesSearch: (haystack: string, needle: string) => boolean;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Metin normalizasyonu — aksan ve büyük/küçük harf duyarsız arama. */
|
|
2
|
+
/** Serbest metin arama anahtarı: */
|
|
3
|
+
export declare const normalizeSearchTerm: (value: string) => string;
|
|
4
|
+
/** Aranan metin, hedefin içinde geçiyor mu? */
|
|
5
|
+
export declare const matchesSearch: (haystack: string, needle: string) => boolean;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const r = (e) => e.replace(/İ/g, "i").replace(/I/g, "i").replace(/ı/g, "i").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/ş/g, "s").replace(/ğ/g, "g").replace(/ç/g, "c").replace(/ø/g, "o").replace(/æ/g, "ae").replace(/ß/g, "ss").replace(/đ/g, "d").replace(/ł/g, "l").replace(/\s+/g, " ").trim(), c = (e, a) => r(e).includes(r(a));
|
|
2
|
+
export {
|
|
3
|
+
c as matchesSearch,
|
|
4
|
+
r as normalizeSearchTerm
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=text.helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.helper.js","sources":["../../src/helpers/text.helper.ts"],"sourcesContent":["/** Metin normalizasyonu — aksan ve büyük/küçük harf duyarsız arama. */\n\n/** Serbest metin arama anahtarı: */\nexport const normalizeSearchTerm = (value: string): string =>\n value\n .replace(/İ/g, 'i')\n .replace(/I/g, 'i')\n .replace(/ı/g, 'i')\n .toLowerCase()\n .normalize('NFD')\n /* Birlestirici aksan isaretleri (U+0300–U+036F). */\n .replace(/[\\u0300-\\u036f]/g, '')\n /* NFD'nin ayristirmadigi harfler: her biri tek kod noktasi. */\n .replace(/ş/g, 's')\n .replace(/ğ/g, 'g')\n .replace(/ç/g, 'c')\n .replace(/ø/g, 'o')\n .replace(/æ/g, 'ae')\n .replace(/ß/g, 'ss')\n .replace(/đ/g, 'd')\n .replace(/ł/g, 'l')\n .replace(/\\s+/g, ' ')\n .trim();\n\n/** Aranan metin, hedefin içinde geçiyor mu? */\nexport const matchesSearch = (haystack: string, needle: string): boolean =>\n normalizeSearchTerm(haystack).includes(normalizeSearchTerm(needle));\n"],"names":["normalizeSearchTerm","value","matchesSearch","haystack","needle"],"mappings":"AAGO,MAAMA,IAAsB,CAACC,MAClCA,EACG,QAAQ,MAAM,GAAG,EACjB,QAAQ,MAAM,GAAG,EACjB,QAAQ,MAAM,GAAG,EACjB,YAAA,EACA,UAAU,KAAK,EAEf,QAAQ,oBAAoB,EAAE,EAE9B,QAAQ,MAAM,GAAG,EACjB,QAAQ,MAAM,GAAG,EACjB,QAAQ,MAAM,GAAG,EACjB,QAAQ,MAAM,GAAG,EACjB,QAAQ,MAAM,IAAI,EAClB,QAAQ,MAAM,IAAI,EAClB,QAAQ,MAAM,GAAG,EACjB,QAAQ,MAAM,GAAG,EACjB,QAAQ,QAAQ,GAAG,EACnB,KAAA,GAGQC,IAAgB,CAACC,GAAkBC,MAC9CJ,EAAoBG,CAAQ,EAAE,SAASH,EAAoBI,CAAM,CAAC;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@handijitcom/ui/design"),r=require("@handijitcom/utils"),n="ui-theme-switching",o="(prefers-color-scheme: dark)",i=e=>e==="light"||e==="dark",s=()=>{var e;return r.isClient()&&((e=window.matchMedia)!=null&&e.call(window,o).matches)?"dark":"light"},c=()=>{if(!r.isClient())return"system";try{const e=window.localStorage.getItem(t.THEME_STORAGE_KEY);return i(e)?e:"system"}catch{return"system"}},m=()=>{if(!r.isClient())return"light";const e=document.documentElement.getAttribute(t.THEME_ATTRIBUTE);return i(e)?e:s()},T=e=>{if(r.isClient()){try{e==="system"?window.localStorage.removeItem(t.THEME_STORAGE_KEY):window.localStorage.setItem(t.THEME_STORAGE_KEY,e)}catch{}document.documentElement.setAttribute(t.THEME_ATTRIBUTE,e==="system"?s():e)}};exports.THEME_SWITCHING_CLASS=n;exports.applyThemePreference=T;exports.readActiveTheme=m;exports.readStoredPreference=c;exports.readSystemTheme=s;
|
|
2
|
+
//# sourceMappingURL=theme.helper.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.helper.cjs","sources":["../../src/helpers/theme.helper.ts"],"sourcesContent":["import {\n THEME_ATTRIBUTE,\n THEME_STORAGE_KEY,\n type ThemeName,\n type ThemePreference,\n} from '@handijitcom/ui/design';\nimport { isClient } from '@handijitcom/utils';\n\n/** Turns transitions off for one frame while the theme flips (see `base.scss`). */\nexport const THEME_SWITCHING_CLASS = 'ui-theme-switching';\n\nconst DARK_QUERY = '(prefers-color-scheme: dark)';\n\nconst isThemeName = (value: unknown): value is ThemeName => value === 'light' || value === 'dark';\n\n/** The operating system's setting; `light` on the server. */\nexport const readSystemTheme = (): ThemeName =>\n isClient() && window.matchMedia?.(DARK_QUERY).matches ? 'dark' : 'light';\n\n/**\n * The user's stored choice. \"System\" is the absence of the key, and a storage that throws (private\n * window, blocked site data) counts as no choice — the same reading as the design boot script.\n */\nexport const readStoredPreference = (): ThemePreference => {\n if (!isClient()) return 'system';\n\n try {\n const stored = window.localStorage.getItem(THEME_STORAGE_KEY);\n return isThemeName(stored) ? stored : 'system';\n } catch {\n return 'system';\n }\n};\n\n/** The theme drawn on the page: the root attribute when it names a theme, else the system's. */\nexport const readActiveTheme = (): ThemeName => {\n if (!isClient()) return 'light';\n\n const attribute = document.documentElement.getAttribute(THEME_ATTRIBUTE);\n return isThemeName(attribute) ? attribute : readSystemTheme();\n};\n\n/**\n * Stores the choice and applies it to the root element, the way `@handijitcom/ui/design` documents it:\n * only `light` / `dark` are stored, \"system\" removes the key, and the attribute always carries the\n * resolved theme so the boot script and this function agree.\n */\nexport const applyThemePreference = (preference: ThemePreference): void => {\n if (!isClient()) return;\n\n try {\n if (preference === 'system') window.localStorage.removeItem(THEME_STORAGE_KEY);\n else window.localStorage.setItem(THEME_STORAGE_KEY, preference);\n } catch {\n /* The choice still applies for this page view; it just cannot be remembered. */\n }\n\n document.documentElement.setAttribute(\n THEME_ATTRIBUTE,\n preference === 'system' ? readSystemTheme() : preference,\n );\n};\n"],"names":["THEME_SWITCHING_CLASS","DARK_QUERY","isThemeName","value","readSystemTheme","isClient","_a","readStoredPreference","stored","THEME_STORAGE_KEY","readActiveTheme","attribute","THEME_ATTRIBUTE","applyThemePreference","preference"],"mappings":"0JASaA,EAAwB,qBAE/BC,EAAa,+BAEbC,EAAeC,GAAuCA,IAAU,SAAWA,IAAU,OAG9EC,EAAkB,IAAA,OAC7BC,OAAAA,EAAAA,SAAA,KAAcC,EAAA,OAAO,aAAP,MAAAA,EAAA,YAAoBL,GAAY,SAAU,OAAS,SAMtDM,EAAuB,IAAuB,CACzD,GAAI,CAACF,EAAAA,SAAA,EAAY,MAAO,SAExB,GAAI,CACF,MAAMG,EAAS,OAAO,aAAa,QAAQC,EAAAA,iBAAiB,EAC5D,OAAOP,EAAYM,CAAM,EAAIA,EAAS,QACxC,MAAQ,CACN,MAAO,QACT,CACF,EAGaE,EAAkB,IAAiB,CAC9C,GAAI,CAACL,EAAAA,SAAA,EAAY,MAAO,QAExB,MAAMM,EAAY,SAAS,gBAAgB,aAAaC,EAAAA,eAAe,EACvE,OAAOV,EAAYS,CAAS,EAAIA,EAAYP,EAAA,CAC9C,EAOaS,EAAwBC,GAAsC,CACzE,GAAKT,EAAAA,WAEL,IAAI,CACES,IAAe,SAAU,OAAO,aAAa,WAAWL,EAAAA,iBAAiB,EACxE,OAAO,aAAa,QAAQA,EAAAA,kBAAmBK,CAAU,CAChE,MAAQ,CAER,CAEA,SAAS,gBAAgB,aACvBF,EAAAA,gBACAE,IAAe,SAAWV,IAAoBU,CAAA,EAElD"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ThemeName, ThemePreference } from '@handijitcom/ui/design';
|
|
2
|
+
/** Turns transitions off for one frame while the theme flips (see `base.scss`). */
|
|
3
|
+
export declare const THEME_SWITCHING_CLASS = "ui-theme-switching";
|
|
4
|
+
/** The operating system's setting; `light` on the server. */
|
|
5
|
+
export declare const readSystemTheme: () => ThemeName;
|
|
6
|
+
/**
|
|
7
|
+
* The user's stored choice. "System" is the absence of the key, and a storage that throws (private
|
|
8
|
+
* window, blocked site data) counts as no choice — the same reading as the design boot script.
|
|
9
|
+
*/
|
|
10
|
+
export declare const readStoredPreference: () => ThemePreference;
|
|
11
|
+
/** The theme drawn on the page: the root attribute when it names a theme, else the system's. */
|
|
12
|
+
export declare const readActiveTheme: () => ThemeName;
|
|
13
|
+
/**
|
|
14
|
+
* Stores the choice and applies it to the root element, the way `@handijitcom/ui/design` documents it:
|
|
15
|
+
* only `light` / `dark` are stored, "system" removes the key, and the attribute always carries the
|
|
16
|
+
* resolved theme so the boot script and this function agree.
|
|
17
|
+
*/
|
|
18
|
+
export declare const applyThemePreference: (preference: ThemePreference) => void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ThemeName, ThemePreference } from '@handijitcom/ui/design';
|
|
2
|
+
/** Turns transitions off for one frame while the theme flips (see `base.scss`). */
|
|
3
|
+
export declare const THEME_SWITCHING_CLASS = "ui-theme-switching";
|
|
4
|
+
/** The operating system's setting; `light` on the server. */
|
|
5
|
+
export declare const readSystemTheme: () => ThemeName;
|
|
6
|
+
/**
|
|
7
|
+
* The user's stored choice. "System" is the absence of the key, and a storage that throws (private
|
|
8
|
+
* window, blocked site data) counts as no choice — the same reading as the design boot script.
|
|
9
|
+
*/
|
|
10
|
+
export declare const readStoredPreference: () => ThemePreference;
|
|
11
|
+
/** The theme drawn on the page: the root attribute when it names a theme, else the system's. */
|
|
12
|
+
export declare const readActiveTheme: () => ThemeName;
|
|
13
|
+
/**
|
|
14
|
+
* Stores the choice and applies it to the root element, the way `@handijitcom/ui/design` documents it:
|
|
15
|
+
* only `light` / `dark` are stored, "system" removes the key, and the attribute always carries the
|
|
16
|
+
* resolved theme so the boot script and this function agree.
|
|
17
|
+
*/
|
|
18
|
+
export declare const applyThemePreference: (preference: ThemePreference) => void;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { THEME_STORAGE_KEY as r, THEME_ATTRIBUTE as o } from "@handijitcom/ui/design";
|
|
2
|
+
import { isClient as e } from "@handijitcom/utils";
|
|
3
|
+
const a = "ui-theme-switching", n = "(prefers-color-scheme: dark)", s = (t) => t === "light" || t === "dark", m = () => {
|
|
4
|
+
var t;
|
|
5
|
+
return e() && ((t = window.matchMedia) != null && t.call(window, n).matches) ? "dark" : "light";
|
|
6
|
+
}, d = () => {
|
|
7
|
+
if (!e()) return "system";
|
|
8
|
+
try {
|
|
9
|
+
const t = window.localStorage.getItem(r);
|
|
10
|
+
return s(t) ? t : "system";
|
|
11
|
+
} catch {
|
|
12
|
+
return "system";
|
|
13
|
+
}
|
|
14
|
+
}, h = () => {
|
|
15
|
+
if (!e()) return "light";
|
|
16
|
+
const t = document.documentElement.getAttribute(o);
|
|
17
|
+
return s(t) ? t : m();
|
|
18
|
+
}, l = (t) => {
|
|
19
|
+
if (e()) {
|
|
20
|
+
try {
|
|
21
|
+
t === "system" ? window.localStorage.removeItem(r) : window.localStorage.setItem(r, t);
|
|
22
|
+
} catch {
|
|
23
|
+
}
|
|
24
|
+
document.documentElement.setAttribute(
|
|
25
|
+
o,
|
|
26
|
+
t === "system" ? m() : t
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
a as THEME_SWITCHING_CLASS,
|
|
32
|
+
l as applyThemePreference,
|
|
33
|
+
h as readActiveTheme,
|
|
34
|
+
d as readStoredPreference,
|
|
35
|
+
m as readSystemTheme
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=theme.helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.helper.js","sources":["../../src/helpers/theme.helper.ts"],"sourcesContent":["import {\n THEME_ATTRIBUTE,\n THEME_STORAGE_KEY,\n type ThemeName,\n type ThemePreference,\n} from '@handijitcom/ui/design';\nimport { isClient } from '@handijitcom/utils';\n\n/** Turns transitions off for one frame while the theme flips (see `base.scss`). */\nexport const THEME_SWITCHING_CLASS = 'ui-theme-switching';\n\nconst DARK_QUERY = '(prefers-color-scheme: dark)';\n\nconst isThemeName = (value: unknown): value is ThemeName => value === 'light' || value === 'dark';\n\n/** The operating system's setting; `light` on the server. */\nexport const readSystemTheme = (): ThemeName =>\n isClient() && window.matchMedia?.(DARK_QUERY).matches ? 'dark' : 'light';\n\n/**\n * The user's stored choice. \"System\" is the absence of the key, and a storage that throws (private\n * window, blocked site data) counts as no choice — the same reading as the design boot script.\n */\nexport const readStoredPreference = (): ThemePreference => {\n if (!isClient()) return 'system';\n\n try {\n const stored = window.localStorage.getItem(THEME_STORAGE_KEY);\n return isThemeName(stored) ? stored : 'system';\n } catch {\n return 'system';\n }\n};\n\n/** The theme drawn on the page: the root attribute when it names a theme, else the system's. */\nexport const readActiveTheme = (): ThemeName => {\n if (!isClient()) return 'light';\n\n const attribute = document.documentElement.getAttribute(THEME_ATTRIBUTE);\n return isThemeName(attribute) ? attribute : readSystemTheme();\n};\n\n/**\n * Stores the choice and applies it to the root element, the way `@handijitcom/ui/design` documents it:\n * only `light` / `dark` are stored, \"system\" removes the key, and the attribute always carries the\n * resolved theme so the boot script and this function agree.\n */\nexport const applyThemePreference = (preference: ThemePreference): void => {\n if (!isClient()) return;\n\n try {\n if (preference === 'system') window.localStorage.removeItem(THEME_STORAGE_KEY);\n else window.localStorage.setItem(THEME_STORAGE_KEY, preference);\n } catch {\n /* The choice still applies for this page view; it just cannot be remembered. */\n }\n\n document.documentElement.setAttribute(\n THEME_ATTRIBUTE,\n preference === 'system' ? readSystemTheme() : preference,\n );\n};\n"],"names":["THEME_SWITCHING_CLASS","DARK_QUERY","isThemeName","value","readSystemTheme","isClient","_a","readStoredPreference","stored","THEME_STORAGE_KEY","readActiveTheme","attribute","THEME_ATTRIBUTE","applyThemePreference","preference"],"mappings":";;AASO,MAAMA,IAAwB,sBAE/BC,IAAa,gCAEbC,IAAc,CAACC,MAAuCA,MAAU,WAAWA,MAAU,QAG9EC,IAAkB,MAAA;;AAC7B,SAAAC,EAAA,OAAcC,IAAA,OAAO,eAAP,QAAAA,EAAA,aAAoBL,GAAY,WAAU,SAAS;AAAA,GAMtDM,IAAuB,MAAuB;AACzD,MAAI,CAACF,EAAA,EAAY,QAAO;AAExB,MAAI;AACF,UAAMG,IAAS,OAAO,aAAa,QAAQC,CAAiB;AAC5D,WAAOP,EAAYM,CAAM,IAAIA,IAAS;AAAA,EACxC,QAAQ;AACN,WAAO;AAAA,EACT;AACF,GAGaE,IAAkB,MAAiB;AAC9C,MAAI,CAACL,EAAA,EAAY,QAAO;AAExB,QAAMM,IAAY,SAAS,gBAAgB,aAAaC,CAAe;AACvE,SAAOV,EAAYS,CAAS,IAAIA,IAAYP,EAAA;AAC9C,GAOaS,IAAuB,CAACC,MAAsC;AACzE,MAAKT,KAEL;AAAA,QAAI;AACF,MAAIS,MAAe,WAAU,OAAO,aAAa,WAAWL,CAAiB,IACxE,OAAO,aAAa,QAAQA,GAAmBK,CAAU;AAAA,IAChE,QAAQ;AAAA,IAER;AAEA,aAAS,gBAAgB;AAAA,MACvBF;AAAA,MACAE,MAAe,WAAWV,MAAoBU;AAAA,IAAA;AAAA;AAElD;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react"),o=require("@handijitcom/utils"),u="ui-live-region",s=t=>{if(!o.isClient())return null;const i=`${u}-${t}`,n=document.getElementById(i);if(n)return n;const e=document.createElement("div");return e.id=i,e.setAttribute("aria-live",t),e.setAttribute("aria-atomic","true"),e.className="ui-visually-hidden",document.body.appendChild(e),e},c=(t,i)=>{t.textContent="",window.requestAnimationFrame(()=>{t.textContent=i})},l=()=>r.useCallback((t,i="polite")=>{const n=t.trim();if(n==="")return;const e=s(i);e&&c(e,n)},[]);exports.default=l;
|
|
2
|
+
//# sourceMappingURL=useAnnounce.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAnnounce.cjs","sources":["../../src/hooks/useAnnounce.ts"],"sourcesContent":["'use client';\n\nimport { useCallback } from 'react';\n\nimport { isClient } from '@handijitcom/utils';\nimport { AnnouncePoliteness } from '@/types/hook.type';\n\n/**\n * EKRAN OKUYUCU DUYURU MERKEZİ.\n * @example const announce = useAnnounce(); announce(`${count} ürün bulundu`)\n */\n\nconst REGION_ID = 'ui-live-region';\n\n/** Bölgeyi bulur; yoksa oluşturur. */\nconst getRegion = (politeness: AnnouncePoliteness): HTMLElement | null => {\n if (!isClient()) return null;\n\n const id = `${REGION_ID}-${politeness}`;\n const existing = document.getElementById(id);\n if (existing) return existing;\n\n const region = document.createElement('div');\n region.id = id;\n region.setAttribute('aria-live', politeness);\n /* `aria-atomic` — bolge her degistiginde TAMAMI okunur. */\n region.setAttribute('aria-atomic', 'true');\n /*\n * Gorsel olarak gizli ama DOM'da: `display: none` ya da `hidden` bolgeyi erisilebilirlik\n * agacindan da cikarir ve hicbir sey duyurulmaz.\n */\n region.className = 'ui-visually-hidden';\n\n document.body.appendChild(region);\n return region;\n};\n\n/** AYNI metni arka arkaya duyurmak. */\nconst write = (region: HTMLElement, message: string): void => {\n region.textContent = '';\n\n window.requestAnimationFrame(() => {\n region.textContent = message;\n });\n};\n\n/** Duyuru fonksiyonu döndürür. */\nconst useAnnounce = (): ((message: string, politeness?: AnnouncePoliteness) => void) =>\n useCallback((message: string, politeness: AnnouncePoliteness = 'polite') => {\n const trimmed = message.trim();\n /* Bos duyuru bolgeyi temizler ve bir sonraki gercek duyuruyu bastirir. */\n if (trimmed === '') return;\n\n const region = getRegion(politeness);\n if (region) write(region, trimmed);\n }, []);\n\nexport default useAnnounce;\n"],"names":["REGION_ID","getRegion","politeness","isClient","id","existing","region","write","message","useAnnounce","useCallback","trimmed"],"mappings":"kLAWMA,EAAY,iBAGZC,EAAaC,GAAuD,CACxE,GAAI,CAACC,EAAAA,SAAA,EAAY,OAAO,KAExB,MAAMC,EAAK,GAAGJ,CAAS,IAAIE,CAAU,GAC/BG,EAAW,SAAS,eAAeD,CAAE,EAC3C,GAAIC,EAAU,OAAOA,EAErB,MAAMC,EAAS,SAAS,cAAc,KAAK,EAC3C,OAAAA,EAAO,GAAKF,EACZE,EAAO,aAAa,YAAaJ,CAAU,EAE3CI,EAAO,aAAa,cAAe,MAAM,EAKzCA,EAAO,UAAY,qBAEnB,SAAS,KAAK,YAAYA,CAAM,EACzBA,CACT,EAGMC,EAAQ,CAACD,EAAqBE,IAA0B,CAC5DF,EAAO,YAAc,GAErB,OAAO,sBAAsB,IAAM,CACjCA,EAAO,YAAcE,CACvB,CAAC,CACH,EAGMC,EAAc,IAClBC,EAAAA,YAAY,CAACF,EAAiBN,EAAiC,WAAa,CAC1E,MAAMS,EAAUH,EAAQ,KAAA,EAExB,GAAIG,IAAY,GAAI,OAEpB,MAAML,EAASL,EAAUC,CAAU,EAC/BI,GAAQC,EAAMD,EAAQK,CAAO,CACnC,EAAG,CAAA,CAAE"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCallback as o } from "react";
|
|
3
|
+
import { isClient as r } from "@handijitcom/utils";
|
|
4
|
+
const u = "ui-live-region", s = (e) => {
|
|
5
|
+
if (!r()) return null;
|
|
6
|
+
const n = `${u}-${e}`, i = document.getElementById(n);
|
|
7
|
+
if (i) return i;
|
|
8
|
+
const t = document.createElement("div");
|
|
9
|
+
return t.id = n, t.setAttribute("aria-live", e), t.setAttribute("aria-atomic", "true"), t.className = "ui-visually-hidden", document.body.appendChild(t), t;
|
|
10
|
+
}, c = (e, n) => {
|
|
11
|
+
e.textContent = "", window.requestAnimationFrame(() => {
|
|
12
|
+
e.textContent = n;
|
|
13
|
+
});
|
|
14
|
+
}, d = () => o((e, n = "polite") => {
|
|
15
|
+
const i = e.trim();
|
|
16
|
+
if (i === "") return;
|
|
17
|
+
const t = s(n);
|
|
18
|
+
t && c(t, i);
|
|
19
|
+
}, []);
|
|
20
|
+
export {
|
|
21
|
+
d as default
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=useAnnounce.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAnnounce.js","sources":["../../src/hooks/useAnnounce.ts"],"sourcesContent":["'use client';\n\nimport { useCallback } from 'react';\n\nimport { isClient } from '@handijitcom/utils';\nimport { AnnouncePoliteness } from '@/types/hook.type';\n\n/**\n * EKRAN OKUYUCU DUYURU MERKEZİ.\n * @example const announce = useAnnounce(); announce(`${count} ürün bulundu`)\n */\n\nconst REGION_ID = 'ui-live-region';\n\n/** Bölgeyi bulur; yoksa oluşturur. */\nconst getRegion = (politeness: AnnouncePoliteness): HTMLElement | null => {\n if (!isClient()) return null;\n\n const id = `${REGION_ID}-${politeness}`;\n const existing = document.getElementById(id);\n if (existing) return existing;\n\n const region = document.createElement('div');\n region.id = id;\n region.setAttribute('aria-live', politeness);\n /* `aria-atomic` — bolge her degistiginde TAMAMI okunur. */\n region.setAttribute('aria-atomic', 'true');\n /*\n * Gorsel olarak gizli ama DOM'da: `display: none` ya da `hidden` bolgeyi erisilebilirlik\n * agacindan da cikarir ve hicbir sey duyurulmaz.\n */\n region.className = 'ui-visually-hidden';\n\n document.body.appendChild(region);\n return region;\n};\n\n/** AYNI metni arka arkaya duyurmak. */\nconst write = (region: HTMLElement, message: string): void => {\n region.textContent = '';\n\n window.requestAnimationFrame(() => {\n region.textContent = message;\n });\n};\n\n/** Duyuru fonksiyonu döndürür. */\nconst useAnnounce = (): ((message: string, politeness?: AnnouncePoliteness) => void) =>\n useCallback((message: string, politeness: AnnouncePoliteness = 'polite') => {\n const trimmed = message.trim();\n /* Bos duyuru bolgeyi temizler ve bir sonraki gercek duyuruyu bastirir. */\n if (trimmed === '') return;\n\n const region = getRegion(politeness);\n if (region) write(region, trimmed);\n }, []);\n\nexport default useAnnounce;\n"],"names":["REGION_ID","getRegion","politeness","isClient","id","existing","region","write","message","useAnnounce","useCallback","trimmed"],"mappings":";;;AAWA,MAAMA,IAAY,kBAGZC,IAAY,CAACC,MAAuD;AACxE,MAAI,CAACC,EAAA,EAAY,QAAO;AAExB,QAAMC,IAAK,GAAGJ,CAAS,IAAIE,CAAU,IAC/BG,IAAW,SAAS,eAAeD,CAAE;AAC3C,MAAIC,EAAU,QAAOA;AAErB,QAAMC,IAAS,SAAS,cAAc,KAAK;AAC3C,SAAAA,EAAO,KAAKF,GACZE,EAAO,aAAa,aAAaJ,CAAU,GAE3CI,EAAO,aAAa,eAAe,MAAM,GAKzCA,EAAO,YAAY,sBAEnB,SAAS,KAAK,YAAYA,CAAM,GACzBA;AACT,GAGMC,IAAQ,CAACD,GAAqBE,MAA0B;AAC5D,EAAAF,EAAO,cAAc,IAErB,OAAO,sBAAsB,MAAM;AACjC,IAAAA,EAAO,cAAcE;AAAA,EACvB,CAAC;AACH,GAGMC,IAAc,MAClBC,EAAY,CAACF,GAAiBN,IAAiC,aAAa;AAC1E,QAAMS,IAAUH,EAAQ,KAAA;AAExB,MAAIG,MAAY,GAAI;AAEpB,QAAML,IAASL,EAAUC,CAAU;AACnC,EAAII,KAAQC,EAAMD,GAAQK,CAAO;AACnC,GAAG,CAAA,CAAE;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react"),s=(t,r,u,n)=>{const e=o.useRef(u);e.current=u,o.useEffect(()=>{if(!r||!e.current)return;const i=window.setTimeout(()=>{var c;return(c=e.current)==null?void 0:c.call(e,t.trim())},n);return()=>window.clearTimeout(i)},[t,r,n])};exports.default=s;
|
|
2
|
+
//# sourceMappingURL=useAsyncSearch.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAsyncSearch.cjs","sources":["../../src/hooks/useAsyncSearch.ts"],"sourcesContent":["'use client';\n\nimport { useEffect, useRef } from 'react';\n\n/**\n * Arama terimini geciktirip DIŞARI bildirir — her tuşta istek atmamak için.\n * ⚠ `onSearch` bağımlılık listesine KONULAMAZ: çağıran taraf her render'da yeni bir kapanış\n * verebilir ve bağımlılığa konduğunda etki sonsuz…\n * @param term Ham arama terimi.\n * @param isActive Panel açık mı.\n * @param onSearch Yoksa kanca hiçbir şey yapmaz (yerel süzme yürürlüktedir).\n * @param delayMs Tuş vuruşları arasında beklenen süre.\n */\nconst useAsyncSearch = (\n term: string,\n isActive: boolean,\n onSearch: ((term: string) => void) | undefined,\n delayMs: number,\n): void => {\n const searchRef = useRef(onSearch);\n searchRef.current = onSearch;\n\n useEffect(() => {\n if (!isActive || !searchRef.current) return;\n\n const timer = window.setTimeout(() => searchRef.current?.(term.trim()), delayMs);\n return () => window.clearTimeout(timer);\n }, [term, isActive, delayMs]);\n};\n\nexport default useAsyncSearch;\n"],"names":["useAsyncSearch","term","isActive","onSearch","delayMs","searchRef","useRef","useEffect","timer","_a"],"mappings":"kJAYMA,EAAiB,CACrBC,EACAC,EACAC,EACAC,IACS,CACT,MAAMC,EAAYC,EAAAA,OAAOH,CAAQ,EACjCE,EAAU,QAAUF,EAEpBI,EAAAA,UAAU,IAAM,CACd,GAAI,CAACL,GAAY,CAACG,EAAU,QAAS,OAErC,MAAMG,EAAQ,OAAO,WAAW,IAAA,OAAM,OAAAC,EAAAJ,EAAU,UAAV,YAAAI,EAAA,KAAAJ,EAAoBJ,EAAK,SAASG,CAAO,EAC/E,MAAO,IAAM,OAAO,aAAaI,CAAK,CACxC,EAAG,CAACP,EAAMC,EAAUE,CAAO,CAAC,CAC9B"}
|