@handijit/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 +872 -2
- package/build/base.css +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 +1865 -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 +1120 -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.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.ts +15 -0
- package/build/components/Alert/index.js +30 -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.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.ts +26 -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.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.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.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.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.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.ts +10 -0
- package/build/components/Checkbox/index.js +33 -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.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.ts +34 -0
- package/build/components/ChipGroup/index.js +64 -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.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.ts +6 -0
- package/build/components/Combobox/index.js +302 -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.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.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.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.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.ts +44 -0
- package/build/components/DateField/index.js +79 -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.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.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.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.ts +22 -0
- package/build/components/Drawer/index.js +88 -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.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.ts +31 -0
- package/build/components/Field/index.js +52 -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.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.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.ts +22 -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.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.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.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.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.ts +28 -0
- package/build/components/Modal/index.js +92 -0
- package/build/components/Modal/index.js.map +1 -0
- package/build/components/Modal/style.css +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.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.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.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.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/Popover/index.cjs +2 -0
- package/build/components/Popover/index.cjs.map +1 -0
- package/build/components/Popover/index.d.ts +20 -0
- package/build/components/Popover/index.js +91 -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.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.ts +49 -0
- package/build/components/Progress/index.js +120 -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.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/QuantityStepper/index.cjs +2 -0
- package/build/components/QuantityStepper/index.cjs.map +1 -0
- package/build/components/QuantityStepper/index.d.ts +21 -0
- package/build/components/QuantityStepper/index.js +106 -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.ts +12 -0
- package/build/components/Radio/index.js +35 -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.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.ts +26 -0
- package/build/components/RangeSlider/index.js +102 -0
- package/build/components/RangeSlider/index.js.map +1 -0
- package/build/components/RangeSlider/style.css +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.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.ts +21 -0
- package/build/components/RatingInput/index.js +75 -0
- package/build/components/RatingInput/index.js.map +1 -0
- package/build/components/RatingInput/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.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.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.ts +24 -0
- package/build/components/SegmentedControl/index.js +69 -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.ts +39 -0
- package/build/components/Select/index.js +179 -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.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.ts +11 -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.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.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.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.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.ts +16 -0
- package/build/components/Switch/index.js +42 -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.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.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.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.ts +25 -0
- package/build/components/TagInput/index.js +124 -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.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.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.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.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.ts +43 -0
- package/build/components/Toast/index.js +136 -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.ts +8 -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.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.ts +8 -0
- package/build/constants/breakpoint.constants.js +9 -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.ts +11 -0
- package/build/constants/combobox.constants.js +7 -0
- package/build/constants/combobox.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.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.ts +9 -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.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/class-name.helper.cjs +2 -0
- package/build/helpers/class-name.helper.cjs.map +1 -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.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.ts +42 -0
- package/build/helpers/focus.helper.js +65 -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.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.ts +28 -0
- package/build/helpers/portal.helper.js +36 -0
- package/build/helpers/portal.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.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.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 +24 -0
- package/build/helpers/theme.helper.cjs.map +1 -0
- package/build/helpers/theme.helper.d.ts +49 -0
- package/build/helpers/theme.helper.js +75 -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.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.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.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.ts +12 -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.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.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.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.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.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.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.ts +7 -0
- package/build/hooks/useUiTheme.js +36 -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.ts +11 -0
- package/build/hooks/useUiTokens.js +39 -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.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.ts +95 -0
- package/build/index.js +207 -0
- package/build/index.js.map +1 -0
- package/build/scss/_colors.generated.scss +119 -0
- package/build/scss/_index.scss +6 -0
- package/build/scss/_metrics.generated.scss +49 -0
- package/build/scss/_mixins.scss +710 -0
- package/build/scss/_variables.scss +51 -0
- package/build/styles/base.d.ts +0 -0
- package/build/styles.css +133 -0
- package/build/theme/UiProvider.cjs +2 -0
- package/build/theme/UiProvider.cjs.map +1 -0
- package/build/theme/UiProvider.d.ts +22 -0
- package/build/theme/UiProvider.js +30 -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.ts +19 -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.ts +5 -0
- package/build/theme/context.js +8 -0
- package/build/theme/context.js.map +1 -0
- package/build/theme/initUi.cjs +2 -0
- package/build/theme/initUi.cjs.map +1 -0
- package/build/theme/initUi.d.ts +7 -0
- package/build/theme/initUi.js +10 -0
- package/build/theme/initUi.js.map +1 -0
- package/build/theme/palette.cjs +2 -0
- package/build/theme/palette.cjs.map +1 -0
- package/build/theme/palette.d.ts +219 -0
- package/build/theme/palette.js +148 -0
- package/build/theme/palette.js.map +1 -0
- package/build/theme/tokens.cjs +2 -0
- package/build/theme/tokens.cjs.map +1 -0
- package/build/theme/tokens.d.ts +225 -0
- package/build/theme/tokens.js +384 -0
- package/build/theme/tokens.js.map +1 -0
- package/build/types/charts/AreaChart/index.d.ts +14 -0
- package/build/types/charts/BarChart/index.d.ts +16 -0
- package/build/types/charts/BoxPlot/index.d.ts +43 -0
- package/build/types/charts/ComposedChart/index.d.ts +16 -0
- package/build/types/charts/Heatmap/index.d.ts +30 -0
- package/build/types/charts/Histogram/index.d.ts +29 -0
- package/build/types/charts/LineChart/index.d.ts +14 -0
- package/build/types/charts/PieChart/index.d.ts +36 -0
- package/build/types/charts/RadarChart/index.d.ts +40 -0
- package/build/types/charts/ScatterPlot/index.d.ts +41 -0
- package/build/types/charts/core/CartesianChart.d.ts +43 -0
- package/build/types/charts/core/ChartFrame.d.ts +55 -0
- package/build/types/charts/core/axes.d.ts +37 -0
- package/build/types/charts/core/cartesian.d.ts +80 -0
- package/build/types/charts/core/format.d.ts +19 -0
- package/build/types/charts/core/margins.d.ts +9 -0
- package/build/types/charts/core/palette.d.ts +13 -0
- package/build/types/charts/core/path.d.ts +24 -0
- package/build/types/charts/core/scale.d.ts +40 -0
- package/build/types/charts/core/series.d.ts +11 -0
- package/build/types/charts/core/spatial.d.ts +12 -0
- package/build/types/charts/core/stats.d.ts +34 -0
- package/build/types/charts/core/types.d.ts +31 -0
- package/build/types/charts/core/useChartWidth.d.ts +7 -0
- package/build/types/charts/index.d.ts +21 -0
- package/build/types/chat/ActionList/index.d.ts +46 -0
- package/build/types/chat/AppBar/index.d.ts +21 -0
- package/build/types/chat/ChatMessage/index.d.ts +24 -0
- package/build/types/chat/ChatThread/index.d.ts +24 -0
- package/build/types/chat/Citation/index.d.ts +15 -0
- package/build/types/chat/CodeBlock/format.d.ts +7 -0
- package/build/types/chat/CodeBlock/grammars.d.ts +44 -0
- package/build/types/chat/CodeBlock/highlight.d.ts +22 -0
- package/build/types/chat/CodeBlock/index.d.ts +33 -0
- package/build/types/chat/DescriptionList/index.d.ts +16 -0
- package/build/types/chat/Legend/index.d.ts +20 -0
- package/build/types/chat/MessageActions/index.d.ts +21 -0
- package/build/types/chat/PromptInput/index.d.ts +47 -0
- package/build/types/chat/PromptSuggestions/index.d.ts +25 -0
- package/build/types/chat/Prose/index.d.ts +15 -0
- package/build/types/chat/ReasoningBlock/index.d.ts +24 -0
- package/build/types/chat/ReasoningText/index.d.ts +14 -0
- package/build/types/chat/SegmentBar/index.d.ts +46 -0
- package/build/types/chat/SourceList/index.d.ts +25 -0
- package/build/types/chat/TerminalOutput/index.d.ts +25 -0
- package/build/types/chat/ToolCall/index.d.ts +41 -0
- package/build/types/chat/index.d.ts +26 -0
- package/build/types/combobox.type.d.ts +49 -0
- package/build/types/common-element-props.type.d.ts +8 -0
- package/build/types/helpers/class-name.helper.d.ts +3 -0
- package/build/types/helpers/component.helper.d.ts +13 -0
- package/build/types/helpers/label.helper.d.ts +12 -0
- package/build/types/hook.type.d.ts +36 -0
- package/build/types/link.type.d.ts +14 -0
- package/build/types/positioning.type.d.ts +38 -0
- package/build/types/theme/palette.d.ts +219 -0
- package/build/types/theme/tokens.d.ts +225 -0
- package/build/types/theme.type.d.ts +223 -0
- package/build/types/types/common-element-props.type.d.ts +8 -0
- package/build/types/types/link.type.d.ts +14 -0
- package/build/types/types/theme.type.d.ts +223 -0
- package/package.json +487 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer ui{.ui-tagInput-QraZR{width:100%;font-family:var(--ui-font-body);font-size:var(--ui-font-size-control);line-height:var(--ui-leading-snug);color:var(--ui-text);background-color:var(--ui-surface);border:1px solid var(--ui-border-strong);border-radius:var(--ui-radius-md);padding:var(--ui-space-3) var(--ui-space-4);min-height:44px;transition:border-color var(--ui-duration-fast) var(--ui-ease-out),box-shadow var(--ui-duration-fast) var(--ui-ease-out)}.ui-tagInput-QraZR::placeholder{color:var(--ui-placeholder, var(--ui-text-3))}.ui-tagInput-QraZR:hover:not(:disabled):not([aria-invalid=true]){border-color:color-mix(in oklab,var(--ui-border-strong),var(--ui-text) 30%)}.ui-tagInput-QraZR:focus{outline:none;border-color:var(--ui-ring-color);box-shadow:var(--ui-ring)}.ui-tagInput-QraZR:disabled{background-color:var(--ui-surface-2);border-color:var(--ui-border);cursor:not-allowed;color:var(--ui-text-3)}@media (forced-colors: active){.ui-tagInput-QraZR:disabled{color:GrayText;border-color:GrayText}}.ui-tagInput-QraZR[aria-invalid=true]{border-color:var(--ui-danger-solid)}.ui-tagInput-QraZR[aria-invalid=true]:focus{box-shadow:var(--ui-ring-danger)}@media (prefers-reduced-motion: reduce){.ui-tagInput-QraZR{transition:none}}.ui-tagInput-QraZR{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ui-space-1);padding:var(--ui-space-1) var(--ui-space-2);cursor:text}.ui-tagInput-QraZR:has(.ui-tagInput__field-HeWrC:focus-visible){border-color:var(--ui-ring-color);box-shadow:var(--ui-ring)}.ui-tagInput--invalid-NQogL{border-color:var(--ui-danger-solid)}.ui-tagInput--disabled--AJFF{background-color:var(--ui-surface-2);cursor:not-allowed}.ui-tagInput__tag-D-ZWB{display:flex;align-items:center;gap:var(--ui-space-1);flex-shrink:0;padding:2px var(--ui-space-1) 2px var(--ui-space-2);border-radius:var(--ui-radius-sm);background-color:var(--ui-surface-2);border:1px solid var(--ui-border);font-size:var(--ui-font-size-xs);color:var(--ui-text);transition:background-color var(--ui-duration-fast) var(--ui-ease-out),border-color var(--ui-duration-fast) var(--ui-ease-out)}.ui-tagInput__tag--duplicate-3-FMF{background-color:var(--ui-warn-bg);border-color:var(--ui-warn-line)}@media (prefers-reduced-motion: reduce){.ui-tagInput__tag-D-ZWB{transition:none}}.ui-tagInput__remove-bpjGG{position:relative}.ui-tagInput__remove-bpjGG:after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:max(100%,28px);height:max(100%,28px)}.ui-tagInput__remove-bpjGG{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:none;border-radius:var(--ui-radius-xs);background:none;cursor:pointer;color:var(--ui-text-2);font-size:var(--ui-font-size-2xs)}.ui-tagInput__remove-bpjGG:hover:not(:disabled){background-color:var(--ui-surface-3);color:var(--ui-text)}.ui-tagInput__remove-bpjGG:disabled{cursor:not-allowed}.ui-tagInput__remove-bpjGG:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color);outline-offset:var(--ui-ring-offset, 1px)}.ui-tagInput__field-HeWrC{flex:1;min-width:100px;border:none;background:none;padding:var(--ui-space-1) 0;font-family:var(--ui-font-body);font-size:var(--ui-font-size-sm);color:var(--ui-text)}@media (hover: none) and (pointer: coarse){.ui-tagInput__field-HeWrC{font-size:var(--ui-font-size-control)}}.ui-tagInput__field-HeWrC::placeholder{color:var(--ui-text-3)}.ui-tagInput__field-HeWrC:focus{outline:none}.ui-tagInput__field-HeWrC:disabled{cursor:not-allowed}}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),c=require("react"),d=require("react-bootstrap-icons"),m=require("../../helpers/class-name.helper.cjs"),x=require("../Link/index.cjs"),e={default:{"link":"ui-link-WBmXY","link__label":"ui-link__label--OEu-","link__arrow":"ui-link__arrow-JKXm-","link--sm":"ui-link--sm-a-3Dz","link--md":"ui-link--md-lZdYP","link--brand":"ui-link--brand-vr8sW","link--muted":"ui-link--muted-EeN6l"}},f=({href:r,children:s,hasArrow:a,tone:l="brand",size:n="md",className:i,linkProps:u,...o})=>t.jsxs(x.default,{href:r,className:m.cx(e.default.link,e.default[`link--${l}`],e.default[`link--${n}`],i),...u,...o,children:[t.jsx("span",{className:e.default.link__label,children:s}),a&&t.jsx(d.ArrowRight,{"aria-hidden":!0,className:e.default.link__arrow})]}),_=c.memo(f);exports.default=_;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/TextLink/index.tsx"],"sourcesContent":["import { type AnchorHTMLAttributes, memo, type ReactNode } from 'react';\n\nimport { ArrowRight } from 'react-bootstrap-icons';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport type { UiLinkExtraProps } from '../../types/link.type';\nimport UiLink from '../Link';\n\nimport styles from './index.module.scss';\n\ntype Props = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'href'> & {\n href: string;\n children: ReactNode;\n /** Sonda ok gösterilir — \"devam et\" anlamı taşıyan bağlantılarda. */\n hasArrow?: boolean;\n tone?: 'brand' | 'muted';\n size?: 'sm' | 'md';\n /** Yönlendiriciye geçirilecek ek props. */\n linkProps?: UiLinkExtraProps;\n};\n\n/** Metin bağlantısı. */\nconst TextLink = ({\n href,\n children,\n hasArrow,\n tone = 'brand',\n size = 'md',\n className,\n linkProps,\n ...rest\n}: Props) => (\n <UiLink\n href={href}\n className={cx(styles.link, styles[`link--${tone}`], styles[`link--${size}`], className)}\n {...linkProps}\n {...rest}\n >\n <span className={styles.link__label}>{children}</span>\n {/*\n * Ok DOLU DEĞİL: Bootstrap Icons'ta uzun okun dolu bir eşi yok ve dolu\n * caret bir \"devam\" oku değil, bir açılır menü işareti okunuyor.\n */}\n {hasArrow && <ArrowRight aria-hidden className={styles.link__arrow} />}\n </UiLink>\n);\n\nexport default /*#__PURE__*/ memo(TextLink) as typeof TextLink;\n"],"names":["TextLink","href","children","hasArrow","tone","size","className","linkProps","rest","jsxs","UiLink","cx","styles","jsx","ArrowRight","index"],"mappings":"4TAsBMA,EAAW,CAAC,CAChB,KAAAC,EACA,SAAAC,EACA,SAAAC,EACA,KAAAC,EAAO,QACP,KAAAC,EAAO,KACP,UAAAC,EACA,UAAAC,EACA,GAAGC,CACL,IACEC,EAAAA,KAACC,EAAAA,QAAA,CACC,KAAAT,EACA,UAAWU,EAAAA,GAAGC,EAAAA,QAAO,KAAMA,EAAAA,QAAO,SAASR,CAAI,EAAE,EAAGQ,EAAAA,QAAO,SAASP,CAAI,EAAE,EAAGC,CAAS,EACrF,GAAGC,EACH,GAAGC,EAEJ,SAAA,CAAAK,EAAAA,IAAC,OAAA,CAAK,UAAWD,EAAAA,QAAO,YAAc,SAAAV,EAAS,EAK9CC,GAAYU,EAAAA,IAACC,EAAAA,WAAA,CAAW,cAAW,GAAC,UAAWF,EAAAA,QAAO,WAAA,CAAa,CAAA,CAAA,CACtE,EAGFG,SAAkCf,CAAQ"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AnchorHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { UiLinkExtraProps } from '../../types/link.type';
|
|
3
|
+
type Props = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'href'> & {
|
|
4
|
+
href: string;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
/** Sonda ok gösterilir — "devam et" anlamı taşıyan bağlantılarda. */
|
|
7
|
+
hasArrow?: boolean;
|
|
8
|
+
tone?: 'brand' | 'muted';
|
|
9
|
+
size?: 'sm' | 'md';
|
|
10
|
+
/** Yönlendiriciye geçirilecek ek props. */
|
|
11
|
+
linkProps?: UiLinkExtraProps;
|
|
12
|
+
};
|
|
13
|
+
/** Metin bağlantısı. */
|
|
14
|
+
declare const TextLink: ({ href, children, hasArrow, tone, size, className, linkProps, ...rest }: Props) => import("react").JSX.Element;
|
|
15
|
+
declare const _default: typeof TextLink;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsxs as p, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { memo as c } from "react";
|
|
3
|
+
import { ArrowRight as d } from "react-bootstrap-icons";
|
|
4
|
+
import { cx as f } from "../../helpers/class-name.helper.js";
|
|
5
|
+
import k from "../Link/index.js";
|
|
6
|
+
const r = {"link":"ui-link-WBmXY","link__label":"ui-link__label--OEu-","link__arrow":"ui-link__arrow-JKXm-","link--sm":"ui-link--sm-a-3Dz","link--md":"ui-link--md-lZdYP","link--brand":"ui-link--brand-vr8sW","link--muted":"ui-link--muted-EeN6l"};
|
|
7
|
+
const x = ({
|
|
8
|
+
href: m,
|
|
9
|
+
children: o,
|
|
10
|
+
hasArrow: s,
|
|
11
|
+
tone: a = "brand",
|
|
12
|
+
size: n = "md",
|
|
13
|
+
className: t,
|
|
14
|
+
linkProps: e,
|
|
15
|
+
...l
|
|
16
|
+
}) => /* @__PURE__ */ p(
|
|
17
|
+
k,
|
|
18
|
+
{
|
|
19
|
+
href: m,
|
|
20
|
+
className: f(r.link, r[`link--${a}`], r[`link--${n}`], t),
|
|
21
|
+
...e,
|
|
22
|
+
...l,
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ i("span", { className: r.link__label, children: o }),
|
|
25
|
+
s && /* @__PURE__ */ i(d, { "aria-hidden": !0, className: r.link__arrow })
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
), w = /* @__PURE__ */ c(x);
|
|
29
|
+
export {
|
|
30
|
+
w as default
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/TextLink/index.tsx"],"sourcesContent":["import { type AnchorHTMLAttributes, memo, type ReactNode } from 'react';\n\nimport { ArrowRight } from 'react-bootstrap-icons';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport type { UiLinkExtraProps } from '../../types/link.type';\nimport UiLink from '../Link';\n\nimport styles from './index.module.scss';\n\ntype Props = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'href'> & {\n href: string;\n children: ReactNode;\n /** Sonda ok gösterilir — \"devam et\" anlamı taşıyan bağlantılarda. */\n hasArrow?: boolean;\n tone?: 'brand' | 'muted';\n size?: 'sm' | 'md';\n /** Yönlendiriciye geçirilecek ek props. */\n linkProps?: UiLinkExtraProps;\n};\n\n/** Metin bağlantısı. */\nconst TextLink = ({\n href,\n children,\n hasArrow,\n tone = 'brand',\n size = 'md',\n className,\n linkProps,\n ...rest\n}: Props) => (\n <UiLink\n href={href}\n className={cx(styles.link, styles[`link--${tone}`], styles[`link--${size}`], className)}\n {...linkProps}\n {...rest}\n >\n <span className={styles.link__label}>{children}</span>\n {/*\n * Ok DOLU DEĞİL: Bootstrap Icons'ta uzun okun dolu bir eşi yok ve dolu\n * caret bir \"devam\" oku değil, bir açılır menü işareti okunuyor.\n */}\n {hasArrow && <ArrowRight aria-hidden className={styles.link__arrow} />}\n </UiLink>\n);\n\nexport default /*#__PURE__*/ memo(TextLink) as typeof TextLink;\n"],"names":["TextLink","href","children","hasArrow","tone","size","className","linkProps","rest","jsxs","UiLink","cx","styles","jsx","ArrowRight","index"],"mappings":";;;;;;AAsBA,MAAMA,IAAW,CAAC;AAAA,EAChB,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,MAAAC,IAAO;AAAA,EACP,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACL,MACE,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,MAAAT;AAAA,IACA,WAAWU,EAAGC,EAAO,MAAMA,EAAO,SAASR,CAAI,EAAE,GAAGQ,EAAO,SAASP,CAAI,EAAE,GAAGC,CAAS;AAAA,IACrF,GAAGC;AAAA,IACH,GAAGC;AAAA,IAEJ,UAAA;AAAA,MAAA,gBAAAK,EAAC,QAAA,EAAK,WAAWD,EAAO,aAAc,UAAAV,GAAS;AAAA,MAK9CC,KAAY,gBAAAU,EAACC,GAAA,EAAW,eAAW,IAAC,WAAWF,EAAO,YAAA,CAAa;AAAA,IAAA;AAAA,EAAA;AACtE,GAGFG,sBAAkCf,CAAQ;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer ui{.ui-link-WBmXY{display:inline-flex;align-items:center;gap:var(--ui-space-2);font-weight:500;text-decoration:none;border-radius:var(--ui-radius-xs);transition:color var(--ui-duration-fast) var(--ui-ease-out)}.ui-link-WBmXY:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color);outline-offset:var(--ui-ring-offset, 3px)}@media (prefers-reduced-motion: reduce){.ui-link-WBmXY{transition:none}}.ui-link__label--OEu-{text-underline-offset:3px}[dir=rtl] .ui-link__arrow-JKXm-{transform:scaleX(-1)}.ui-link__arrow-JKXm-{font-size:1em;flex-shrink:0;transition:transform var(--ui-duration-fast) var(--ui-ease-out)}@media (prefers-reduced-motion: reduce){.ui-link__arrow-JKXm-{transition:none}}.ui-link-WBmXY:hover .ui-link__label--OEu-{text-decoration:underline}.ui-link-WBmXY:hover .ui-link__arrow-JKXm-{transform:translate(3px)}[dir=rtl] .ui-link-WBmXY:hover .ui-link__arrow-JKXm-{transform:scaleX(-1) translate(3px)}.ui-link--sm-a-3Dz{font-size:var(--ui-font-size-xs)}.ui-link--md-lZdYP{font-size:var(--ui-font-size-sm)}.ui-link--brand-vr8sW{color:var(--ui-link)}.ui-link--brand-vr8sW:hover{color:var(--ui-link-hover)}.ui-link--muted-EeN6l{color:var(--ui-text-2)}.ui-link--muted-EeN6l:hover{color:var(--ui-text)}}
|
|
@@ -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"),r=require("react"),o=require("../../helpers/class-name.helper.cjs"),_=require("../../helpers/component.helper.cjs"),t={default:{"textarea":"ui-textarea-zwJcB","wrapper":"ui-wrapper-O8aJA","textarea--bare":"ui-textarea--bare-IjCIn","textarea--autoSize":"ui-textarea--autoSize--F8yj","counter":"ui-counter-bHVh3","counter--near":"ui-counter--near-AZAQm"}},v=r.forwardRef(({className:x,variant:m="default",rows:p=4,isAutoSize:i,maxRows:d=12,hasCounter:y,maxLength:s,value:n,defaultValue:f,onChange:l,testId:b,...N},a)=>{const h=r.useRef(null),[j,q]=r.useState(String(f??"").length),c=n===void 0?j:String(n).length,H=r.useCallback(e=>{h.current=e,typeof a=="function"?a(e):a&&(a.current=e)},[a]);r.useLayoutEffect(()=>{const e=h.current;if(!i||!e)return;e.style.height="auto";const g=(Number.parseFloat(getComputedStyle(e).lineHeight)||20)*d;e.style.height=`${Math.min(e.scrollHeight,g)}px`,e.style.overflowY=e.scrollHeight>g?"auto":"hidden"},[i,d,n,c]);const S=s!==void 0&&c>=s*.9;return u.jsxs("div",{className:o.cx(t.default.wrapper,x),"data-testid":b,children:[u.jsx("textarea",{ref:H,rows:p,className:o.cx(t.default.textarea,m==="bare"&&t.default["textarea--bare"],i&&t.default["textarea--autoSize"]),maxLength:s,value:n,defaultValue:f,onChange:e=>{q(e.target.value.length),l==null||l(e)},...N}),y&&s!==void 0&&u.jsxs("span",{className:o.cx(t.default.counter,S&&t.default["counter--near"]),"aria-hidden":!0,children:[c," / ",s]})]})}),R=r.memo(_.named(v,"Textarea"));exports.default=R;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/Textarea/index.tsx"],"sourcesContent":["'use client';\n\nimport {\n forwardRef,\n memo,\n type TextareaHTMLAttributes,\n useCallback,\n useLayoutEffect,\n useRef,\n useState,\n} from 'react';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\n\nimport styles from './index.module.scss';\n\n/**\n * `bare`: kenarlık, zemin, dolgu ve gölge YOK — çerçeveyi kapsayıcı çizer (sohbet girdisi).\n * ⚠ Odak göstergesi de kapsayıcının işi (`:focus-within`); `bare` alanı çerçevesiz bir kutuya\n * konursa odak görünmez olur.\n */\nexport type TextareaVariant = 'default' | 'bare';\n\ntype Props = TextareaHTMLAttributes<HTMLTextAreaElement> & {\n variant?: TextareaVariant;\n /** Alan içeriğiyle birlikte BÜYÜR — kaydırma çubuğu yerine yükseklik. */\n isAutoSize?: boolean;\n /** Otomatik büyümenin tavanı (satır). */\n maxRows?: number;\n /** Kalan karakter sayacını gösterir. `maxLength` ile birlikte anlamlı. */\n hasCounter?: boolean;\n testId?: string;\n};\n\n/** Çok satırlı metin girdisi. */\nconst Textarea = /*#__PURE__*/ forwardRef<HTMLTextAreaElement, Props>(\n (\n {\n className,\n variant = 'default',\n rows = 4,\n isAutoSize,\n maxRows = 12,\n hasCounter,\n maxLength,\n value,\n defaultValue,\n onChange,\n testId,\n ...rest\n },\n ref,\n ) => {\n const innerRef = useRef<HTMLTextAreaElement | null>(null);\n /* KONTROLLU kipte uzunluk `value`dan OKUNUR, ic durumdan degil. */\n const [innerLength, setLength] = useState(String(defaultValue ?? '').length);\n const length = value === undefined ? innerLength : String(value).length;\n\n /*\n * Cagiranin `ref`i ile ic olcum referansini birlikte tut: `useImperativeHandle` yalnizca bir\n * nesne dondurur ve DOM dugumunun kendisini gizlerdi.\n */\n const setRefs = useCallback(\n (node: HTMLTextAreaElement | null) => {\n innerRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) ref.current = node;\n },\n [ref],\n );\n\n /*\n * OLCUM BOYAMADAN ONCE: `useEffect` ile alan bir kare boyunca eski yuksekligiyle cizilip sonra\n * ziplyordu.\n */\n useLayoutEffect(() => {\n const node = innerRef.current;\n if (!isAutoSize || !node) return;\n\n node.style.height = 'auto';\n\n const lineHeight = Number.parseFloat(getComputedStyle(node).lineHeight) || 20;\n const max = lineHeight * maxRows;\n\n node.style.height = `${Math.min(node.scrollHeight, max)}px`;\n node.style.overflowY = node.scrollHeight > max ? 'auto' : 'hidden';\n }, [isAutoSize, maxRows, value, length]);\n\n const isNearLimit = maxLength !== undefined && length >= maxLength * 0.9;\n\n return (\n <div className={cx(styles.wrapper, className)} data-testid={testId}>\n <textarea\n ref={setRefs}\n rows={rows}\n className={cx(\n styles.textarea,\n variant === 'bare' && styles['textarea--bare'],\n isAutoSize && styles['textarea--autoSize'],\n )}\n maxLength={maxLength}\n value={value}\n defaultValue={defaultValue}\n onChange={event => {\n setLength(event.target.value.length);\n onChange?.(event);\n }}\n {...rest}\n />\n\n {hasCounter && maxLength !== undefined && (\n /* `aria-hidden`: ayni bilgi her tusta duyurulsaydi yazma kesintiye ugrardi. */\n <span className={cx(styles.counter, isNearLimit && styles['counter--near'])} aria-hidden>\n {length} / {maxLength}\n </span>\n )}\n </div>\n );\n },\n);\n\nexport default /*#__PURE__*/ memo(/*#__PURE__*/ named(Textarea, 'Textarea')) as typeof Textarea;\n"],"names":["Textarea","forwardRef","className","variant","rows","isAutoSize","maxRows","hasCounter","maxLength","value","defaultValue","onChange","testId","rest","ref","innerRef","useRef","innerLength","setLength","useState","length","setRefs","useCallback","node","useLayoutEffect","max","isNearLimit","jsxs","cx","styles","jsx","event","memo","named"],"mappings":"uTAmCMA,EAAyBC,EAAAA,WAC7B,CACE,CACE,UAAAC,EACA,QAAAC,EAAU,UACV,KAAAC,EAAO,EACP,WAAAC,EACA,QAAAC,EAAU,GACV,WAAAC,EACA,UAAAC,EACA,MAAAC,EACA,aAAAC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GLN,GAAcC,IAAc,QAE3BmB,EAAAA,KAAC,OAAA,CAAK,UAAWC,EAAAA,GAAGC,EAAAA,QAAO,QAASH,GAAeG,EAAAA,QAAO,eAAe,CAAC,EAAG,cAAW,GACrF,SAAA,CAAAT,EAAO,MAAIZ,CAAA,CAAA,CACd,CAAA,EAEJ,CAEJ,CACF,EAEAR,EAA6BgC,OAAmBC,EAAAA,MAAMjC,EAAU,UAAU,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TextareaHTMLAttributes } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* `bare`: kenarlık, zemin, dolgu ve gölge YOK — çerçeveyi kapsayıcı çizer (sohbet girdisi).
|
|
4
|
+
* ⚠ Odak göstergesi de kapsayıcının işi (`:focus-within`); `bare` alanı çerçevesiz bir kutuya
|
|
5
|
+
* konursa odak görünmez olur.
|
|
6
|
+
*/
|
|
7
|
+
export type TextareaVariant = 'default' | 'bare';
|
|
8
|
+
/** Çok satırlı metin girdisi. */
|
|
9
|
+
declare const Textarea: import('react').ForwardRefExoticComponent<TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
10
|
+
variant?: TextareaVariant;
|
|
11
|
+
/** Alan içeriğiyle birlikte BÜYÜR — kaydırma çubuğu yerine yükseklik. */
|
|
12
|
+
isAutoSize?: boolean;
|
|
13
|
+
/** Otomatik büyümenin tavanı (satır). */
|
|
14
|
+
maxRows?: number;
|
|
15
|
+
/** Kalan karakter sayacını gösterir. `maxLength` ile birlikte anlamlı. */
|
|
16
|
+
hasCounter?: boolean;
|
|
17
|
+
testId?: string;
|
|
18
|
+
} & import('react').RefAttributes<HTMLTextAreaElement>>;
|
|
19
|
+
declare const _default: typeof Textarea;
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as d, jsx as T } from "react/jsx-runtime";
|
|
3
|
+
import { memo as j, forwardRef as v, useRef as w, useState as $, useCallback as k, useLayoutEffect as E } from "react";
|
|
4
|
+
import { cx as c } from "../../helpers/class-name.helper.js";
|
|
5
|
+
import { named as F } from "../../helpers/component.helper.js";
|
|
6
|
+
const e = {"textarea":"ui-textarea-zwJcB","wrapper":"ui-wrapper-O8aJA","textarea--bare":"ui-textarea--bare-IjCIn","textarea--autoSize":"ui-textarea--autoSize--F8yj","counter":"ui-counter-bHVh3","counter--near":"ui-counter--near-AZAQm"};
|
|
7
|
+
const M = /* @__PURE__ */ v(
|
|
8
|
+
({
|
|
9
|
+
className: h,
|
|
10
|
+
variant: p = "default",
|
|
11
|
+
rows: g = 4,
|
|
12
|
+
isAutoSize: i,
|
|
13
|
+
maxRows: l = 12,
|
|
14
|
+
hasCounter: x,
|
|
15
|
+
maxLength: r,
|
|
16
|
+
value: a,
|
|
17
|
+
defaultValue: u,
|
|
18
|
+
onChange: o,
|
|
19
|
+
testId: y,
|
|
20
|
+
...H
|
|
21
|
+
}, s) => {
|
|
22
|
+
const f = w(null), [N, b] = $(String(u ?? "").length), n = a === void 0 ? N : String(a).length, R = k(
|
|
23
|
+
(t) => {
|
|
24
|
+
f.current = t, typeof s == "function" ? s(t) : s && (s.current = t);
|
|
25
|
+
},
|
|
26
|
+
[s]
|
|
27
|
+
);
|
|
28
|
+
E(() => {
|
|
29
|
+
const t = f.current;
|
|
30
|
+
if (!i || !t) return;
|
|
31
|
+
t.style.height = "auto";
|
|
32
|
+
const m = (Number.parseFloat(getComputedStyle(t).lineHeight) || 20) * l;
|
|
33
|
+
t.style.height = `${Math.min(t.scrollHeight, m)}px`, t.style.overflowY = t.scrollHeight > m ? "auto" : "hidden";
|
|
34
|
+
}, [i, l, a, n]);
|
|
35
|
+
const S = r !== void 0 && n >= r * 0.9;
|
|
36
|
+
return /* @__PURE__ */ d("div", { className: c(e.wrapper, h), "data-testid": y, children: [
|
|
37
|
+
/* @__PURE__ */ T(
|
|
38
|
+
"textarea",
|
|
39
|
+
{
|
|
40
|
+
ref: R,
|
|
41
|
+
rows: g,
|
|
42
|
+
className: c(
|
|
43
|
+
e.textarea,
|
|
44
|
+
p === "bare" && e["textarea--bare"],
|
|
45
|
+
i && e["textarea--autoSize"]
|
|
46
|
+
),
|
|
47
|
+
maxLength: r,
|
|
48
|
+
value: a,
|
|
49
|
+
defaultValue: u,
|
|
50
|
+
onChange: (t) => {
|
|
51
|
+
b(t.target.value.length), o == null || o(t);
|
|
52
|
+
},
|
|
53
|
+
...H
|
|
54
|
+
}
|
|
55
|
+
),
|
|
56
|
+
x && r !== void 0 && /* `aria-hidden`: ayni bilgi her tusta duyurulsaydi yazma kesintiye ugrardi. */
|
|
57
|
+
/* @__PURE__ */ d("span", { className: c(e.counter, S && e["counter--near"]), "aria-hidden": !0, children: [
|
|
58
|
+
n,
|
|
59
|
+
" / ",
|
|
60
|
+
r
|
|
61
|
+
] })
|
|
62
|
+
] });
|
|
63
|
+
}
|
|
64
|
+
), J = /* @__PURE__ */ j(/* @__PURE__ */ F(M, "Textarea"));
|
|
65
|
+
export {
|
|
66
|
+
J as default
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/Textarea/index.tsx"],"sourcesContent":["'use client';\n\nimport {\n forwardRef,\n memo,\n type TextareaHTMLAttributes,\n useCallback,\n useLayoutEffect,\n useRef,\n useState,\n} from 'react';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\n\nimport styles from './index.module.scss';\n\n/**\n * `bare`: kenarlık, zemin, dolgu ve gölge YOK — çerçeveyi kapsayıcı çizer (sohbet girdisi).\n * ⚠ Odak göstergesi de kapsayıcının işi (`:focus-within`); `bare` alanı çerçevesiz bir kutuya\n * konursa odak görünmez olur.\n */\nexport type TextareaVariant = 'default' | 'bare';\n\ntype Props = TextareaHTMLAttributes<HTMLTextAreaElement> & {\n variant?: TextareaVariant;\n /** Alan içeriğiyle birlikte BÜYÜR — kaydırma çubuğu yerine yükseklik. */\n isAutoSize?: boolean;\n /** Otomatik büyümenin tavanı (satır). */\n maxRows?: number;\n /** Kalan karakter sayacını gösterir. `maxLength` ile birlikte anlamlı. */\n hasCounter?: boolean;\n testId?: string;\n};\n\n/** Çok satırlı metin girdisi. */\nconst Textarea = /*#__PURE__*/ forwardRef<HTMLTextAreaElement, Props>(\n (\n {\n className,\n variant = 'default',\n rows = 4,\n isAutoSize,\n maxRows = 12,\n hasCounter,\n maxLength,\n value,\n defaultValue,\n onChange,\n testId,\n ...rest\n },\n ref,\n ) => {\n const innerRef = useRef<HTMLTextAreaElement | null>(null);\n /* KONTROLLU kipte uzunluk `value`dan OKUNUR, ic durumdan degil. */\n const [innerLength, setLength] = useState(String(defaultValue ?? '').length);\n const length = value === undefined ? innerLength : String(value).length;\n\n /*\n * Cagiranin `ref`i ile ic olcum referansini birlikte tut: `useImperativeHandle` yalnizca bir\n * nesne dondurur ve DOM dugumunun kendisini gizlerdi.\n */\n const setRefs = useCallback(\n (node: HTMLTextAreaElement | null) => {\n innerRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) ref.current = node;\n },\n [ref],\n );\n\n /*\n * OLCUM BOYAMADAN ONCE: `useEffect` ile alan bir kare boyunca eski yuksekligiyle cizilip sonra\n * ziplyordu.\n */\n useLayoutEffect(() => {\n const node = innerRef.current;\n if (!isAutoSize || !node) return;\n\n node.style.height = 'auto';\n\n const lineHeight = Number.parseFloat(getComputedStyle(node).lineHeight) || 20;\n const max = lineHeight * maxRows;\n\n node.style.height = `${Math.min(node.scrollHeight, max)}px`;\n node.style.overflowY = node.scrollHeight > max ? 'auto' : 'hidden';\n }, [isAutoSize, maxRows, value, length]);\n\n const isNearLimit = maxLength !== undefined && length >= maxLength * 0.9;\n\n return (\n <div className={cx(styles.wrapper, className)} data-testid={testId}>\n <textarea\n ref={setRefs}\n rows={rows}\n className={cx(\n styles.textarea,\n variant === 'bare' && styles['textarea--bare'],\n isAutoSize && styles['textarea--autoSize'],\n )}\n maxLength={maxLength}\n value={value}\n defaultValue={defaultValue}\n onChange={event => {\n setLength(event.target.value.length);\n onChange?.(event);\n }}\n {...rest}\n />\n\n {hasCounter && maxLength !== undefined && (\n /* `aria-hidden`: ayni bilgi her tusta duyurulsaydi yazma kesintiye ugrardi. */\n <span className={cx(styles.counter, isNearLimit && styles['counter--near'])} aria-hidden>\n {length} / {maxLength}\n </span>\n )}\n </div>\n );\n },\n);\n\nexport default /*#__PURE__*/ memo(/*#__PURE__*/ named(Textarea, 'Textarea')) as typeof Textarea;\n"],"names":["Textarea","forwardRef","className","variant","rows","isAutoSize","maxRows","hasCounter","maxLength","value","defaultValue","onChange","testId","rest","ref","innerRef","useRef","innerLength","setLength","useState","length","setRefs","useCallback","node","useLayoutEffect","max","isNearLimit","jsxs","cx","styles","jsx","event","Textarea$1","memo","named"],"mappings":";;;;;;AAmCA,MAAMA,IAAyB,gBAAAC;AAAA,EAC7B,CACE;AAAA,IACE,WAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,MAAAC,IAAO;AAAA,IACP,YAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,YAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,cAAAC;AAAA,IACA,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAMC,IAAWC,EAAmC,IAAI,GAElD,CAACC,GAAaC,CAAS,IAAIC,EAAS,OAAOT,KAAgB,EAAE,EAAE,MAAM,GACrEU,IAASX,MAAU,SAAYQ,IAAc,OAAOR,CAAK,EAAE,QAM3DY,IAAUC;AAAA,MACd,CAACC,MAAqC;AACpC,QAAAR,EAAS,UAAUQ,GACf,OAAOT,KAAQ,aAAYA,EAAIS,CAAI,IAC9BT,QAAS,UAAUS;AAAA,MAC9B;AAAA,MACA,CAACT,CAAG;AAAA,IAAA;AAON,IAAAU,EAAgB,MAAM;AACpB,YAAMD,IAAOR,EAAS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+1 @@
|
|
|
1
|
+
@layer ui{.ui-textarea-zwJcB{width:100%;font-family:var(--ui-font-body);font-size:var(--ui-font-size-control);line-height:var(--ui-leading-snug);color:var(--ui-text);background-color:var(--ui-surface);border:1px solid var(--ui-border-strong);border-radius:var(--ui-radius-md);padding:var(--ui-space-3) var(--ui-space-4);min-height:44px;transition:border-color var(--ui-duration-fast) var(--ui-ease-out),box-shadow var(--ui-duration-fast) var(--ui-ease-out)}.ui-textarea-zwJcB::placeholder{color:var(--ui-placeholder, var(--ui-text-3))}.ui-textarea-zwJcB:hover:not(:disabled):not([aria-invalid=true]){border-color:color-mix(in oklab,var(--ui-border-strong),var(--ui-text) 30%)}.ui-textarea-zwJcB:focus{outline:none;border-color:var(--ui-ring-color);box-shadow:var(--ui-ring)}.ui-textarea-zwJcB:disabled{background-color:var(--ui-surface-2);border-color:var(--ui-border);cursor:not-allowed;color:var(--ui-text-3)}@media (forced-colors: active){.ui-textarea-zwJcB:disabled{color:GrayText;border-color:GrayText}}.ui-textarea-zwJcB[aria-invalid=true]{border-color:var(--ui-danger-solid)}.ui-textarea-zwJcB[aria-invalid=true]:focus{box-shadow:var(--ui-ring-danger)}@media (prefers-reduced-motion: reduce){.ui-textarea-zwJcB{transition:none}}.ui-textarea-zwJcB{resize:vertical;min-height:96px;line-height:var(--ui-leading-normal)}.ui-wrapper-O8aJA{display:flex;flex-direction:column;gap:var(--ui-space-1);width:100%}.ui-textarea--bare-IjCIn{min-height:0;padding:0;border:0;border-radius:0;background-color:transparent;box-shadow:none}.ui-textarea--bare-IjCIn:hover:not(:disabled):not([aria-invalid=true]),.ui-textarea--bare-IjCIn:focus,.ui-textarea--bare-IjCIn:disabled{border:0;background-color:transparent;box-shadow:none}.ui-textarea--autoSize--F8yj{resize:none;overflow-y:hidden}.ui-counter-bHVh3{align-self:flex-end;font-size:var(--ui-font-size-2xs);color:var(--ui-text-3);font-variant-numeric:tabular-nums}.ui-counter--near-AZAQm{color:var(--ui-warn-fg);font-weight:600}}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react/jsx-runtime"),c=require("react"),o=require("../../helpers/class-name.helper.cjs"),m=require("../Link/index.cjs"),e={default:{"tile":"ui-tile-TGur-","tile__medallion":"ui-tile__medallion--Y0pz","tile__label":"ui-tile__label-mI1OQ","tile__meta":"ui-tile__meta-22qnR","tile--active":"ui-tile--active-z0F2M"}},_=({label:s,icon:i,href:r,meta:l,isActive:t,linkProps:d,className:n,testId:u})=>a.jsxs(m.default,{href:r,className:o.cx(e.default.tile,t&&e.default["tile--active"],n),"aria-current":t?"page":void 0,"data-testid":u,...d,children:[a.jsx("span",{className:e.default.tile__medallion,"aria-hidden":!0,children:i}),a.jsx("span",{className:e.default.tile__label,children:s}),l&&a.jsx("span",{className:e.default.tile__meta,children:l})]}),x=c.memo(_);exports.default=x;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/Tile/index.tsx"],"sourcesContent":["import { memo, type ReactNode } from 'react';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport type { UiLinkExtraProps } from '../../types/link.type';\nimport UiLink from '../Link';\n\nimport styles from './index.module.scss';\n\ntype Props = {\n label: string;\n /** İkon DIŞARIDAN gelir: hangi ikonun hangi konuya ait olduğu uygulamanın bilgisi. */\n icon: ReactNode;\n href: string;\n /** Etiketin altında gösterilen ikincil satır (\"1.248 kayıt\"). */\n meta?: ReactNode;\n isActive?: boolean;\n /** Yönlendiriciye geçirilecek ek props. */\n linkProps?: UiLinkExtraProps;\n className?: string;\n testId?: string;\n};\n\n/** Karo — ikon madalyonu + etiket. */\nconst Tile = ({ label, icon, href, meta, isActive, linkProps, className, testId }: Props) => (\n <UiLink\n href={href}\n className={cx(styles.tile, isActive && styles['tile--active'], className)}\n aria-current={isActive ? 'page' : undefined}\n data-testid={testId}\n {...linkProps}\n >\n <span className={styles.tile__medallion} aria-hidden>\n {icon}\n </span>\n\n <span className={styles.tile__label}>{label}</span>\n\n {meta && <span className={styles.tile__meta}>{meta}</span>}\n </UiLink>\n);\n\nexport default /*#__PURE__*/ memo(Tile) as typeof Tile;\n"],"names":["Tile","label","icon","href","meta","isActive","linkProps","className","testId","jsxs","UiLink","cx","styles","jsx","index"],"mappings":"yRAuBMA,EAAO,CAAC,CAAE,MAAAC,EAAO,KAAAC,EAAM,KAAAC,EAAM,KAAAC,EAAM,SAAAC,EAAU,UAAAC,EAAW,UAAAC,EAAW,OAAAC,CAAA,IACvEC,EAAAA,KAACC,EAAAA,QAAA,CACC,KAAAP,EACA,UAAWQ,EAAAA,GAAGC,EAAAA,QAAO,KAAMP,GAAYO,UAAO,cAAc,EAAGL,CAAS,EACxE,eAAcF,EAAW,OAAS,OAClC,cAAaG,EACZ,GAAGF,EAEJ,SAAA,CAAAO,MAAC,QAAK,UAAWD,EAAAA,QAAO,gBAAiB,cAAW,GACjD,SAAAV,EACH,EAEAW,EAAAA,IAAC,OAAA,CAAK,UAAWD,EAAAA,QAAO,YAAc,SAAAX,EAAM,EAE3CG,GAAQS,EAAAA,IAAC,OAAA,CAAK,UAAWD,EAAAA,QAAO,WAAa,SAAAR,CAAA,CAAK,CAAA,CAAA,CACrD,EAGFU,SAAkCd,CAAI"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { UiLinkExtraProps } from '../../types/link.type';
|
|
3
|
+
type Props = {
|
|
4
|
+
label: string;
|
|
5
|
+
/** İkon DIŞARIDAN gelir: hangi ikonun hangi konuya ait olduğu uygulamanın bilgisi. */
|
|
6
|
+
icon: ReactNode;
|
|
7
|
+
href: string;
|
|
8
|
+
/** Etiketin altında gösterilen ikincil satır ("1.248 kayıt"). */
|
|
9
|
+
meta?: ReactNode;
|
|
10
|
+
isActive?: boolean;
|
|
11
|
+
/** Yönlendiriciye geçirilecek ek props. */
|
|
12
|
+
linkProps?: UiLinkExtraProps;
|
|
13
|
+
className?: string;
|
|
14
|
+
testId?: string;
|
|
15
|
+
};
|
|
16
|
+
/** Karo — ikon madalyonu + etiket. */
|
|
17
|
+
declare const Tile: ({ label, icon, href, meta, isActive, linkProps, className, testId }: Props) => import("react").JSX.Element;
|
|
18
|
+
declare const _default: typeof Tile;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsxs as c, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { memo as d } from "react";
|
|
3
|
+
import { cx as p } from "../../helpers/class-name.helper.js";
|
|
4
|
+
import f from "../Link/index.js";
|
|
5
|
+
const e = {"tile":"ui-tile-TGur-","tile__medallion":"ui-tile__medallion--Y0pz","tile__label":"ui-tile__label-mI1OQ","tile__meta":"ui-tile__meta-22qnR","tile--active":"ui-tile--active-z0F2M"};
|
|
6
|
+
const _ = ({ label: r, icon: t, href: s, meta: i, isActive: l, linkProps: m, className: o, testId: n }) => /* @__PURE__ */ c(
|
|
7
|
+
f,
|
|
8
|
+
{
|
|
9
|
+
href: s,
|
|
10
|
+
className: p(e.tile, l && e["tile--active"], o),
|
|
11
|
+
"aria-current": l ? "page" : void 0,
|
|
12
|
+
"data-testid": n,
|
|
13
|
+
...m,
|
|
14
|
+
children: [
|
|
15
|
+
/* @__PURE__ */ a("span", { className: e.tile__medallion, "aria-hidden": !0, children: t }),
|
|
16
|
+
/* @__PURE__ */ a("span", { className: e.tile__label, children: r }),
|
|
17
|
+
i && /* @__PURE__ */ a("span", { className: e.tile__meta, children: i })
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
), b = /* @__PURE__ */ d(_);
|
|
21
|
+
export {
|
|
22
|
+
b as default
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/Tile/index.tsx"],"sourcesContent":["import { memo, type ReactNode } from 'react';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport type { UiLinkExtraProps } from '../../types/link.type';\nimport UiLink from '../Link';\n\nimport styles from './index.module.scss';\n\ntype Props = {\n label: string;\n /** İkon DIŞARIDAN gelir: hangi ikonun hangi konuya ait olduğu uygulamanın bilgisi. */\n icon: ReactNode;\n href: string;\n /** Etiketin altında gösterilen ikincil satır (\"1.248 kayıt\"). */\n meta?: ReactNode;\n isActive?: boolean;\n /** Yönlendiriciye geçirilecek ek props. */\n linkProps?: UiLinkExtraProps;\n className?: string;\n testId?: string;\n};\n\n/** Karo — ikon madalyonu + etiket. */\nconst Tile = ({ label, icon, href, meta, isActive, linkProps, className, testId }: Props) => (\n <UiLink\n href={href}\n className={cx(styles.tile, isActive && styles['tile--active'], className)}\n aria-current={isActive ? 'page' : undefined}\n data-testid={testId}\n {...linkProps}\n >\n <span className={styles.tile__medallion} aria-hidden>\n {icon}\n </span>\n\n <span className={styles.tile__label}>{label}</span>\n\n {meta && <span className={styles.tile__meta}>{meta}</span>}\n </UiLink>\n);\n\nexport default /*#__PURE__*/ memo(Tile) as typeof Tile;\n"],"names":["Tile","label","icon","href","meta","isActive","linkProps","className","testId","jsxs","UiLink","cx","styles","jsx","index"],"mappings":";;;;;AAuBA,MAAMA,IAAO,CAAC,EAAE,OAAAC,GAAO,MAAAC,GAAM,MAAAC,GAAM,MAAAC,GAAM,UAAAC,GAAU,WAAAC,GAAW,WAAAC,GAAW,QAAAC,EAAA,MACvE,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,MAAAP;AAAA,IACA,WAAWQ,EAAGC,EAAO,MAAMP,KAAYO,EAAO,cAAc,GAAGL,CAAS;AAAA,IACxE,gBAAcF,IAAW,SAAS;AAAA,IAClC,eAAaG;AAAA,IACZ,GAAGF;AAAA,IAEJ,UAAA;AAAA,MAAA,gBAAAO,EAAC,UAAK,WAAWD,EAAO,iBAAiB,eAAW,IACjD,UAAAV,GACH;AAAA,MAEA,gBAAAW,EAAC,QAAA,EAAK,WAAWD,EAAO,aAAc,UAAAX,GAAM;AAAA,MAE3CG,KAAQ,gBAAAS,EAAC,QAAA,EAAK,WAAWD,EAAO,YAAa,UAAAR,EAAA,CAAK;AAAA,IAAA;AAAA,EAAA;AACrD,GAGFU,sBAAkCd,CAAI;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer ui{.ui-tile-TGur-{background-color:var(--ui-surface);border:1px solid var(--ui-border);border-radius:var(--ui-radius-lg)}@media (max-width: 640px){.ui-tile-TGur-{border-radius:var(--ui-radius-md)}}.ui-tile-TGur-{transition:border-color var(--ui-duration-fast) var(--ui-ease-out),box-shadow var(--ui-duration-fast) var(--ui-ease-out),transform var(--ui-duration-fast) var(--ui-ease-out)}.ui-tile-TGur-:hover{border-color:var(--ui-border-strong);box-shadow:var(--ui-shadow-md);transform:translateY(-2px)}.ui-tile-TGur-:active{transform:translateY(0);box-shadow:var(--ui-shadow-xs)}@media (prefers-reduced-motion: reduce){.ui-tile-TGur-{transition:none}.ui-tile-TGur-:hover,.ui-tile-TGur-:active{transform:none}}.ui-tile-TGur-{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--ui-space-2);padding:var(--ui-space-5) var(--ui-space-3);text-align:center;text-decoration:none;color:inherit;height:100%}.ui-tile-TGur-:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color);outline-offset:var(--ui-ring-offset, 2px)}.ui-tile__medallion--Y0pz{display:inline-flex;align-items:center;justify-content:center;width:52px;height:52px;border-radius:var(--ui-radius-pill);background-color:var(--ui-surface-2);color:var(--ui-text-2);font-size:var(--ui-font-size-xl);flex-shrink:0;transition:background-color var(--ui-duration-fast) var(--ui-ease-out),color var(--ui-duration-fast) var(--ui-ease-out)}@media (prefers-reduced-motion: reduce){.ui-tile__medallion--Y0pz{transition:none}}.ui-tile__label-mI1OQ{font-family:var(--ui-font-heading);font-size:var(--ui-font-size-sm);font-weight:600;line-height:var(--ui-leading-snug);color:var(--ui-text)}.ui-tile__meta-22qnR{font-size:var(--ui-font-size-2xs);color:var(--ui-text-2);font-variant-numeric:tabular-nums}.ui-tile-TGur-:hover .ui-tile__medallion--Y0pz{background-color:var(--ui-selected-tint);color:var(--ui-text)}.ui-tile--active-z0F2M{border-color:var(--ui-selected-line)}.ui-tile--active-z0F2M .ui-tile__medallion--Y0pz{background-color:var(--ui-selected);color:var(--ui-on-selected)}.ui-tile--active-z0F2M .ui-tile__label-mI1OQ{color:var(--ui-text)}}
|
|
@@ -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"),_=require("react"),a=require("react-bootstrap-icons"),c=require("../../helpers/class-name.helper.cjs"),p=require("../../helpers/component.helper.cjs"),x=require("../../helpers/label.helper.cjs"),f=require("../../theme/context.cjs"),i={default:{"timeline":"ui-timeline-GxubZ","timeline__item":"ui-timeline__item-qMpF2","timeline__marker":"ui-timeline__marker-MDk07","timeline__item--done":"ui-timeline__item--done-dqiOQ","timeline__item--current":"ui-timeline__item--current-TGV5f","timeline__item--pending":"ui-timeline__item--pending-VMZTS","timeline__item--failed":"ui-timeline__item--failed-2BbfX","timeline__body":"ui-timeline__body-xJi7t","timeline__title":"ui-timeline__title-pKxZJ","timeline__time":"ui-timeline__time-ITWYy","timeline__description":"ui-timeline__description-4vrEy","timeline__srOnly":"ui-timeline__srOnly-7K2We"}},h={done:e.jsx(a.CheckLg,{}),failed:e.jsx(a.XLg,{}),current:null,pending:null},s={done:"completed",current:"current",pending:null,failed:"failed"},j=({events:d,label:u,className:o,testId:m})=>{const{labels:n}=f.useUi();return e.jsx("ol",{className:c.cx(i.default.timeline,o),"aria-label":u,"data-testid":m,children:d.map(l=>{var r;const t=l.status??"done";return e.jsxs("li",{className:c.cx(i.default.timeline__item,i.default[`timeline__item--${t}`]),"aria-current":t==="current"?"step":void 0,children:[e.jsx("span",{className:i.default.timeline__marker,"aria-hidden":!0,children:l.icon??h[t]}),e.jsxs("div",{className:i.default.timeline__body,children:[e.jsxs("span",{className:i.default.timeline__title,children:[l.title,e.jsx("span",{className:i.default.timeline__srOnly,children:s[t]===null?null:x.resolveLabel(`Timeline.${s[t]}`,(r=n==null?void 0:n.timeline)==null?void 0:r[s[t]])})]}),l.time&&e.jsx("span",{className:i.default.timeline__time,children:l.time}),l.description&&e.jsx("span",{className:i.default.timeline__description,children:l.description})]})]},l.id)})})},N=_.memo(p.named(j,"Timeline"));exports.default=N;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/Timeline/index.tsx"],"sourcesContent":["'use client';\n\nimport { type FC, memo, type ReactNode } from 'react';\n\nimport { CheckLg, XLg } from 'react-bootstrap-icons';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\nimport { resolveLabel } from '../../helpers/label.helper';\n\nimport { useUi } from '../../theme/context';\n\nimport styles from './index.module.scss';\n\n/** Bir olayın durumu. `pending` HENÜZ olmadı — başarısız değil. */\nexport type TimelineStatus = 'done' | 'current' | 'pending' | 'failed';\n\nexport type TimelineEvent = {\n id: string;\n title: string;\n /** Zaman damgası — BİÇİMLENDİRİLMİŞ dize. */\n time?: string;\n description?: ReactNode;\n status?: TimelineStatus;\n /** Varsayılan işaretin yerine geçen ikon. */\n icon?: ReactNode;\n};\n\ntype Props = {\n events: TimelineEvent[];\n /** Akışın erişilebilir adı (\"Sipariş geçmişi\"). */\n label: string;\n className?: string;\n testId?: string;\n};\n\n/** Durumun GÖRSEL işareti — renkten bağımsız. */\nconst STATUS_ICON: Record<TimelineStatus, ReactNode> = {\n done: <CheckLg />,\n failed: <XLg />,\n current: null,\n pending: null,\n};\n\n/*\n * ⚠ DURUM METNI SR-ONLY ve SAGLAYICIDAN gelir.\n * ⚠ `pending` LISTEDE YOK ve bu bilincli: \"henuz olmadi\" durumunun ekran okuyucuda ayri bir\n * karsiligi yok\n */\nconst STATUS_KEY: Record<TimelineStatus, 'completed' | 'current' | 'failed' | null> = {\n done: 'completed',\n current: 'current',\n pending: null,\n failed: 'failed',\n};\n\n/** Zaman çizelgesi — sipariş durumu, işlem geçmişi. */\nconst Timeline: FC<Props> = ({ events, label, className, testId }) => {\n const { labels } = useUi();\n\n return (\n <ol className={cx(styles.timeline, className)} aria-label={label} data-testid={testId}>\n {events.map(event => {\n const status = event.status ?? 'done';\n\n return (\n <li\n key={event.id}\n className={cx(styles.timeline__item, styles[`timeline__item--${status}`])}\n aria-current={status === 'current' ? 'step' : undefined}\n >\n <span className={styles.timeline__marker} aria-hidden>\n {event.icon ?? STATUS_ICON[status]}\n </span>\n\n <div className={styles.timeline__body}>\n <span className={styles.timeline__title}>\n {event.title}\n {/* Durum METIN olarak da okunur: isaret ve renk ekran okuyucuya\n gecmiyor. */}\n <span className={styles.timeline__srOnly}>\n {STATUS_KEY[status] === null\n ? null\n : resolveLabel(\n `Timeline.${STATUS_KEY[status]}`,\n labels?.timeline?.[STATUS_KEY[status]],\n )}\n </span>\n </span>\n\n {event.time && (\n /*\n * `<time>` DEGIL ` `: `datetime` icin makine okunur bir deger gerekiyor ve elimizde\n * yalnizca bicimlendirilmis dize var.\n */\n <span className={styles.timeline__time}>{event.time}</span>\n )}\n\n {event.description && (\n <span className={styles.timeline__description}>{event.description}</span>\n )}\n </div>\n </li>\n );\n })}\n </ol>\n );\n};\n\nexport default /*#__PURE__*/ memo(/*#__PURE__*/ named(Timeline, 'Timeline')) as typeof Timeline;\n"],"names":["STATUS_ICON","CheckLg","XLg","STATUS_KEY","Timeline","events","label","className","testId","labels","useUi","jsx","cx","styles","event","status","jsxs","resolveLabel","_a","index","memo","named"],"mappings":"2aAoCMA,EAAiD,CACrD,WAAOC,EAAAA,QAAA,EAAQ,EACf,aAASC,EAAAA,IAAA,EAAI,EACb,QAAS,KACT,QAAS,IACX,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,EAAA,CAqCjB,CAAC,CAAA,CACH,CAEJ,EAEAK,EAA6BC,OAAmBC,EAAAA,MAAMjB,EAAU,UAAU,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
/** Bir olayın durumu. `pending` HENÜZ olmadı — başarısız değil. */
|
|
3
|
+
export type TimelineStatus = 'done' | 'current' | 'pending' | 'failed';
|
|
4
|
+
export type TimelineEvent = {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
/** Zaman damgası — BİÇİMLENDİRİLMİŞ dize. */
|
|
8
|
+
time?: string;
|
|
9
|
+
description?: ReactNode;
|
|
10
|
+
status?: TimelineStatus;
|
|
11
|
+
/** Varsayılan işaretin yerine geçen ikon. */
|
|
12
|
+
icon?: ReactNode;
|
|
13
|
+
};
|
|
14
|
+
type Props = {
|
|
15
|
+
events: TimelineEvent[];
|
|
16
|
+
/** Akışın erişilebilir adı ("Sipariş geçmişi"). */
|
|
17
|
+
label: string;
|
|
18
|
+
className?: string;
|
|
19
|
+
testId?: string;
|
|
20
|
+
};
|
|
21
|
+
/** Zaman çizelgesi — sipariş durumu, işlem geçmişi. */
|
|
22
|
+
declare const Timeline: FC<Props>;
|
|
23
|
+
declare const _default: typeof Timeline;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as l, jsxs as t } from "react/jsx-runtime";
|
|
3
|
+
import { memo as u } from "react";
|
|
4
|
+
import { XLg as _, CheckLg as f } from "react-bootstrap-icons";
|
|
5
|
+
import { cx as a } from "../../helpers/class-name.helper.js";
|
|
6
|
+
import { named as h } from "../../helpers/component.helper.js";
|
|
7
|
+
import { resolveLabel as N } from "../../helpers/label.helper.js";
|
|
8
|
+
import { useUi as T } from "../../theme/context.js";
|
|
9
|
+
const e = {"timeline":"ui-timeline-GxubZ","timeline__item":"ui-timeline__item-qMpF2","timeline__marker":"ui-timeline__marker-MDk07","timeline__item--done":"ui-timeline__item--done-dqiOQ","timeline__item--current":"ui-timeline__item--current-TGV5f","timeline__item--pending":"ui-timeline__item--pending-VMZTS","timeline__item--failed":"ui-timeline__item--failed-2BbfX","timeline__body":"ui-timeline__body-xJi7t","timeline__title":"ui-timeline__title-pKxZJ","timeline__time":"ui-timeline__time-ITWYy","timeline__description":"ui-timeline__description-4vrEy","timeline__srOnly":"ui-timeline__srOnly-7K2We"};
|
|
10
|
+
const x = {
|
|
11
|
+
done: /* @__PURE__ */ l(f, {}),
|
|
12
|
+
failed: /* @__PURE__ */ l(_, {}),
|
|
13
|
+
current: null,
|
|
14
|
+
pending: null
|
|
15
|
+
}, m = {
|
|
16
|
+
done: "completed",
|
|
17
|
+
current: "current",
|
|
18
|
+
pending: null,
|
|
19
|
+
failed: "failed"
|
|
20
|
+
}, g = ({ events: o, label: c, className: d, testId: p }) => {
|
|
21
|
+
const { labels: r } = T();
|
|
22
|
+
return /* @__PURE__ */ l("ol", { className: a(e.timeline, d), "aria-label": c, "data-testid": p, children: o.map((i) => {
|
|
23
|
+
var s;
|
|
24
|
+
const n = i.status ?? "done";
|
|
25
|
+
return /* @__PURE__ */ t(
|
|
26
|
+
"li",
|
|
27
|
+
{
|
|
28
|
+
className: a(e.timeline__item, e[`timeline__item--${n}`]),
|
|
29
|
+
"aria-current": n === "current" ? "step" : void 0,
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ l("span", { className: e.timeline__marker, "aria-hidden": !0, children: i.icon ?? x[n] }),
|
|
32
|
+
/* @__PURE__ */ t("div", { className: e.timeline__body, children: [
|
|
33
|
+
/* @__PURE__ */ t("span", { className: e.timeline__title, children: [
|
|
34
|
+
i.title,
|
|
35
|
+
/* @__PURE__ */ l("span", { className: e.timeline__srOnly, children: m[n] === null ? null : N(
|
|
36
|
+
`Timeline.${m[n]}`,
|
|
37
|
+
(s = r == null ? void 0 : r.timeline) == null ? void 0 : s[m[n]]
|
|
38
|
+
) })
|
|
39
|
+
] }),
|
|
40
|
+
i.time && /*
|
|
41
|
+
* `<time>` DEGIL ` `: `datetime` icin makine okunur bir deger gerekiyor ve elimizde
|
|
42
|
+
* yalnizca bicimlendirilmis dize var.
|
|
43
|
+
*/
|
|
44
|
+
/* @__PURE__ */ l("span", { className: e.timeline__time, children: i.time }),
|
|
45
|
+
i.description && /* @__PURE__ */ l("span", { className: e.timeline__description, children: i.description })
|
|
46
|
+
] })
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
i.id
|
|
50
|
+
);
|
|
51
|
+
}) });
|
|
52
|
+
}, C = /* @__PURE__ */ u(/* @__PURE__ */ h(g, "Timeline"));
|
|
53
|
+
export {
|
|
54
|
+
C as default
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/Timeline/index.tsx"],"sourcesContent":["'use client';\n\nimport { type FC, memo, type ReactNode } from 'react';\n\nimport { CheckLg, XLg } from 'react-bootstrap-icons';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\nimport { resolveLabel } from '../../helpers/label.helper';\n\nimport { useUi } from '../../theme/context';\n\nimport styles from './index.module.scss';\n\n/** Bir olayın durumu. `pending` HENÜZ olmadı — başarısız değil. */\nexport type TimelineStatus = 'done' | 'current' | 'pending' | 'failed';\n\nexport type TimelineEvent = {\n id: string;\n title: string;\n /** Zaman damgası — BİÇİMLENDİRİLMİŞ dize. */\n time?: string;\n description?: ReactNode;\n status?: TimelineStatus;\n /** Varsayılan işaretin yerine geçen ikon. */\n icon?: ReactNode;\n};\n\ntype Props = {\n events: TimelineEvent[];\n /** Akışın erişilebilir adı (\"Sipariş geçmişi\"). */\n label: string;\n className?: string;\n testId?: string;\n};\n\n/** Durumun GÖRSEL işareti — renkten bağımsız. */\nconst STATUS_ICON: Record<TimelineStatus, ReactNode> = {\n done: <CheckLg />,\n failed: <XLg />,\n current: null,\n pending: null,\n};\n\n/*\n * ⚠ DURUM METNI SR-ONLY ve SAGLAYICIDAN gelir.\n * ⚠ `pending` LISTEDE YOK ve bu bilincli: \"henuz olmadi\" durumunun ekran okuyucuda ayri bir\n * karsiligi yok\n */\nconst STATUS_KEY: Record<TimelineStatus, 'completed' | 'current' | 'failed' | null> = {\n done: 'completed',\n current: 'current',\n pending: null,\n failed: 'failed',\n};\n\n/** Zaman çizelgesi — sipariş durumu, işlem geçmişi. */\nconst Timeline: FC<Props> = ({ events, label, className, testId }) => {\n const { labels } = useUi();\n\n return (\n <ol className={cx(styles.timeline, className)} aria-label={label} data-testid={testId}>\n {events.map(event => {\n const status = event.status ?? 'done';\n\n return (\n <li\n key={event.id}\n className={cx(styles.timeline__item, styles[`timeline__item--${status}`])}\n aria-current={status === 'current' ? 'step' : undefined}\n >\n <span className={styles.timeline__marker} aria-hidden>\n {event.icon ?? STATUS_ICON[status]}\n </span>\n\n <div className={styles.timeline__body}>\n <span className={styles.timeline__title}>\n {event.title}\n {/* Durum METIN olarak da okunur: isaret ve renk ekran okuyucuya\n gecmiyor. */}\n <span className={styles.timeline__srOnly}>\n {STATUS_KEY[status] === null\n ? null\n : resolveLabel(\n `Timeline.${STATUS_KEY[status]}`,\n labels?.timeline?.[STATUS_KEY[status]],\n )}\n </span>\n </span>\n\n {event.time && (\n /*\n * `<time>` DEGIL ` `: `datetime` icin makine okunur bir deger gerekiyor ve elimizde\n * yalnizca bicimlendirilmis dize var.\n */\n <span className={styles.timeline__time}>{event.time}</span>\n )}\n\n {event.description && (\n <span className={styles.timeline__description}>{event.description}</span>\n )}\n </div>\n </li>\n );\n })}\n </ol>\n );\n};\n\nexport default /*#__PURE__*/ memo(/*#__PURE__*/ named(Timeline, 'Timeline')) as typeof Timeline;\n"],"names":["STATUS_ICON","CheckLg","XLg","STATUS_KEY","Timeline","events","label","className","testId","labels","useUi","jsx","cx","styles","event","status","jsxs","resolveLabel","_a","index","memo","named"],"mappings":";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M;AAAA;AAAA;AAAA;AAAA,8BAKJ,QAAA,EAAK,WAAWD,EAAO,gBAAiB,YAAM,MAAK;AAAA,YAGrDC,EAAM,eACL,gBAAAH,EAAC,QAAA,EAAK,WAAWE,EAAO,uBAAwB,YAAM,YAAA,CAAY;AAAA,UAAA,EAAA,CAEtE;AAAA,QAAA;AAAA,MAAA;AAAA,MAlCKC,EAAM;AAAA,IAAA;AAAA,EAqCjB,CAAC,EAAA,CACH;AAEJ,GAEAK,IAA6B,gBAAAC,EAAmB,gBAAAC,EAAMjB,GAAU,UAAU,CAAC;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer ui{.ui-timeline-GxubZ{display:flex;flex-direction:column;gap:var(--ui-space-0);margin:0;padding:0;list-style:none}.ui-timeline__item-qMpF2{display:flex;gap:var(--ui-space-3);padding-bottom:var(--ui-space-4);position:relative}.ui-timeline__item-qMpF2:not(:last-child):before{content:"";position:absolute;inset-block-start:26px;inset-block-end:0;inset-inline-start:11px;width:2px;background-color:var(--ui-border)}.ui-timeline__item-qMpF2:last-child{padding-bottom:0}.ui-timeline__marker-MDk07{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:24px;height:24px;border-radius:var(--ui-radius-pill);border:2px solid var(--ui-border-strong);background-color:var(--ui-surface);color:var(--ui-on-green);font-size:var(--ui-font-size-2xs);z-index:1}.ui-timeline__item--done-dqiOQ .ui-timeline__marker-MDk07{background-color:var(--ui-green-accent);border-color:var(--ui-green-accent)}.ui-timeline__item--current-TGV5f .ui-timeline__marker-MDk07{border-color:var(--ui-selected);box-shadow:inset 0 0 0 3px var(--ui-selected)}.ui-timeline__item--pending-VMZTS .ui-timeline__marker-MDk07{border-style:dashed;background-color:var(--ui-surface)}.ui-timeline__item--failed-2BbfX .ui-timeline__marker-MDk07{background-color:var(--ui-danger-solid);border-color:var(--ui-danger-solid);color:var(--ui-on-danger)}@media (forced-colors: active){.ui-timeline__item--done-dqiOQ .ui-timeline__marker-MDk07,.ui-timeline__item--current-TGV5f .ui-timeline__marker-MDk07,.ui-timeline__item--failed-2BbfX .ui-timeline__marker-MDk07{background-color:Highlight;border-color:Highlight;forced-color-adjust:none}}.ui-timeline__body-xJi7t{display:flex;flex-direction:column;gap:2px;min-width:0;padding-block-start:1px}.ui-timeline__title-pKxZJ{font-size:var(--ui-font-size-sm);font-weight:600;color:var(--ui-text)}.ui-timeline__item--pending-VMZTS .ui-timeline__title-pKxZJ{color:var(--ui-text-2);font-weight:500}.ui-timeline__item--failed-2BbfX .ui-timeline__title-pKxZJ{color:var(--ui-bad-fg)}.ui-timeline__time-ITWYy{font-size:var(--ui-font-size-xs);color:var(--ui-text-3);font-variant-numeric:tabular-nums}.ui-timeline__description-4vrEy{font-size:var(--ui-font-size-xs);line-height:var(--ui-leading-normal);color:var(--ui-text-2)}.ui-timeline__srOnly-7K2We{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),n=require("react"),w=require("react-dom"),x=require("react-bootstrap-icons"),q=require("../../helpers/class-name.helper.cjs"),v=require("../../helpers/component.helper.cjs"),j=require("../../helpers/label.helper.cjs"),N=require("../../hooks/useDismissOnEscape.cjs"),C=require("../../theme/context.cjs"),L=require("../IconButton/index.cjs"),o={default:{"hub":"ui-hub-JoqOf","toast":"ui-toast-U27Of","toast--info":"ui-toast--info-S1QJr","toast--success":"ui-toast--success-NUso7","toast--warning":"ui-toast--warning-7mi-S","toast--danger":"ui-toast--danger-IhFSz","toast__icon":"ui-toast__icon-p-rgI","toast__text":"ui-toast__text-rG4ji","toast__message":"ui-toast__message-s6S2-","toast__description":"ui-toast__description-0cYTx","toast__action":"ui-toast__action-fOXU5","toast__close":"ui-toast__close-QxSNP"}},E={info:s.jsx(x.InfoCircleFill,{"aria-hidden":!0}),success:s.jsx(x.CheckCircleFill,{"aria-hidden":!0}),warning:s.jsx(x.ExclamationTriangleFill,{"aria-hidden":!0}),danger:s.jsx(x.XCircleFill,{"aria-hidden":!0})},I={info:4e3,success:4e3,warning:6e3,danger:8e3};let T=0;const g=new Set;let l=[];const p=()=>g.forEach(e=>e(l)),_=e=>{l=l.filter(t=>t.id!==e),p()},h=(e,t={})=>{T+=1;const i=T;return l=[...l,{...t,id:i,message:e}].slice(-3),p(),i},S={show:h,info:(e,t)=>h(e,{...t,tone:"info"}),success:(e,t)=>h(e,{...t,tone:"success"}),warning:(e,t)=>h(e,{...t,tone:"warning"}),error:(e,t)=>h(e,{...t,tone:"danger"}),dismiss:_,clear:()=>{l=[],p()}},k=({toast:e,closeLabel:t,onDismiss:i})=>{const a=e.tone??"info",r=e.duration??I[a],[u,d]=n.useState(!1),m=n.useRef(r),b=n.useRef(0);return n.useEffect(()=>{if(r===0||u)return;b.current=Date.now();const f=window.setTimeout(()=>i(e.id),m.current);return()=>{window.clearTimeout(f),m.current=Math.max(0,m.current-(Date.now()-b.current))}},[r,u,i,e.id]),s.jsxs("div",{className:q.cx(o.default.toast,o.default[`toast--${a}`]),role:a==="danger"?"alert":"status",onPointerEnter:()=>d(!0),onPointerLeave:()=>d(!1),onFocus:()=>d(!0),onBlur:()=>d(!1),children:[s.jsx("span",{className:o.default.toast__icon,"aria-hidden":!0,children:E[a]}),s.jsxs("div",{className:o.default.toast__text,children:[s.jsx("span",{className:o.default.toast__message,children:e.message}),e.description&&s.jsx("span",{className:o.default.toast__description,children:e.description})]}),e.action&&s.jsx("button",{type:"button",className:o.default.toast__action,onClick:()=>{var f;(f=e.action)==null||f.onClick(),i(e.id)},children:e.action.label}),s.jsx(L.default,{icon:s.jsx(x.XLg,{"aria-hidden":!0}),label:t,variant:"ghost",size:"sm",className:o.default.toast__close,onClick:()=>i(e.id)})]})},F=({closeLabel:e,regionLabel:t,className:i})=>{const{labels:a}=C.useUi(),[r,u]=n.useState([]);n.useEffect(()=>(g.add(u),u(l),()=>{g.delete(u)}),[]);const d=n.useCallback(c=>_(c),[]),m=n.useCallback(()=>{const c=r.at(-1);c&&_(c.id)},[r]);N.default(r.length>0,m);const[b,f]=n.useState(!1);return n.useEffect(()=>f(!0),[]),b?w.createPortal(s.jsx("div",{className:q.cx(o.default.hub,i),role:"region","aria-label":j.resolveLabel("ToastHub.regionLabel",t,a==null?void 0:a.notifications),"aria-live":"polite","aria-relevant":"additions",children:r.map(c=>s.jsx(k,{toast:c,closeLabel:j.resolveLabel("ToastHub.closeLabel",e,a==null?void 0:a.close),onDismiss:d},c.id))}),document.body):null},P=n.memo(v.named(F,"ToastHub"));exports.default=P;exports.toast=S;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/Toast/index.tsx"],"sourcesContent":["'use client';\n\nimport { memo, type ReactNode, useCallback, useEffect, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\n\nimport {\n CheckCircleFill,\n ExclamationTriangleFill,\n InfoCircleFill,\n XCircleFill,\n XLg,\n} from 'react-bootstrap-icons';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\nimport { resolveLabel } from '../../helpers/label.helper';\nimport useDismissOnEscape from '../../hooks/useDismissOnEscape';\nimport { useUi } from '../../theme/context';\nimport IconButton from '../IconButton';\n\nimport styles from './index.module.scss';\n\nexport type ToastTone = 'info' | 'success' | 'warning' | 'danger';\n\nexport type ToastOptions = {\n tone?: ToastTone;\n /** Görüntülenme süresi (ms). `0` → kendiliğinden kapanmaz. */\n duration?: number;\n /** Başlığın altındaki bir cümlelik ayrıntı. */\n description?: ReactNode;\n /** Bildirimin içindeki tek eylem (\"Geri al\"). */\n action?: { label: string; onClick: () => void };\n};\n\ntype ToastRecord = ToastOptions & { id: number; message: string };\n\n/** Ton başına ikon: renk TEK BAŞINA anlam taşımaz (WCAG 1.4.1). */\nconst ICONS: Record<ToastTone, ReactNode> = {\n info: <InfoCircleFill aria-hidden />,\n success: <CheckCircleFill aria-hidden />,\n warning: <ExclamationTriangleFill aria-hidden />,\n danger: <XCircleFill aria-hidden />,\n};\n\n/** Ton başına varsayılan süre. */\nconst DEFAULT_DURATION: Record<ToastTone, number> = {\n info: 4_000,\n success: 4_000,\n warning: 6_000,\n danger: 8_000,\n};\n\n/** Aynı anda ekranda duran en fazla bildirim. */\nconst MAX_VISIBLE = 3;\n\n/* YAYIN MERKEZI — modul duzeyinde, saglayicidan BAGIMSIZ. */\nlet counter = 0;\n/*\n * `new Set()` modul duzeyinde bir CAGRI ve acilama olmadan bundler onu yan etkili sayabilir — Faz\n * 0'da `memo()` cagrilarinda tam olarak bu olmustu.\n */\nconst listeners = /*#__PURE__*/ new Set<(toasts: ToastRecord[]) => void>();\nlet queue: ToastRecord[] = [];\n\nconst emit = () => listeners.forEach(listener => listener(queue));\n\nconst dismiss = (id: number) => {\n queue = queue.filter(item => item.id !== id);\n emit();\n};\n\nconst push = (message: string, options: ToastOptions = {}): number => {\n counter += 1;\n const id = counter;\n\n /*\n * SIRAYA ALMA: ekranda en fazla `MAX_VISIBLE` bildirim durur, fazlasi EN ESKIsini duserek yerini\n * alir.\n */\n queue = [...queue, { ...options, id, message }].slice(-MAX_VISIBLE);\n emit();\n\n return id;\n};\n\n/**\n * BİLDİRİM SÖZLEŞMESİ — süre, ikon ve renk kararları TEK YERDE.\n * @example toast.success('Adres kaydedildi'); toast.error('Kart reddedildi', { action: { label…\n */\nexport const toast = {\n show: push,\n info: (message: string, options?: ToastOptions) => push(message, { ...options, tone: 'info' }),\n success: (message: string, options?: ToastOptions) =>\n push(message, { ...options, tone: 'success' }),\n warning: (message: string, options?: ToastOptions) =>\n push(message, { ...options, tone: 'warning' }),\n error: (message: string, options?: ToastOptions) => push(message, { ...options, tone: 'danger' }),\n dismiss,\n /** Tümünü kapatır — sayfa geçişinde bayat bildirim taşınmasın. */\n clear: () => {\n queue = [];\n emit();\n },\n};\n\ntype ItemProps = {\n toast: ToastRecord;\n closeLabel: string;\n onDismiss: (id: number) => void;\n};\n\n/** Tek bir bildirim satırı; kendi zamanlayıcısını kendisi taşır. */\nconst ToastItem = ({ toast: record, closeLabel, onDismiss }: ItemProps) => {\n const tone = record.tone ?? 'info';\n const duration = record.duration ?? DEFAULT_DURATION[tone];\n\n const [isPaused, setIsPaused] = useState(false);\n const remainingRef = useRef(duration);\n const startedRef = useRef(0);\n\n useEffect(() => {\n if (duration === 0 || isPaused) return;\n\n startedRef.current = Date.now();\n const timer = window.setTimeout(() => onDismiss(record.id), remainingRef.current);\n\n return () => {\n window.clearTimeout(timer);\n /*\n * Kalan sure KORUNUR: imlec ayrilinca sayac bastan baslasaydi, uzerine bir kez gelinen\n * bildirim ekranda cok daha uzun kaliyordu.\n */\n remainingRef.current = Math.max(0, remainingRef.current - (Date.now() - startedRef.current));\n };\n }, [duration, isPaused, onDismiss, record.id]);\n\n return (\n <div\n className={cx(styles.toast, styles[`toast--${tone}`])}\n /*\n * `role=\"alert\"` YALNIZCA hatada: o rol `aria-live=\"assertive\"` demek ve kullanicinin okudugu\n * seyi BOLER.\n */\n role={tone === 'danger' ? 'alert' : 'status'}\n /*\n * Fare uzerindeyken sayac DURUR: kullanici bildirimi okuyor ya da icindeki eylemi tiklamaya\n * gidiyor.\n */\n onPointerEnter={() => setIsPaused(true)}\n onPointerLeave={() => setIsPaused(false)}\n /* Klavye odagi da duraklatir: */\n onFocus={() => setIsPaused(true)}\n onBlur={() => setIsPaused(false)}\n >\n <span className={styles.toast__icon} aria-hidden>\n {ICONS[tone]}\n </span>\n\n <div className={styles.toast__text}>\n <span className={styles.toast__message}>{record.message}</span>\n {record.description && (\n <span className={styles.toast__description}>{record.description}</span>\n )}\n </div>\n\n {record.action && (\n <button\n type=\"button\"\n className={styles.toast__action}\n onClick={() => {\n record.action?.onClick();\n onDismiss(record.id);\n }}\n >\n {record.action.label}\n </button>\n )}\n\n <IconButton\n icon={<XLg aria-hidden />}\n label={closeLabel}\n variant=\"ghost\"\n size=\"sm\"\n className={styles.toast__close}\n onClick={() => onDismiss(record.id)}\n />\n </div>\n );\n};\n\ntype HubProps = {\n /** Kapatma düğmelerinin erişilebilir adı. */\n closeLabel?: string;\n /**\n * Yığının erişilebilir adı (\"Bildirimler\").\n * ⚠ Yığın artık bir `role=\"region\"` ve canlı bölge; adsız bir bölge ekran okuyucuda yalnızca\n * \"bölge\" diye okunur.\n */\n regionLabel?: string;\n className?: string;\n};\n\n/** Bildirim yığını — uygulamada BİR KEZ çizilir. */\nconst ToastHub = ({ closeLabel, regionLabel, className }: HubProps) => {\n const { labels } = useUi();\n const [toasts, setToasts] = useState<ToastRecord[]>([]);\n\n useEffect(() => {\n listeners.add(setToasts);\n setToasts(queue);\n return () => {\n listeners.delete(setToasts);\n };\n }, []);\n\n const handleDismiss = useCallback((id: number) => dismiss(id), []);\n\n /*\n * Escape en YENI bildirimi kapatir: yigilmis bildirimleri tek tek kapatmanin klavyeyle tek yolu\n * buydu.\n */\n const dismissLatest = useCallback(() => {\n const latest = toasts.at(-1);\n if (latest) dismiss(latest.id);\n }, [toasts]);\n\n useDismissOnEscape(toasts.length > 0, dismissLatest);\n\n /* HIDRASYON: `isClient()` RENDER İÇİNDE OKUNAMAZ */\n const [isMounted, setIsMounted] = useState(false);\n\n useEffect(() => setIsMounted(true), []);\n\n if (!isMounted) return null;\n\n return createPortal(\n /*\n * Bildirimin üzerindeki `role=\"status\"`/`role=\"alert\"` öğe DOM'a girdiği ANDA yaratılıyordu\n * ⚠ CANLI BÖLGE YIĞININ KENDİSİNDE, tek tek bildirimlerde DEĞİL.\n */\n <div\n className={cx(styles.hub, className)}\n role=\"region\"\n aria-label={resolveLabel('ToastHub.regionLabel', regionLabel, labels?.notifications)}\n aria-live=\"polite\"\n aria-relevant=\"additions\"\n >\n {toasts.map(record => (\n <ToastItem\n key={record.id}\n toast={record}\n closeLabel={resolveLabel('ToastHub.closeLabel', closeLabel, labels?.close)}\n onDismiss={handleDismiss}\n />\n ))}\n </div>,\n document.body,\n );\n};\n\nexport default /*#__PURE__*/ memo(/*#__PURE__*/ named(ToastHub, 'ToastHub')) as typeof ToastHub;\n"],"names":["ICONS","jsx","InfoCircleFill","CheckCircleFill","ExclamationTriangleFill","XCircleFill","DEFAULT_DURATION","counter","listeners","queue","emit","listener","dismiss","id","item","push","message","options","toast","ToastItem","record","closeLabel","onDismiss","tone","duration","isPaused","setIsPaused","useState","remainingRef","useRef","startedRef","useEffect","timer","jsxs","cx","styles","_a","IconButton","XLg","ToastHub","regionLabel","className","labels","useUi","toasts","setToasts","handleDismiss","useCallback","dismissLatest","latest","useDismissOnEscape","isMounted","setIsMounted","createPortal","resolveLabel","memo","named"],"mappings":"uhBAoCMA,EAAsC,CAC1C,KAAMC,EAAAA,IAACC,EAAAA,eAAA,CAAe,cAAW,EAAA,CAAC,EAClC,QAASD,EAAAA,IAACE,EAAAA,gBAAA,CAAgB,cAAW,EAAA,CAAC,EACtC,QAASF,EAAAA,IAACG,EAAAA,wBAAA,CAAwB,cAAW,EAAA,CAAC,EAC9C,OAAQH,EAAAA,IAACI,EAAAA,YAAA,CAAY,cAAW,EAAA,CAAC,CACnC,EAGMC,EAA8C,CAClD,KAAM,IACN,QAAS,IACT,QAAS,IACT,OAAQ,GACV,EAMA,IAAIC,EAAU,EAKd,MAAMC,MAA8B,IACpC,IAAIC,EAAuB,CAAA,EAE3B,MAAMC,EAAO,IAAMF,EAAU,QAAQG,GAAYA,EAASF,CAAK,CAAC,EAE1DG,EAAWC,GAAe,CAC9BJ,EAAQA,EAAM,OAAOK,GAAQA,EAAK,KAAOD,CAAE,EAC3CH,EAAA,CACF,EAEMK,EAAO,CAACC,EAAiBC,EAAwB,KAAe,CACpEV,GAAW,EACX,MAAMM,EAAKN,EAMX,OAAAE,EAAQ,CAAC,GAAGA,EAAO,CAAE,GAAGQ,EAAS,GAAAJ,EAAI,QAAAG,CAAA,C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GACC,CAAA,CAAE,EAEL,MAAMC,EAAgBC,EAAAA,YAAalC,GAAeD,EAAQC,CAAE,EAAG,EAAE,EAM3DmC,EAAgBD,EAAAA,YAAY,IAAM,CACtC,MAAME,EAASL,EAAO,GAAG,EAAE,EACvBK,GAAQrC,EAAQqC,EAAO,EAAE,CAC/B,EAAG,CAACL,CAAM,CAAC,EAEXM,EAAAA,QAAmBN,EAAO,OAAS,EAAGI,CAAa,EAGnD,KAAM,CAACG,EAAWC,CAAY,EAAIzB,EAAAA,SAAS,EAAK,EAIhD,OAFAI,EAAAA,UAAU,IAAMqB,EAAa,EAAI,EAAG,CAAA,CAAE,EAEjCD,EAEEE,EAAAA,aAKLpD,EAAAA,IAAC,MAAA,CACC,UAAWiC,EAAAA,GAAGC,UAAO,IAAKM,CAAS,EACnC,KAAK,SACL,aAAYa,EAAAA,aAAa,uBAAwBd,EAAaE,GAAA,YAAAA,EAAQ,aAAa,EACnF,YAAU,SACV,gBAAc,YAEb,SAAAE,EAAO,IAAIxB,GACVnB,EAAAA,IAACkB,EAAA,CAEC,MAAOC,EACP,WAAYkC,EAAAA,aAAa,sBAAuBjC,EAAYqB,GAAA,YAAAA,EAAQ,KAAK,EACzE,UAAWI,CAAA,EAHN1B,EAAO,EAAA,CAKf,CAAA,CAAA,EAEH,SAAS,IAAA,EAvBY,IAyBzB,EAEAmB,EAA6BgB,OAAmBC,EAAAA,MAAMjB,EAAU,UAAU,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type ToastTone = 'info' | 'success' | 'warning' | 'danger';
|
|
3
|
+
export type ToastOptions = {
|
|
4
|
+
tone?: ToastTone;
|
|
5
|
+
/** Görüntülenme süresi (ms). `0` → kendiliğinden kapanmaz. */
|
|
6
|
+
duration?: number;
|
|
7
|
+
/** Başlığın altındaki bir cümlelik ayrıntı. */
|
|
8
|
+
description?: ReactNode;
|
|
9
|
+
/** Bildirimin içindeki tek eylem ("Geri al"). */
|
|
10
|
+
action?: {
|
|
11
|
+
label: string;
|
|
12
|
+
onClick: () => void;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* BİLDİRİM SÖZLEŞMESİ — süre, ikon ve renk kararları TEK YERDE.
|
|
17
|
+
* @example toast.success('Adres kaydedildi'); toast.error('Kart reddedildi', { action: { label…
|
|
18
|
+
*/
|
|
19
|
+
export declare const toast: {
|
|
20
|
+
show: (message: string, options?: ToastOptions) => number;
|
|
21
|
+
info: (message: string, options?: ToastOptions) => number;
|
|
22
|
+
success: (message: string, options?: ToastOptions) => number;
|
|
23
|
+
warning: (message: string, options?: ToastOptions) => number;
|
|
24
|
+
error: (message: string, options?: ToastOptions) => number;
|
|
25
|
+
dismiss: (id: number) => void;
|
|
26
|
+
/** Tümünü kapatır — sayfa geçişinde bayat bildirim taşınmasın. */
|
|
27
|
+
clear: () => void;
|
|
28
|
+
};
|
|
29
|
+
type HubProps = {
|
|
30
|
+
/** Kapatma düğmelerinin erişilebilir adı. */
|
|
31
|
+
closeLabel?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Yığının erişilebilir adı ("Bildirimler").
|
|
34
|
+
* ⚠ Yığın artık bir `role="region"` ve canlı bölge; adsız bir bölge ekran okuyucuda yalnızca
|
|
35
|
+
* "bölge" diye okunur.
|
|
36
|
+
*/
|
|
37
|
+
regionLabel?: string;
|
|
38
|
+
className?: string;
|
|
39
|
+
};
|
|
40
|
+
/** Bildirim yığını — uygulamada BİR KEZ çizilir. */
|
|
41
|
+
declare const ToastHub: ({ closeLabel, regionLabel, className }: HubProps) => import('react').ReactPortal | null;
|
|
42
|
+
declare const _default: typeof ToastHub;
|
|
43
|
+
export default _default;
|