@handijitcom/ui 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +1023 -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 +11 -0
- package/build/constants/scale.constants.d.ts +11 -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/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 +55 -0
- package/build/helpers/scaled-number.helper.d.ts +55 -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 +905 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/PromptDialog/index.tsx"],"sourcesContent":["'use client';\n\nimport { type FC, memo, type ReactNode, useEffect, useId, useRef, useState } from 'react';\n\nimport { resolveLabel } from '../../helpers/label.helper';\nimport { useUi } from '../../theme/context';\nimport UISize from '../../enums/ui-size.enum';\nimport UIVariant from '../../enums/ui-variant.enum';\nimport Button from '../Button';\nimport Field, { type FieldChildProps } from '../Field';\nimport Input from '../Input';\nimport Modal from '../Modal';\nimport Textarea from '../Textarea';\n\nimport styles from './index.module.scss';\n\ntype BaseProps = {\n isOpen: boolean;\n /** Vazgeçme ve perde/Escape kapanışı. */\n onClose: () => void;\n /** Girilen değerle çalışır (değer kırpılmış gönderilir). */\n onSubmit: (value: string) => void | Promise<void>;\n title: string;\n /** Girdi alanının etiketi. */\n label: string;\n /** Verilmezse `labels.submit`. */\n submitLabel?: string;\n /** Verilmezse `labels.cancel`. */\n cancelLabel?: string;\n /** Kapatma düğmesinin erişilebilir adı. */\n closeLabel?: string;\n /** Başlığın altındaki bir cümlelik bağlam. */\n description?: ReactNode;\n hint?: string;\n placeholder?: string;\n defaultValue?: string;\n /** `text` tek satır, `multiline` gerekçe gibi uzun metin, `number` adet/fark gibi sayılar. */\n inputMode?: 'text' | 'multiline' | 'number';\n maxLength?: number;\n rows?: number;\n};\n\ntype Props = BaseProps & {\n /** Boş (yalnızca boşluk dahil) değer gönderilemez. */\n isRequired?: boolean;\n /** Zorunluluk yıldızının ekran okuyucu karşılığı (\"(zorunlu)\"). */\n requiredLabel?: string;\n};\n\n/** Metin isteyen pencere — `window.prompt()` yerine. */\nconst PromptDialog: FC<Props> = ({\n isOpen,\n onClose,\n onSubmit,\n title,\n label,\n submitLabel,\n cancelLabel,\n closeLabel,\n description,\n hint,\n placeholder,\n defaultValue = '',\n isRequired,\n requiredLabel,\n inputMode = 'text',\n maxLength,\n rows = 4,\n}) => {\n const { labels } = useUi();\n const formId = useId();\n const [value, setValue] = useState(defaultValue);\n const [isBusy, setIsBusy] = useState(false);\n\n /*\n * Deger yalnizca ACILIS kenarinda tazelenir. `isOpen`'a bagli duz bir etki, pencere acikken gelen\n * her ust render'da yazilani ezebilirdi\n */\n const wasOpenRef = useRef(false);\n useEffect(() => {\n if (isOpen && !wasOpenRef.current) setValue(defaultValue);\n wasOpenRef.current = isOpen;\n }, [isOpen, defaultValue]);\n\n const trimmed = value.trim();\n const isSubmitDisabled = Boolean(isRequired) && trimmed === '';\n\n /** Girdi, `Field`in urettigi erisilebilirlik baglariyla cizilir. */\n const renderControl = (props: FieldChildProps) =>\n inputMode === 'multiline' ? (\n <Textarea\n {...props}\n value={value}\n onChange={event => setValue(event.target.value)}\n placeholder={placeholder}\n maxLength={maxLength}\n rows={rows}\n />\n ) : (\n <Input\n {...props}\n type={inputMode === 'number' ? 'number' : 'text'}\n value={value}\n onChange={event => setValue(event.target.value)}\n placeholder={placeholder}\n maxLength={maxLength}\n />\n );\n\n const handleSubmit = async () => {\n if (isSubmitDisabled || isBusy) return;\n\n setIsBusy(true);\n try {\n await onSubmit(trimmed);\n // Yalnizca basarida: hata durumunda pencere acik, metin yerinde kalir.\n onClose();\n } catch {\n // Bildirim cagiranin isi; burada yalnizca pencere acik tutulur.\n } finally {\n setIsBusy(false);\n }\n };\n\n return (\n <Modal\n isOpen={isOpen}\n onClose={onClose}\n title={title}\n closeLabel={closeLabel ?? labels?.close}\n description={description}\n size=\"sm\"\n // Istek surerken kapanmaz: kapanis \"islem iptal oldu\" gibi gorunuyordu.\n isDismissable={!isBusy}\n footer={\n <>\n <Button\n variant={UIVariant.SECONDARY}\n size={UISize.MEDIUM}\n onClick={onClose}\n disabled={isBusy}\n >\n {resolveLabel('PromptDialog.cancelLabel', cancelLabel, labels?.cancel)}\n </Button>\n <Button\n type=\"submit\"\n form={formId}\n variant={UIVariant.PRIMARY}\n size={UISize.MEDIUM}\n disabled={isSubmitDisabled}\n isLoading={isBusy}\n >\n {resolveLabel('PromptDialog.submitLabel', submitLabel, labels?.submit)}\n </Button>\n </>\n }\n >\n <form\n id={formId}\n className={styles.form}\n onSubmit={event => {\n event.preventDefault();\n handleSubmit();\n }}\n >\n <Field label={label} hint={hint} isRequired={isRequired} requiredLabel={requiredLabel}>\n {renderControl}\n </Field>\n </form>\n </Modal>\n );\n};\n\nexport default /*#__PURE__*/ memo(PromptDialog) as typeof PromptDialog;\n"],"names":["PromptDialog","isOpen","onClose","onSubmit","title","label","submitLabel","cancelLabel","closeLabel","description","hint","placeholder","defaultValue","isRequired","requiredLabel","inputMode","maxLength","rows","labels","useUi","formId","useId","value","setValue","useState","isBusy","setIsBusy","wasOpenRef","useRef","useEffect","trimmed","isSubmitDisabled","renderControl","props","jsx","Textarea","event","Input","handleSubmit","Modal","jsxs","Fragment","Button","UIVariant","UISize","resolveLabel","styles","Field","index"],"mappings":"kiBAiDMA,EAA0B,CAAC,CAC/B,OAAAC,EACA,QAAAC,EACA,SAAAC,EACA,MAAAC,EACA,MAAAC,EACA,YAAAC,EACA,YAAAC,EACA,WAAAC,EACA,YAAAC,EACA,KAAAC,EACA,YAAAC,EACA,aAAAC,EAAe,GACf,WAAAC,EACA,cAAAC,EACA,UAAAC,EAAY,OACZ,UAAAC,EACA,KAAAC,EAAO,CACT,IAAM,CACJ,KAAM,CAAE,OAAAC,CAAA,EAAWC,QAAA,EACbC,EAASC,EAAAA,MAAA,EACT,CAACC,EAAOC,CAAQ,EAAIC,EAAAA,SAASZ,CAAY,EACzC,CAACa,EAAQC,CAAS,EAAIF,EAAAA,SAAS,EAAK,EAMpCG,EAAaC,EAAAA,OAAO,EAAK,EAC/BC,EAAAA,UAAU,IAAM,CACV5B,GAAU,CAAC0B,EAAW,WAAkBf,CAAY,EACxDe,EAAW,QAAU1B,CACvB,EAAG,CAACA,EAAQW,CAAY,CAAC,EAEzB,MAAMkB,EAAUR,EAAM,KAAA,EAChBS,EAAmB,EAAQlB,GAAeiB,IAAY,GAGtDE,EAAiBC,GACrBlB,IAAc,YACZmB,EAAAA,IAACC,EAAAA,QAAA,CACE,GAAGF,EACJ,MAAAX,EACA,SAAUc,GAASb,EAASa,EAAM,OAAO,KAAK,EAC9C,YAAAzB,EACA,UAAAK,EACA,KAAAC,CAAA,CAAA,EAGFiB,EAAAA,IAACG,EAAAA,QAAA,CACE,GAAGJ,EACJ,KAAMlB,IAAc,SAAW,SAAW,OAC1C,MAAAO,EACA,SAAUc,GAASb,EAASa,EAAM,OAAO,KAAK,EAC9C,YAAAzB,EACA,UAAAK,CAAA,CAAA,EAIAsB,EAAe,SAAY,CAC/B,GAAI,EAAAP,GAAoBN,GAExB,CAAAC,EAAU,EAAI,EACd,GAAI,CACF,MAAMvB,EAAS2B,CAAO,EAEtB5B,EAAA,CACF,MAAQ,CAER,QAAA,CACEwB,EAAU,EAAK,CACjB,EACF,EAEA,OACEQ,EAAAA,IAACK,EAAAA,QAAA,CACC,OAAAtC,EACA,QAAAC,EACA,MAAAE,EACA,WAAYI,IAAcU,GAAA,YAAAA,EAAQ,OAClC,YAAAT,EACA,KAAK,KAEL,cAAe,CAACgB,EAChB,OACEe,EAAAA,KAAAC,WAAA,CACE,SAAA,CAAAP,EAAAA,IAACQ,EAAAA,QAAA,CACC,QAASC,EAAAA,QAAU,UACnB,KAAMC,EAAAA,QAAO,OACb,QAAS1C,EACT,SAAUuB,EAET,SAAAoB,EAAAA,aAAa,2BAA4BtC,EAAaW,GAAA,YAAAA,EAAQ,MAAM,CAAA,CAAA,EAEvEgB,EAAAA,IAACQ,EAAAA,QAAA,CACC,KAAK,SACL,KAAMtB,EACN,QAASuB,EAAAA,QAAU,QACnB,KAAMC,EAAAA,QAAO,OACb,SAAUb,EACV,UAAWN,EAEV,SAAAoB,EAAAA,aAAa,2BAA4BvC,EAAaY,GAAA,YAAAA,EAAQ,MAAM,CAAA,CAAA,CACvE,EACF,EAGF,SAAAgB,EAAAA,IAAC,OAAA,CACC,GAAId,EACJ,UAAW0B,EAAAA,QAAO,KAClB,SAAUV,GAAS,CACjBA,EAAM,eAAA,EACNE,EAAA,CACF,EAEA,eAACS,EAAAA,QAAA,CAAM,MAAA1C,EAAc,KAAAK,EAAY,WAAAG,EAAwB,cAAAC,EACtD,SAAAkB,CAAA,CACH,CAAA,CAAA,CACF,CAAA,CAGN,EAEAgB,SAAkChD,CAAY"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
type BaseProps = {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
/** Vazgeçme ve perde/Escape kapanışı. */
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
/** Girilen değerle çalışır (değer kırpılmış gönderilir). */
|
|
7
|
+
onSubmit: (value: string) => void | Promise<void>;
|
|
8
|
+
title: string;
|
|
9
|
+
/** Girdi alanının etiketi. */
|
|
10
|
+
label: string;
|
|
11
|
+
/** Verilmezse `labels.submit`. */
|
|
12
|
+
submitLabel?: string;
|
|
13
|
+
/** Verilmezse `labels.cancel`. */
|
|
14
|
+
cancelLabel?: string;
|
|
15
|
+
/** Kapatma düğmesinin erişilebilir adı. */
|
|
16
|
+
closeLabel?: string;
|
|
17
|
+
/** Başlığın altındaki bir cümlelik bağlam. */
|
|
18
|
+
description?: ReactNode;
|
|
19
|
+
hint?: string;
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
defaultValue?: string;
|
|
22
|
+
/** `text` tek satır, `multiline` gerekçe gibi uzun metin, `number` adet/fark gibi sayılar. */
|
|
23
|
+
inputMode?: 'text' | 'multiline' | 'number';
|
|
24
|
+
maxLength?: number;
|
|
25
|
+
rows?: number;
|
|
26
|
+
};
|
|
27
|
+
type Props = BaseProps & {
|
|
28
|
+
/** Boş (yalnızca boşluk dahil) değer gönderilemez. */
|
|
29
|
+
isRequired?: boolean;
|
|
30
|
+
/** Zorunluluk yıldızının ekran okuyucu karşılığı ("(zorunlu)"). */
|
|
31
|
+
requiredLabel?: string;
|
|
32
|
+
};
|
|
33
|
+
/** Metin isteyen pencere — `window.prompt()` yerine. */
|
|
34
|
+
declare const PromptDialog: FC<Props>;
|
|
35
|
+
declare const _default: typeof PromptDialog;
|
|
36
|
+
export default _default;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
type BaseProps = {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
/** Vazgeçme ve perde/Escape kapanışı. */
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
/** Girilen değerle çalışır (değer kırpılmış gönderilir). */
|
|
7
|
+
onSubmit: (value: string) => void | Promise<void>;
|
|
8
|
+
title: string;
|
|
9
|
+
/** Girdi alanının etiketi. */
|
|
10
|
+
label: string;
|
|
11
|
+
/** Verilmezse `labels.submit`. */
|
|
12
|
+
submitLabel?: string;
|
|
13
|
+
/** Verilmezse `labels.cancel`. */
|
|
14
|
+
cancelLabel?: string;
|
|
15
|
+
/** Kapatma düğmesinin erişilebilir adı. */
|
|
16
|
+
closeLabel?: string;
|
|
17
|
+
/** Başlığın altındaki bir cümlelik bağlam. */
|
|
18
|
+
description?: ReactNode;
|
|
19
|
+
hint?: string;
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
defaultValue?: string;
|
|
22
|
+
/** `text` tek satır, `multiline` gerekçe gibi uzun metin, `number` adet/fark gibi sayılar. */
|
|
23
|
+
inputMode?: 'text' | 'multiline' | 'number';
|
|
24
|
+
maxLength?: number;
|
|
25
|
+
rows?: number;
|
|
26
|
+
};
|
|
27
|
+
type Props = BaseProps & {
|
|
28
|
+
/** Boş (yalnızca boşluk dahil) değer gönderilemez. */
|
|
29
|
+
isRequired?: boolean;
|
|
30
|
+
/** Zorunluluk yıldızının ekran okuyucu karşılığı ("(zorunlu)"). */
|
|
31
|
+
requiredLabel?: string;
|
|
32
|
+
};
|
|
33
|
+
/** Metin isteyen pencere — `window.prompt()` yerine. */
|
|
34
|
+
declare const PromptDialog: FC<Props>;
|
|
35
|
+
declare const _default: typeof PromptDialog;
|
|
36
|
+
export default _default;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as r, jsxs as F, Fragment as N } from "react/jsx-runtime";
|
|
3
|
+
import { memo as Y, useId as k, useState as h, useRef as T, useEffect as G } from "react";
|
|
4
|
+
import { resolveLabel as y } from "../../helpers/label.helper.js";
|
|
5
|
+
import { useUi as H } from "../../theme/context.js";
|
|
6
|
+
import v from "../../enums/ui-size.enum.js";
|
|
7
|
+
import x from "../../enums/ui-variant.enum.js";
|
|
8
|
+
import S from "../Button/index.js";
|
|
9
|
+
import J from "../Field/index.js";
|
|
10
|
+
import K from "../Input/index.js";
|
|
11
|
+
import Q from "../Modal/index.js";
|
|
12
|
+
import V from "../Textarea/index.js";
|
|
13
|
+
const W = {"form":"ui-form-zpZn4"};
|
|
14
|
+
const X = ({
|
|
15
|
+
isOpen: e,
|
|
16
|
+
onClose: m,
|
|
17
|
+
onSubmit: M,
|
|
18
|
+
title: U,
|
|
19
|
+
label: z,
|
|
20
|
+
submitLabel: B,
|
|
21
|
+
cancelLabel: E,
|
|
22
|
+
closeLabel: L,
|
|
23
|
+
description: P,
|
|
24
|
+
hint: R,
|
|
25
|
+
placeholder: f,
|
|
26
|
+
defaultValue: s = "",
|
|
27
|
+
isRequired: l,
|
|
28
|
+
requiredLabel: C,
|
|
29
|
+
inputMode: u = "text",
|
|
30
|
+
maxLength: d,
|
|
31
|
+
rows: j = 4
|
|
32
|
+
}) => {
|
|
33
|
+
const { labels: t } = H(), p = k(), [n, a] = h(s), [o, b] = h(!1), D = T(!1);
|
|
34
|
+
G(() => {
|
|
35
|
+
e && !D.current && a(s), D.current = e;
|
|
36
|
+
}, [e, s]);
|
|
37
|
+
const I = n.trim(), g = !!l && I === "", w = (i) => u === "multiline" ? /* @__PURE__ */ r(
|
|
38
|
+
V,
|
|
39
|
+
{
|
|
40
|
+
...i,
|
|
41
|
+
value: n,
|
|
42
|
+
onChange: (c) => a(c.target.value),
|
|
43
|
+
placeholder: f,
|
|
44
|
+
maxLength: d,
|
|
45
|
+
rows: j
|
|
46
|
+
}
|
|
47
|
+
) : /* @__PURE__ */ r(
|
|
48
|
+
K,
|
|
49
|
+
{
|
|
50
|
+
...i,
|
|
51
|
+
type: u === "number" ? "number" : "text",
|
|
52
|
+
value: n,
|
|
53
|
+
onChange: (c) => a(c.target.value),
|
|
54
|
+
placeholder: f,
|
|
55
|
+
maxLength: d
|
|
56
|
+
}
|
|
57
|
+
), A = async () => {
|
|
58
|
+
if (!(g || o)) {
|
|
59
|
+
b(!0);
|
|
60
|
+
try {
|
|
61
|
+
await M(I), m();
|
|
62
|
+
} catch {
|
|
63
|
+
} finally {
|
|
64
|
+
b(!1);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
return /* @__PURE__ */ r(
|
|
69
|
+
Q,
|
|
70
|
+
{
|
|
71
|
+
isOpen: e,
|
|
72
|
+
onClose: m,
|
|
73
|
+
title: U,
|
|
74
|
+
closeLabel: L ?? (t == null ? void 0 : t.close),
|
|
75
|
+
description: P,
|
|
76
|
+
size: "sm",
|
|
77
|
+
isDismissable: !o,
|
|
78
|
+
footer: /* @__PURE__ */ F(N, { children: [
|
|
79
|
+
/* @__PURE__ */ r(
|
|
80
|
+
S,
|
|
81
|
+
{
|
|
82
|
+
variant: x.SECONDARY,
|
|
83
|
+
size: v.MEDIUM,
|
|
84
|
+
onClick: m,
|
|
85
|
+
disabled: o,
|
|
86
|
+
children: y("PromptDialog.cancelLabel", E, t == null ? void 0 : t.cancel)
|
|
87
|
+
}
|
|
88
|
+
),
|
|
89
|
+
/* @__PURE__ */ r(
|
|
90
|
+
S,
|
|
91
|
+
{
|
|
92
|
+
type: "submit",
|
|
93
|
+
form: p,
|
|
94
|
+
variant: x.PRIMARY,
|
|
95
|
+
size: v.MEDIUM,
|
|
96
|
+
disabled: g,
|
|
97
|
+
isLoading: o,
|
|
98
|
+
children: y("PromptDialog.submitLabel", B, t == null ? void 0 : t.submit)
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
] }),
|
|
102
|
+
children: /* @__PURE__ */ r(
|
|
103
|
+
"form",
|
|
104
|
+
{
|
|
105
|
+
id: p,
|
|
106
|
+
className: W.form,
|
|
107
|
+
onSubmit: (i) => {
|
|
108
|
+
i.preventDefault(), A();
|
|
109
|
+
},
|
|
110
|
+
children: /* @__PURE__ */ r(J, { label: z, hint: R, isRequired: l, requiredLabel: C, children: w })
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
}, nt = /* @__PURE__ */ Y(X);
|
|
116
|
+
export {
|
|
117
|
+
nt as default
|
|
118
|
+
};
|
|
119
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/PromptDialog/index.tsx"],"sourcesContent":["'use client';\n\nimport { type FC, memo, type ReactNode, useEffect, useId, useRef, useState } from 'react';\n\nimport { resolveLabel } from '../../helpers/label.helper';\nimport { useUi } from '../../theme/context';\nimport UISize from '../../enums/ui-size.enum';\nimport UIVariant from '../../enums/ui-variant.enum';\nimport Button from '../Button';\nimport Field, { type FieldChildProps } from '../Field';\nimport Input from '../Input';\nimport Modal from '../Modal';\nimport Textarea from '../Textarea';\n\nimport styles from './index.module.scss';\n\ntype BaseProps = {\n isOpen: boolean;\n /** Vazgeçme ve perde/Escape kapanışı. */\n onClose: () => void;\n /** Girilen değerle çalışır (değer kırpılmış gönderilir). */\n onSubmit: (value: string) => void | Promise<void>;\n title: string;\n /** Girdi alanının etiketi. */\n label: string;\n /** Verilmezse `labels.submit`. */\n submitLabel?: string;\n /** Verilmezse `labels.cancel`. */\n cancelLabel?: string;\n /** Kapatma düğmesinin erişilebilir adı. */\n closeLabel?: string;\n /** Başlığın altındaki bir cümlelik bağlam. */\n description?: ReactNode;\n hint?: string;\n placeholder?: string;\n defaultValue?: string;\n /** `text` tek satır, `multiline` gerekçe gibi uzun metin, `number` adet/fark gibi sayılar. */\n inputMode?: 'text' | 'multiline' | 'number';\n maxLength?: number;\n rows?: number;\n};\n\ntype Props = BaseProps & {\n /** Boş (yalnızca boşluk dahil) değer gönderilemez. */\n isRequired?: boolean;\n /** Zorunluluk yıldızının ekran okuyucu karşılığı (\"(zorunlu)\"). */\n requiredLabel?: string;\n};\n\n/** Metin isteyen pencere — `window.prompt()` yerine. */\nconst PromptDialog: FC<Props> = ({\n isOpen,\n onClose,\n onSubmit,\n title,\n label,\n submitLabel,\n cancelLabel,\n closeLabel,\n description,\n hint,\n placeholder,\n defaultValue = '',\n isRequired,\n requiredLabel,\n inputMode = 'text',\n maxLength,\n rows = 4,\n}) => {\n const { labels } = useUi();\n const formId = useId();\n const [value, setValue] = useState(defaultValue);\n const [isBusy, setIsBusy] = useState(false);\n\n /*\n * Deger yalnizca ACILIS kenarinda tazelenir. `isOpen`'a bagli duz bir etki, pencere acikken gelen\n * her ust render'da yazilani ezebilirdi\n */\n const wasOpenRef = useRef(false);\n useEffect(() => {\n if (isOpen && !wasOpenRef.current) setValue(defaultValue);\n wasOpenRef.current = isOpen;\n }, [isOpen, defaultValue]);\n\n const trimmed = value.trim();\n const isSubmitDisabled = Boolean(isRequired) && trimmed === '';\n\n /** Girdi, `Field`in urettigi erisilebilirlik baglariyla cizilir. */\n const renderControl = (props: FieldChildProps) =>\n inputMode === 'multiline' ? (\n <Textarea\n {...props}\n value={value}\n onChange={event => setValue(event.target.value)}\n placeholder={placeholder}\n maxLength={maxLength}\n rows={rows}\n />\n ) : (\n <Input\n {...props}\n type={inputMode === 'number' ? 'number' : 'text'}\n value={value}\n onChange={event => setValue(event.target.value)}\n placeholder={placeholder}\n maxLength={maxLength}\n />\n );\n\n const handleSubmit = async () => {\n if (isSubmitDisabled || isBusy) return;\n\n setIsBusy(true);\n try {\n await onSubmit(trimmed);\n // Yalnizca basarida: hata durumunda pencere acik, metin yerinde kalir.\n onClose();\n } catch {\n // Bildirim cagiranin isi; burada yalnizca pencere acik tutulur.\n } finally {\n setIsBusy(false);\n }\n };\n\n return (\n <Modal\n isOpen={isOpen}\n onClose={onClose}\n title={title}\n closeLabel={closeLabel ?? labels?.close}\n description={description}\n size=\"sm\"\n // Istek surerken kapanmaz: kapanis \"islem iptal oldu\" gibi gorunuyordu.\n isDismissable={!isBusy}\n footer={\n <>\n <Button\n variant={UIVariant.SECONDARY}\n size={UISize.MEDIUM}\n onClick={onClose}\n disabled={isBusy}\n >\n {resolveLabel('PromptDialog.cancelLabel', cancelLabel, labels?.cancel)}\n </Button>\n <Button\n type=\"submit\"\n form={formId}\n variant={UIVariant.PRIMARY}\n size={UISize.MEDIUM}\n disabled={isSubmitDisabled}\n isLoading={isBusy}\n >\n {resolveLabel('PromptDialog.submitLabel', submitLabel, labels?.submit)}\n </Button>\n </>\n }\n >\n <form\n id={formId}\n className={styles.form}\n onSubmit={event => {\n event.preventDefault();\n handleSubmit();\n }}\n >\n <Field label={label} hint={hint} isRequired={isRequired} requiredLabel={requiredLabel}>\n {renderControl}\n </Field>\n </form>\n </Modal>\n );\n};\n\nexport default /*#__PURE__*/ memo(PromptDialog) as typeof PromptDialog;\n"],"names":["PromptDialog","isOpen","onClose","onSubmit","title","label","submitLabel","cancelLabel","closeLabel","description","hint","placeholder","defaultValue","isRequired","requiredLabel","inputMode","maxLength","rows","labels","useUi","formId","useId","value","setValue","useState","isBusy","setIsBusy","wasOpenRef","useRef","useEffect","trimmed","isSubmitDisabled","renderControl","props","jsx","Textarea","event","Input","handleSubmit","Modal","jsxs","Fragment","Button","UIVariant","UISize","resolveLabel","styles","Field","index"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer ui{.ui-form-zpZn4{display:flex;flex-direction:column;gap:var(--hd-space-4)}}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("react/jsx-runtime"),t=require("react"),e=require("../../constants/scale.constants.cjs"),o=require("../../helpers/component.helper.cjs"),a=require("../ScaledInput/index.cjs"),c=t.forwardRef(({unitDigits:n,unit:i,...r},s)=>u.jsx(a.default,{ref:s,...r,scaleDigits:e.QTY4_DIGITS,maxFractionDigits:Math.min(n,e.QTY4_DIGITS),suffix:i})),l=t.memo(o.named(c,"QuantityInput"));exports.default=l;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/QuantityInput/index.tsx"],"sourcesContent":["import { forwardRef, memo, type ReactNode } from 'react';\n\nimport { QTY4_DIGITS } from '../../constants/scale.constants';\nimport { named } from '../../helpers/component.helper';\nimport ScaledInput, { type ScaledInputProps } from '../ScaledInput';\n\ntype Props = Omit<\n ScaledInputProps,\n 'scaleDigits' | 'maxFractionDigits' | 'minFractionDigits' | 'suffix'\n> & {\n /**\n * The decimal places the unit takes (a piece 0, a kilogram 3; at most 4). The stored scale stays\n * 4 whatever the unit: \"2,5\" kg is `25000`.\n */\n unitDigits: number;\n /** The unit after the number (\"kg\", \"adet\"). */\n unit?: ReactNode;\n};\n\n/**\n * Quantity field (2.4): takes and gives a `Qty4`, ten-thousandths of the base unit — \"2,5\" is\n * `25000`, \"3\" pieces `30000`. Not `QuantityStepper`, which counts whole pieces with two buttons.\n */\nconst QuantityInput = /*#__PURE__*/ forwardRef<HTMLInputElement, Props>(\n ({ unitDigits, unit, ...rest }, ref) => (\n <ScaledInput\n ref={ref}\n {...rest}\n scaleDigits={QTY4_DIGITS}\n maxFractionDigits={Math.min(unitDigits, QTY4_DIGITS)}\n suffix={unit}\n />\n ),\n);\n\nexport default /*#__PURE__*/ memo(\n /*#__PURE__*/ named(QuantityInput, 'QuantityInput'),\n) as typeof QuantityInput;\n"],"names":["QuantityInput","forwardRef","unitDigits","unit","rest","ref","jsx","ScaledInput","QTY4_DIGITS","index","memo","named"],"mappings":"2SAuBMA,EAA8BC,EAAAA,WAClC,CAAC,CAAE,WAAAC,EAAY,KAAAC,EAAM,GAAGC,CAAA,EAAQC,IAC9BC,EAAAA,IAACC,EAAAA,QAAA,CACC,IAAAF,EACC,GAAGD,EACJ,YAAaI,EAAAA,YACb,kBAAmB,KAAK,IAAIN,EAAYM,EAAAA,WAAW,EACnD,OAAQL,CAAA,CAAA,CAGd,EAEAM,EAA6BC,EAAAA,KACbC,EAAAA,MAAMX,EAAe,eAAe,CACpD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ScaledInputProps } from '../ScaledInput/index.cjs';
|
|
3
|
+
/**
|
|
4
|
+
* Quantity field (2.4): takes and gives a `Qty4`, ten-thousandths of the base unit — "2,5" is
|
|
5
|
+
* `25000`, "3" pieces `30000`. Not `QuantityStepper`, which counts whole pieces with two buttons.
|
|
6
|
+
*/
|
|
7
|
+
declare const QuantityInput: import('react').ForwardRefExoticComponent<Omit<ScaledInputProps, "suffix" | "scaleDigits" | "minFractionDigits" | "maxFractionDigits"> & {
|
|
8
|
+
/**
|
|
9
|
+
* The decimal places the unit takes (a piece 0, a kilogram 3; at most 4). The stored scale stays
|
|
10
|
+
* 4 whatever the unit: "2,5" kg is `25000`.
|
|
11
|
+
*/
|
|
12
|
+
unitDigits: number;
|
|
13
|
+
/** The unit after the number ("kg", "adet"). */
|
|
14
|
+
unit?: ReactNode;
|
|
15
|
+
} & import('react').RefAttributes<HTMLInputElement>>;
|
|
16
|
+
declare const _default: typeof QuantityInput;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ScaledInputProps } from '../ScaledInput/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Quantity field (2.4): takes and gives a `Qty4`, ten-thousandths of the base unit — "2,5" is
|
|
5
|
+
* `25000`, "3" pieces `30000`. Not `QuantityStepper`, which counts whole pieces with two buttons.
|
|
6
|
+
*/
|
|
7
|
+
declare const QuantityInput: import('react').ForwardRefExoticComponent<Omit<ScaledInputProps, "suffix" | "scaleDigits" | "minFractionDigits" | "maxFractionDigits"> & {
|
|
8
|
+
/**
|
|
9
|
+
* The decimal places the unit takes (a piece 0, a kilogram 3; at most 4). The stored scale stays
|
|
10
|
+
* 4 whatever the unit: "2,5" kg is `25000`.
|
|
11
|
+
*/
|
|
12
|
+
unitDigits: number;
|
|
13
|
+
/** The unit after the number ("kg", "adet"). */
|
|
14
|
+
unit?: ReactNode;
|
|
15
|
+
} & import('react').RefAttributes<HTMLInputElement>>;
|
|
16
|
+
declare const _default: typeof QuantityInput;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { memo as n, forwardRef as f } from "react";
|
|
3
|
+
import { QTY4_DIGITS as t } from "../../constants/scale.constants.js";
|
|
4
|
+
import { named as p } from "../../helpers/component.helper.js";
|
|
5
|
+
import e from "../ScaledInput/index.js";
|
|
6
|
+
const s = /* @__PURE__ */ f(
|
|
7
|
+
({ unitDigits: o, unit: i, ...m }, r) => /* @__PURE__ */ a(
|
|
8
|
+
e,
|
|
9
|
+
{
|
|
10
|
+
ref: r,
|
|
11
|
+
...m,
|
|
12
|
+
scaleDigits: t,
|
|
13
|
+
maxFractionDigits: Math.min(o, t),
|
|
14
|
+
suffix: i
|
|
15
|
+
}
|
|
16
|
+
)
|
|
17
|
+
), l = /* @__PURE__ */ n(
|
|
18
|
+
/* @__PURE__ */ p(s, "QuantityInput")
|
|
19
|
+
);
|
|
20
|
+
export {
|
|
21
|
+
l as default
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/QuantityInput/index.tsx"],"sourcesContent":["import { forwardRef, memo, type ReactNode } from 'react';\n\nimport { QTY4_DIGITS } from '../../constants/scale.constants';\nimport { named } from '../../helpers/component.helper';\nimport ScaledInput, { type ScaledInputProps } from '../ScaledInput';\n\ntype Props = Omit<\n ScaledInputProps,\n 'scaleDigits' | 'maxFractionDigits' | 'minFractionDigits' | 'suffix'\n> & {\n /**\n * The decimal places the unit takes (a piece 0, a kilogram 3; at most 4). The stored scale stays\n * 4 whatever the unit: \"2,5\" kg is `25000`.\n */\n unitDigits: number;\n /** The unit after the number (\"kg\", \"adet\"). */\n unit?: ReactNode;\n};\n\n/**\n * Quantity field (2.4): takes and gives a `Qty4`, ten-thousandths of the base unit — \"2,5\" is\n * `25000`, \"3\" pieces `30000`. Not `QuantityStepper`, which counts whole pieces with two buttons.\n */\nconst QuantityInput = /*#__PURE__*/ forwardRef<HTMLInputElement, Props>(\n ({ unitDigits, unit, ...rest }, ref) => (\n <ScaledInput\n ref={ref}\n {...rest}\n scaleDigits={QTY4_DIGITS}\n maxFractionDigits={Math.min(unitDigits, QTY4_DIGITS)}\n suffix={unit}\n />\n ),\n);\n\nexport default /*#__PURE__*/ memo(\n /*#__PURE__*/ named(QuantityInput, 'QuantityInput'),\n) as typeof QuantityInput;\n"],"names":["QuantityInput","forwardRef","unitDigits","unit","rest","ref","jsx","ScaledInput","QTY4_DIGITS","index","memo","named"],"mappings":";;;;;AAuBA,MAAMA,IAA8B,gBAAAC;AAAA,EAClC,CAAC,EAAE,YAAAC,GAAY,MAAAC,GAAM,GAAGC,EAAA,GAAQC,MAC9B,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAF;AAAA,MACC,GAAGD;AAAA,MACJ,aAAaI;AAAA,MACb,mBAAmB,KAAK,IAAIN,GAAYM,CAAW;AAAA,MACnD,QAAQL;AAAA,IAAA;AAAA,EAAA;AAGd,GAEAM,IAA6B,gBAAAC;AAAA,EACb,gBAAAC,EAAMX,GAAe,eAAe;AACpD;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("react/jsx-runtime"),x=require("react"),k=require("react-bootstrap-icons"),U=require("../../helpers/class-name.helper.cjs"),b=require("../../helpers/label.helper.cjs"),A=require("../../theme/context.cjs"),c={default:{"stepper":"ui-stepper-8s5Ih","stepper__input":"ui-stepper__input-OQh5v","stepper__button":"ui-stepper__button-h6g7d","stepper--sm":"ui-stepper--sm-RvrBP","stepper--md":"ui-stepper--md-Cnjei"}},B=({value:r,onChange:a,label:D,decreaseLabel:h,increaseLabel:j,min:l=1,max:n=99,isDisabled:p,isReadOnly:i,size:L="md",id:S,required:M,"aria-describedby":w,"aria-invalid":N,className:P,testId:Q})=>{var m,g,q;const{labels:t}=A.useUi(),f=b.resolveLabel("QuantityStepper.label",D,(m=t==null?void 0:t.quantity)==null?void 0:m.label),[v,o]=x.useState(null),d=e=>Math.min(Math.max(e,l),n),y=e=>{if(o(null),i)return;const s=e.replace(/\D/g,"");s!==""&&a(d(Number(s)))};return u.jsxs("div",{className:U.cx(c.default.stepper,c.default[`stepper--${L}`],P),role:"group","aria-label":f,"data-testid":Q,children:[u.jsx("button",{type:"button",className:c.default.stepper__button,onClick:()=>a(Math.max(r-1,l)),disabled:p||i||r<=l,"aria-label":b.resolveLabel("QuantityStepper.decreaseLabel",h,(g=t==null?void 0:t.quantity)==null?void 0:g.decrease),children:u.jsx(k.DashLg,{"aria-hidden":!0})}),u.jsx("input",{id:S,className:c.default.stepper__input,value:v??String(r),onChange:e=>o(e.target.value.replace(/\D/g,"").slice(0,2)),onBlur:e=>y(e.target.value),onKeyDown:e=>{if(i)return;const s=e.key==="ArrowUp"?1:e.key==="ArrowDown"?-1:0;if(s!==0){e.preventDefault(),o(null),a(d(r+s));return}const _=e.key==="PageUp"?10:e.key==="PageDown"?-10:0;if(_!==0){e.preventDefault(),o(null),a(d(r+_));return}if(e.key==="Home"||e.key==="End"){e.preventDefault(),o(null),a(e.key==="Home"?l:n);return}e.key==="Enter"&&(e.preventDefault(),y(e.target.value))},inputMode:"numeric",disabled:p,readOnly:i,"aria-readonly":i||void 0,"aria-required":M||void 0,"aria-invalid":N||void 0,"aria-describedby":w,role:"spinbutton","aria-valuenow":r,"aria-valuemin":l,"aria-valuemax":n,"aria-label":f}),u.jsx("button",{type:"button",className:c.default.stepper__button,onClick:()=>a(Math.min(r+1,n)),disabled:p||i||r>=n,"aria-label":b.resolveLabel("QuantityStepper.increaseLabel",j,(q=t==null?void 0:t.quantity)==null?void 0:q.increase),children:u.jsx(k.PlusLg,{"aria-hidden":!0})})]})},E=x.memo(B);exports.default=E;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/QuantityStepper/index.tsx"],"sourcesContent":["'use client';\n\nimport { type FC, memo, useState } from 'react';\n\nimport { DashLg, PlusLg } from 'react-bootstrap-icons';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { resolveLabel } from '../../helpers/label.helper';\nimport { useUi } from '../../theme/context';\n\nimport styles from './index.module.scss';\n\ntype Props = {\n value: number;\n onChange: (value: number) => void;\n /** Grubun ve girdinin erişilebilir adı. */\n label?: string;\n /** Verilmezse `labels.quantity.decrease`. */\n decreaseLabel?: string;\n /** Verilmezse `labels.quantity.increase`. */\n increaseLabel?: string;\n min?: number;\n max?: number;\n isDisabled?: boolean;\n /**\n * Read-only (2.2): the number stays focusable and readable (`aria-readonly`); typing, the arrow\n * keys and the two buttons do not change it.\n */\n isReadOnly?: boolean;\n size?: 'sm' | 'md';\n /**\n * The id of the number box (2.2) — the `id` of `Field`'s `FieldChildProps`, so the field's label\n * and a form's focus reach the box.\n */\n id?: string;\n /** Zorunluluk — `Field`in `FieldChildProps` sözleşmesi (2.2); `aria-required` on the box. */\n required?: boolean;\n /** On the number box (2.2), with the error and hint ids of `Field`. */\n 'aria-describedby'?: string;\n /** On the number box (2.2): `spinbutton` takes `aria-invalid`. */\n 'aria-invalid'?: boolean;\n className?: string;\n testId?: string;\n};\n\n/** Adet seçici. */\nconst QuantityStepper: FC<Props> = ({\n value,\n onChange,\n label,\n decreaseLabel,\n increaseLabel,\n min = 1,\n max = 99,\n isDisabled,\n isReadOnly,\n size = 'md',\n id,\n required,\n 'aria-describedby': describedBy,\n 'aria-invalid': isInvalid,\n className,\n testId,\n}) => {\n const { labels } = useUi();\n const groupLabel = resolveLabel('QuantityStepper.label', label, labels?.quantity?.label);\n const [draft, setDraft] = useState<string | null>(null);\n\n const clamp = (next: number) => Math.min(Math.max(next, min), max);\n\n const commit = (raw: string) => {\n setDraft(null);\n if (isReadOnly) return;\n\n /*\n * Onceki bicim `if (!parsed) return;` diyordu ve `0` falsy: `min={0}` ile kurulmus bir alanda\n * (stok duzeltme formu) kullanici `0` yazip alandan…\n * ⚠ BOSLUK KONTROLU HAM DIZEDEN yapilir, sayidan DEGIL.\n */\n const digits = raw.replace(/\\D/g, '');\n if (digits === '') return;\n\n onChange(clamp(Number(digits)));\n };\n\n return (\n <div\n className={cx(styles.stepper, styles[`stepper--${size}`], className)}\n role=\"group\"\n aria-label={groupLabel}\n data-testid={testId}\n >\n <button\n type=\"button\"\n className={styles.stepper__button}\n onClick={() => onChange(Math.max(value - 1, min))}\n disabled={isDisabled || isReadOnly || value <= min}\n aria-label={resolveLabel(\n 'QuantityStepper.decreaseLabel',\n decreaseLabel,\n labels?.quantity?.decrease,\n )}\n >\n <DashLg aria-hidden />\n </button>\n\n <input\n id={id}\n className={styles.stepper__input}\n value={draft ?? String(value)}\n onChange={event => setDraft(event.target.value.replace(/\\D/g, '').slice(0, 2))}\n onBlur={event => commit(event.target.value)}\n /* ⚠ `spinbutton` ROLU BIR SOZ VERIR: */\n onKeyDown={event => {\n if (isReadOnly) return;\n\n const step = event.key === 'ArrowUp' ? 1 : event.key === 'ArrowDown' ? -1 : 0;\n\n if (step !== 0) {\n event.preventDefault();\n setDraft(null);\n onChange(clamp(value + step));\n return;\n }\n\n const page = event.key === 'PageUp' ? 10 : event.key === 'PageDown' ? -10 : 0;\n\n if (page !== 0) {\n event.preventDefault();\n setDraft(null);\n onChange(clamp(value + page));\n return;\n }\n\n if (event.key === 'Home' || event.key === 'End') {\n event.preventDefault();\n setDraft(null);\n onChange(event.key === 'Home' ? min : max);\n return;\n }\n\n if (event.key === 'Enter') {\n event.preventDefault();\n commit((event.target as HTMLInputElement).value);\n }\n }}\n inputMode=\"numeric\"\n disabled={isDisabled}\n readOnly={isReadOnly}\n aria-readonly={isReadOnly || undefined}\n aria-required={required || undefined}\n aria-invalid={isInvalid || undefined}\n aria-describedby={describedBy}\n /* ⚠ ARALIK ETIKETE GOMULMEZ, ROLE ILE BILDIRILIR. */\n role=\"spinbutton\"\n aria-valuenow={value}\n aria-valuemin={min}\n aria-valuemax={max}\n aria-label={groupLabel}\n />\n\n <button\n type=\"button\"\n className={styles.stepper__button}\n onClick={() => onChange(Math.min(value + 1, max))}\n disabled={isDisabled || isReadOnly || value >= max}\n aria-label={resolveLabel(\n 'QuantityStepper.increaseLabel',\n increaseLabel,\n labels?.quantity?.increase,\n )}\n >\n <PlusLg aria-hidden />\n </button>\n </div>\n );\n};\n\nexport default /*#__PURE__*/ memo(QuantityStepper) as typeof QuantityStepper;\n"],"names":["QuantityStepper","value","onChange","label","decreaseLabel","increaseLabel","min","max","isDisabled","isReadOnly","size","id","required","describedBy","isInvalid","className","testId","labels","useUi","groupLabel","resolveLabel","_a","draft","setDraft","useState","clamp","next","commit","raw","digits","jsxs","cx","styles","jsx","_b","DashLg","event","step","page","_c","PlusLg","index"],"mappings":"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"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
value: number;
|
|
4
|
+
onChange: (value: number) => void;
|
|
5
|
+
/** Grubun ve girdinin erişilebilir adı. */
|
|
6
|
+
label?: string;
|
|
7
|
+
/** Verilmezse `labels.quantity.decrease`. */
|
|
8
|
+
decreaseLabel?: string;
|
|
9
|
+
/** Verilmezse `labels.quantity.increase`. */
|
|
10
|
+
increaseLabel?: string;
|
|
11
|
+
min?: number;
|
|
12
|
+
max?: number;
|
|
13
|
+
isDisabled?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Read-only (2.2): the number stays focusable and readable (`aria-readonly`); typing, the arrow
|
|
16
|
+
* keys and the two buttons do not change it.
|
|
17
|
+
*/
|
|
18
|
+
isReadOnly?: boolean;
|
|
19
|
+
size?: 'sm' | 'md';
|
|
20
|
+
/**
|
|
21
|
+
* The id of the number box (2.2) — the `id` of `Field`'s `FieldChildProps`, so the field's label
|
|
22
|
+
* and a form's focus reach the box.
|
|
23
|
+
*/
|
|
24
|
+
id?: string;
|
|
25
|
+
/** Zorunluluk — `Field`in `FieldChildProps` sözleşmesi (2.2); `aria-required` on the box. */
|
|
26
|
+
required?: boolean;
|
|
27
|
+
/** On the number box (2.2), with the error and hint ids of `Field`. */
|
|
28
|
+
'aria-describedby'?: string;
|
|
29
|
+
/** On the number box (2.2): `spinbutton` takes `aria-invalid`. */
|
|
30
|
+
'aria-invalid'?: boolean;
|
|
31
|
+
className?: string;
|
|
32
|
+
testId?: string;
|
|
33
|
+
};
|
|
34
|
+
/** Adet seçici. */
|
|
35
|
+
declare const QuantityStepper: FC<Props>;
|
|
36
|
+
declare const _default: typeof QuantityStepper;
|
|
37
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
value: number;
|
|
4
|
+
onChange: (value: number) => void;
|
|
5
|
+
/** Grubun ve girdinin erişilebilir adı. */
|
|
6
|
+
label?: string;
|
|
7
|
+
/** Verilmezse `labels.quantity.decrease`. */
|
|
8
|
+
decreaseLabel?: string;
|
|
9
|
+
/** Verilmezse `labels.quantity.increase`. */
|
|
10
|
+
increaseLabel?: string;
|
|
11
|
+
min?: number;
|
|
12
|
+
max?: number;
|
|
13
|
+
isDisabled?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Read-only (2.2): the number stays focusable and readable (`aria-readonly`); typing, the arrow
|
|
16
|
+
* keys and the two buttons do not change it.
|
|
17
|
+
*/
|
|
18
|
+
isReadOnly?: boolean;
|
|
19
|
+
size?: 'sm' | 'md';
|
|
20
|
+
/**
|
|
21
|
+
* The id of the number box (2.2) — the `id` of `Field`'s `FieldChildProps`, so the field's label
|
|
22
|
+
* and a form's focus reach the box.
|
|
23
|
+
*/
|
|
24
|
+
id?: string;
|
|
25
|
+
/** Zorunluluk — `Field`in `FieldChildProps` sözleşmesi (2.2); `aria-required` on the box. */
|
|
26
|
+
required?: boolean;
|
|
27
|
+
/** On the number box (2.2), with the error and hint ids of `Field`. */
|
|
28
|
+
'aria-describedby'?: string;
|
|
29
|
+
/** On the number box (2.2): `spinbutton` takes `aria-invalid`. */
|
|
30
|
+
'aria-invalid'?: boolean;
|
|
31
|
+
className?: string;
|
|
32
|
+
testId?: string;
|
|
33
|
+
};
|
|
34
|
+
/** Adet seçici. */
|
|
35
|
+
declare const QuantityStepper: FC<Props>;
|
|
36
|
+
declare const _default: typeof QuantityStepper;
|
|
37
|
+
export default _default;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as U, jsx as l } from "react/jsx-runtime";
|
|
3
|
+
import { memo as j, useState as A } from "react";
|
|
4
|
+
import { DashLg as E, PlusLg as H } from "react-bootstrap-icons";
|
|
5
|
+
import { cx as B } from "../../helpers/class-name.helper.js";
|
|
6
|
+
import { resolveLabel as m } from "../../helpers/label.helper.js";
|
|
7
|
+
import { useUi as K } from "../../theme/context.js";
|
|
8
|
+
const s = {"stepper":"ui-stepper-8s5Ih","stepper__input":"ui-stepper__input-OQh5v","stepper__button":"ui-stepper__button-h6g7d","stepper--sm":"ui-stepper--sm-RvrBP","stepper--md":"ui-stepper--md-Cnjei"};
|
|
9
|
+
const $ = ({
|
|
10
|
+
value: e,
|
|
11
|
+
onChange: a,
|
|
12
|
+
label: h,
|
|
13
|
+
decreaseLabel: w,
|
|
14
|
+
increaseLabel: L,
|
|
15
|
+
min: o = 1,
|
|
16
|
+
max: u = 99,
|
|
17
|
+
isDisabled: c,
|
|
18
|
+
isReadOnly: i,
|
|
19
|
+
size: S = "md",
|
|
20
|
+
id: _,
|
|
21
|
+
required: M,
|
|
22
|
+
"aria-describedby": N,
|
|
23
|
+
"aria-invalid": q,
|
|
24
|
+
className: x,
|
|
25
|
+
testId: Q
|
|
26
|
+
}) => {
|
|
27
|
+
var y, g, k;
|
|
28
|
+
const { labels: t } = K(), f = m("QuantityStepper.label", h, (y = t == null ? void 0 : t.quantity) == null ? void 0 : y.label), [P, p] = A(null), d = (r) => Math.min(Math.max(r, o), u), b = (r) => {
|
|
29
|
+
if (p(null), i) return;
|
|
30
|
+
const n = r.replace(/\D/g, "");
|
|
31
|
+
n !== "" && a(d(Number(n)));
|
|
32
|
+
};
|
|
33
|
+
return /* @__PURE__ */ U(
|
|
34
|
+
"div",
|
|
35
|
+
{
|
|
36
|
+
className: B(s.stepper, s[`stepper--${S}`], x),
|
|
37
|
+
role: "group",
|
|
38
|
+
"aria-label": f,
|
|
39
|
+
"data-testid": Q,
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ l(
|
|
42
|
+
"button",
|
|
43
|
+
{
|
|
44
|
+
type: "button",
|
|
45
|
+
className: s.stepper__button,
|
|
46
|
+
onClick: () => a(Math.max(e - 1, o)),
|
|
47
|
+
disabled: c || i || e <= o,
|
|
48
|
+
"aria-label": m(
|
|
49
|
+
"QuantityStepper.decreaseLabel",
|
|
50
|
+
w,
|
|
51
|
+
(g = t == null ? void 0 : t.quantity) == null ? void 0 : g.decrease
|
|
52
|
+
),
|
|
53
|
+
children: /* @__PURE__ */ l(E, { "aria-hidden": !0 })
|
|
54
|
+
}
|
|
55
|
+
),
|
|
56
|
+
/* @__PURE__ */ l(
|
|
57
|
+
"input",
|
|
58
|
+
{
|
|
59
|
+
id: _,
|
|
60
|
+
className: s.stepper__input,
|
|
61
|
+
value: P ?? String(e),
|
|
62
|
+
onChange: (r) => p(r.target.value.replace(/\D/g, "").slice(0, 2)),
|
|
63
|
+
onBlur: (r) => b(r.target.value),
|
|
64
|
+
onKeyDown: (r) => {
|
|
65
|
+
if (i) return;
|
|
66
|
+
const n = r.key === "ArrowUp" ? 1 : r.key === "ArrowDown" ? -1 : 0;
|
|
67
|
+
if (n !== 0) {
|
|
68
|
+
r.preventDefault(), p(null), a(d(e + n));
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const D = r.key === "PageUp" ? 10 : r.key === "PageDown" ? -10 : 0;
|
|
72
|
+
if (D !== 0) {
|
|
73
|
+
r.preventDefault(), p(null), a(d(e + D));
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
if (r.key === "Home" || r.key === "End") {
|
|
77
|
+
r.preventDefault(), p(null), a(r.key === "Home" ? o : u);
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
r.key === "Enter" && (r.preventDefault(), b(r.target.value));
|
|
81
|
+
},
|
|
82
|
+
inputMode: "numeric",
|
|
83
|
+
disabled: c,
|
|
84
|
+
readOnly: i,
|
|
85
|
+
"aria-readonly": i || void 0,
|
|
86
|
+
"aria-required": M || void 0,
|
|
87
|
+
"aria-invalid": q || void 0,
|
|
88
|
+
"aria-describedby": N,
|
|
89
|
+
role: "spinbutton",
|
|
90
|
+
"aria-valuenow": e,
|
|
91
|
+
"aria-valuemin": o,
|
|
92
|
+
"aria-valuemax": u,
|
|
93
|
+
"aria-label": f
|
|
94
|
+
}
|
|
95
|
+
),
|
|
96
|
+
/* @__PURE__ */ l(
|
|
97
|
+
"button",
|
|
98
|
+
{
|
|
99
|
+
type: "button",
|
|
100
|
+
className: s.stepper__button,
|
|
101
|
+
onClick: () => a(Math.min(e + 1, u)),
|
|
102
|
+
disabled: c || i || e >= u,
|
|
103
|
+
"aria-label": m(
|
|
104
|
+
"QuantityStepper.increaseLabel",
|
|
105
|
+
L,
|
|
106
|
+
(k = t == null ? void 0 : t.quantity) == null ? void 0 : k.increase
|
|
107
|
+
),
|
|
108
|
+
children: /* @__PURE__ */ l(H, { "aria-hidden": !0 })
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
}, W = /* @__PURE__ */ j($);
|
|
115
|
+
export {
|
|
116
|
+
W as default
|
|
117
|
+
};
|
|
118
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/QuantityStepper/index.tsx"],"sourcesContent":["'use client';\n\nimport { type FC, memo, useState } from 'react';\n\nimport { DashLg, PlusLg } from 'react-bootstrap-icons';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { resolveLabel } from '../../helpers/label.helper';\nimport { useUi } from '../../theme/context';\n\nimport styles from './index.module.scss';\n\ntype Props = {\n value: number;\n onChange: (value: number) => void;\n /** Grubun ve girdinin erişilebilir adı. */\n label?: string;\n /** Verilmezse `labels.quantity.decrease`. */\n decreaseLabel?: string;\n /** Verilmezse `labels.quantity.increase`. */\n increaseLabel?: string;\n min?: number;\n max?: number;\n isDisabled?: boolean;\n /**\n * Read-only (2.2): the number stays focusable and readable (`aria-readonly`); typing, the arrow\n * keys and the two buttons do not change it.\n */\n isReadOnly?: boolean;\n size?: 'sm' | 'md';\n /**\n * The id of the number box (2.2) — the `id` of `Field`'s `FieldChildProps`, so the field's label\n * and a form's focus reach the box.\n */\n id?: string;\n /** Zorunluluk — `Field`in `FieldChildProps` sözleşmesi (2.2); `aria-required` on the box. */\n required?: boolean;\n /** On the number box (2.2), with the error and hint ids of `Field`. */\n 'aria-describedby'?: string;\n /** On the number box (2.2): `spinbutton` takes `aria-invalid`. */\n 'aria-invalid'?: boolean;\n className?: string;\n testId?: string;\n};\n\n/** Adet seçici. */\nconst QuantityStepper: FC<Props> = ({\n value,\n onChange,\n label,\n decreaseLabel,\n increaseLabel,\n min = 1,\n max = 99,\n isDisabled,\n isReadOnly,\n size = 'md',\n id,\n required,\n 'aria-describedby': describedBy,\n 'aria-invalid': isInvalid,\n className,\n testId,\n}) => {\n const { labels } = useUi();\n const groupLabel = resolveLabel('QuantityStepper.label', label, labels?.quantity?.label);\n const [draft, setDraft] = useState<string | null>(null);\n\n const clamp = (next: number) => Math.min(Math.max(next, min), max);\n\n const commit = (raw: string) => {\n setDraft(null);\n if (isReadOnly) return;\n\n /*\n * Onceki bicim `if (!parsed) return;` diyordu ve `0` falsy: `min={0}` ile kurulmus bir alanda\n * (stok duzeltme formu) kullanici `0` yazip alandan…\n * ⚠ BOSLUK KONTROLU HAM DIZEDEN yapilir, sayidan DEGIL.\n */\n const digits = raw.replace(/\\D/g, '');\n if (digits === '') return;\n\n onChange(clamp(Number(digits)));\n };\n\n return (\n <div\n className={cx(styles.stepper, styles[`stepper--${size}`], className)}\n role=\"group\"\n aria-label={groupLabel}\n data-testid={testId}\n >\n <button\n type=\"button\"\n className={styles.stepper__button}\n onClick={() => onChange(Math.max(value - 1, min))}\n disabled={isDisabled || isReadOnly || value <= min}\n aria-label={resolveLabel(\n 'QuantityStepper.decreaseLabel',\n decreaseLabel,\n labels?.quantity?.decrease,\n )}\n >\n <DashLg aria-hidden />\n </button>\n\n <input\n id={id}\n className={styles.stepper__input}\n value={draft ?? String(value)}\n onChange={event => setDraft(event.target.value.replace(/\\D/g, '').slice(0, 2))}\n onBlur={event => commit(event.target.value)}\n /* ⚠ `spinbutton` ROLU BIR SOZ VERIR: */\n onKeyDown={event => {\n if (isReadOnly) return;\n\n const step = event.key === 'ArrowUp' ? 1 : event.key === 'ArrowDown' ? -1 : 0;\n\n if (step !== 0) {\n event.preventDefault();\n setDraft(null);\n onChange(clamp(value + step));\n return;\n }\n\n const page = event.key === 'PageUp' ? 10 : event.key === 'PageDown' ? -10 : 0;\n\n if (page !== 0) {\n event.preventDefault();\n setDraft(null);\n onChange(clamp(value + page));\n return;\n }\n\n if (event.key === 'Home' || event.key === 'End') {\n event.preventDefault();\n setDraft(null);\n onChange(event.key === 'Home' ? min : max);\n return;\n }\n\n if (event.key === 'Enter') {\n event.preventDefault();\n commit((event.target as HTMLInputElement).value);\n }\n }}\n inputMode=\"numeric\"\n disabled={isDisabled}\n readOnly={isReadOnly}\n aria-readonly={isReadOnly || undefined}\n aria-required={required || undefined}\n aria-invalid={isInvalid || undefined}\n aria-describedby={describedBy}\n /* ⚠ ARALIK ETIKETE GOMULMEZ, ROLE ILE BILDIRILIR. */\n role=\"spinbutton\"\n aria-valuenow={value}\n aria-valuemin={min}\n aria-valuemax={max}\n aria-label={groupLabel}\n />\n\n <button\n type=\"button\"\n className={styles.stepper__button}\n onClick={() => onChange(Math.min(value + 1, max))}\n disabled={isDisabled || isReadOnly || value >= max}\n aria-label={resolveLabel(\n 'QuantityStepper.increaseLabel',\n increaseLabel,\n labels?.quantity?.increase,\n )}\n >\n <PlusLg aria-hidden />\n </button>\n </div>\n );\n};\n\nexport default /*#__PURE__*/ memo(QuantityStepper) as typeof QuantityStepper;\n"],"names":["QuantityStepper","value","onChange","label","decreaseLabel","increaseLabel","min","max","isDisabled","isReadOnly","size","id","required","describedBy","isInvalid","className","testId","labels","useUi","groupLabel","resolveLabel","_a","draft","setDraft","useState","clamp","next","commit","raw","digits","jsxs","cx","styles","jsx","_b","DashLg","event","step","page","_c","PlusLg","index"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer ui{.ui-stepper-8s5Ih{display:inline-flex;align-items:stretch;border:1px solid var(--hd-border-control);border-radius:var(--hd-radius-sm);background-color:var(--hd-bg-surface);overflow:hidden}.ui-stepper-8s5Ih:has(.ui-stepper__input-OQh5v[aria-invalid=true]){border-color:var(--hd-danger-solid)}.ui-stepper__button-h6g7d{display:flex;align-items:center;justify-content:center;border:none;background:none;color:var(--hd-text-2);cursor:pointer;padding-inline:var(--hd-space-3);transition:background-color var(--hd-duration-fast) var(--hd-ease-standard)}.ui-stepper__button-h6g7d:hover:not(:disabled){background-color:var(--hd-bg-raised);color:var(--hd-text)}.ui-stepper__button-h6g7d:disabled{background-color:var(--hd-bg-raised);border-color:var(--hd-border);cursor:not-allowed;color:var(--hd-text-3)}@media (forced-colors: active){.ui-stepper__button-h6g7d:disabled{color:GrayText;border-color:GrayText}}.ui-stepper__button-h6g7d:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--hd-focus);outline-offset:var(--ui-ring-offset, -2px)}@media (prefers-reduced-motion: reduce){.ui-stepper__button-h6g7d{transition:none}}.ui-stepper__input-OQh5v{font-family:var(--hd-font-mono);font-size:var(--hd-type-small-size);letter-spacing:.02em;font-variant-numeric:tabular-nums;width:40px;border:none;border-inline:1px solid var(--hd-border);background:none;text-align:center;color:var(--hd-text);font-weight:var(--hd-font-weight-semibold)}@media (hover: none) and (pointer: coarse){.ui-stepper__input-OQh5v{font-size:max(16px,var(--hd-type-body-size))}}.ui-stepper__input-OQh5v:focus{outline:none;background-color:var(--hd-bg-raised)}.ui-stepper__input-OQh5v:disabled{color:var(--hd-text-2)}.ui-stepper--sm-RvrBP .ui-stepper__button-h6g7d{height:32px;font-size:16px}.ui-stepper--sm-RvrBP .ui-stepper__input-OQh5v{width:34px;font-size:var(--hd-type-caption-size)}@media (hover: none) and (pointer: coarse){.ui-stepper--sm-RvrBP .ui-stepper__input-OQh5v{font-size:max(16px,var(--hd-type-body-size))}}.ui-stepper--md-Cnjei .ui-stepper__button-h6g7d{height:44px;font-size:18px}.ui-stepper--md-Cnjei .ui-stepper__input-OQh5v{width:46px}}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),t=require("react"),N=require("react-bootstrap-icons"),u=require("@handijitcom/utils"),_=require("../../helpers/aria.helper.cjs"),y=require("../../helpers/class-name.helper.cjs"),v=require("../../helpers/component.helper.cjs"),a={default:{"radio":"ui-radio-KoZak","radio__input":"ui-radio__input-gVMgh","radio__body":"ui-radio__body-oZWg6","radio__label":"ui-radio__label-d-5ce","radio__hint":"ui-radio__hint-baVbs","radio__error":"ui-radio__error-vguvt","radio__count":"ui-radio__count-OtkUM"}},R=t.forwardRef(({label:m,hint:d,error:s,count:r,className:b,id:p,testId:f,"aria-describedby":x,"aria-invalid":h,...j},q)=>{const I=t.useId(),i=p??I,l=`${i}-label`,n=`${i}-hint`,c=`${i}-error`,o=`${i}-count`;return e.jsxs("label",{className:y.cx(a.default.radio,b),"data-testid":f,children:[e.jsx("input",{ref:q,type:"radio",id:i,className:a.default.radio__input,"aria-labelledby":_.idList(l,u.isDefined(r)&&o),"aria-describedby":_.idList(s&&c,d&&n,x),"aria-invalid":s?!0:h,...j}),e.jsxs("span",{className:a.default.radio__body,children:[e.jsx("span",{id:l,className:a.default.radio__label,children:m}),d&&e.jsx("span",{id:n,className:a.default.radio__hint,children:d}),s&&e.jsxs("span",{id:c,className:a.default.radio__error,role:"alert",children:[e.jsx(N.ExclamationCircleFill,{"aria-hidden":!0}),s]})]}),u.isDefined(r)&&e.jsx("span",{id:o,className:a.default.radio__count,children:r})]})}),$=t.memo(v.named(R,"Radio"));exports.default=$;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/Radio/index.tsx"],"sourcesContent":["'use client';\n\nimport { forwardRef, type InputHTMLAttributes, memo, type ReactNode, useId } from 'react';\n\nimport { ExclamationCircleFill } from 'react-bootstrap-icons';\n\nimport { isDefined } from '@handijitcom/utils';\n\nimport { idList } from '../../helpers/aria.helper';\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\n\nimport styles from './index.module.scss';\n\ntype Props = Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> & {\n label: ReactNode;\n /** Etiketin altındaki açıklama; `aria-describedby` ile bağlanır. */\n hint?: string;\n /**\n * The error under the label (2.2): the radio is marked invalid (`aria-invalid`) and the message\n * is linked with `aria-describedby`. The error of a whole group belongs on the group (its\n * `radiogroup` element with `aria-invalid`, or a `Field` around it), not on every radio.\n */\n error?: string;\n /** Sağda gösterilen sonuç adedi (filtre listelerinde). */\n count?: number;\n testId?: string;\n};\n\n/** Radyo düğmesi. */\nconst Radio = /*#__PURE__*/ forwardRef<HTMLInputElement, Props>(\n (\n {\n label,\n hint,\n error,\n count,\n className,\n id,\n testId,\n 'aria-describedby': describedBy,\n 'aria-invalid': isInvalid,\n ...rest\n },\n ref,\n ) => {\n /* ⚠ İpucu ADA değil AÇIKLAMAYA bağlanır — gerekçe `Switch`te yazılı. */\n const generatedId = useId();\n const baseId = id ?? generatedId;\n const labelId = `${baseId}-label`;\n const hintId = `${baseId}-hint`;\n const errorId = `${baseId}-error`;\n const countId = `${baseId}-count`;\n\n return (\n <label className={cx(styles.radio, className)} data-testid={testId}>\n <input\n ref={ref}\n type=\"radio\"\n id={baseId}\n className={styles.radio__input}\n /*\n * Sayaç ADIN İÇİNDE KALIR (\"Disk Balata, 128\"): filtre listesinde kaç sonuç olduğu\n * seçimin bir parçası.\n */\n aria-labelledby={idList(labelId, isDefined(count) && countId)}\n /* 2.2: the links are MERGED; a passed `aria-describedby` no longer drops the hint. */\n aria-describedby={idList(error && errorId, hint && hintId, describedBy)}\n aria-invalid={error ? true : isInvalid}\n {...rest}\n />\n <span className={styles.radio__body}>\n <span id={labelId} className={styles.radio__label}>\n {label}\n </span>\n {hint && (\n <span id={hintId} className={styles.radio__hint}>\n {hint}\n </span>\n )}\n {error && (\n <span id={errorId} className={styles.radio__error} role=\"alert\">\n <ExclamationCircleFill aria-hidden />\n {error}\n </span>\n )}\n </span>\n {isDefined(count) && (\n <span id={countId} className={styles.radio__count}>\n {count}\n </span>\n )}\n </label>\n );\n },\n);\n\nexport default /*#__PURE__*/ memo(/*#__PURE__*/ named(Radio, 'Radio')) as typeof Radio;\n"],"names":["Radio","forwardRef","label","hint","error","count","className","id","testId","describedBy","isInvalid","rest","ref","generatedId","useId","baseId","labelId","hintId","errorId","countId","jsxs","cx","styles","jsx","idList","isDefined","ExclamationCircleFill","index","memo","named"],"mappings":"qaA6BMA,EAAsBC,EAAAA,WAC1B,CACE,CACE,MAAAC,EACA,KAAAC,EACA,MAAAC,EACA,MAAAC,EACA,UAAAC,EACA,GAAAC,EACA,OAAAC,EACA,mBAAoBC,EACpB,eAAgBC,EAChB,GAAGC,CAAA,EAELC,IACG,CAEH,MAAMC,EAAcC,EAAAA,MAAA,EACdC,EAASR,GAAMM,EACfG,EAAU,GAAGD,CAAM,SACnBE,EAAS,GAAGF,CAAM,QAClBG,EAAU,GAAGH,CAAM,SACnBI,EAAU,GAAGJ,CAAM,SAEzB,OACEK,OAAC,SAAM,UAAWC,EAAAA,GAAGC,EAAAA,QAAO,MAAOhB,CAAS,EAAG,cAAaE,EAC1D,SAAA,CAAAe,EAAAA,IAAC,QAAA,CACC,IAAAX,EACA,KAAK,QACL,GAAIG,EACJ,UAAWO,EAAAA,QAAO,aAKlB,kBAAiBE,EAAAA,OAAOR,EAASS,EAAAA,UAAUpB,CAAK,GAAKc,CAAO,EAE5D,mBAAkBK,EAAAA,OAAOpB,GAASc,EAASf,GAAQc,EAAQR,CAAW,EACtE,eAAcL,EAAQ,GAAOM,EAC5B,GAAGC,CAAA,CAAA,EAENS,EAAAA,KAAC,OAAA,CAAK,UAAWE,EAAAA,QAAO,YACtB,SAAA,CAAAC,MAAC,QAAK,GAAIP,EAAS,UAAWM,EAAAA,QAAO,aAClC,SAAApB,EACH,EACCC,SACE,OAAA,CAAK,GAAIc,EAAQ,UAAWK,UAAO,YACjC,SAAAnB,CAAA,CACH,EAEDC,UACE,OAAA,CAAK,GAAIc,EAAS,UAAWI,EAAAA,QAAO,aAAc,KAAK,QACtD,SAAA,CAAAC,EAAAA,IAACG,EAAAA,sBAAA,CAAsB,cAAW,EAAA,CAAC,EAClCtB,CAAA,CAAA,CACH,CAAA,EAEJ,EACCqB,EAAAA,UAAUpB,CAAK,GACdkB,EAAAA,IAAC,OAAA,CAAK,GAAIJ,EAAS,UAAWG,EAAAA,QAAO,aAClC,SAAAjB,CAAA,CACH,CAAA,EAEJ,CAEJ,CACF,EAEAsB,EAA6BC,OAAmBC,EAAAA,MAAM7B,EAAO,OAAO,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
/** Radyo düğmesi. */
|
|
3
|
+
declare const Radio: import('react').ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "type"> & {
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
/** Etiketin altındaki açıklama; `aria-describedby` ile bağlanır. */
|
|
6
|
+
hint?: string;
|
|
7
|
+
/**
|
|
8
|
+
* The error under the label (2.2): the radio is marked invalid (`aria-invalid`) and the message
|
|
9
|
+
* is linked with `aria-describedby`. The error of a whole group belongs on the group (its
|
|
10
|
+
* `radiogroup` element with `aria-invalid`, or a `Field` around it), not on every radio.
|
|
11
|
+
*/
|
|
12
|
+
error?: string;
|
|
13
|
+
/** Sağda gösterilen sonuç adedi (filtre listelerinde). */
|
|
14
|
+
count?: number;
|
|
15
|
+
testId?: string;
|
|
16
|
+
} & import('react').RefAttributes<HTMLInputElement>>;
|
|
17
|
+
declare const _default: typeof Radio;
|
|
18
|
+
export default _default;
|