@handijitcom/ui 0.0.0-stage → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +1025 -2
- package/build/base.css +1 -0
- package/build/calendar.cjs +2 -0
- package/build/calendar.cjs.map +1 -0
- package/build/calendar.css +1 -0
- package/build/calendar.js +741 -0
- package/build/calendar.js.map +1 -0
- package/build/charts.cjs +2 -0
- package/build/charts.cjs.map +1 -0
- package/build/charts.css +1 -0
- package/build/charts.js +1866 -0
- package/build/charts.js.map +1 -0
- package/build/chat.cjs +4 -0
- package/build/chat.cjs.map +1 -0
- package/build/chat.css +1 -0
- package/build/chat.js +1126 -0
- package/build/chat.js.map +1 -0
- package/build/components/Accordion/index.cjs +2 -0
- package/build/components/Accordion/index.cjs.map +1 -0
- package/build/components/Accordion/index.d.cts +29 -0
- package/build/components/Accordion/index.d.ts +29 -0
- package/build/components/Accordion/index.js +42 -0
- package/build/components/Accordion/index.js.map +1 -0
- package/build/components/Accordion/style.css +1 -0
- package/build/components/Alert/index.cjs +2 -0
- package/build/components/Alert/index.cjs.map +1 -0
- package/build/components/Alert/index.d.cts +15 -0
- package/build/components/Alert/index.d.ts +15 -0
- package/build/components/Alert/index.js +32 -0
- package/build/components/Alert/index.js.map +1 -0
- package/build/components/Alert/style.css +1 -0
- package/build/components/Avatar/index.cjs +2 -0
- package/build/components/Avatar/index.cjs.map +1 -0
- package/build/components/Avatar/index.d.cts +26 -0
- package/build/components/Avatar/index.d.ts +26 -0
- package/build/components/Avatar/index.js +57 -0
- package/build/components/Avatar/index.js.map +1 -0
- package/build/components/Avatar/style.css +1 -0
- package/build/components/Badge/index.cjs +2 -0
- package/build/components/Badge/index.cjs.map +1 -0
- package/build/components/Badge/index.d.cts +21 -0
- package/build/components/Badge/index.d.ts +21 -0
- package/build/components/Badge/index.js +26 -0
- package/build/components/Badge/index.js.map +1 -0
- package/build/components/Badge/style.css +1 -0
- package/build/components/BottomSheet/index.cjs +2 -0
- package/build/components/BottomSheet/index.cjs.map +1 -0
- package/build/components/BottomSheet/index.d.cts +21 -0
- package/build/components/BottomSheet/index.d.ts +21 -0
- package/build/components/BottomSheet/index.js +85 -0
- package/build/components/BottomSheet/index.js.map +1 -0
- package/build/components/BottomSheet/style.css +1 -0
- package/build/components/Breadcrumb/index.cjs +2 -0
- package/build/components/Breadcrumb/index.cjs.map +1 -0
- package/build/components/Breadcrumb/index.d.cts +20 -0
- package/build/components/Breadcrumb/index.d.ts +20 -0
- package/build/components/Breadcrumb/index.js +31 -0
- package/build/components/Breadcrumb/index.js.map +1 -0
- package/build/components/Breadcrumb/style.css +1 -0
- package/build/components/Button/index.cjs +2 -0
- package/build/components/Button/index.cjs.map +1 -0
- package/build/components/Button/index.d.cts +32 -0
- package/build/components/Button/index.d.ts +32 -0
- package/build/components/Button/index.js +88 -0
- package/build/components/Button/index.js.map +1 -0
- package/build/components/Button/style.css +1 -0
- package/build/components/Card/index.cjs +2 -0
- package/build/components/Card/index.cjs.map +1 -0
- package/build/components/Card/index.d.cts +51 -0
- package/build/components/Card/index.d.ts +51 -0
- package/build/components/Card/index.js +58 -0
- package/build/components/Card/index.js.map +1 -0
- package/build/components/Card/style.css +1 -0
- package/build/components/Carousel/index.cjs +2 -0
- package/build/components/Carousel/index.cjs.map +1 -0
- package/build/components/Carousel/index.d.cts +24 -0
- package/build/components/Carousel/index.d.ts +24 -0
- package/build/components/Carousel/index.js +111 -0
- package/build/components/Carousel/index.js.map +1 -0
- package/build/components/Carousel/style.css +1 -0
- package/build/components/Checkbox/index.cjs +2 -0
- package/build/components/Checkbox/index.cjs.map +1 -0
- package/build/components/Checkbox/index.d.cts +15 -0
- package/build/components/Checkbox/index.d.ts +15 -0
- package/build/components/Checkbox/index.js +50 -0
- package/build/components/Checkbox/index.js.map +1 -0
- package/build/components/Checkbox/style.css +1 -0
- package/build/components/Chip/index.cjs +2 -0
- package/build/components/Chip/index.cjs.map +1 -0
- package/build/components/Chip/index.d.cts +27 -0
- package/build/components/Chip/index.d.ts +27 -0
- package/build/components/Chip/index.js +67 -0
- package/build/components/Chip/index.js.map +1 -0
- package/build/components/Chip/style.css +1 -0
- package/build/components/ChipGroup/index.cjs +2 -0
- package/build/components/ChipGroup/index.cjs.map +1 -0
- package/build/components/ChipGroup/index.d.cts +53 -0
- package/build/components/ChipGroup/index.d.ts +53 -0
- package/build/components/ChipGroup/index.js +81 -0
- package/build/components/ChipGroup/index.js.map +1 -0
- package/build/components/ChipGroup/style.css +1 -0
- package/build/components/CodeBadge/index.cjs +2 -0
- package/build/components/CodeBadge/index.cjs.map +1 -0
- package/build/components/CodeBadge/index.d.cts +36 -0
- package/build/components/CodeBadge/index.d.ts +36 -0
- package/build/components/CodeBadge/index.js +62 -0
- package/build/components/CodeBadge/index.js.map +1 -0
- package/build/components/CodeBadge/style.css +1 -0
- package/build/components/Combobox/index.cjs +2 -0
- package/build/components/Combobox/index.cjs.map +1 -0
- package/build/components/Combobox/index.d.cts +8 -0
- package/build/components/Combobox/index.d.ts +8 -0
- package/build/components/Combobox/index.js +332 -0
- package/build/components/Combobox/index.js.map +1 -0
- package/build/components/Combobox/style.css +1 -0
- package/build/components/CommandPalette/index.cjs +2 -0
- package/build/components/CommandPalette/index.cjs.map +1 -0
- package/build/components/CommandPalette/index.d.cts +37 -0
- package/build/components/CommandPalette/index.d.ts +37 -0
- package/build/components/CommandPalette/index.js +181 -0
- package/build/components/CommandPalette/index.js.map +1 -0
- package/build/components/CommandPalette/style.css +1 -0
- package/build/components/ConfirmDialog/index.cjs +2 -0
- package/build/components/ConfirmDialog/index.cjs.map +1 -0
- package/build/components/ConfirmDialog/index.d.cts +34 -0
- package/build/components/ConfirmDialog/index.d.ts +34 -0
- package/build/components/ConfirmDialog/index.js +85 -0
- package/build/components/ConfirmDialog/index.js.map +1 -0
- package/build/components/CopyField/index.cjs +2 -0
- package/build/components/CopyField/index.cjs.map +1 -0
- package/build/components/CopyField/index.d.cts +20 -0
- package/build/components/CopyField/index.d.ts +20 -0
- package/build/components/CopyField/index.js +44 -0
- package/build/components/CopyField/index.js.map +1 -0
- package/build/components/CopyField/style.css +1 -0
- package/build/components/DataTable/index.cjs +2 -0
- package/build/components/DataTable/index.cjs.map +1 -0
- package/build/components/DataTable/index.d.cts +60 -0
- package/build/components/DataTable/index.d.ts +60 -0
- package/build/components/DataTable/index.js +109 -0
- package/build/components/DataTable/index.js.map +1 -0
- package/build/components/DataTable/style.css +1 -0
- package/build/components/DateField/index.cjs +2 -0
- package/build/components/DateField/index.cjs.map +1 -0
- package/build/components/DateField/index.d.cts +57 -0
- package/build/components/DateField/index.d.ts +57 -0
- package/build/components/DateField/index.js +90 -0
- package/build/components/DateField/index.js.map +1 -0
- package/build/components/DateField/style.css +1 -0
- package/build/components/Directory/index.cjs +2 -0
- package/build/components/Directory/index.cjs.map +1 -0
- package/build/components/Directory/index.d.cts +51 -0
- package/build/components/Directory/index.d.ts +51 -0
- package/build/components/Directory/index.js +46 -0
- package/build/components/Directory/index.js.map +1 -0
- package/build/components/Directory/style.css +1 -0
- package/build/components/Disclosure/index.cjs +2 -0
- package/build/components/Disclosure/index.cjs.map +1 -0
- package/build/components/Disclosure/index.d.cts +34 -0
- package/build/components/Disclosure/index.d.ts +34 -0
- package/build/components/Disclosure/index.js +64 -0
- package/build/components/Disclosure/index.js.map +1 -0
- package/build/components/Disclosure/style.css +1 -0
- package/build/components/Divider/index.cjs +2 -0
- package/build/components/Divider/index.cjs.map +1 -0
- package/build/components/Divider/index.d.cts +10 -0
- package/build/components/Divider/index.d.ts +10 -0
- package/build/components/Divider/index.js +24 -0
- package/build/components/Divider/index.js.map +1 -0
- package/build/components/Divider/style.css +1 -0
- package/build/components/Drawer/index.cjs +2 -0
- package/build/components/Drawer/index.cjs.map +1 -0
- package/build/components/Drawer/index.d.cts +29 -0
- package/build/components/Drawer/index.d.ts +29 -0
- package/build/components/Drawer/index.js +91 -0
- package/build/components/Drawer/index.js.map +1 -0
- package/build/components/Drawer/style.css +1 -0
- package/build/components/EmptyState/index.cjs +2 -0
- package/build/components/EmptyState/index.cjs.map +1 -0
- package/build/components/EmptyState/index.d.cts +19 -0
- package/build/components/EmptyState/index.d.ts +19 -0
- package/build/components/EmptyState/index.js +35 -0
- package/build/components/EmptyState/index.js.map +1 -0
- package/build/components/EmptyState/style.css +1 -0
- package/build/components/Field/index.cjs +2 -0
- package/build/components/Field/index.cjs.map +1 -0
- package/build/components/Field/index.d.cts +37 -0
- package/build/components/Field/index.d.ts +37 -0
- package/build/components/Field/index.js +54 -0
- package/build/components/Field/index.js.map +1 -0
- package/build/components/Field/style.css +1 -0
- package/build/components/FileUpload/index.cjs +2 -0
- package/build/components/FileUpload/index.cjs.map +1 -0
- package/build/components/FileUpload/index.d.cts +42 -0
- package/build/components/FileUpload/index.d.ts +42 -0
- package/build/components/FileUpload/index.js +145 -0
- package/build/components/FileUpload/index.js.map +1 -0
- package/build/components/FileUpload/style.css +1 -0
- package/build/components/FilterBar/index.cjs +2 -0
- package/build/components/FilterBar/index.cjs.map +1 -0
- package/build/components/FilterBar/index.d.cts +28 -0
- package/build/components/FilterBar/index.d.ts +28 -0
- package/build/components/FilterBar/index.js +35 -0
- package/build/components/FilterBar/index.js.map +1 -0
- package/build/components/FilterBar/style.css +1 -0
- package/build/components/IconButton/index.cjs +2 -0
- package/build/components/IconButton/index.cjs.map +1 -0
- package/build/components/IconButton/index.d.cts +26 -0
- package/build/components/IconButton/index.d.ts +26 -0
- package/build/components/IconButton/index.js +61 -0
- package/build/components/IconButton/index.js.map +1 -0
- package/build/components/IconButton/style.css +1 -0
- package/build/components/Input/index.cjs +2 -0
- package/build/components/Input/index.cjs.map +1 -0
- package/build/components/Input/index.d.cts +15 -0
- package/build/components/Input/index.d.ts +15 -0
- package/build/components/Input/index.js +52 -0
- package/build/components/Input/index.js.map +1 -0
- package/build/components/Input/style.css +1 -0
- package/build/components/Kbd/index.cjs +2 -0
- package/build/components/Kbd/index.cjs.map +1 -0
- package/build/components/Kbd/index.d.cts +12 -0
- package/build/components/Kbd/index.d.ts +12 -0
- package/build/components/Kbd/index.js +13 -0
- package/build/components/Kbd/index.js.map +1 -0
- package/build/components/Kbd/style.css +1 -0
- package/build/components/Link/index.cjs +2 -0
- package/build/components/Link/index.cjs.map +1 -0
- package/build/components/Link/index.d.cts +5 -0
- package/build/components/Link/index.d.ts +5 -0
- package/build/components/Link/index.js +11 -0
- package/build/components/Link/index.js.map +1 -0
- package/build/components/Menu/index.cjs +2 -0
- package/build/components/Menu/index.cjs.map +1 -0
- package/build/components/Menu/index.d.cts +46 -0
- package/build/components/Menu/index.d.ts +46 -0
- package/build/components/Menu/index.js +241 -0
- package/build/components/Menu/index.js.map +1 -0
- package/build/components/Menu/style.css +1 -0
- package/build/components/Modal/index.cjs +2 -0
- package/build/components/Modal/index.cjs.map +1 -0
- package/build/components/Modal/index.d.cts +35 -0
- package/build/components/Modal/index.d.ts +35 -0
- package/build/components/Modal/index.js +95 -0
- package/build/components/Modal/index.js.map +1 -0
- package/build/components/Modal/style.css +1 -0
- package/build/components/MoneyInput/index.cjs +2 -0
- package/build/components/MoneyInput/index.cjs.map +1 -0
- package/build/components/MoneyInput/index.d.cts +17 -0
- package/build/components/MoneyInput/index.d.ts +17 -0
- package/build/components/MoneyInput/index.js +22 -0
- package/build/components/MoneyInput/index.js.map +1 -0
- package/build/components/PageHeader/index.cjs +2 -0
- package/build/components/PageHeader/index.cjs.map +1 -0
- package/build/components/PageHeader/index.d.cts +24 -0
- package/build/components/PageHeader/index.d.ts +24 -0
- package/build/components/PageHeader/index.js +34 -0
- package/build/components/PageHeader/index.js.map +1 -0
- package/build/components/PageHeader/style.css +1 -0
- package/build/components/Pagination/index.cjs +2 -0
- package/build/components/Pagination/index.cjs.map +1 -0
- package/build/components/Pagination/index.d.cts +39 -0
- package/build/components/Pagination/index.d.ts +39 -0
- package/build/components/Pagination/index.js +128 -0
- package/build/components/Pagination/index.js.map +1 -0
- package/build/components/Pagination/style.css +1 -0
- package/build/components/Panel/index.cjs +2 -0
- package/build/components/Panel/index.cjs.map +1 -0
- package/build/components/Panel/index.d.cts +43 -0
- package/build/components/Panel/index.d.ts +43 -0
- package/build/components/Panel/index.js +55 -0
- package/build/components/Panel/index.js.map +1 -0
- package/build/components/Panel/style.css +1 -0
- package/build/components/PasswordInput/index.cjs +2 -0
- package/build/components/PasswordInput/index.cjs.map +1 -0
- package/build/components/PasswordInput/index.d.cts +14 -0
- package/build/components/PasswordInput/index.d.ts +14 -0
- package/build/components/PasswordInput/index.js +40 -0
- package/build/components/PasswordInput/index.js.map +1 -0
- package/build/components/PasswordInput/style.css +1 -0
- package/build/components/PercentInput/index.cjs +2 -0
- package/build/components/PercentInput/index.cjs.map +1 -0
- package/build/components/PercentInput/index.d.cts +10 -0
- package/build/components/PercentInput/index.d.ts +10 -0
- package/build/components/PercentInput/index.js +14 -0
- package/build/components/PercentInput/index.js.map +1 -0
- package/build/components/Popover/index.cjs +2 -0
- package/build/components/Popover/index.cjs.map +1 -0
- package/build/components/Popover/index.d.cts +26 -0
- package/build/components/Popover/index.d.ts +26 -0
- package/build/components/Popover/index.js +106 -0
- package/build/components/Popover/index.js.map +1 -0
- package/build/components/Popover/style.css +1 -0
- package/build/components/Price/index.cjs +2 -0
- package/build/components/Price/index.cjs.map +1 -0
- package/build/components/Price/index.d.cts +22 -0
- package/build/components/Price/index.d.ts +22 -0
- package/build/components/Price/index.js +46 -0
- package/build/components/Price/index.js.map +1 -0
- package/build/components/Price/style.css +1 -0
- package/build/components/Progress/index.cjs +2 -0
- package/build/components/Progress/index.cjs.map +1 -0
- package/build/components/Progress/index.d.cts +59 -0
- package/build/components/Progress/index.d.ts +59 -0
- package/build/components/Progress/index.js +124 -0
- package/build/components/Progress/index.js.map +1 -0
- package/build/components/Progress/style.css +1 -0
- package/build/components/PromptDialog/index.cjs +2 -0
- package/build/components/PromptDialog/index.cjs.map +1 -0
- package/build/components/PromptDialog/index.d.cts +36 -0
- package/build/components/PromptDialog/index.d.ts +36 -0
- package/build/components/PromptDialog/index.js +119 -0
- package/build/components/PromptDialog/index.js.map +1 -0
- package/build/components/PromptDialog/style.css +1 -0
- package/build/components/QuantityInput/index.cjs +2 -0
- package/build/components/QuantityInput/index.cjs.map +1 -0
- package/build/components/QuantityInput/index.d.cts +17 -0
- package/build/components/QuantityInput/index.d.ts +17 -0
- package/build/components/QuantityInput/index.js +23 -0
- package/build/components/QuantityInput/index.js.map +1 -0
- package/build/components/QuantityStepper/index.cjs +2 -0
- package/build/components/QuantityStepper/index.cjs.map +1 -0
- package/build/components/QuantityStepper/index.d.cts +37 -0
- package/build/components/QuantityStepper/index.d.ts +37 -0
- package/build/components/QuantityStepper/index.js +118 -0
- package/build/components/QuantityStepper/index.js.map +1 -0
- package/build/components/QuantityStepper/style.css +1 -0
- package/build/components/Radio/index.cjs +2 -0
- package/build/components/Radio/index.cjs.map +1 -0
- package/build/components/Radio/index.d.cts +18 -0
- package/build/components/Radio/index.d.ts +18 -0
- package/build/components/Radio/index.js +53 -0
- package/build/components/Radio/index.js.map +1 -0
- package/build/components/Radio/style.css +1 -0
- package/build/components/RadioCard/index.cjs +2 -0
- package/build/components/RadioCard/index.cjs.map +1 -0
- package/build/components/RadioCard/index.d.cts +16 -0
- package/build/components/RadioCard/index.d.ts +16 -0
- package/build/components/RadioCard/index.js +48 -0
- package/build/components/RadioCard/index.js.map +1 -0
- package/build/components/RadioCard/style.css +1 -0
- package/build/components/RangeSlider/index.cjs +2 -0
- package/build/components/RangeSlider/index.cjs.map +1 -0
- package/build/components/RangeSlider/index.d.cts +45 -0
- package/build/components/RangeSlider/index.d.ts +45 -0
- package/build/components/RangeSlider/index.js +121 -0
- package/build/components/RangeSlider/index.js.map +1 -0
- package/build/components/RangeSlider/style.css +1 -0
- package/build/components/RateInput/index.cjs +2 -0
- package/build/components/RateInput/index.cjs.map +1 -0
- package/build/components/RateInput/index.d.cts +9 -0
- package/build/components/RateInput/index.d.ts +9 -0
- package/build/components/RateInput/index.js +18 -0
- package/build/components/RateInput/index.js.map +1 -0
- package/build/components/Rating/index.cjs +2 -0
- package/build/components/Rating/index.cjs.map +1 -0
- package/build/components/Rating/index.d.cts +16 -0
- package/build/components/Rating/index.d.ts +16 -0
- package/build/components/Rating/index.js +29 -0
- package/build/components/Rating/index.js.map +1 -0
- package/build/components/Rating/style.css +1 -0
- package/build/components/RatingInput/index.cjs +2 -0
- package/build/components/RatingInput/index.cjs.map +1 -0
- package/build/components/RatingInput/index.d.cts +34 -0
- package/build/components/RatingInput/index.d.ts +34 -0
- package/build/components/RatingInput/index.js +89 -0
- package/build/components/RatingInput/index.js.map +1 -0
- package/build/components/RatingInput/style.css +1 -0
- package/build/components/ScaledInput/index.cjs +2 -0
- package/build/components/ScaledInput/index.cjs.map +1 -0
- package/build/components/ScaledInput/index.d.cts +77 -0
- package/build/components/ScaledInput/index.d.ts +77 -0
- package/build/components/ScaledInput/index.js +77 -0
- package/build/components/ScaledInput/index.js.map +1 -0
- package/build/components/ScaledInput/style.css +1 -0
- package/build/components/ScrollArea/index.cjs +2 -0
- package/build/components/ScrollArea/index.cjs.map +1 -0
- package/build/components/ScrollArea/index.d.cts +23 -0
- package/build/components/ScrollArea/index.d.ts +23 -0
- package/build/components/ScrollArea/index.js +65 -0
- package/build/components/ScrollArea/index.js.map +1 -0
- package/build/components/ScrollArea/style.css +1 -0
- package/build/components/SectionHeader/index.cjs +2 -0
- package/build/components/SectionHeader/index.cjs.map +1 -0
- package/build/components/SectionHeader/index.d.cts +17 -0
- package/build/components/SectionHeader/index.d.ts +17 -0
- package/build/components/SectionHeader/index.js +25 -0
- package/build/components/SectionHeader/index.js.map +1 -0
- package/build/components/SectionHeader/style.css +1 -0
- package/build/components/SegmentedControl/index.cjs +2 -0
- package/build/components/SegmentedControl/index.cjs.map +1 -0
- package/build/components/SegmentedControl/index.d.cts +39 -0
- package/build/components/SegmentedControl/index.d.ts +39 -0
- package/build/components/SegmentedControl/index.js +84 -0
- package/build/components/SegmentedControl/index.js.map +1 -0
- package/build/components/SegmentedControl/style.css +1 -0
- package/build/components/Select/index.cjs +2 -0
- package/build/components/Select/index.cjs.map +1 -0
- package/build/components/Select/index.d.cts +52 -0
- package/build/components/Select/index.d.ts +52 -0
- package/build/components/Select/index.js +206 -0
- package/build/components/Select/index.js.map +1 -0
- package/build/components/Select/style.css +1 -0
- package/build/components/Skeleton/index.cjs +2 -0
- package/build/components/Skeleton/index.cjs.map +1 -0
- package/build/components/Skeleton/index.d.cts +25 -0
- package/build/components/Skeleton/index.d.ts +25 -0
- package/build/components/Skeleton/index.js +50 -0
- package/build/components/Skeleton/index.js.map +1 -0
- package/build/components/Skeleton/style.css +1 -0
- package/build/components/Spinner/index.cjs +2 -0
- package/build/components/Spinner/index.cjs.map +1 -0
- package/build/components/Spinner/index.d.cts +16 -0
- package/build/components/Spinner/index.d.ts +16 -0
- package/build/components/Spinner/index.js +15 -0
- package/build/components/Spinner/index.js.map +1 -0
- package/build/components/Spinner/style.css +1 -0
- package/build/components/Stat/index.cjs +2 -0
- package/build/components/Stat/index.cjs.map +1 -0
- package/build/components/Stat/index.d.cts +34 -0
- package/build/components/Stat/index.d.ts +34 -0
- package/build/components/Stat/index.js +72 -0
- package/build/components/Stat/index.js.map +1 -0
- package/build/components/Stat/style.css +1 -0
- package/build/components/StatusDot/index.cjs +2 -0
- package/build/components/StatusDot/index.cjs.map +1 -0
- package/build/components/StatusDot/index.d.cts +23 -0
- package/build/components/StatusDot/index.d.ts +23 -0
- package/build/components/StatusDot/index.js +23 -0
- package/build/components/StatusDot/index.js.map +1 -0
- package/build/components/StatusDot/style.css +1 -0
- package/build/components/Steps/index.cjs +2 -0
- package/build/components/Steps/index.cjs.map +1 -0
- package/build/components/Steps/index.d.cts +23 -0
- package/build/components/Steps/index.d.ts +23 -0
- package/build/components/Steps/index.js +69 -0
- package/build/components/Steps/index.js.map +1 -0
- package/build/components/Steps/style.css +1 -0
- package/build/components/SummaryCard/index.cjs +2 -0
- package/build/components/SummaryCard/index.cjs.map +1 -0
- package/build/components/SummaryCard/index.d.cts +24 -0
- package/build/components/SummaryCard/index.d.ts +24 -0
- package/build/components/SummaryCard/index.js +33 -0
- package/build/components/SummaryCard/index.js.map +1 -0
- package/build/components/SummaryCard/style.css +1 -0
- package/build/components/Switch/index.cjs +2 -0
- package/build/components/Switch/index.cjs.map +1 -0
- package/build/components/Switch/index.d.cts +21 -0
- package/build/components/Switch/index.d.ts +21 -0
- package/build/components/Switch/index.js +60 -0
- package/build/components/Switch/index.js.map +1 -0
- package/build/components/Switch/style.css +1 -0
- package/build/components/Table/index.cjs +2 -0
- package/build/components/Table/index.cjs.map +1 -0
- package/build/components/Table/index.d.cts +28 -0
- package/build/components/Table/index.d.ts +28 -0
- package/build/components/Table/index.js +58 -0
- package/build/components/Table/index.js.map +1 -0
- package/build/components/Table/style.css +1 -0
- package/build/components/TableCheckbox/index.cjs +2 -0
- package/build/components/TableCheckbox/index.cjs.map +1 -0
- package/build/components/TableCheckbox/index.d.cts +15 -0
- package/build/components/TableCheckbox/index.d.ts +15 -0
- package/build/components/TableCheckbox/index.js +31 -0
- package/build/components/TableCheckbox/index.js.map +1 -0
- package/build/components/TableCheckbox/style.css +1 -0
- package/build/components/Tabs/index.cjs +2 -0
- package/build/components/Tabs/index.cjs.map +1 -0
- package/build/components/Tabs/index.d.cts +27 -0
- package/build/components/Tabs/index.d.ts +27 -0
- package/build/components/Tabs/index.js +102 -0
- package/build/components/Tabs/index.js.map +1 -0
- package/build/components/Tabs/style.css +1 -0
- package/build/components/TagInput/index.cjs +2 -0
- package/build/components/TagInput/index.cjs.map +1 -0
- package/build/components/TagInput/index.d.cts +43 -0
- package/build/components/TagInput/index.d.ts +43 -0
- package/build/components/TagInput/index.js +134 -0
- package/build/components/TagInput/index.js.map +1 -0
- package/build/components/TagInput/style.css +1 -0
- package/build/components/TextLink/index.cjs +2 -0
- package/build/components/TextLink/index.cjs.map +1 -0
- package/build/components/TextLink/index.d.cts +16 -0
- package/build/components/TextLink/index.d.ts +16 -0
- package/build/components/TextLink/index.js +32 -0
- package/build/components/TextLink/index.js.map +1 -0
- package/build/components/TextLink/style.css +1 -0
- package/build/components/Textarea/index.cjs +2 -0
- package/build/components/Textarea/index.cjs.map +1 -0
- package/build/components/Textarea/index.d.cts +20 -0
- package/build/components/Textarea/index.d.ts +20 -0
- package/build/components/Textarea/index.js +68 -0
- package/build/components/Textarea/index.js.map +1 -0
- package/build/components/Textarea/style.css +1 -0
- package/build/components/Tile/index.cjs +2 -0
- package/build/components/Tile/index.cjs.map +1 -0
- package/build/components/Tile/index.d.cts +19 -0
- package/build/components/Tile/index.d.ts +19 -0
- package/build/components/Tile/index.js +24 -0
- package/build/components/Tile/index.js.map +1 -0
- package/build/components/Tile/style.css +1 -0
- package/build/components/Timeline/index.cjs +2 -0
- package/build/components/Timeline/index.cjs.map +1 -0
- package/build/components/Timeline/index.d.cts +24 -0
- package/build/components/Timeline/index.d.ts +24 -0
- package/build/components/Timeline/index.js +56 -0
- package/build/components/Timeline/index.js.map +1 -0
- package/build/components/Timeline/style.css +1 -0
- package/build/components/Toast/index.cjs +2 -0
- package/build/components/Toast/index.cjs.map +1 -0
- package/build/components/Toast/index.d.cts +63 -0
- package/build/components/Toast/index.d.ts +63 -0
- package/build/components/Toast/index.js +159 -0
- package/build/components/Toast/index.js.map +1 -0
- package/build/components/Toast/style.css +1 -0
- package/build/components/ToastPortal/index.cjs +2 -0
- package/build/components/ToastPortal/index.cjs.map +1 -0
- package/build/components/ToastPortal/index.d.cts +10 -0
- package/build/components/ToastPortal/index.d.ts +10 -0
- package/build/components/ToastPortal/index.js +15 -0
- package/build/components/ToastPortal/index.js.map +1 -0
- package/build/components/Tooltip/index.cjs +2 -0
- package/build/components/Tooltip/index.cjs.map +1 -0
- package/build/components/Tooltip/index.d.cts +23 -0
- package/build/components/Tooltip/index.d.ts +23 -0
- package/build/components/Tooltip/index.js +116 -0
- package/build/components/Tooltip/index.js.map +1 -0
- package/build/components/Tooltip/style.css +1 -0
- package/build/constants/breakpoint.constants.cjs +2 -0
- package/build/constants/breakpoint.constants.cjs.map +1 -0
- package/build/constants/breakpoint.constants.d.cts +15 -0
- package/build/constants/breakpoint.constants.d.ts +15 -0
- package/build/constants/breakpoint.constants.js +12 -0
- package/build/constants/breakpoint.constants.js.map +1 -0
- package/build/constants/combobox.constants.cjs +2 -0
- package/build/constants/combobox.constants.cjs.map +1 -0
- package/build/constants/combobox.constants.d.cts +11 -0
- package/build/constants/combobox.constants.d.ts +11 -0
- package/build/constants/combobox.constants.js +7 -0
- package/build/constants/combobox.constants.js.map +1 -0
- package/build/constants/scale.constants.cjs +2 -0
- package/build/constants/scale.constants.cjs.map +1 -0
- package/build/constants/scale.constants.d.cts +10 -0
- package/build/constants/scale.constants.d.ts +10 -0
- package/build/constants/scale.constants.js +8 -0
- package/build/constants/scale.constants.js.map +1 -0
- package/build/constants/scroll.constants.cjs +2 -0
- package/build/constants/scroll.constants.cjs.map +1 -0
- package/build/constants/scroll.constants.d.cts +7 -0
- package/build/constants/scroll.constants.d.ts +7 -0
- package/build/constants/scroll.constants.js +5 -0
- package/build/constants/scroll.constants.js.map +1 -0
- package/build/design/fonts/LICENSE-archivo.txt +93 -0
- package/build/design/fonts/LICENSE-ibm-plex-mono.txt +93 -0
- package/build/design/fonts/LICENSE-inter.txt +93 -0
- package/build/design/fonts/archivo-latin-ext-wdth-normal.woff2 +0 -0
- package/build/design/fonts/archivo-latin-wdth-normal.woff2 +0 -0
- package/build/design/fonts/ibm-plex-mono-latin-400-normal.woff2 +0 -0
- package/build/design/fonts/ibm-plex-mono-latin-500-normal.woff2 +0 -0
- package/build/design/fonts/ibm-plex-mono-latin-ext-400-normal.woff2 +0 -0
- package/build/design/fonts/ibm-plex-mono-latin-ext-500-normal.woff2 +0 -0
- package/build/design/fonts/inter-latin-ext-wght-normal.woff2 +0 -0
- package/build/design/fonts/inter-latin-wght-normal.woff2 +0 -0
- package/build/design/fonts.css +75 -0
- package/build/design/fonts.d.css.ts +1 -0
- package/build/design/index.cjs +778 -0
- package/build/design/index.cjs.map +1 -0
- package/build/design/index.d.cts +263 -0
- package/build/design/index.d.mts +263 -0
- package/build/design/index.mjs +751 -0
- package/build/design/index.mjs.map +1 -0
- package/build/design/index.umd.cjs +2 -0
- package/build/design/index.umd.cjs.map +1 -0
- package/build/design/logos/horizontal.svg +1 -0
- package/build/design/logos/mark.svg +1 -0
- package/build/design/tokens.css +477 -0
- package/build/design/tokens.d.css.ts +1 -0
- package/build/design/tokens.json +542 -0
- package/build/design/tokens.scss +616 -0
- package/build/enums/ui-size.enum.cjs +2 -0
- package/build/enums/ui-size.enum.cjs.map +1 -0
- package/build/enums/ui-size.enum.d.cts +12 -0
- package/build/enums/ui-size.enum.d.ts +12 -0
- package/build/enums/ui-size.enum.js +5 -0
- package/build/enums/ui-size.enum.js.map +1 -0
- package/build/enums/ui-variant.enum.cjs +2 -0
- package/build/enums/ui-variant.enum.cjs.map +1 -0
- package/build/enums/ui-variant.enum.d.cts +20 -0
- package/build/enums/ui-variant.enum.d.ts +20 -0
- package/build/enums/ui-variant.enum.js +5 -0
- package/build/enums/ui-variant.enum.js.map +1 -0
- package/build/helpers/aria.helper.cjs +2 -0
- package/build/helpers/aria.helper.cjs.map +1 -0
- package/build/helpers/aria.helper.d.cts +7 -0
- package/build/helpers/aria.helper.d.ts +7 -0
- package/build/helpers/aria.helper.js +5 -0
- package/build/helpers/aria.helper.js.map +1 -0
- package/build/helpers/class-name.helper.cjs +2 -0
- package/build/helpers/class-name.helper.cjs.map +1 -0
- package/build/helpers/class-name.helper.d.cts +3 -0
- package/build/helpers/class-name.helper.d.ts +3 -0
- package/build/helpers/class-name.helper.js +10 -0
- package/build/helpers/class-name.helper.js.map +1 -0
- package/build/helpers/component.helper.cjs +2 -0
- package/build/helpers/component.helper.cjs.map +1 -0
- package/build/helpers/component.helper.d.cts +13 -0
- package/build/helpers/component.helper.d.ts +13 -0
- package/build/helpers/component.helper.js +5 -0
- package/build/helpers/component.helper.js.map +1 -0
- package/build/helpers/focus.helper.cjs +2 -0
- package/build/helpers/focus.helper.cjs.map +1 -0
- package/build/helpers/focus.helper.d.cts +90 -0
- package/build/helpers/focus.helper.d.ts +90 -0
- package/build/helpers/focus.helper.js +83 -0
- package/build/helpers/focus.helper.js.map +1 -0
- package/build/helpers/label.helper.cjs +2 -0
- package/build/helpers/label.helper.cjs.map +1 -0
- package/build/helpers/label.helper.d.cts +11 -0
- package/build/helpers/label.helper.d.ts +11 -0
- package/build/helpers/label.helper.js +11 -0
- package/build/helpers/label.helper.js.map +1 -0
- package/build/helpers/portal.helper.cjs +2 -0
- package/build/helpers/portal.helper.cjs.map +1 -0
- package/build/helpers/portal.helper.d.cts +28 -0
- package/build/helpers/portal.helper.d.ts +28 -0
- package/build/helpers/portal.helper.js +36 -0
- package/build/helpers/portal.helper.js.map +1 -0
- package/build/helpers/ref.helper.cjs +2 -0
- package/build/helpers/ref.helper.cjs.map +1 -0
- package/build/helpers/ref.helper.d.cts +3 -0
- package/build/helpers/ref.helper.d.ts +3 -0
- package/build/helpers/ref.helper.js +7 -0
- package/build/helpers/ref.helper.js.map +1 -0
- package/build/helpers/scaled-number.helper.cjs +2 -0
- package/build/helpers/scaled-number.helper.cjs.map +1 -0
- package/build/helpers/scaled-number.helper.d.cts +54 -0
- package/build/helpers/scaled-number.helper.d.ts +54 -0
- package/build/helpers/scaled-number.helper.js +34 -0
- package/build/helpers/scaled-number.helper.js.map +1 -0
- package/build/helpers/scroll.helper.cjs +2 -0
- package/build/helpers/scroll.helper.cjs.map +1 -0
- package/build/helpers/scroll.helper.d.cts +8 -0
- package/build/helpers/scroll.helper.d.ts +8 -0
- package/build/helpers/scroll.helper.js +11 -0
- package/build/helpers/scroll.helper.js.map +1 -0
- package/build/helpers/text.helper.cjs +2 -0
- package/build/helpers/text.helper.cjs.map +1 -0
- package/build/helpers/text.helper.d.cts +5 -0
- package/build/helpers/text.helper.d.ts +5 -0
- package/build/helpers/text.helper.js +6 -0
- package/build/helpers/text.helper.js.map +1 -0
- package/build/helpers/theme.helper.cjs +2 -0
- package/build/helpers/theme.helper.cjs.map +1 -0
- package/build/helpers/theme.helper.d.cts +18 -0
- package/build/helpers/theme.helper.d.ts +18 -0
- package/build/helpers/theme.helper.js +37 -0
- package/build/helpers/theme.helper.js.map +1 -0
- package/build/hooks/useAnnounce.cjs +2 -0
- package/build/hooks/useAnnounce.cjs.map +1 -0
- package/build/hooks/useAnnounce.d.cts +4 -0
- package/build/hooks/useAnnounce.d.ts +4 -0
- package/build/hooks/useAnnounce.js +23 -0
- package/build/hooks/useAnnounce.js.map +1 -0
- package/build/hooks/useAsyncSearch.cjs +2 -0
- package/build/hooks/useAsyncSearch.cjs.map +1 -0
- package/build/hooks/useAsyncSearch.d.cts +11 -0
- package/build/hooks/useAsyncSearch.d.ts +11 -0
- package/build/hooks/useAsyncSearch.js +17 -0
- package/build/hooks/useAsyncSearch.js.map +1 -0
- package/build/hooks/useCopyFeedback.cjs +2 -0
- package/build/hooks/useCopyFeedback.cjs.map +1 -0
- package/build/hooks/useCopyFeedback.d.cts +10 -0
- package/build/hooks/useCopyFeedback.d.ts +10 -0
- package/build/hooks/useCopyFeedback.js +25 -0
- package/build/hooks/useCopyFeedback.js.map +1 -0
- package/build/hooks/useDismissOnEscape.cjs +2 -0
- package/build/hooks/useDismissOnEscape.cjs.map +1 -0
- package/build/hooks/useDismissOnEscape.d.cts +16 -0
- package/build/hooks/useDismissOnEscape.d.ts +16 -0
- package/build/hooks/useDismissOnEscape.js +18 -0
- package/build/hooks/useDismissOnEscape.js.map +1 -0
- package/build/hooks/useListboxNavigation.cjs +2 -0
- package/build/hooks/useListboxNavigation.cjs.map +1 -0
- package/build/hooks/useListboxNavigation.d.cts +7 -0
- package/build/hooks/useListboxNavigation.d.ts +7 -0
- package/build/hooks/useListboxNavigation.js +53 -0
- package/build/hooks/useListboxNavigation.js.map +1 -0
- package/build/hooks/usePortalSurface.cjs +2 -0
- package/build/hooks/usePortalSurface.cjs.map +1 -0
- package/build/hooks/usePortalSurface.d.cts +25 -0
- package/build/hooks/usePortalSurface.d.ts +25 -0
- package/build/hooks/usePortalSurface.js +19 -0
- package/build/hooks/usePortalSurface.js.map +1 -0
- package/build/hooks/usePositioning.cjs +2 -0
- package/build/hooks/usePositioning.cjs.map +1 -0
- package/build/hooks/usePositioning.d.cts +13 -0
- package/build/hooks/usePositioning.d.ts +13 -0
- package/build/hooks/usePositioning.js +74 -0
- package/build/hooks/usePositioning.js.map +1 -0
- package/build/hooks/useScrollLock.cjs +2 -0
- package/build/hooks/useScrollLock.cjs.map +1 -0
- package/build/hooks/useScrollLock.d.cts +2 -0
- package/build/hooks/useScrollLock.d.ts +2 -0
- package/build/hooks/useScrollLock.js +34 -0
- package/build/hooks/useScrollLock.js.map +1 -0
- package/build/hooks/useSheetViewport.cjs +2 -0
- package/build/hooks/useSheetViewport.cjs.map +1 -0
- package/build/hooks/useSheetViewport.d.cts +6 -0
- package/build/hooks/useSheetViewport.d.ts +6 -0
- package/build/hooks/useSheetViewport.js +29 -0
- package/build/hooks/useSheetViewport.js.map +1 -0
- package/build/hooks/useStickToBottom.cjs +2 -0
- package/build/hooks/useStickToBottom.cjs.map +1 -0
- package/build/hooks/useStickToBottom.d.cts +12 -0
- package/build/hooks/useStickToBottom.d.ts +12 -0
- package/build/hooks/useStickToBottom.js +39 -0
- package/build/hooks/useStickToBottom.js.map +1 -0
- package/build/hooks/useUiTheme.cjs +2 -0
- package/build/hooks/useUiTheme.cjs.map +1 -0
- package/build/hooks/useUiTheme.d.cts +10 -0
- package/build/hooks/useUiTheme.d.ts +10 -0
- package/build/hooks/useUiTheme.js +42 -0
- package/build/hooks/useUiTheme.js.map +1 -0
- package/build/hooks/useUiTokens.cjs +2 -0
- package/build/hooks/useUiTokens.cjs.map +1 -0
- package/build/hooks/useUiTokens.d.cts +11 -0
- package/build/hooks/useUiTokens.d.ts +11 -0
- package/build/hooks/useUiTokens.js +36 -0
- package/build/hooks/useUiTokens.js.map +1 -0
- package/build/hooks/useVirtualList.cjs +2 -0
- package/build/hooks/useVirtualList.cjs.map +1 -0
- package/build/hooks/useVirtualList.d.cts +13 -0
- package/build/hooks/useVirtualList.d.ts +13 -0
- package/build/hooks/useVirtualList.js +41 -0
- package/build/hooks/useVirtualList.js.map +1 -0
- package/build/index.cjs +2 -0
- package/build/index.cjs.map +1 -0
- package/build/index.d.cts +98 -0
- package/build/index.d.ts +98 -0
- package/build/index.js +209 -0
- package/build/index.js.map +1 -0
- package/build/scss/_index.scss +7 -0
- package/build/scss/_mixins.scss +861 -0
- package/build/scss/_variables.scss +245 -0
- package/build/styles/base.d.cts +0 -0
- package/build/styles/base.d.ts +0 -0
- package/build/styles.css +135 -0
- package/build/theme/UiProvider.cjs +2 -0
- package/build/theme/UiProvider.cjs.map +1 -0
- package/build/theme/UiProvider.d.cts +23 -0
- package/build/theme/UiProvider.d.ts +23 -0
- package/build/theme/UiProvider.js +12 -0
- package/build/theme/UiProvider.js.map +1 -0
- package/build/theme/UiThemeScript.cjs +2 -0
- package/build/theme/UiThemeScript.cjs.map +1 -0
- package/build/theme/UiThemeScript.d.cts +22 -0
- package/build/theme/UiThemeScript.d.ts +22 -0
- package/build/theme/UiThemeScript.js +8 -0
- package/build/theme/UiThemeScript.js.map +1 -0
- package/build/theme/context.cjs +2 -0
- package/build/theme/context.cjs.map +1 -0
- package/build/theme/context.d.cts +5 -0
- package/build/theme/context.d.ts +5 -0
- package/build/theme/context.js +8 -0
- package/build/theme/context.js.map +1 -0
- package/build/types/calendar/Calendar/EventBlock.d.cts +29 -0
- package/build/types/calendar/Calendar/EventBlock.d.ts +29 -0
- package/build/types/calendar/Calendar/MonthGrid.d.cts +28 -0
- package/build/types/calendar/Calendar/MonthGrid.d.ts +28 -0
- package/build/types/calendar/Calendar/TimeGrid.d.cts +37 -0
- package/build/types/calendar/Calendar/TimeGrid.d.ts +37 -0
- package/build/types/calendar/Calendar/index.d.cts +72 -0
- package/build/types/calendar/Calendar/index.d.ts +72 -0
- package/build/types/calendar/core/layout.d.cts +43 -0
- package/build/types/calendar/core/layout.d.ts +43 -0
- package/build/types/calendar/core/moves.d.cts +37 -0
- package/build/types/calendar/core/moves.d.ts +37 -0
- package/build/types/calendar/core/time.d.cts +19 -0
- package/build/types/calendar/core/time.d.ts +19 -0
- package/build/types/calendar/core/types.d.cts +75 -0
- package/build/types/calendar/core/types.d.ts +75 -0
- package/build/types/calendar/core/useCalendarDrag.d.cts +32 -0
- package/build/types/calendar/core/useCalendarDrag.d.ts +32 -0
- package/build/types/calendar/index.d.cts +13 -0
- package/build/types/calendar/index.d.ts +13 -0
- package/build/types/charts/AreaChart/index.d.cts +14 -0
- package/build/types/charts/AreaChart/index.d.ts +14 -0
- package/build/types/charts/BarChart/index.d.cts +16 -0
- package/build/types/charts/BarChart/index.d.ts +16 -0
- package/build/types/charts/BoxPlot/index.d.cts +43 -0
- package/build/types/charts/BoxPlot/index.d.ts +43 -0
- package/build/types/charts/ComposedChart/index.d.cts +16 -0
- package/build/types/charts/ComposedChart/index.d.ts +16 -0
- package/build/types/charts/Heatmap/index.d.cts +30 -0
- package/build/types/charts/Heatmap/index.d.ts +30 -0
- package/build/types/charts/Histogram/index.d.cts +29 -0
- package/build/types/charts/Histogram/index.d.ts +29 -0
- package/build/types/charts/LineChart/index.d.cts +14 -0
- package/build/types/charts/LineChart/index.d.ts +14 -0
- package/build/types/charts/PieChart/index.d.cts +36 -0
- package/build/types/charts/PieChart/index.d.ts +36 -0
- package/build/types/charts/RadarChart/index.d.cts +40 -0
- package/build/types/charts/RadarChart/index.d.ts +40 -0
- package/build/types/charts/ScatterPlot/index.d.cts +41 -0
- package/build/types/charts/ScatterPlot/index.d.ts +41 -0
- package/build/types/charts/core/CartesianChart.d.cts +43 -0
- package/build/types/charts/core/CartesianChart.d.ts +43 -0
- package/build/types/charts/core/ChartFrame.d.cts +55 -0
- package/build/types/charts/core/ChartFrame.d.ts +55 -0
- package/build/types/charts/core/axes.d.cts +37 -0
- package/build/types/charts/core/axes.d.ts +37 -0
- package/build/types/charts/core/cartesian.d.cts +80 -0
- package/build/types/charts/core/cartesian.d.ts +80 -0
- package/build/types/charts/core/format.d.cts +19 -0
- package/build/types/charts/core/format.d.ts +19 -0
- package/build/types/charts/core/margins.d.cts +9 -0
- package/build/types/charts/core/margins.d.ts +9 -0
- package/build/types/charts/core/palette.d.cts +11 -0
- package/build/types/charts/core/palette.d.ts +11 -0
- package/build/types/charts/core/path.d.cts +24 -0
- package/build/types/charts/core/path.d.ts +24 -0
- package/build/types/charts/core/scale.d.cts +40 -0
- package/build/types/charts/core/scale.d.ts +40 -0
- package/build/types/charts/core/series.d.cts +11 -0
- package/build/types/charts/core/series.d.ts +11 -0
- package/build/types/charts/core/spatial.d.cts +12 -0
- package/build/types/charts/core/spatial.d.ts +12 -0
- package/build/types/charts/core/stats.d.cts +34 -0
- package/build/types/charts/core/stats.d.ts +34 -0
- package/build/types/charts/core/types.d.cts +31 -0
- package/build/types/charts/core/types.d.ts +31 -0
- package/build/types/charts/core/useChartWidth.d.cts +7 -0
- package/build/types/charts/core/useChartWidth.d.ts +7 -0
- package/build/types/charts/index.d.cts +21 -0
- package/build/types/charts/index.d.ts +21 -0
- package/build/types/chat/ActionList/index.d.cts +46 -0
- package/build/types/chat/ActionList/index.d.ts +46 -0
- package/build/types/chat/AppBar/index.d.cts +21 -0
- package/build/types/chat/AppBar/index.d.ts +21 -0
- package/build/types/chat/ChatMessage/index.d.cts +24 -0
- package/build/types/chat/ChatMessage/index.d.ts +24 -0
- package/build/types/chat/ChatThread/index.d.cts +24 -0
- package/build/types/chat/ChatThread/index.d.ts +24 -0
- package/build/types/chat/Citation/index.d.cts +15 -0
- package/build/types/chat/Citation/index.d.ts +15 -0
- package/build/types/chat/CodeBlock/format.d.cts +7 -0
- package/build/types/chat/CodeBlock/format.d.ts +7 -0
- package/build/types/chat/CodeBlock/grammars.d.cts +44 -0
- package/build/types/chat/CodeBlock/grammars.d.ts +44 -0
- package/build/types/chat/CodeBlock/highlight.d.cts +22 -0
- package/build/types/chat/CodeBlock/highlight.d.ts +22 -0
- package/build/types/chat/CodeBlock/index.d.cts +33 -0
- package/build/types/chat/CodeBlock/index.d.ts +33 -0
- package/build/types/chat/DescriptionList/index.d.cts +16 -0
- package/build/types/chat/DescriptionList/index.d.ts +16 -0
- package/build/types/chat/Legend/index.d.cts +21 -0
- package/build/types/chat/Legend/index.d.ts +21 -0
- package/build/types/chat/MessageActions/index.d.cts +21 -0
- package/build/types/chat/MessageActions/index.d.ts +21 -0
- package/build/types/chat/PromptInput/index.d.cts +47 -0
- package/build/types/chat/PromptInput/index.d.ts +47 -0
- package/build/types/chat/PromptSuggestions/index.d.cts +25 -0
- package/build/types/chat/PromptSuggestions/index.d.ts +25 -0
- package/build/types/chat/Prose/index.d.cts +15 -0
- package/build/types/chat/Prose/index.d.ts +15 -0
- package/build/types/chat/ReasoningBlock/index.d.cts +24 -0
- package/build/types/chat/ReasoningBlock/index.d.ts +24 -0
- package/build/types/chat/ReasoningText/index.d.cts +14 -0
- package/build/types/chat/ReasoningText/index.d.ts +14 -0
- package/build/types/chat/SegmentBar/index.d.cts +46 -0
- package/build/types/chat/SegmentBar/index.d.ts +46 -0
- package/build/types/chat/SourceList/index.d.cts +25 -0
- package/build/types/chat/SourceList/index.d.ts +25 -0
- package/build/types/chat/TerminalOutput/index.d.cts +25 -0
- package/build/types/chat/TerminalOutput/index.d.ts +25 -0
- package/build/types/chat/ToolCall/index.d.cts +41 -0
- package/build/types/chat/ToolCall/index.d.ts +41 -0
- package/build/types/chat/index.d.cts +26 -0
- package/build/types/chat/index.d.ts +26 -0
- package/build/types/combobox.type.d.cts +65 -0
- package/build/types/combobox.type.d.ts +65 -0
- package/build/types/common-element-props.type.d.cts +8 -0
- package/build/types/common-element-props.type.d.ts +8 -0
- package/build/types/helpers/class-name.helper.d.cts +3 -0
- package/build/types/helpers/class-name.helper.d.ts +3 -0
- package/build/types/helpers/component.helper.d.cts +13 -0
- package/build/types/helpers/component.helper.d.ts +13 -0
- package/build/types/helpers/label.helper.d.cts +12 -0
- package/build/types/helpers/label.helper.d.ts +12 -0
- package/build/types/hook.type.d.cts +36 -0
- package/build/types/hook.type.d.ts +36 -0
- package/build/types/link.type.d.cts +14 -0
- package/build/types/link.type.d.ts +14 -0
- package/build/types/positioning.type.d.cts +38 -0
- package/build/types/positioning.type.d.ts +38 -0
- package/build/types/theme.type.d.cts +197 -0
- package/build/types/theme.type.d.ts +197 -0
- package/build/types/types/common-element-props.type.d.cts +8 -0
- package/build/types/types/common-element-props.type.d.ts +8 -0
- package/build/types/types/link.type.d.cts +14 -0
- package/build/types/types/link.type.d.ts +14 -0
- package/build/types/types/theme.type.d.cts +197 -0
- package/build/types/types/theme.type.d.ts +197 -0
- package/package.json +929 -4
package/README.md
CHANGED
|
@@ -1,3 +1,1026 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @handijitcom/ui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Accessible React components for Han Dijit applications: the site, the staff
|
|
4
|
+
panel and the desktop programs. Built on SCSS Modules and drawn with the tokens
|
|
5
|
+
of [`@handijitcom/ui/design`](https://www.npmjs.com/package/@handijitcom/ui/design).
|
|
6
|
+
|
|
7
|
+
- **One design source.** Colours, type, radii, spacing, motion and layers come
|
|
8
|
+
from `@handijitcom/ui/design` (`--hd-*`). This package holds no palette of its own.
|
|
9
|
+
- **Light and dark.** Both themes ship; the choice rides on `data-theme`, the
|
|
10
|
+
contract `@handijitcom/ui/design` defines.
|
|
11
|
+
- **The router is injected.** `next/link`, `react-router`, a plain `<a>`: the
|
|
12
|
+
application decides.
|
|
13
|
+
- **Text comes from outside, once.** The library invents no string in any
|
|
14
|
+
language; user-visible strings are defined in one place, on the provider.
|
|
15
|
+
- **Native elements are kept.** `<dialog>`, `<input type="range">`,
|
|
16
|
+
`<input type="radio">`: focus trapping, keyboard handling and screen reader
|
|
17
|
+
announcements come from the browser.
|
|
18
|
+
- **Sub-entries, zero bytes in the main bundle.** `@handijitcom/ui/chat`
|
|
19
|
+
(chat and tool interfaces), `@handijitcom/ui/charts` (dependency-free SVG
|
|
20
|
+
charts), `@handijitcom/ui/calendar`, `@handijitcom/ui/scss` (token variables
|
|
21
|
+
and mixins) and `@handijitcom/ui/design` (the design tokens: JavaScript API,
|
|
22
|
+
`tokens.css`, `fonts.css`, `tokens.scss`, `tokens.json`, fonts and logos).
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm install @handijitcom/ui @handijitcom/utils react-bootstrap-icons
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
`react`, `react-dom`, `@handijitcom/utils` (`^1.0.0`) and `react-bootstrap-icons`
|
|
29
|
+
are **peer** dependencies. The design tokens ship inside the package
|
|
30
|
+
(`@handijitcom/ui/design`, `@handijitcom/ui/tokens.css`, see
|
|
31
|
+
[`docs/design.md`](./docs/design.md)): an application has exactly one copy of the
|
|
32
|
+
tokens, and the site, the panel and the components all read the same custom
|
|
33
|
+
properties.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Quick start
|
|
38
|
+
|
|
39
|
+
```tsx
|
|
40
|
+
// Once, at the root of the application. The order matters.
|
|
41
|
+
import '@handijitcom/ui/tokens.css'; // the --hd-* custom properties, both themes
|
|
42
|
+
import '@handijitcom/ui/fonts.css'; // optional: Archivo, Inter, IBM Plex Mono
|
|
43
|
+
import '@handijitcom/ui/styles.css';
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
```tsx
|
|
47
|
+
import { Button, Field, Input, UIVariant } from '@handijitcom/ui';
|
|
48
|
+
|
|
49
|
+
<Field label="E-posta" isRequired error={error}>
|
|
50
|
+
{props => <Input {...props} type="email" value={email} onChange={onChange} />}
|
|
51
|
+
</Field>
|
|
52
|
+
|
|
53
|
+
<Button variant={UIVariant.PRIMARY} isLoading={isSaving} onClick={save}>
|
|
54
|
+
Kaydet
|
|
55
|
+
</Button>;
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The provider is **optional**: the package works with no configuration. Links
|
|
59
|
+
are plain `<a>` elements and labels are whatever each call passes.
|
|
60
|
+
|
|
61
|
+
`@handijitcom/ui/styles.css` carries **no tokens**. Without
|
|
62
|
+
`@handijitcom/ui/tokens.css` every colour resolves to nothing. `fonts.css` is
|
|
63
|
+
optional: load the three families your own way (`next/font`, self-hosted
|
|
64
|
+
`@font-face`) if you prefer, the tokens only name them.
|
|
65
|
+
|
|
66
|
+
### A subset of the CSS
|
|
67
|
+
|
|
68
|
+
An application that wants less imports `base.css` (box model, `@keyframes`,
|
|
69
|
+
helpers) and the `components/<Name>/style.css` files of the components it uses,
|
|
70
|
+
and lets its own build join them:
|
|
71
|
+
|
|
72
|
+
```scss
|
|
73
|
+
// styles/ui.scss: Sass inlines plain CSS files.
|
|
74
|
+
@use '@handijitcom/ui/base.css';
|
|
75
|
+
@use '@handijitcom/ui/components/Button/style.css';
|
|
76
|
+
@use '@handijitcom/ui/components/Chip/style.css';
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The JavaScript modules do not import CSS. That is deliberate: under Turbopack
|
|
80
|
+
every client boundary's CSS landed in its own file, and the number of
|
|
81
|
+
render-blocking files hurt LCP more than the bytes did.
|
|
82
|
+
|
|
83
|
+
Every component also has a subpath (`@handijitcom/ui/button`, `/chip-group`,
|
|
84
|
+
`/combobox`, …). The main entry is a pure re-export, so a bundler reaches the
|
|
85
|
+
same file either way.
|
|
86
|
+
|
|
87
|
+
The sub-entries have their own stylesheets, imported **after** `styles.css`:
|
|
88
|
+
`@handijitcom/ui/chat.css`, `@handijitcom/ui/charts.css`, `@handijitcom/ui/calendar.css`.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Theme
|
|
93
|
+
|
|
94
|
+
### The choice rides on `<html data-theme>`
|
|
95
|
+
|
|
96
|
+
```html
|
|
97
|
+
<html data-theme="dark"></html>
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
This is the contract of `@handijitcom/ui/design`, not a setting of this package:
|
|
101
|
+
`data-theme="light"` or `"dark"` on the root element picks the theme, and
|
|
102
|
+
without the attribute `prefers-color-scheme` decides. An explicit choice is
|
|
103
|
+
never overridden by the system setting. The attribute also works on any
|
|
104
|
+
element, to draw one region in the other theme.
|
|
105
|
+
|
|
106
|
+
### Write it before the first paint: `UiThemeScript`
|
|
107
|
+
|
|
108
|
+
```tsx
|
|
109
|
+
// app/layout.tsx, a server layout, inside <head>.
|
|
110
|
+
import { UiThemeScript } from '@handijitcom/ui';
|
|
111
|
+
|
|
112
|
+
<head>
|
|
113
|
+
<UiThemeScript nonce={nonce} />
|
|
114
|
+
</head>;
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
It renders the boot script of `@handijitcom/ui/design` (`THEME_BOOT_SCRIPT`) as an
|
|
118
|
+
inline `<script>`. The script reads `localStorage["hd-theme"]` (`light` or
|
|
119
|
+
`dark`; anything else means "follow the system"), writes `data-theme` while the
|
|
120
|
+
HTML is still being parsed, and follows the system setting when it changes.
|
|
121
|
+
Without it a user who chose dark sees one light frame.
|
|
122
|
+
|
|
123
|
+
It is a component and not a function because a plain function exported from a
|
|
124
|
+
package with `'use client'` files cannot be called from a Next.js server layout.
|
|
125
|
+
|
|
126
|
+
### Content Security Policy
|
|
127
|
+
|
|
128
|
+
The boot script is the **only** element this library injects. It injects no
|
|
129
|
+
`<style>` element at all.
|
|
130
|
+
|
|
131
|
+
| Policy style | What to do |
|
|
132
|
+
| ----------------- | --------------------------------------------------------------------------- |
|
|
133
|
+
| Nonce per request | `<UiThemeScript nonce={nonce} />` |
|
|
134
|
+
| Static hash | add `'${THEME_BOOT_SCRIPT_HASH}'` to `script-src`; the page stays cacheable |
|
|
135
|
+
|
|
136
|
+
```ts
|
|
137
|
+
import { THEME_BOOT_SCRIPT_HASH } from '@handijitcom/ui'; // re-exported from @handijitcom/ui/design
|
|
138
|
+
|
|
139
|
+
const policy = `script-src 'self' '${THEME_BOOT_SCRIPT_HASH}'`;
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
`THEME_ATTRIBUTE`, `THEME_STORAGE_KEY`, `THEME_BOOT_SCRIPT` and
|
|
143
|
+
`THEME_BOOT_SCRIPT_HASH` are re-exports, not copies: the digest always matches
|
|
144
|
+
the script the installed design package ships.
|
|
145
|
+
|
|
146
|
+
Some components position or size themselves with inline `style` attributes
|
|
147
|
+
(popover coordinates, progress width, virtual list offsets). A nonce cannot
|
|
148
|
+
cover an attribute; a policy that restricts inline styles needs
|
|
149
|
+
`style-src-attr 'unsafe-inline'`.
|
|
150
|
+
|
|
151
|
+
### Changing the theme
|
|
152
|
+
|
|
153
|
+
```tsx
|
|
154
|
+
const { scheme, preference, setScheme, toggle, isReady } = useUiTheme();
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
| Field | |
|
|
158
|
+
| ------------ | ---------------------------------------------------------------------- |
|
|
159
|
+
| `scheme` | the **resolved** theme, the one on screen (`light` \| `dark`) |
|
|
160
|
+
| `preference` | the user's **choice** (`light` \| `dark` \| `system`) |
|
|
161
|
+
| `setScheme` | stores the choice and applies it; `'system'` removes the stored choice |
|
|
162
|
+
| `toggle` | flips between light and dark |
|
|
163
|
+
| `isReady` | `false` on the server and on the first client frame |
|
|
164
|
+
|
|
165
|
+
A three-state switch (Light / Dark / System) reads `preference`; if it read
|
|
166
|
+
`scheme`, "System" would show "Dark" as selected.
|
|
167
|
+
|
|
168
|
+
`setScheme` writes where the boot script reads: `localStorage["hd-theme"]`
|
|
169
|
+
holds `light` or `dark`, "system" removes the key, and the attribute always
|
|
170
|
+
carries the resolved theme. A choice made through the hook therefore survives a
|
|
171
|
+
reload without a flash. Wait for `isReady` before drawing the switch: the
|
|
172
|
+
server does not know the choice, and a guessed switch mismatched on hydration
|
|
173
|
+
even when the guess was right.
|
|
174
|
+
|
|
175
|
+
### Brand and product overrides
|
|
176
|
+
|
|
177
|
+
There is no theme prop. A value is changed where it is defined, as a custom
|
|
178
|
+
property, in the application's own stylesheet:
|
|
179
|
+
|
|
180
|
+
```css
|
|
181
|
+
:root {
|
|
182
|
+
--hd-radius-md: 10px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/* The same selector the design package uses, or the override loses on <html>. */
|
|
186
|
+
:root[data-theme='dark'] {
|
|
187
|
+
--hd-bg-page: #0b0d12;
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Change the tokens of `@handijitcom/ui/design` sparingly: the contrast of every text
|
|
192
|
+
and focus pair is measured against the published values.
|
|
193
|
+
|
|
194
|
+
### Overriding our CSS: `@layer ui`
|
|
195
|
+
|
|
196
|
+
All of the library's CSS is inside `@layer ui`. A layered rule **always loses**
|
|
197
|
+
to an unlayered one, whatever the specificity or source order:
|
|
198
|
+
|
|
199
|
+
```css
|
|
200
|
+
/* This is enough; no `!important`, no `.app .card .card`. */
|
|
201
|
+
.my-card {
|
|
202
|
+
padding: 0;
|
|
203
|
+
}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Without the layer your class and ours competed at the same specificity and the
|
|
207
|
+
winner was decided by source order, which is in your bundler's hands and need
|
|
208
|
+
not be the same in development and production.
|
|
209
|
+
|
|
210
|
+
### Component variables
|
|
211
|
+
|
|
212
|
+
Besides the design tokens, a few components read custom properties of their own
|
|
213
|
+
(`var(--ui-…, default)`) so an application can restyle one component from
|
|
214
|
+
`:root` without a class selector:
|
|
215
|
+
|
|
216
|
+
| Component | Variables |
|
|
217
|
+
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
|
|
218
|
+
| focus ring | `--ui-ring-width` (2px) · `--ui-ring-offset` (2px; `-2px` pulls it inside) |
|
|
219
|
+
| inputs | `--ui-placeholder` (`text-3`) |
|
|
220
|
+
| modal scrim | `--ui-scrim-blur` |
|
|
221
|
+
| `Button` | `--ui-button-radius` · `-weight` · `-tracking` · `-wrap` (`nowrap`) |
|
|
222
|
+
| `Chip` | `--ui-chip-bg` · `-line` · `-fg` · `-radius` · `-weight` · `-selected-bg` · `-selected-line` · `-selected-fg` · `-selected-weight` |
|
|
223
|
+
| `Badge` | `--ui-badge-font` · `-weight` · `-tracking` · `-transform` · `-radius` · `-bg` · `-line` · `-fg` |
|
|
224
|
+
| `Stat` | `--ui-stat-label-font/-size/-weight/-tracking/-transform` · `-value-font/-weight/-tracking` · `-unit-font/-size/-tracking/-transform` |
|
|
225
|
+
| `Tabs` | `--ui-tab-weight` |
|
|
226
|
+
| `RadioCard` | `--ui-radio-card-line` · `-radius` |
|
|
227
|
+
| sticky parts | `--ui-header-height` (see below) |
|
|
228
|
+
|
|
229
|
+
```css
|
|
230
|
+
:root {
|
|
231
|
+
--ui-ring-offset: -2px;
|
|
232
|
+
--ui-button-weight: 500;
|
|
233
|
+
--ui-chip-radius: var(--hd-radius-pill);
|
|
234
|
+
--ui-badge-font: var(--hd-font-mono);
|
|
235
|
+
--ui-badge-transform: uppercase;
|
|
236
|
+
}
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
`--ui-*` is the prefix of component-private variables only. Every global value
|
|
240
|
+
(colour, size, radius, duration, layer) is `--hd-*`.
|
|
241
|
+
|
|
242
|
+
### Reading tokens in JavaScript
|
|
243
|
+
|
|
244
|
+
```tsx
|
|
245
|
+
const colors = useUiTokens(['border', 'chart-1']); // { border: '#…', 'chart-1': '#…' }
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
`useUiTokens` returns the resolved values of design tokens and follows theme
|
|
249
|
+
changes; it is for canvas and third-party charts that cannot read `var()`. On
|
|
250
|
+
the server and the first frame it returns `currentColor`. The names are
|
|
251
|
+
`TokenName` of `@handijitcom/ui/design`.
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
## Labels
|
|
256
|
+
|
|
257
|
+
The library cannot write "Close": it does not know the language, the tone or
|
|
258
|
+
the term. Spreading the same string over a hundred call sites is not right
|
|
259
|
+
either. Labels are given **once**, on the provider:
|
|
260
|
+
|
|
261
|
+
```tsx
|
|
262
|
+
<UiProvider
|
|
263
|
+
labels={{
|
|
264
|
+
close: 'Kapat',
|
|
265
|
+
cancel: 'Vazgeç',
|
|
266
|
+
submit: 'Kaydet',
|
|
267
|
+
loading: 'Yükleniyor',
|
|
268
|
+
required: '(zorunlu)',
|
|
269
|
+
filters: 'Filtreler',
|
|
270
|
+
breadcrumb: 'Konum',
|
|
271
|
+
directoryJump: 'Harfe göre atla',
|
|
272
|
+
selectPlaceholder: 'Seçiniz',
|
|
273
|
+
locale: 'tr',
|
|
274
|
+
currency: '₺',
|
|
275
|
+
combobox: {
|
|
276
|
+
searchPlaceholder: 'Ara…',
|
|
277
|
+
emptyMessage: 'Sonuç bulunamadı',
|
|
278
|
+
loadingMessage: 'Aranıyor…',
|
|
279
|
+
clearLabel: 'Seçimi temizle',
|
|
280
|
+
},
|
|
281
|
+
pagination: { label: 'Sayfalar', previous: 'Önceki sayfa', next: 'Sonraki sayfa' },
|
|
282
|
+
quantity: { label: 'Adet', decrease: 'Adeti azalt', increase: 'Adeti artır' },
|
|
283
|
+
range: { min: 'En az', max: 'En çok' },
|
|
284
|
+
dataTable: { empty: 'Kayıt bulunamadı.', loading: 'Yükleniyor…' },
|
|
285
|
+
copyField: {
|
|
286
|
+
copy: value => `${value} kopyala`,
|
|
287
|
+
copied: value => `${value} kopyalandı`,
|
|
288
|
+
announcement: 'Panoya kopyalandı',
|
|
289
|
+
},
|
|
290
|
+
calendar: {
|
|
291
|
+
instructions: 'Oklarla gezinin, Enter ile açın; ⌘ ve oklarla taşıyın, ⌘ ⇧ ↑ ↓ ile kısaltıp uzatın.',
|
|
292
|
+
cancelled: 'İptal',
|
|
293
|
+
more: count => `+${count} daha`,
|
|
294
|
+
moved: (title, when) => `${title} taşındı: ${when}`,
|
|
295
|
+
},
|
|
296
|
+
rating: {
|
|
297
|
+
srLabel: (value, count) => `5 üzerinden ${value}${count ? `, ${count} değerlendirme` : ''}`,
|
|
298
|
+
starCount: star => `${star} yıldız`,
|
|
299
|
+
scale: { 1: 'Hiç memnun kalmadım', 2: 'Beklentimi karşılamadı', 3: 'İdare eder', 4: 'Memnun kaldım', 5: 'Çok memnun kaldım' },
|
|
300
|
+
},
|
|
301
|
+
}}
|
|
302
|
+
>
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
**Resolution order: prop → provider → development warning.** A prop wins when
|
|
306
|
+
given; pass one where the wording depends on the context
|
|
307
|
+
(`closeLabel="Daha sonra"`).
|
|
308
|
+
|
|
309
|
+
Text that belongs to **one element** never goes on the provider, because it
|
|
310
|
+
differs at every call site: `Modal.title`, `ConfirmDialog.confirmLabel` ("Sil":
|
|
311
|
+
it must repeat the action; "OK" does not say what is being confirmed),
|
|
312
|
+
`IconButton.label`, `Select.label`, `Combobox.labels.placeholder`,
|
|
313
|
+
`TableCheckbox.label`, `ChipGroup.label`, `RatingInput.label`.
|
|
314
|
+
|
|
315
|
+
TypeScript cannot see what the provider carries at run time, so the props are
|
|
316
|
+
optional. With neither a prop nor a provider value the element stays unnamed
|
|
317
|
+
and, in development, the console says so once per key:
|
|
318
|
+
|
|
319
|
+
```
|
|
320
|
+
[@handijitcom/ui] Eksik metin: Modal.closeLabel. Prop olarak geçin ya da
|
|
321
|
+
<UiProvider labels={…}> içinde bir kez tanımlayın.
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
---
|
|
325
|
+
|
|
326
|
+
## Router
|
|
327
|
+
|
|
328
|
+
```tsx
|
|
329
|
+
import NextLink from 'next/link';
|
|
330
|
+
|
|
331
|
+
<UiProvider linkComponent={NextLink}>…</UiProvider>;
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
A component library cannot choose the router: importing `next/link` ties the
|
|
335
|
+
package to Next.js, importing `react-router` breaks another application.
|
|
336
|
+
Router-specific props travel through `linkProps`:
|
|
337
|
+
|
|
338
|
+
```tsx
|
|
339
|
+
<Pagination buildHref={page => `?sayfa=${page}`} linkProps={{ scroll: false }} … />
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
### Back to the top after a page change
|
|
343
|
+
|
|
344
|
+
```tsx
|
|
345
|
+
<Pagination page={page} totalPages={totalPages} scrollTo="top" … />
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
It works in both modes (`buildHref` and `onPageChange`). The scroll is instant
|
|
349
|
+
and does **not** happen when the active page is pressed, when the click opens a
|
|
350
|
+
new tab (Ctrl/Cmd/middle button), or when the prop is absent. Do not pass it
|
|
351
|
+
for a list inside a page (reviews in a tab): it throws the reader to the top.
|
|
352
|
+
|
|
353
|
+
### Sticky header
|
|
354
|
+
|
|
355
|
+
Components that stick while the page scrolls (`DirectoryGroup`,
|
|
356
|
+
`DirectoryJump`, a `DataTable` with a caption) read their offset from
|
|
357
|
+
`--ui-header-height`, **0 by default**. If the application has a sticky band,
|
|
358
|
+
write its real height:
|
|
359
|
+
|
|
360
|
+
```tsx
|
|
361
|
+
useEffect(() => {
|
|
362
|
+
const observer = new ResizeObserver(([entry]) =>
|
|
363
|
+
document.documentElement.style.setProperty(
|
|
364
|
+
'--ui-header-height',
|
|
365
|
+
`${entry.contentRect.height}px`,
|
|
366
|
+
),
|
|
367
|
+
);
|
|
368
|
+
observer.observe(headerRef.current!);
|
|
369
|
+
return () => observer.disconnect();
|
|
370
|
+
}, []);
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
Do not write a constant: the band grows when the search box wraps on a phone
|
|
374
|
+
and changes when an announcement strip appears.
|
|
375
|
+
|
|
376
|
+
---
|
|
377
|
+
|
|
378
|
+
## Component catalogue
|
|
379
|
+
|
|
380
|
+
| Group | Components |
|
|
381
|
+
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
382
|
+
| Action | `Button` · `IconButton` · `TextLink` · `Tooltip` · `Menu` · `ContextMenu` · `Popover` |
|
|
383
|
+
| Choice | `Chip` · `ChipGroup` · `SegmentedControl` · `Select` · `Combobox` · `Checkbox` · `Switch` · `Radio` · `RadioCard` · `RangeSlider` · `RatingInput` · `QuantityStepper` · `TableCheckbox` |
|
|
384
|
+
| Input | `Input` · `PasswordInput` · `Textarea` · `TagInput` · `DateField` (+ `DateRange`) · `FileUpload` · `Field` · `ScaledInput` · `MoneyInput` · `QuantityInput` · `RateInput` · `PercentInput` |
|
|
385
|
+
| Surface | `Card` (+ `CardMedia`, `CardOverlay`, `CardBody`, `CardFooter`) · `SummaryCard` · `Panel` (+ `PanelForm`, `PanelRow`) · `PageHeader` · `SectionHeader` · `Tile` · `Directory` (+ `DirectoryGroup`, `DirectoryRow`, `DirectoryJump`) · `Carousel` · `ScrollArea` · `Disclosure` · `Accordion` · `Tabs` |
|
|
386
|
+
| Feedback | `Alert` · `Badge` · `StatusDot` · `CodeBadge` · `Kbd` · `EmptyState` · `Skeleton` (+ `SkeletonCard`, `SkeletonRows`, `SkeletonTable`) · `Spinner` · `Progress` · `Steps` · `Divider` · `Avatar` · `Rating` · `Price` · `Stat` · `CopyField` · `Breadcrumb` · `ToastHub` (+ `ToastPortal`) |
|
|
387
|
+
| Modal | `Modal` · `Drawer` · `BottomSheet` · `ConfirmDialog` · `PromptDialog` · `CommandPalette` |
|
|
388
|
+
| Data | `Table` (+ `TableScroller`) · `DataTable` (+ `DataTableRow`) · `FilterBar` (+ `FilterBarField`) · `Pagination` · `Timeline` |
|
|
389
|
+
| Theme and hooks | `UiProvider` · `UiThemeScript` · `useUi` · `useUiTheme` · `useUiTokens` · `useAnnounce` · `useStickToBottom` · `usePositioning` · `useVirtualList` · `useListboxNavigation` · `hasOpenSurface` |
|
|
390
|
+
| Chat, `/chat` | `ChatThread` · `ChatMessage` · `PromptInput` · `PromptSuggestions` · `Prose` · `CodeBlock` · `ReasoningBlock` (+ `ReasoningText`) · `ToolCall` (+ `ToolCallSection`) · `TerminalOutput` · `SourceList` · `Citation` · `MessageActions` · `AppBar` · `ActionList` (+ `ActionListItem`) · `SegmentBar` · `Legend` · `DescriptionList` |
|
|
391
|
+
| Charts, `/charts` | `LineChart` · `AreaChart` · `BarChart` · `ComposedChart` · `PieChart` · `ScatterPlot` · `Heatmap` · `BoxPlot` · `Histogram` · `RadarChart` |
|
|
392
|
+
| Calendar, `/calendar` | `Calendar` |
|
|
393
|
+
|
|
394
|
+
### Variants and sizes
|
|
395
|
+
|
|
396
|
+
| `UIVariant` | Use |
|
|
397
|
+
| ----------- | ----------------------------------------------------------------------- |
|
|
398
|
+
| `PRIMARY` | the one expected action of the screen: cobalt fill |
|
|
399
|
+
| `ACCENT` | the conversion action (download, try, subscribe): coral fill, only that |
|
|
400
|
+
| `SECONDARY` | a neutral second action: grey border, body text |
|
|
401
|
+
| `OUTLINE` | a cobalt frame: an encouraged navigation that is not the primary action |
|
|
402
|
+
| `SOFT` | a neutral fill: a secondary action inside a card |
|
|
403
|
+
| `GHOST` | no surface: toolbar and inline secondary actions, in the link colour |
|
|
404
|
+
| `DANGER` | a destructive action |
|
|
405
|
+
| `ON_BAND` | an action on the brand band (deep cobalt in both themes) |
|
|
406
|
+
|
|
407
|
+
`UISize`: `XSMALL` 28px · `SMALL` 32px · `MEDIUM` 40px · `LARGE` 48px. Fields
|
|
408
|
+
are 40px with 15px text on desktop and 44px with 16px text on a narrow or touch
|
|
409
|
+
screen (no iOS zoom, a full touch target).
|
|
410
|
+
|
|
411
|
+
`IconButton variant`: `ghost` · `secondary` · `outline` · `solid` · `accent` ·
|
|
412
|
+
`danger`. `secondary` and `outline` are drawn exactly like the `Button` variants
|
|
413
|
+
of the same name: the neutral frame and the cobalt frame. (Until 2.1 `outline`
|
|
414
|
+
was the neutral frame; use `secondary` for that look.)
|
|
415
|
+
`Badge tone`: `neutral` · `success` · `danger` · `warning` · `info` ·
|
|
416
|
+
`highlight`, each as `soft`, `solid` or `outline`.
|
|
417
|
+
|
|
418
|
+
### The number of options picks the element
|
|
419
|
+
|
|
420
|
+
| Options | Element |
|
|
421
|
+
| ------------- | ---------------------------------------------------- |
|
|
422
|
+
| ≤7 | `ChipGroup`: all on screen, one tap |
|
|
423
|
+
| 5–20 | `Select`: a list without search |
|
|
424
|
+
| 20+ | `Combobox`: type to search |
|
|
425
|
+
| A range | `RangeSlider` (+ a number input for the exact value) |
|
|
426
|
+
| A single flag | `Checkbox` |
|
|
427
|
+
|
|
428
|
+
### Dropdown or bottom sheet
|
|
429
|
+
|
|
430
|
+
`Select` and `Combobox` open a **dropdown anchored to the trigger** on every
|
|
431
|
+
screen except a narrow touch one, where they open a **bottom sheet**. The rule
|
|
432
|
+
is one media query, exported as `SHEET_MEDIA_QUERY`:
|
|
433
|
+
`(max-width: 640px) and (pointer: coarse)`. A narrow desktop window, an
|
|
434
|
+
Electron window included, keeps the dropdown.
|
|
435
|
+
|
|
436
|
+
### Form fields (2.2)
|
|
437
|
+
|
|
438
|
+
Every field component speaks `Field`'s contract, so a form library binds them
|
|
439
|
+
the same way: spread `FieldChildProps` (`id`, `aria-invalid`,
|
|
440
|
+
`aria-describedby`, `required`) on the control and the label, error and hint
|
|
441
|
+
are linked for a screen reader.
|
|
442
|
+
|
|
443
|
+
```tsx
|
|
444
|
+
<Field id="plan" label="Plan" hint="İstediğiniz zaman değiştirebilirsiniz" error={error}>
|
|
445
|
+
{props => (
|
|
446
|
+
<SegmentedControl {...props} label="Plan" options={PLANS} value={plan} onChange={setPlan} />
|
|
447
|
+
)}
|
|
448
|
+
</Field>
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
- **`Field`** takes an `id` (the control's; the messages take `<id>-error` and
|
|
452
|
+
`<id>-hint`) and a `ReactNode` label.
|
|
453
|
+
- **`Checkbox`, `Switch`, `Radio`** take `error`: the message under the label,
|
|
454
|
+
`aria-invalid` and the link. A passed `aria-describedby` is **merged** with
|
|
455
|
+
the error and the hint, each id once (until 2.1 it replaced the hint).
|
|
456
|
+
- **Composites** take the four props of `FieldChildProps`. Where they land:
|
|
457
|
+
|
|
458
|
+
| Component | `id` | `aria-invalid` · `aria-describedby` | `required` |
|
|
459
|
+
| ------------------ | ---------------------------- | ----------------------------------- | -------------------------- |
|
|
460
|
+
| `QuantityStepper` | the number box | the number box | `aria-required` |
|
|
461
|
+
| `SegmentedControl` | the `radiogroup` | the `radiogroup` | `aria-required` |
|
|
462
|
+
| `ChipGroup` | the group | the group | single choice only |
|
|
463
|
+
| `RangeSlider` | the low thumb (`<id>-high`) | both thumbs | — (always holds a value) |
|
|
464
|
+
| `RatingInput` | the `<fieldset>` | the `<fieldset>` | native, on the five radios |
|
|
465
|
+
| `DateRange` | the start field (`<id>-end`) | both fields | native, on both fields |
|
|
466
|
+
|
|
467
|
+
- **`Select`** holds `null` (the placeholder shows) and, with **`Combobox`**,
|
|
468
|
+
takes `onBlur` (focus left the whole control: moving into its own list or
|
|
469
|
+
search box is not a blur) and a `ref` to the trigger.
|
|
470
|
+
- **Read-only**: `isReadOnly` on `Select`, `Combobox`, `QuantityStepper`,
|
|
471
|
+
`SegmentedControl`, `ChipGroup`, `RangeSlider`, `RatingInput`, `DateRange`
|
|
472
|
+
and `TagInput`. The value stays focusable and readable (`aria-readonly` where
|
|
473
|
+
the role has it); nothing changes it.
|
|
474
|
+
- **`SegmentedControl` and `ChipGroup`** take a group-wide `isDisabled`.
|
|
475
|
+
- **`TagInput`** takes `value` like every other field (`values` still works,
|
|
476
|
+
deprecated until 3.0) and `duplicateLabel` for the "already added"
|
|
477
|
+
announcement (or `labels.tagInput.duplicate`).
|
|
478
|
+
- **`Button`** has no default `type`: inside a `<form>` a button without one
|
|
479
|
+
submits, as in HTML. Write `type="button"` for every other button in a form.
|
|
480
|
+
The default becomes `"button"` in 3.0.
|
|
481
|
+
|
|
482
|
+
### Notices, shortcuts and focus (2.3)
|
|
483
|
+
|
|
484
|
+
**Where the notices stand.** `ToastPortal` (and `ToastHub`) take a
|
|
485
|
+
`placement` — `bottom-end` (the default), `bottom-start`, `bottom-center`,
|
|
486
|
+
`top-end`, `top-start`, `top-center` — that holds at **every** width, and an
|
|
487
|
+
`inset` of CSS lengths that moves the stack off the window's edges. An
|
|
488
|
+
application with a sidebar keeps the notices over its content:
|
|
489
|
+
|
|
490
|
+
```tsx
|
|
491
|
+
<ToastPortal placement="bottom-end" inset={{ inlineStart: 'var(--app-sidebar-width)' }} />
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
`start` and `end` follow the writing direction. Until 2.2 the stack centred
|
|
495
|
+
its notices below 1025px whatever the application wanted.
|
|
496
|
+
|
|
497
|
+
**Which surfaces own the keyboard.** `hasOpenSurface()` is true while a
|
|
498
|
+
surface that takes the keyboard is open: a modal dialog (`Modal`, `Drawer`,
|
|
499
|
+
`BottomSheet`, `ConfirmDialog`, `PromptDialog`), the `CommandPalette`, an open
|
|
500
|
+
`Popover`. A visible toast and an open tooltip do **not** count: they still
|
|
501
|
+
close on `Escape` (newest first), but ⌘K and the application's shortcuts keep
|
|
502
|
+
working while they are on screen.
|
|
503
|
+
|
|
504
|
+
```ts
|
|
505
|
+
// An application shortcut (⌘S, ⌘N, F2…)
|
|
506
|
+
if (hasOpenSurface()) return;
|
|
507
|
+
// A page-level Escape listener: a toast or a tooltip takes that key first
|
|
508
|
+
if (event.defaultPrevented || hasOpenSurface({ includeTransient: true })) return;
|
|
509
|
+
```
|
|
510
|
+
|
|
511
|
+
**Opening focus.** `Modal`, `Drawer` and `Popover` focus, in this order, the
|
|
512
|
+
element of `initialFocus` (a ref inside the surface), the element marked
|
|
513
|
+
`data-ui-autofocus`, or the first focusable element (the close button skipped).
|
|
514
|
+
React's `autoFocus` does not work inside them: it runs before the dialog is
|
|
515
|
+
shown, and the browser ignores focus on a hidden element. In a `Modal` or a
|
|
516
|
+
`Drawer` a first text field keeps the focus on a desktop; only on a touch
|
|
517
|
+
screen does the dialog take it instead (no on-screen keyboard nobody asked
|
|
518
|
+
for; `BottomSheet` always does). Closing gives the focus back
|
|
519
|
+
to the element that opened the surface. A `Popover` gives its first focus once
|
|
520
|
+
it is placed (it is hidden until then), and Tab at either edge leaves it for a
|
|
521
|
+
real stop: past the last element to the one after the trigger, before the
|
|
522
|
+
first back to the trigger; it closes in both cases.
|
|
523
|
+
|
|
524
|
+
**Field heights.** `Combobox` takes `size="sm"`: at each size `Combobox`,
|
|
525
|
+
`Select` and `Input` are one height (40px and 32px). The placeholder of an
|
|
526
|
+
`isTechnical` input is drawn in the body font: it is an instruction, not code,
|
|
527
|
+
and in monospace it was cut short in a narrow scan field.
|
|
528
|
+
|
|
529
|
+
### Number fields: scaled integers (2.4)
|
|
530
|
+
|
|
531
|
+
`ScaledInput`, `MoneyInput`, `QuantityInput`, `RateInput` and `PercentInput`
|
|
532
|
+
take and give a **scaled integer**, never a float: the integer types of the
|
|
533
|
+
data contract. `123450` with two decimal places is "1.234,50".
|
|
534
|
+
|
|
535
|
+
| Field | Value | Scale | At rest |
|
|
536
|
+
| --------------- | ------------------------ | ---------------------------- | ------------------- |
|
|
537
|
+
| `MoneyInput` | `Kurus` (the minor unit) | `minorDigits` (TRY 2, JPY 0) | "1.234,50 TL" |
|
|
538
|
+
| `QuantityInput` | `Qty4` | 4; `unitDigits` may be typed | "2,5 kg" |
|
|
539
|
+
| `RateInput` | `Rate6` | 6 | "34,1235" |
|
|
540
|
+
| `PercentInput` | `Pct2` | 2 | "%12,5" |
|
|
541
|
+
| `ScaledInput` | any (`Price4`, `Ppm`) | `scaleDigits` | `minFractionDigits` |
|
|
542
|
+
|
|
543
|
+
```tsx
|
|
544
|
+
<Field label="Tutar" error={errors.amount}>
|
|
545
|
+
{props => (
|
|
546
|
+
<MoneyInput {...props} value={amount} onChange={setAmount} minorDigits={2} currency="TL" />
|
|
547
|
+
)}
|
|
548
|
+
</Field>
|
|
549
|
+
<QuantityInput aria-label="Miktar" value={qty} onChange={setQty} unitDigits={3} unit="kg" />
|
|
550
|
+
<PercentInput aria-label="KDV" value={vat} onChange={setVat} />
|
|
551
|
+
```
|
|
552
|
+
|
|
553
|
+
- **`onChange` on every keystroke that changes the meaning**: the integer, or
|
|
554
|
+
`null` while the field is empty or holds a number still being typed ("-",
|
|
555
|
+
"1.250.0"). Left with such a text, the field keeps it and marks itself
|
|
556
|
+
`aria-invalid`.
|
|
557
|
+
- **The grammar is the data contract's (§4.3)**: the comma is the
|
|
558
|
+
decimal point; with a comma, dots only group by three; without one, "1.250"
|
|
559
|
+
is a thousand two hundred and fifty, "0.250" and "12.5" are decimals (the dot
|
|
560
|
+
key of a number pad). Spaces and signs around the number are dropped, so a
|
|
561
|
+
pasted "1.234,56 TL" reads; a letter inside it does not.
|
|
562
|
+
- **A keystroke the field cannot hold is refused**, the text stays: a letter,
|
|
563
|
+
one decimal too many (`unitDigits={0}` refuses the comma), a minus when `min`
|
|
564
|
+
is 0 or more (the default), a value past `max` or past the safe integers.
|
|
565
|
+
Nothing is rounded.
|
|
566
|
+
- **At rest grouped, while focused plain and selected** ("1234,50"), so typing
|
|
567
|
+
replaces it. A value under a positive `min` is raised to it on blur or Enter.
|
|
568
|
+
- `Field`'s contract (`id`, `aria-invalid`, `aria-describedby`, `required`),
|
|
569
|
+
`ref`, `size`, `prefix`/`suffix`, `disabled` and `readOnly` pass to the
|
|
570
|
+
input. Right-aligned, tabular figures.
|
|
571
|
+
- The scale is never guessed: `minorDigits` comes from the caller's currency table,
|
|
572
|
+
`unitDigits` from the unit. Display elsewhere is the application's
|
|
573
|
+
formatters' (`formatMoney`, `formatQuantity` …); `Price` stays a
|
|
574
|
+
display of an already formatted text.
|
|
575
|
+
|
|
576
|
+
### TypeScript resolution
|
|
577
|
+
|
|
578
|
+
The declarations resolve under every `moduleResolution`: `bundler`, `node16`
|
|
579
|
+
and `nodenext` (from ES modules and from CommonJS; the `require` condition has
|
|
580
|
+
`.d.cts` files). `npm run check:types` compiles a `nodenext` consumer against
|
|
581
|
+
the build with `skipLibCheck` off.
|
|
582
|
+
|
|
583
|
+
---
|
|
584
|
+
|
|
585
|
+
## Decisions the system carries
|
|
586
|
+
|
|
587
|
+
**Cobalt acts, coral converts, turquoise highlights.** Cobalt is the primary
|
|
588
|
+
action, the link, the selection and the focus ring. Coral is the conversion
|
|
589
|
+
button (`UIVariant.ACCENT` on `Button`, `variant="accent"` on `IconButton`) and
|
|
590
|
+
appears nowhere else. Turquoise marks a highlight or a live state
|
|
591
|
+
(`Badge tone="highlight"`, `Avatar tone="highlight"`); it is a fill, never body
|
|
592
|
+
text.
|
|
593
|
+
`colour-footprint.test.ts` turns a coral or turquoise token in any other
|
|
594
|
+
component's stylesheet into a failing test.
|
|
595
|
+
|
|
596
|
+
**One `PRIMARY` per screen.** `UIVariant` is a hierarchy of emphasis: two
|
|
597
|
+
filled buttons side by side and neither stands out.
|
|
598
|
+
|
|
599
|
+
**Status is a tint, an action is a fill or a border.** `Alert` and the soft
|
|
600
|
+
`Badge` sit on tinted grounds; when that distinction blurs, users try to click
|
|
601
|
+
status labels.
|
|
602
|
+
|
|
603
|
+
**Colour never carries meaning alone** (WCAG 1.4.1). Every state is also told
|
|
604
|
+
by a text, an icon or a mark: each `Alert` tone has its own icon, the required
|
|
605
|
+
star of `Field` has a readable text next to it.
|
|
606
|
+
|
|
607
|
+
**Icons come from `react-bootstrap-icons`, in the filled version.** A thin
|
|
608
|
+
outline disappears on a tint at small sizes. Where no filled twin exists (`X`,
|
|
609
|
+
`Check`, `Plus`, `Dash`) the heavy `*Lg` version is used, and `Caret*Fill`
|
|
610
|
+
instead of a chevron. Content icons (a category mark, a logo) always come from
|
|
611
|
+
outside as a `ReactNode` prop.
|
|
612
|
+
|
|
613
|
+
**Icon size is separate from text size.** The scale is its own set of values
|
|
614
|
+
(`$icon-xs` … `$icon-xl`: 14/16/18/20/24px); every box that carries an icon
|
|
615
|
+
takes its size from there.
|
|
616
|
+
|
|
617
|
+
**"Could not load" and "empty" are different states.** `DataTable` never draws
|
|
618
|
+
the empty message while `error` is set.
|
|
619
|
+
|
|
620
|
+
**A native element beats an imitation.** `<dialog>`, `<input type="range">`,
|
|
621
|
+
`<input type="radio">` are kept. The one exception is `<select>`: its list
|
|
622
|
+
cannot be styled and its mobile wheel looks like nothing else in the
|
|
623
|
+
application.
|
|
624
|
+
|
|
625
|
+
**A touch target is at least 44×44px** (WCAG 2.5.8). The visual box may be
|
|
626
|
+
smaller; an invisible overlay keeps the area.
|
|
627
|
+
|
|
628
|
+
**Motion uses the design durations** (`fast` 120ms, `base` 200ms, `slow`
|
|
629
|
+
320ms for a sheet) and every animation honours `prefers-reduced-motion`.
|
|
630
|
+
|
|
631
|
+
**The focus ring is `:focus-visible`**, 2px of cobalt with a 2px offset.
|
|
632
|
+
|
|
633
|
+
---
|
|
634
|
+
|
|
635
|
+
## Next.js App Router
|
|
636
|
+
|
|
637
|
+
The package draws the `'use client'` boundary **inside itself, per file**:
|
|
638
|
+
components without hooks (`Alert`, `Badge`, `Button`, `Card`, `Chip`,
|
|
639
|
+
`Divider`, `EmptyState`, `IconButton`, `Kbd`, `PageHeader`, `Panel`,
|
|
640
|
+
`Progress`, `SectionHeader`, `Skeleton`, `StatusDot`, `SummaryCard`,
|
|
641
|
+
`TextLink`, `Tile`) render as server components and send no JavaScript; the
|
|
642
|
+
interactive ones carry their own directive. No thin `Client*` wrappers are
|
|
643
|
+
needed, and `UIVariant` / `UISize` can be imported on the server.
|
|
644
|
+
|
|
645
|
+
```ts
|
|
646
|
+
// next.config.ts: the main entry is pure, so imports short-circuit to the component file.
|
|
647
|
+
const nextConfig = {
|
|
648
|
+
experimental: { optimizePackageImports: ['@handijitcom/ui'] },
|
|
649
|
+
};
|
|
650
|
+
```
|
|
651
|
+
|
|
652
|
+
```tsx
|
|
653
|
+
// app/layout.tsx, a server component
|
|
654
|
+
import '@handijitcom/ui/tokens.css';
|
|
655
|
+
import '@handijitcom/ui/fonts.css';
|
|
656
|
+
import '@handijitcom/ui/styles.css';
|
|
657
|
+
import '@handijitcom/ui/chat.css'; // only if /chat is used
|
|
658
|
+
import '@handijitcom/ui/charts.css'; // only if /charts is used
|
|
659
|
+
import { UiProvider, UiThemeScript } from '@handijitcom/ui';
|
|
660
|
+
import NextLink from 'next/link';
|
|
661
|
+
|
|
662
|
+
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
663
|
+
return (
|
|
664
|
+
<html lang="tr" suppressHydrationWarning>
|
|
665
|
+
<head>
|
|
666
|
+
<UiThemeScript />
|
|
667
|
+
</head>
|
|
668
|
+
<body>
|
|
669
|
+
<UiProvider linkComponent={NextLink}>{children}</UiProvider>
|
|
670
|
+
</body>
|
|
671
|
+
</html>
|
|
672
|
+
);
|
|
673
|
+
}
|
|
674
|
+
```
|
|
675
|
+
|
|
676
|
+
`suppressHydrationWarning`: the boot script adds an attribute to `<html>` that
|
|
677
|
+
the server did not write; the warning is silenced for that element only.
|
|
678
|
+
|
|
679
|
+
## Electron
|
|
680
|
+
|
|
681
|
+
The same three stylesheet imports in the renderer entry, and the boot script in
|
|
682
|
+
the HTML shell. With the usual strict policy of a packaged program, allow the
|
|
683
|
+
script by hash (`THEME_BOOT_SCRIPT_HASH`), and keep `style-src-attr
|
|
684
|
+
'unsafe-inline'` for the positioned components (and for `ToastPortal`'s
|
|
685
|
+
`inset`). With a mouse or a trackpad `Select` and `Combobox` open dropdowns
|
|
686
|
+
whatever the window width. A window with a sidebar gives `ToastPortal` an
|
|
687
|
+
`inset` (see "Notices, shortcuts and focus").
|
|
688
|
+
|
|
689
|
+
---
|
|
690
|
+
|
|
691
|
+
## Chat components: `@handijitcom/ui/chat`
|
|
692
|
+
|
|
693
|
+
A separate entry for chat and tool interfaces; it adds nothing to the main
|
|
694
|
+
bundle or to `styles.css`.
|
|
695
|
+
|
|
696
|
+
```tsx
|
|
697
|
+
import '@handijitcom/ui/styles.css';
|
|
698
|
+
import '@handijitcom/ui/chat.css'; // AFTER styles.css
|
|
699
|
+
|
|
700
|
+
import { ChatMessage, ChatThread, PromptInput } from '@handijitcom/ui/chat';
|
|
701
|
+
|
|
702
|
+
<ChatThread
|
|
703
|
+
isStreaming={isStreaming}
|
|
704
|
+
dock={
|
|
705
|
+
<PromptInput
|
|
706
|
+
value={draft}
|
|
707
|
+
onChange={setDraft}
|
|
708
|
+
onSubmit={send}
|
|
709
|
+
onStop={stop}
|
|
710
|
+
isBusy={isStreaming}
|
|
711
|
+
placeholder="Mesajınızı yazın…"
|
|
712
|
+
/>
|
|
713
|
+
}
|
|
714
|
+
>
|
|
715
|
+
{messages.map(message => (
|
|
716
|
+
<ChatMessage key={message.id} author={message.author}>
|
|
717
|
+
{message.content}
|
|
718
|
+
</ChatMessage>
|
|
719
|
+
))}
|
|
720
|
+
</ChatThread>;
|
|
721
|
+
```
|
|
722
|
+
|
|
723
|
+
Labels come from the same provider, under `labels.chat`:
|
|
724
|
+
|
|
725
|
+
```tsx
|
|
726
|
+
<UiProvider
|
|
727
|
+
labels={{
|
|
728
|
+
chat: {
|
|
729
|
+
thread: 'Sohbet',
|
|
730
|
+
send: 'Gönder',
|
|
731
|
+
stop: 'Durdur',
|
|
732
|
+
scrollToLatest: 'En yeniye in',
|
|
733
|
+
replyReady: 'Yanıt hazır',
|
|
734
|
+
messageActions: 'Mesaj eylemleri',
|
|
735
|
+
sources: 'Kaynaklar',
|
|
736
|
+
citation: index => `Kaynak ${index}`,
|
|
737
|
+
stderr: 'hata çıktısı',
|
|
738
|
+
toolStatus: { running: 'çalışıyor', ok: 'tamamlandı', error: 'hata', aborted: 'durduruldu', interrupted: 'kesildi' },
|
|
739
|
+
codeCopy: language => `${language} kodunu kopyala`,
|
|
740
|
+
codeCopied: 'Kod kopyalandı',
|
|
741
|
+
},
|
|
742
|
+
}}
|
|
743
|
+
>
|
|
744
|
+
```
|
|
745
|
+
|
|
746
|
+
`CodeBlock` highlights and formats the code itself, with no dependency:
|
|
747
|
+
|
|
748
|
+
```tsx
|
|
749
|
+
<CodeBlock language="json" code={JSON.stringify(payload)} />
|
|
750
|
+
```
|
|
751
|
+
|
|
752
|
+
JSON is re-indented with two spaces (values are kept as text: large numbers are
|
|
753
|
+
not rounded) and blank lines at the edges are dropped; other languages keep
|
|
754
|
+
their indentation. More than 30 languages are recognised; an unknown one is
|
|
755
|
+
drawn plain. The token colours are design tokens (keyword `primary-text`,
|
|
756
|
+
string `success-fg`, number `warning-fg`, type `highlight-text`), so they
|
|
757
|
+
follow the theme and stay inside the measured text pairs. For Shiki-grade
|
|
758
|
+
accuracy pass pre-highlighted HTML as `html` (its safety is yours).
|
|
759
|
+
|
|
760
|
+
Markdown parsing stays in the application: `Prose` is a typography container
|
|
761
|
+
only.
|
|
762
|
+
|
|
763
|
+
## Charts: `@handijitcom/ui/charts`
|
|
764
|
+
|
|
765
|
+
Ten SVG charts with no dependency (drawing, scales and statistics live in the
|
|
766
|
+
library).
|
|
767
|
+
|
|
768
|
+
```tsx
|
|
769
|
+
import '@handijitcom/ui/styles.css';
|
|
770
|
+
import '@handijitcom/ui/charts.css'; // AFTER styles.css
|
|
771
|
+
|
|
772
|
+
import { BarChart, LineChart, PieChart } from '@handijitcom/ui/charts';
|
|
773
|
+
|
|
774
|
+
<LineChart
|
|
775
|
+
label="Aylık gelir ve gider"
|
|
776
|
+
description="Gelir ekimde zirve yaptı"
|
|
777
|
+
xKey="month"
|
|
778
|
+
data={[
|
|
779
|
+
{ month: 'Oca', revenue: 120, cost: 90 },
|
|
780
|
+
{ month: 'Şub', revenue: 180, cost: null }, // null = no data: the line BREAKS
|
|
781
|
+
]}
|
|
782
|
+
series={[
|
|
783
|
+
{ key: 'revenue', label: 'Gelir' },
|
|
784
|
+
{ key: 'cost', label: 'Gider', format: value => `${value} ₺` },
|
|
785
|
+
]}
|
|
786
|
+
/>;
|
|
787
|
+
```
|
|
788
|
+
|
|
789
|
+
| Chart | When |
|
|
790
|
+
| ------------------------- | --------------------------------------------------------------- |
|
|
791
|
+
| `LineChart` · `AreaChart` | a trend over time; `AreaChart isStacked` for parts of a total |
|
|
792
|
+
| `BarChart` | comparing categories; `orientation="horizontal"` for long names |
|
|
793
|
+
| `ComposedChart` | bars and a line; a different unit on `axis: 'right'` |
|
|
794
|
+
| `PieChart` | at most six parts of a whole (`variant="donut"` by default) |
|
|
795
|
+
| `ScatterPlot` | the relation of two variables; a bubble with `size` |
|
|
796
|
+
| `Heatmap` | density on two categorical axes (day × hour) |
|
|
797
|
+
| `BoxPlot` · `Histogram` | distribution: comparing groups · the shape of one variable |
|
|
798
|
+
| `RadarChart` | a few series on one set of axes, all on the SAME scale |
|
|
799
|
+
|
|
800
|
+
Every chart is a single tab stop: arrows walk the items (each is announced),
|
|
801
|
+
`Home` / `End` go to the ends, `Escape` clears the highlight. A screen reader
|
|
802
|
+
also reads the chart as a hidden **data table**. Width is measured from the
|
|
803
|
+
container (or fixed with `width`); numbers are formatted with `labels.locale`.
|
|
804
|
+
Colours come from the data series of the design (`tone`: `chart-1` … `chart-6`,
|
|
805
|
+
`muted`).
|
|
806
|
+
|
|
807
|
+
## Calendar: `@handijitcom/ui/calendar`
|
|
808
|
+
|
|
809
|
+
The base of a scheduling screen (2.4): a **time grid** (days as
|
|
810
|
+
columns, the drawn hours as rows; with `resources` a column per teacher, room
|
|
811
|
+
or technician under every day) or a **month** of day cells. A separate entry,
|
|
812
|
+
so the main entry's budget does not grow (5,9 kB gzip, `calendar.css` 2 kB).
|
|
813
|
+
|
|
814
|
+
```tsx
|
|
815
|
+
import '@handijitcom/ui/styles.css';
|
|
816
|
+
import '@handijitcom/ui/calendar.css'; // AFTER styles.css
|
|
817
|
+
|
|
818
|
+
import { Calendar, type CalendarEvent } from '@handijitcom/ui/calendar';
|
|
819
|
+
|
|
820
|
+
<Calendar
|
|
821
|
+
label="Ders planı"
|
|
822
|
+
days={week} // [{ date: '2026-11-09', label: 'Pazartesi 9 Kasım', shortLabel: 'Pzt 9', isToday, isOff }]
|
|
823
|
+
resources={rooms} // optional: [{ id: 'r1', label: 'Derslik 1', detail: '7 / 8', tone: 'warning' }]
|
|
824
|
+
bands={[{ label: 'Sabah', start: '08:00', end: '12:00' }]} // optional, 2.5
|
|
825
|
+
events={lessons} // [{ id, title, start: '2026-11-09T09:00', end: '2026-11-09T10:30', resourceId, tone, isCancelled, isLocked }]
|
|
826
|
+
startTime="08:00"
|
|
827
|
+
endTime="22:00"
|
|
828
|
+
slotMinutes={15}
|
|
829
|
+
onEventChange={change => (conflicts(change) ? toast(why(change)) : save(change))}
|
|
830
|
+
onEventOpen={id => openLesson(id)}
|
|
831
|
+
onSlotSelect={slot => newLesson(slot)}
|
|
832
|
+
onExternalDrop={({ data, start, resourceId }) => assign(data, start, resourceId)}
|
|
833
|
+
renderEvent={lesson => `${lesson.title} · ${fill(lesson)}`}
|
|
834
|
+
/>;
|
|
835
|
+
```
|
|
836
|
+
|
|
837
|
+
- **Times are the data contract's wall clock** (`YYYY-MM-DDTHH:MM`, the firm's
|
|
838
|
+
time zone) and **days come from the caller**: the calendar converts no time
|
|
839
|
+
zone and does no day arithmetic (that is the caller's). The month takes
|
|
840
|
+
its 35 or 42 `days` (`isOutside` for the neighbouring months), `weekdays`,
|
|
841
|
+
`maxEventsPerDay` (3; the rest behind "+N" → `onDaySelect`) and
|
|
842
|
+
`selectedDate`.
|
|
843
|
+
- **Controlled.** A drop, a stretch or a keyboard move calls `onEventChange`
|
|
844
|
+
with `{ id, start, end, resourceId }`; the move stands when `events` carries
|
|
845
|
+
it. A refused move (a conflict) is simply not applied: say why in a toast.
|
|
846
|
+
Without `onEventChange` the calendar only shows and opens.
|
|
847
|
+
- **Pointer.** Drag the body to move (snapped to `slotMinutes`, into another
|
|
848
|
+
column), the bottom edge to stretch; a preview shows where it lands, `Escape`
|
|
849
|
+
gives up. A multi-day or `isLocked` event is drawn but not moved.
|
|
850
|
+
`onExternalDrop` takes a drop from outside (an unassigned job), with its
|
|
851
|
+
`text/plain` drag data.
|
|
852
|
+
- **Keyboard.** One event is in the tab order; ← ↑ → ↓ go to the neighbouring
|
|
853
|
+
event, Enter opens it, ⌘/Ctrl + arrows move it one slot or one column (month:
|
|
854
|
+
a day or a week), ⌘/Ctrl ⇧ ↑ ↓ shorten or lengthen it. The new place is
|
|
855
|
+
announced (`labels.calendar.moved`) and the focus follows the event.
|
|
856
|
+
- **Resource headers and bands (2.5).** A resource's `detail` is a second
|
|
857
|
+
header line and its `tone` tints the header (Teknik Servis: `warning` at 80%
|
|
858
|
+
of the day's capacity — the percentage goes in `detail`, colour is never
|
|
859
|
+
alone); `renderResource` draws the header instead. `bands` (`CalendarBand`:
|
|
860
|
+
`{ label, start, end }`, `HH:MM`) draws named stretches of the day ("Sabah",
|
|
861
|
+
"Öğle", "Akşam") as a labelled strip beside the hours and a shaded stretch
|
|
862
|
+
across the columns, under the events; clipped to the drawn hours, they catch
|
|
863
|
+
no click or drop. The band labels are visual only (the hours column is
|
|
864
|
+
`aria-hidden`); every event's name already carries its time.
|
|
865
|
+
- **Colour is never alone**: `tone` tints an event; a cancelled one is struck
|
|
866
|
+
through _and_ read as `labels.calendar.cancelled`; today is underlined and
|
|
867
|
+
`aria-current="date"`.
|
|
868
|
+
- **Budgets of the pilots**, measured in jsdom (`__tests__/calendar/performance.test.tsx`):
|
|
869
|
+
a week of 500 lessons draws in ~40–100 ms (budget 300 ms); a day of 20
|
|
870
|
+
technicians and 200 jobs in ~16–30 ms (budget 500 ms). No virtualisation:
|
|
871
|
+
the grid is bounded by its days and hours.
|
|
872
|
+
- Sizes are component variables: `--ui-calendar-hour-height` (3rem),
|
|
873
|
+
`--ui-calendar-column-min` (7rem), `--ui-calendar-gutter` (3.5rem; 4.75rem
|
|
874
|
+
with `bands`).
|
|
875
|
+
|
|
876
|
+
## SCSS API: `@handijitcom/ui/scss`
|
|
877
|
+
|
|
878
|
+
Variables and mixins for the application's own stylesheets. The variables are
|
|
879
|
+
`var(--hd-…)` references, so the theme turns at run time; the module emits no
|
|
880
|
+
rules.
|
|
881
|
+
|
|
882
|
+
```scss
|
|
883
|
+
@use '@handijitcom/ui/scss' as ui;
|
|
884
|
+
|
|
885
|
+
.panel {
|
|
886
|
+
padding: ui.$space-4;
|
|
887
|
+
border: 1px solid ui.$border;
|
|
888
|
+
border-radius: ui.$radius-md;
|
|
889
|
+
|
|
890
|
+
@include ui.type(small);
|
|
891
|
+
@include ui.focus-ring;
|
|
892
|
+
|
|
893
|
+
@media (max-width: ui.$breakpoint-md) {
|
|
894
|
+
padding: ui.$space-3;
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
```
|
|
898
|
+
|
|
899
|
+
**The values are custom properties, so SCSS arithmetic does not work.**
|
|
900
|
+
`$space-8 - $space-2` compiles to `var(--a)-var(--b)` without an error and the
|
|
901
|
+
browser drops the declaration. Write the calculation in `calc()`:
|
|
902
|
+
|
|
903
|
+
```scss
|
|
904
|
+
padding-inline-start: calc(#{ui.$space-8} - #{ui.$space-2});
|
|
905
|
+
margin-inline: calc(-1 * #{ui.$space-2});
|
|
906
|
+
```
|
|
907
|
+
|
|
908
|
+
Sass colour functions do not work either; mix in CSS:
|
|
909
|
+
`color-mix(in srgb, #{ui.$primary} 20%, transparent)`.
|
|
910
|
+
|
|
911
|
+
Next.js (Turbopack and webpack) resolves the package `exports`. For a compiler
|
|
912
|
+
that cannot, add `node_modules/@handijitcom/ui/build/scss` to `loadPaths` and
|
|
913
|
+
write `@use 'index' as ui`. An application that needs only the tokens can use
|
|
914
|
+
`@handijitcom/ui/tokens.scss` directly.
|
|
915
|
+
|
|
916
|
+
---
|
|
917
|
+
|
|
918
|
+
## Development
|
|
919
|
+
|
|
920
|
+
```bash
|
|
921
|
+
nvm use # .nvmrc → 24
|
|
922
|
+
npm install
|
|
923
|
+
npm run verify # contrast → typecheck → lint → coverage → build → types → API → animations → size
|
|
924
|
+
npm run playground # component gallery → http://localhost:5273
|
|
925
|
+
```
|
|
926
|
+
|
|
927
|
+
| Command | |
|
|
928
|
+
| ------------------------ | ------------------------------------------------------------------------------------------- |
|
|
929
|
+
| `npm run build` | `build/`: main entry, `chat`, `charts` (ESM + CJS + `.d.ts` / `.d.cts` + CSS), `build/scss` |
|
|
930
|
+
| `npm run test` | Jest + Testing Library + `jest-axe` |
|
|
931
|
+
| `npm run test:coverage` | coverage gate over all of `src/`: lines 89 · statements 86 · functions 80 · branches 75 |
|
|
932
|
+
| `npm run check:contrast` | WCAG contrast of the pairs the components draw, both themes (254 pairs) |
|
|
933
|
+
| `npm run check:api` | public API guard: four entries, four baselines (main 163 · chat 30 · charts 22 · SCSS 227) |
|
|
934
|
+
| `npm run check:types` | the built declarations as a `nodenext` consumer sees them, ESM and CJS, `skipLibCheck` off |
|
|
935
|
+
| `npm run size` | bundle budget (`size-limit`) |
|
|
936
|
+
| `npm run exports` | writes the `exports` map of `package.json` (`check:exports` verifies; last step of `build`) |
|
|
937
|
+
| `npm run lint` | ESLint (TypeScript) + stylelint (SCSS) |
|
|
938
|
+
| `npm run format:check` | Prettier over `src`, `playground`, `__tests__` |
|
|
939
|
+
| `npm run typecheck` | `tsc --noEmit` |
|
|
940
|
+
| `npm run test:visual` | visual regression (Playwright); NOT part of `verify`, see below |
|
|
941
|
+
| `npm run test:device` | iOS (WebKit) and Android (Chromium) behaviour guards |
|
|
942
|
+
|
|
943
|
+
### What the guards protect
|
|
944
|
+
|
|
945
|
+
- **Design contract** (`__tests__/styles/design-contract.test.ts`): every
|
|
946
|
+
`--hd-*` name in the compiled stylesheets, the SCSS aliases and the
|
|
947
|
+
TypeScript sources exists in the tokens of `src/design`; breakpoints
|
|
948
|
+
and layers match it; no stylesheet declares an `--hd-*` property or carries
|
|
949
|
+
a literal colour.
|
|
950
|
+
- **Colour footprint** (`colour-footprint.test.ts`): coral and turquoise tokens
|
|
951
|
+
are used only by the components on a justified allow-list.
|
|
952
|
+
- **Contrast**: text ≥ 4.5:1, icons and the focus ring ≥ 3:1, measured on the
|
|
953
|
+
values of the installed design package for every pair a component draws.
|
|
954
|
+
- **Accessibility scan** (`__tests__/components/a11y.test.tsx`): every exported
|
|
955
|
+
component in each meaningful state. A new component missing from the ledger
|
|
956
|
+
fails the test.
|
|
957
|
+
- **Keyboard contract**: the key matrix is in each component's JSDoc; its guard
|
|
958
|
+
is `keyboard.test.tsx`.
|
|
959
|
+
- **Control sizes** (`control-size.test.tsx`): `Input`, `DateField`,
|
|
960
|
+
`DateRange` and `Select` take their size from one mixin, and a text field
|
|
961
|
+
never drops below 16px on a narrow or touch screen.
|
|
962
|
+
- **Public API**: the exports of each entry are compared with a baseline. A
|
|
963
|
+
dropped name is **breaking** and surfaces as a build error at the consumer's
|
|
964
|
+
next install. For a deliberate change: `npm run build`, then
|
|
965
|
+
`node scripts/check-api.mjs --update`, and a line in the CHANGELOG.
|
|
966
|
+
- **Bundle size**: budgets in `.size-limit.js` (main entry 44 kB, `styles.css`
|
|
967
|
+
25 kB gzip). When `size-limit` turns red, measure what was added before
|
|
968
|
+
raising a limit.
|
|
969
|
+
- **Sub-entry boundary**: `chat` and `charts` import the main entry by PACKAGE
|
|
970
|
+
NAME only (`subentry-boundary.test.ts`); a relative path would bundle a
|
|
971
|
+
second copy of the provider context and the modal stack.
|
|
972
|
+
- **No fading with opacity**: any `opacity` other than `0` / `1` fails
|
|
973
|
+
(`passive-opacity.test.ts`); a disabled state is drawn with tokens.
|
|
974
|
+
- **Focus ring and motion scale**: stylelint rejects `outline` outside the
|
|
975
|
+
`focus-ring` mixin and raw durations in component SCSS.
|
|
976
|
+
|
|
977
|
+
### Device guards: `npm run test:device`
|
|
978
|
+
|
|
979
|
+
```bash
|
|
980
|
+
npm run test:device:install # WebKit and Chromium binaries (once)
|
|
981
|
+
npm run test:device # ios (iPhone 14 · WebKit) + android (Pixel 7 · Chromium)
|
|
982
|
+
```
|
|
983
|
+
|
|
984
|
+
The most expensive bugs of this repository were invisible on a desktop: a
|
|
985
|
+
collapsed sheet body, a bottom bar under the keyboard. They are layout and
|
|
986
|
+
paint bugs and can only be measured in a real layout engine. This run compares
|
|
987
|
+
numbers (height, overflow, focus, computed style), not pixels, so it needs no
|
|
988
|
+
reference files.
|
|
989
|
+
|
|
990
|
+
**Visual regression is not part of `verify`**: screenshots depend on the
|
|
991
|
+
platform (font rasterisation), and a reference made on macOS fails on the
|
|
992
|
+
ubuntu CI runner. References are stored per platform under
|
|
993
|
+
`__tests__/e2e/__screenshots__/{platform}/`.
|
|
994
|
+
|
|
995
|
+
> When refreshing references write `--update-snapshots=all`, not the bare
|
|
996
|
+
> flag: the bare flag writes only **missing** files and leaves mismatching ones
|
|
997
|
+
> in place while the run reports success.
|
|
998
|
+
|
|
999
|
+
### Releasing
|
|
1000
|
+
|
|
1001
|
+
Every push to `master` runs `.github/workflows/publish.yml`: it checks the formatting,
|
|
1002
|
+
runs `npm run verify`, and publishes with the `NPM_ACCESS_TOKEN` repository
|
|
1003
|
+
secret and npm provenance **when `package.json` carries a version that is not
|
|
1004
|
+
on npm yet**; otherwise it skips. A published version gets a `vX.Y.Z` tag and a
|
|
1005
|
+
GitHub Release whose notes are that version's section of `CHANGELOG.md`, so the
|
|
1006
|
+
section must exist before the push.
|
|
1007
|
+
|
|
1008
|
+
## Design contract
|
|
1009
|
+
|
|
1010
|
+
Which element to use when, the surface ladder, colour roles, typography roles,
|
|
1011
|
+
accessibility thresholds and the motion scale are in **`CLAUDE.md`**. That file
|
|
1012
|
+
is normative for applications that use the library too. The visual language
|
|
1013
|
+
itself (palette, type, logo) belongs to `@handijitcom/ui/design`.
|
|
1014
|
+
|
|
1015
|
+
<!-- handijit:about:start -->
|
|
1016
|
+
|
|
1017
|
+
## About Han Dijit
|
|
1018
|
+
|
|
1019
|
+
`@handijitcom/ui` is built and maintained by **[Han Dijit](https://www.handijit.com)**, a software company serving businesses across Türkiye: web, e-commerce, mobile, artificial intelligence, cyber security and enterprise software projects.
|
|
1020
|
+
|
|
1021
|
+
[www.handijit.com](https://www.handijit.com) · [All Han Dijit packages on npm](https://www.npmjs.com/org/handijitcom)
|
|
1022
|
+
<!-- handijit:about:end -->
|
|
1023
|
+
|
|
1024
|
+
## License
|
|
1025
|
+
|
|
1026
|
+
MIT
|