crowui-pr 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/AGENTS.md +173 -0
- package/LICENSE +21 -0
- package/README.md +53 -0
- package/dist/Accordion/AccordionGroup.d.ts +12 -0
- package/dist/Accordion/AccordionGroup.d.ts.map +1 -0
- package/dist/Accordion/AccordionItem.d.ts +22 -0
- package/dist/Accordion/AccordionItem.d.ts.map +1 -0
- package/dist/Accordion/context.d.ts +8 -0
- package/dist/Accordion/context.d.ts.map +1 -0
- package/dist/Accordion/index.cjs +1 -0
- package/dist/Accordion/index.d.ts +3 -0
- package/dist/Accordion/index.d.ts.map +1 -0
- package/dist/Accordion/index.mjs +6 -0
- package/dist/AccordionItem-BIMhzGxk.js +107 -0
- package/dist/AccordionItem-DrV8fI-p.cjs +1 -0
- package/dist/Alert/index.cjs +1 -0
- package/dist/Alert/index.d.ts +28 -0
- package/dist/Alert/index.d.ts.map +1 -0
- package/dist/Alert/index.mjs +166 -0
- package/dist/Alert/variants.d.ts +14 -0
- package/dist/Alert/variants.d.ts.map +1 -0
- package/dist/Avatar/Group.d.ts +6 -0
- package/dist/Avatar/Group.d.ts.map +1 -0
- package/dist/Avatar/index.cjs +1 -0
- package/dist/Avatar/index.d.ts +8 -0
- package/dist/Avatar/index.d.ts.map +1 -0
- package/dist/Avatar/index.mjs +139 -0
- package/dist/Avatar/types.d.ts +32 -0
- package/dist/Avatar/types.d.ts.map +1 -0
- package/dist/Avatar/variants.d.ts +7 -0
- package/dist/Avatar/variants.d.ts.map +1 -0
- package/dist/Badge/index.cjs +1 -0
- package/dist/Badge/index.d.ts +31 -0
- package/dist/Badge/index.d.ts.map +1 -0
- package/dist/Badge/index.mjs +74 -0
- package/dist/Banner/index.cjs +1 -0
- package/dist/Banner/index.d.ts +5 -0
- package/dist/Banner/index.d.ts.map +1 -0
- package/dist/Banner/index.mjs +140 -0
- package/dist/Banner/types.d.ts +26 -0
- package/dist/Banner/types.d.ts.map +1 -0
- package/dist/Banner/variants.d.ts +12 -0
- package/dist/Banner/variants.d.ts.map +1 -0
- package/dist/Breadcrumb/index.cjs +1 -0
- package/dist/Breadcrumb/index.d.ts +5 -0
- package/dist/Breadcrumb/index.d.ts.map +1 -0
- package/dist/Breadcrumb/index.mjs +35 -0
- package/dist/Breadcrumb/types.d.ts +24 -0
- package/dist/Breadcrumb/types.d.ts.map +1 -0
- package/dist/Button/index.cjs +1 -0
- package/dist/Button/index.d.ts +24 -0
- package/dist/Button/index.d.ts.map +1 -0
- package/dist/Button/index.mjs +140 -0
- package/dist/Button/variants.d.ts +5 -0
- package/dist/Button/variants.d.ts.map +1 -0
- package/dist/Card/Header.d.ts +5 -0
- package/dist/Card/Header.d.ts.map +1 -0
- package/dist/Card/constants.d.ts +6 -0
- package/dist/Card/constants.d.ts.map +1 -0
- package/dist/Card/index.cjs +1 -0
- package/dist/Card/index.d.ts +6 -0
- package/dist/Card/index.d.ts.map +1 -0
- package/dist/Card/index.mjs +78 -0
- package/dist/Card/types.d.ts +38 -0
- package/dist/Card/types.d.ts.map +1 -0
- package/dist/Carousel/constants.d.ts +3 -0
- package/dist/Carousel/constants.d.ts.map +1 -0
- package/dist/Carousel/index.cjs +1 -0
- package/dist/Carousel/index.d.ts +5 -0
- package/dist/Carousel/index.d.ts.map +1 -0
- package/dist/Carousel/index.mjs +126 -0
- package/dist/Carousel/types.d.ts +30 -0
- package/dist/Carousel/types.d.ts.map +1 -0
- package/dist/Chip/index.cjs +1 -0
- package/dist/Chip/index.d.ts +31 -0
- package/dist/Chip/index.d.ts.map +1 -0
- package/dist/Chip/index.mjs +149 -0
- package/dist/Collapse/index.cjs +1 -0
- package/dist/Collapse/index.d.ts +5 -0
- package/dist/Collapse/index.d.ts.map +1 -0
- package/dist/Collapse/index.mjs +74 -0
- package/dist/Collapse/types.d.ts +22 -0
- package/dist/Collapse/types.d.ts.map +1 -0
- package/dist/CommandPalette/constants.d.ts +6 -0
- package/dist/CommandPalette/constants.d.ts.map +1 -0
- package/dist/CommandPalette/index.cjs +1 -0
- package/dist/CommandPalette/index.d.ts +6 -0
- package/dist/CommandPalette/index.d.ts.map +1 -0
- package/dist/CommandPalette/index.mjs +216 -0
- package/dist/CommandPalette/types.d.ts +44 -0
- package/dist/CommandPalette/types.d.ts.map +1 -0
- package/dist/CommandPalette/variants.d.ts +4 -0
- package/dist/CommandPalette/variants.d.ts.map +1 -0
- package/dist/DateAndTimePickerFooter-Cf1P9EiU.js +74 -0
- package/dist/DateAndTimePickerFooter-qv4keBrK.cjs +1 -0
- package/dist/Divider/index.cjs +1 -0
- package/dist/Divider/index.d.ts +15 -0
- package/dist/Divider/index.d.ts.map +1 -0
- package/dist/Divider/index.mjs +38 -0
- package/dist/Drawer/index.cjs +1 -0
- package/dist/Drawer/index.d.ts +52 -0
- package/dist/Drawer/index.d.ts.map +1 -0
- package/dist/Drawer/index.mjs +200 -0
- package/dist/EmptyState/index.cjs +1 -0
- package/dist/EmptyState/index.d.ts +6 -0
- package/dist/EmptyState/index.d.ts.map +1 -0
- package/dist/EmptyState/index.mjs +84 -0
- package/dist/EmptyState/types.d.ts +16 -0
- package/dist/EmptyState/types.d.ts.map +1 -0
- package/dist/EmptyState/variants.d.ts +8 -0
- package/dist/EmptyState/variants.d.ts.map +1 -0
- package/dist/FieldBottomInfo-C0Di4WWj.cjs +1 -0
- package/dist/FieldBottomInfo-CA_chf0O.js +76 -0
- package/dist/Form/Checkbox/index.cjs +1 -0
- package/dist/Form/Checkbox/index.d.ts +8 -0
- package/dist/Form/Checkbox/index.d.ts.map +1 -0
- package/dist/Form/Checkbox/index.mjs +57 -0
- package/dist/Form/Common/DateAndTimePickerFooter/DateAndTimePickerFooter.d.ts +10 -0
- package/dist/Form/Common/DateAndTimePickerFooter/DateAndTimePickerFooter.d.ts.map +1 -0
- package/dist/Form/Common/FieldBottomInfo/FieldBottomInfo.d.ts +11 -0
- package/dist/Form/Common/FieldBottomInfo/FieldBottomInfo.d.ts.map +1 -0
- package/dist/Form/Common/FieldLabel/FieldLabel.d.ts +14 -0
- package/dist/Form/Common/FieldLabel/FieldLabel.d.ts.map +1 -0
- package/dist/Form/Datepicker/Body.d.ts +4 -0
- package/dist/Form/Datepicker/Body.d.ts.map +1 -0
- package/dist/Form/Datepicker/Days.d.ts +4 -0
- package/dist/Form/Datepicker/Days.d.ts.map +1 -0
- package/dist/Form/Datepicker/Footer.d.ts +4 -0
- package/dist/Form/Datepicker/Footer.d.ts.map +1 -0
- package/dist/Form/Datepicker/Header.d.ts +4 -0
- package/dist/Form/Datepicker/Header.d.ts.map +1 -0
- package/dist/Form/Datepicker/Months.d.ts +4 -0
- package/dist/Form/Datepicker/Months.d.ts.map +1 -0
- package/dist/Form/Datepicker/Years.d.ts +4 -0
- package/dist/Form/Datepicker/Years.d.ts.map +1 -0
- package/dist/Form/Datepicker/context.d.ts +5 -0
- package/dist/Form/Datepicker/context.d.ts.map +1 -0
- package/dist/Form/Datepicker/index.cjs +1 -0
- package/dist/Form/Datepicker/index.d.ts +5 -0
- package/dist/Form/Datepicker/index.d.ts.map +1 -0
- package/dist/Form/Datepicker/index.mjs +1895 -0
- package/dist/Form/Datepicker/types.d.ts +80 -0
- package/dist/Form/Datepicker/types.d.ts.map +1 -0
- package/dist/Form/Datepicker/utils.d.ts +10 -0
- package/dist/Form/Datepicker/utils.d.ts.map +1 -0
- package/dist/Form/FileUploader/Input/FileInput.d.ts +8 -0
- package/dist/Form/FileUploader/Input/FileInput.d.ts.map +1 -0
- package/dist/Form/FileUploader/Input/FileInputIcon.d.ts +4 -0
- package/dist/Form/FileUploader/Input/FileInputIcon.d.ts.map +1 -0
- package/dist/Form/FileUploader/Preview/FilePreview.d.ts +11 -0
- package/dist/Form/FileUploader/Preview/FilePreview.d.ts.map +1 -0
- package/dist/Form/FileUploader/Preview/MultipleMode/Grid/GridTypePreview.d.ts +6 -0
- package/dist/Form/FileUploader/Preview/MultipleMode/Grid/GridTypePreview.d.ts.map +1 -0
- package/dist/Form/FileUploader/Preview/MultipleMode/List/ListTypePreview.d.ts +6 -0
- package/dist/Form/FileUploader/Preview/MultipleMode/List/ListTypePreview.d.ts.map +1 -0
- package/dist/Form/FileUploader/Preview/MultipleMode/MultipleModePreview.d.ts +6 -0
- package/dist/Form/FileUploader/Preview/MultipleMode/MultipleModePreview.d.ts.map +1 -0
- package/dist/Form/FileUploader/Preview/SingleMode/PreviewTitle.d.ts +14 -0
- package/dist/Form/FileUploader/Preview/SingleMode/PreviewTitle.d.ts.map +1 -0
- package/dist/Form/FileUploader/Preview/SingleMode/SingleModePreview.d.ts +6 -0
- package/dist/Form/FileUploader/Preview/SingleMode/SingleModePreview.d.ts.map +1 -0
- package/dist/Form/FileUploader/Preview/types.d.ts +5 -0
- package/dist/Form/FileUploader/Preview/types.d.ts.map +1 -0
- package/dist/Form/FileUploader/Preview/utils.d.ts +4 -0
- package/dist/Form/FileUploader/Preview/utils.d.ts.map +1 -0
- package/dist/Form/FileUploader/constants.d.ts +14 -0
- package/dist/Form/FileUploader/constants.d.ts.map +1 -0
- package/dist/Form/FileUploader/index.cjs +1 -0
- package/dist/Form/FileUploader/index.d.ts +6 -0
- package/dist/Form/FileUploader/index.d.ts.map +1 -0
- package/dist/Form/FileUploader/index.mjs +687 -0
- package/dist/Form/FileUploader/types.d.ts +61 -0
- package/dist/Form/FileUploader/types.d.ts.map +1 -0
- package/dist/Form/Input/index.cjs +1 -0
- package/dist/Form/Input/index.d.ts +21 -0
- package/dist/Form/Input/index.d.ts.map +1 -0
- package/dist/Form/Input/index.mjs +10 -0
- package/dist/Form/OtpInput/index.cjs +1 -0
- package/dist/Form/OtpInput/index.d.ts +19 -0
- package/dist/Form/OtpInput/index.d.ts.map +1 -0
- package/dist/Form/OtpInput/index.mjs +97 -0
- package/dist/Form/RadioButton/index.cjs +1 -0
- package/dist/Form/RadioButton/index.d.ts +6 -0
- package/dist/Form/RadioButton/index.d.ts.map +1 -0
- package/dist/Form/RadioButton/index.mjs +27 -0
- package/dist/Form/RangeInput/Thumb.d.ts +11 -0
- package/dist/Form/RangeInput/Thumb.d.ts.map +1 -0
- package/dist/Form/RangeInput/constants.d.ts +11 -0
- package/dist/Form/RangeInput/constants.d.ts.map +1 -0
- package/dist/Form/RangeInput/index.cjs +1 -0
- package/dist/Form/RangeInput/index.d.ts +5 -0
- package/dist/Form/RangeInput/index.d.ts.map +1 -0
- package/dist/Form/RangeInput/index.mjs +246 -0
- package/dist/Form/RangeInput/types.d.ts +32 -0
- package/dist/Form/RangeInput/types.d.ts.map +1 -0
- package/dist/Form/Select/OptionItem.d.ts +9 -0
- package/dist/Form/Select/OptionItem.d.ts.map +1 -0
- package/dist/Form/Select/Options.d.ts +4 -0
- package/dist/Form/Select/Options.d.ts.map +1 -0
- package/dist/Form/Select/index.cjs +1 -0
- package/dist/Form/Select/index.d.ts +4 -0
- package/dist/Form/Select/index.d.ts.map +1 -0
- package/dist/Form/Select/index.mjs +234 -0
- package/dist/Form/Select/types.d.ts +46 -0
- package/dist/Form/Select/types.d.ts.map +1 -0
- package/dist/Form/Switch/index.cjs +1 -0
- package/dist/Form/Switch/index.d.ts +24 -0
- package/dist/Form/Switch/index.d.ts.map +1 -0
- package/dist/Form/Switch/index.mjs +85 -0
- package/dist/Form/Textarea/index.cjs +1 -0
- package/dist/Form/Textarea/index.d.ts +8 -0
- package/dist/Form/Textarea/index.d.ts.map +1 -0
- package/dist/Form/Textarea/index.mjs +36 -0
- package/dist/Form/Timepicker/Body.d.ts +4 -0
- package/dist/Form/Timepicker/Body.d.ts.map +1 -0
- package/dist/Form/Timepicker/Footer.d.ts +4 -0
- package/dist/Form/Timepicker/Footer.d.ts.map +1 -0
- package/dist/Form/Timepicker/GradientOverlay.d.ts +7 -0
- package/dist/Form/Timepicker/GradientOverlay.d.ts.map +1 -0
- package/dist/Form/Timepicker/ScrollWheel.d.ts +5 -0
- package/dist/Form/Timepicker/ScrollWheel.d.ts.map +1 -0
- package/dist/Form/Timepicker/TimeInput.d.ts +10 -0
- package/dist/Form/Timepicker/TimeInput.d.ts.map +1 -0
- package/dist/Form/Timepicker/TimeInputs.d.ts +5 -0
- package/dist/Form/Timepicker/TimeInputs.d.ts.map +1 -0
- package/dist/Form/Timepicker/TimeScrollWheels.d.ts +5 -0
- package/dist/Form/Timepicker/TimeScrollWheels.d.ts.map +1 -0
- package/dist/Form/Timepicker/constants.d.ts +2 -0
- package/dist/Form/Timepicker/constants.d.ts.map +1 -0
- package/dist/Form/Timepicker/context.d.ts +12 -0
- package/dist/Form/Timepicker/context.d.ts.map +1 -0
- package/dist/Form/Timepicker/hooks/useCaret.d.ts +5 -0
- package/dist/Form/Timepicker/hooks/useCaret.d.ts.map +1 -0
- package/dist/Form/Timepicker/hooks/useScrollWheel.d.ts +5 -0
- package/dist/Form/Timepicker/hooks/useScrollWheel.d.ts.map +1 -0
- package/dist/Form/Timepicker/index.cjs +1 -0
- package/dist/Form/Timepicker/index.d.ts +5 -0
- package/dist/Form/Timepicker/index.d.ts.map +1 -0
- package/dist/Form/Timepicker/index.mjs +369 -0
- package/dist/Form/Timepicker/types.d.ts +49 -0
- package/dist/Form/Timepicker/types.d.ts.map +1 -0
- package/dist/Form/Timepicker/utils.d.ts +10 -0
- package/dist/Form/Timepicker/utils.d.ts.map +1 -0
- package/dist/Form/Wrappers/PickerWrapper/PickerWrapper.d.ts +5 -0
- package/dist/Form/Wrappers/PickerWrapper/PickerWrapper.d.ts.map +1 -0
- package/dist/Form/Wrappers/PickerWrapper/contexts.d.ts +7 -0
- package/dist/Form/Wrappers/PickerWrapper/contexts.d.ts.map +1 -0
- package/dist/Form/Wrappers/PickerWrapper/type.d.ts +42 -0
- package/dist/Form/Wrappers/PickerWrapper/type.d.ts.map +1 -0
- package/dist/Form/Wrappers/RadioCheckboxWrapper/RadioCheckboxWrapper.d.ts +34 -0
- package/dist/Form/Wrappers/RadioCheckboxWrapper/RadioCheckboxWrapper.d.ts.map +1 -0
- package/dist/Form/Wrappers/TextFieldWrapper/TextFieldWrapper.d.ts +29 -0
- package/dist/Form/Wrappers/TextFieldWrapper/TextFieldWrapper.d.ts.map +1 -0
- package/dist/Form/types/DateAndTimePicker.d.ts +26 -0
- package/dist/Form/types/DateAndTimePicker.d.ts.map +1 -0
- package/dist/IconArrowDown2-7ddwV5IE.js +22 -0
- package/dist/IconArrowDown2-C1dLVveG.cjs +1 -0
- package/dist/IconArrowLeft2-CNA3H0xY.cjs +1 -0
- package/dist/IconArrowLeft2-cxcPyDqS.js +22 -0
- package/dist/IconArrowRight2-BoXg0Gkw.js +25 -0
- package/dist/IconArrowRight2-CF_bdH81.cjs +1 -0
- package/dist/IconCheckmark-DDfqVvnj.js +22 -0
- package/dist/IconCheckmark-e4F7_KcG.cjs +1 -0
- package/dist/IconCloseRemove-BPEWBqGA.js +22 -0
- package/dist/IconCloseRemove-DwCc4o3b.cjs +1 -0
- package/dist/IconEye-DATABBb3.js +31 -0
- package/dist/IconEye-sBk4Mro2.cjs +1 -0
- package/dist/IconInfoCircleBold-DnAAyuSP.cjs +1 -0
- package/dist/IconInfoCircleBold-GQlvRSek.js +62 -0
- package/dist/IconSearch-BeVs-gUu.cjs +1 -0
- package/dist/IconSearch-aShj2vmu.js +25 -0
- package/dist/List/ListItem.d.ts +5 -0
- package/dist/List/ListItem.d.ts.map +1 -0
- package/dist/List/index.cjs +1 -0
- package/dist/List/index.d.ts +11 -0
- package/dist/List/index.d.ts.map +1 -0
- package/dist/List/index.mjs +81 -0
- package/dist/List/types.d.ts +28 -0
- package/dist/List/types.d.ts.map +1 -0
- package/dist/List/variants.d.ts +8 -0
- package/dist/List/variants.d.ts.map +1 -0
- package/dist/Menu/MenuItem.d.ts +5 -0
- package/dist/Menu/MenuItem.d.ts.map +1 -0
- package/dist/Menu/constants.d.ts +5 -0
- package/dist/Menu/constants.d.ts.map +1 -0
- package/dist/Menu/context.d.ts +4 -0
- package/dist/Menu/context.d.ts.map +1 -0
- package/dist/Menu/index.cjs +1 -0
- package/dist/Menu/index.d.ts +10 -0
- package/dist/Menu/index.d.ts.map +1 -0
- package/dist/Menu/index.mjs +138 -0
- package/dist/Menu/types.d.ts +45 -0
- package/dist/Menu/types.d.ts.map +1 -0
- package/dist/Menu/variants.d.ts +5 -0
- package/dist/Menu/variants.d.ts.map +1 -0
- package/dist/Modal/index.cjs +1 -0
- package/dist/Modal/index.d.ts +25 -0
- package/dist/Modal/index.d.ts.map +1 -0
- package/dist/Modal/index.mjs +63 -0
- package/dist/Pagination/index.cjs +1 -0
- package/dist/Pagination/index.d.ts +21 -0
- package/dist/Pagination/index.d.ts.map +1 -0
- package/dist/Pagination/index.mjs +107 -0
- package/dist/Pagination/utils.d.ts +8 -0
- package/dist/Pagination/utils.d.ts.map +1 -0
- package/dist/PickerWrapper-B14f_Y-E.cjs +1 -0
- package/dist/PickerWrapper-BUpw1NG2.js +133 -0
- package/dist/Popconfirm/constants.d.ts +5 -0
- package/dist/Popconfirm/constants.d.ts.map +1 -0
- package/dist/Popconfirm/index.cjs +1 -0
- package/dist/Popconfirm/index.d.ts +6 -0
- package/dist/Popconfirm/index.d.ts.map +1 -0
- package/dist/Popconfirm/index.mjs +130 -0
- package/dist/Popconfirm/types.d.ts +29 -0
- package/dist/Popconfirm/types.d.ts.map +1 -0
- package/dist/Progress/Bar/index.cjs +1 -0
- package/dist/Progress/Bar/index.d.ts +24 -0
- package/dist/Progress/Bar/index.d.ts.map +1 -0
- package/dist/Progress/Bar/index.mjs +89 -0
- package/dist/Progress/Doughnut/index.cjs +1 -0
- package/dist/Progress/Doughnut/index.d.ts +5 -0
- package/dist/Progress/Doughnut/index.d.ts.map +1 -0
- package/dist/Progress/Doughnut/index.mjs +86 -0
- package/dist/Progress/Doughnut/types.d.ts +21 -0
- package/dist/Progress/Doughnut/types.d.ts.map +1 -0
- package/dist/RadioCheckboxWrapper-BBzu2Ip6.cjs +1 -0
- package/dist/RadioCheckboxWrapper-BvSgv_ra.js +67 -0
- package/dist/Rate/RateStar.d.ts +10 -0
- package/dist/Rate/RateStar.d.ts.map +1 -0
- package/dist/Rate/index.cjs +1 -0
- package/dist/Rate/index.d.ts +6 -0
- package/dist/Rate/index.d.ts.map +1 -0
- package/dist/Rate/index.mjs +159 -0
- package/dist/Rate/types.d.ts +25 -0
- package/dist/Rate/types.d.ts.map +1 -0
- package/dist/SegmentedControl/index.cjs +1 -0
- package/dist/SegmentedControl/index.d.ts +6 -0
- package/dist/SegmentedControl/index.d.ts.map +1 -0
- package/dist/SegmentedControl/index.mjs +132 -0
- package/dist/SegmentedControl/types.d.ts +34 -0
- package/dist/SegmentedControl/types.d.ts.map +1 -0
- package/dist/SegmentedControl/variants.d.ts +7 -0
- package/dist/SegmentedControl/variants.d.ts.map +1 -0
- package/dist/Sidebar/Items.d.ts +4 -0
- package/dist/Sidebar/Items.d.ts.map +1 -0
- package/dist/Sidebar/LogoImage.d.ts +4 -0
- package/dist/Sidebar/LogoImage.d.ts.map +1 -0
- package/dist/Sidebar/Profile.d.ts +3 -0
- package/dist/Sidebar/Profile.d.ts.map +1 -0
- package/dist/Sidebar/SearchInput.d.ts +8 -0
- package/dist/Sidebar/SearchInput.d.ts.map +1 -0
- package/dist/Sidebar/ToggleButton.d.ts +4 -0
- package/dist/Sidebar/ToggleButton.d.ts.map +1 -0
- package/dist/Sidebar/constants.d.ts +6 -0
- package/dist/Sidebar/constants.d.ts.map +1 -0
- package/dist/Sidebar/context.d.ts +4 -0
- package/dist/Sidebar/context.d.ts.map +1 -0
- package/dist/Sidebar/index.cjs +1 -0
- package/dist/Sidebar/index.d.ts +6 -0
- package/dist/Sidebar/index.d.ts.map +1 -0
- package/dist/Sidebar/index.mjs +408 -0
- package/dist/Sidebar/types.d.ts +78 -0
- package/dist/Sidebar/types.d.ts.map +1 -0
- package/dist/Sidebar/utils.d.ts +7 -0
- package/dist/Sidebar/utils.d.ts.map +1 -0
- package/dist/Sidebar/variants.d.ts +7 -0
- package/dist/Sidebar/variants.d.ts.map +1 -0
- package/dist/Skeleton/index.cjs +1 -0
- package/dist/Skeleton/index.d.ts +19 -0
- package/dist/Skeleton/index.d.ts.map +1 -0
- package/dist/Skeleton/index.mjs +107 -0
- package/dist/Skeleton/types.d.ts +13 -0
- package/dist/Skeleton/types.d.ts.map +1 -0
- package/dist/Slide-Df71VSzW.js +341 -0
- package/dist/Slide-idFbYC5G.cjs +1 -0
- package/dist/Slider/Navigation.d.ts +9 -0
- package/dist/Slider/Navigation.d.ts.map +1 -0
- package/dist/Slider/NavigationDot.d.ts +9 -0
- package/dist/Slider/NavigationDot.d.ts.map +1 -0
- package/dist/Slider/Slide.d.ts +4 -0
- package/dist/Slider/Slide.d.ts.map +1 -0
- package/dist/Slider/Slider.d.ts +6 -0
- package/dist/Slider/Slider.d.ts.map +1 -0
- package/dist/Slider/context.d.ts +9 -0
- package/dist/Slider/context.d.ts.map +1 -0
- package/dist/Slider/index.cjs +1 -0
- package/dist/Slider/index.d.ts +4 -0
- package/dist/Slider/index.d.ts.map +1 -0
- package/dist/Slider/index.mjs +6 -0
- package/dist/Slider/types.d.ts +41 -0
- package/dist/Slider/types.d.ts.map +1 -0
- package/dist/Spinner/index.cjs +1 -0
- package/dist/Spinner/index.d.ts +6 -0
- package/dist/Spinner/index.d.ts.map +1 -0
- package/dist/Spinner/index.mjs +34 -0
- package/dist/Spinner/types.d.ts +11 -0
- package/dist/Spinner/types.d.ts.map +1 -0
- package/dist/Spinner/variants.d.ts +4 -0
- package/dist/Spinner/variants.d.ts.map +1 -0
- package/dist/Step-BMPrqeg4.cjs +1 -0
- package/dist/Step-BU0ICl05.js +157 -0
- package/dist/Stepper/Horizontal/Connector.d.ts +7 -0
- package/dist/Stepper/Horizontal/Connector.d.ts.map +1 -0
- package/dist/Stepper/Horizontal/Step.d.ts +24 -0
- package/dist/Stepper/Horizontal/Step.d.ts.map +1 -0
- package/dist/Stepper/Horizontal/StepIcon.d.ts +11 -0
- package/dist/Stepper/Horizontal/StepIcon.d.ts.map +1 -0
- package/dist/Stepper/Horizontal/Stepper.d.ts +15 -0
- package/dist/Stepper/Horizontal/Stepper.d.ts.map +1 -0
- package/dist/Stepper/Horizontal/context.d.ts +10 -0
- package/dist/Stepper/Horizontal/context.d.ts.map +1 -0
- package/dist/Stepper/Horizontal/index.cjs +1 -0
- package/dist/Stepper/Horizontal/index.d.ts +3 -0
- package/dist/Stepper/Horizontal/index.d.ts.map +1 -0
- package/dist/Stepper/Horizontal/index.mjs +6 -0
- package/dist/Stepper/Horizontal/type.d.ts +4 -0
- package/dist/Stepper/Horizontal/type.d.ts.map +1 -0
- package/dist/Stepper/Horizontal/utils.d.ts +4 -0
- package/dist/Stepper/Horizontal/utils.d.ts.map +1 -0
- package/dist/Table/Cell.d.ts +13 -0
- package/dist/Table/Cell.d.ts.map +1 -0
- package/dist/Table/Header.d.ts +7 -0
- package/dist/Table/Header.d.ts.map +1 -0
- package/dist/Table/TBody.d.ts +7 -0
- package/dist/Table/TBody.d.ts.map +1 -0
- package/dist/Table/TBodyEmpty.d.ts +4 -0
- package/dist/Table/TBodyEmpty.d.ts.map +1 -0
- package/dist/Table/TBodyLoading.d.ts +4 -0
- package/dist/Table/TBodyLoading.d.ts.map +1 -0
- package/dist/Table/THead.d.ts +7 -0
- package/dist/Table/THead.d.ts.map +1 -0
- package/dist/Table/context.d.ts +13 -0
- package/dist/Table/context.d.ts.map +1 -0
- package/dist/Table/index.cjs +1 -0
- package/dist/Table/index.d.ts +6 -0
- package/dist/Table/index.d.ts.map +1 -0
- package/dist/Table/index.mjs +762 -0
- package/dist/Table/types.d.ts +104 -0
- package/dist/Table/types.d.ts.map +1 -0
- package/dist/Table/utils.d.ts +10 -0
- package/dist/Table/utils.d.ts.map +1 -0
- package/dist/Tabs/index.cjs +1 -0
- package/dist/Tabs/index.d.ts +29 -0
- package/dist/Tabs/index.d.ts.map +1 -0
- package/dist/Tabs/index.mjs +232 -0
- package/dist/TextFieldWrapper-BAK1sN1p.cjs +1 -0
- package/dist/TextFieldWrapper-ClTnwpWK.js +112 -0
- package/dist/ThemeProvider/context.d.ts +4 -0
- package/dist/ThemeProvider/context.d.ts.map +1 -0
- package/dist/ThemeProvider/index.cjs +1 -0
- package/dist/ThemeProvider/index.d.ts +18 -0
- package/dist/ThemeProvider/index.d.ts.map +1 -0
- package/dist/ThemeProvider/index.mjs +70 -0
- package/dist/ThemeProvider/types.d.ts +24 -0
- package/dist/ThemeProvider/types.d.ts.map +1 -0
- package/dist/Toast/Toast.d.ts +8 -0
- package/dist/Toast/Toast.d.ts.map +1 -0
- package/dist/Toast/ToastContainer.d.ts +8 -0
- package/dist/Toast/ToastContainer.d.ts.map +1 -0
- package/dist/Toast/context.d.ts +10 -0
- package/dist/Toast/context.d.ts.map +1 -0
- package/dist/Toast/index.cjs +1 -0
- package/dist/Toast/index.d.ts +12 -0
- package/dist/Toast/index.d.ts.map +1 -0
- package/dist/Toast/index.mjs +122 -0
- package/dist/Toast/types.d.ts +16 -0
- package/dist/Toast/types.d.ts.map +1 -0
- package/dist/Tooltip/Content.d.ts +9 -0
- package/dist/Tooltip/Content.d.ts.map +1 -0
- package/dist/Tooltip/index.cjs +1 -0
- package/dist/Tooltip/index.d.ts +31 -0
- package/dist/Tooltip/index.d.ts.map +1 -0
- package/dist/Tooltip/index.mjs +169 -0
- package/dist/Tree/constants.d.ts +5 -0
- package/dist/Tree/constants.d.ts.map +1 -0
- package/dist/Tree/context.d.ts +7 -0
- package/dist/Tree/context.d.ts.map +1 -0
- package/dist/Tree/index.cjs +1 -0
- package/dist/Tree/index.d.ts +6 -0
- package/dist/Tree/index.d.ts.map +1 -0
- package/dist/Tree/index.mjs +108 -0
- package/dist/Tree/types.d.ts +40 -0
- package/dist/Tree/types.d.ts.map +1 -0
- package/dist/assets/styles.css +1 -0
- package/dist/clsx-C11secjj.cjs +1 -0
- package/dist/clsx-OuTLNxxd.js +16 -0
- package/dist/debounce-COFLRSUi.js +14 -0
- package/dist/debounce-tddZRTF5.cjs +1 -0
- package/dist/focusTrap-Br2GlOg-.cjs +1 -0
- package/dist/focusTrap-ikiXakRP.js +18 -0
- package/dist/index-1uytR4Ez.js +174 -0
- package/dist/index-Djgl0aBZ.cjs +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +96 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +146 -0
- package/dist/isBrowser-Bczqv-hd.cjs +1 -0
- package/dist/isBrowser-Bkqg1t1y.js +6 -0
- package/dist/omitObjects-CtiYo0hv.cjs +1 -0
- package/dist/omitObjects-CxFrrlkX.js +9 -0
- package/dist/useFlipPosition-B1mqg_YA.js +129 -0
- package/dist/useFlipPosition-BfF6YXxl.cjs +1 -0
- package/dist/useOutsideClick-CpfAm3CM.js +18 -0
- package/dist/useOutsideClick-DGu3KM8Q.cjs +1 -0
- package/package.json +363 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/components/Menu/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAE1E,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,MAAM,WAAW,SAAS;IACxB,uHAAuH;IACvH,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,OAAO,KAAK,KAAK,CAAC,SAAS,CAAC;IAC/F,2DAA2D;IAC3D,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kGAAkG;IAClG,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,6DAA6D;IAC7D,YAAY,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACtC;AAED,MAAM,WAAW,cAAc;IAC7B,oCAAoC;IACpC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,6BAA6B;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,uCAAuC;IACvC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8CAA8C;IAC9C,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,gFAAgF;IAChF,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,4DAA4D;IAC5D,KAAK,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC7B,+DAA+D;IAC/D,IAAI,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;IACjC,6FAA6F;IAC7F,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { MenuItemProps, MenuProps } from './types';
|
|
2
|
+
export declare const menuPanelStyle: Record<Required<MenuProps>['panelVariant'], string>;
|
|
3
|
+
export declare const menuItemColorStyle: Record<Required<MenuItemProps>['color'], string>;
|
|
4
|
+
export declare const menuItemSizeStyle: Record<Required<MenuItemProps>['size'], string>;
|
|
5
|
+
//# sourceMappingURL=variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../src/components/Menu/variants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAExD,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,cAAc,CAAC,EAAE,MAAM,CAG9E,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,EAAE,MAAM,CAK/E,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAG7E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";const r=require("react/jsx-runtime");require("react");const a=require("../Button/index.cjs"),p=require("../Drawer/index.cjs"),q=({title:i,description:s,confirmLabel:l="تایید",cancelLabel:u="انصراف",onConfirm:e,onCancel:o,confirmLoading:d,headerActionElement:c,closeIconAriaLabel:v,onClose:t,children:x,footer:n,...j})=>{const w=()=>{o?.(),t()},h=n!==void 0?n:e||o?{element:r.jsxs("div",{className:"crow:flex crow:gap-3 crow:justify-end crow:w-full",children:[o&&r.jsx(a,{variant:"outline",color:"gray",onClick:w,children:u}),e&&r.jsx(a,{variant:"primary",color:"primary",isLoading:d,onClick:e,children:l})]})}:void 0;return r.jsx(p,{...j,position:"center",onClose:t,header:i||s||c?{title:i,description:s,haveCloseIcon:!0,closeIconAriaLabel:v,actionElement:c}:void 0,footer:h,children:x})};module.exports=q;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { DrawerProps } from '../Drawer';
|
|
3
|
+
export interface ModalProps extends Omit<DrawerProps, 'position' | 'header'> {
|
|
4
|
+
/** Heading text in the modal header. */
|
|
5
|
+
title?: string;
|
|
6
|
+
/** Subheading text below the title. */
|
|
7
|
+
description?: string;
|
|
8
|
+
/** Label for the confirm (primary) button. @default 'تایید' */
|
|
9
|
+
confirmLabel?: string;
|
|
10
|
+
/** Label for the cancel (outline) button. @default 'انصراف' */
|
|
11
|
+
cancelLabel?: string;
|
|
12
|
+
/** Called when the user clicks the confirm button. Renders the confirm button when provided. */
|
|
13
|
+
onConfirm?: () => void;
|
|
14
|
+
/** Called when the user clicks the cancel button. Renders the cancel button when provided. */
|
|
15
|
+
onCancel?: () => void;
|
|
16
|
+
/** Shows a loading spinner on the confirm button and disables it. @default false */
|
|
17
|
+
confirmLoading?: boolean;
|
|
18
|
+
/** Extra node rendered in the header's trailing area. */
|
|
19
|
+
headerActionElement?: ReactNode;
|
|
20
|
+
/** Aria-label for the close icon button (accessibility). */
|
|
21
|
+
closeIconAriaLabel?: string;
|
|
22
|
+
}
|
|
23
|
+
declare const Modal: FC<ModalProps>;
|
|
24
|
+
export default Modal;
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/Modal/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAe,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAErD,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,QAAQ,CAAC;IAC1E,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+DAA+D;IAC/D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+DAA+D;IAC/D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gGAAgG;IAChG,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,8FAA8F;IAC9F,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,oFAAoF;IACpF,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,yDAAyD;IACzD,mBAAmB,CAAC,EAAE,SAAS,CAAC;IAChC,4DAA4D;IAC5D,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,QAAA,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CAwEzB,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e, jsxs as h } from "react/jsx-runtime";
|
|
3
|
+
import "react";
|
|
4
|
+
import d from "../Button/index.mjs";
|
|
5
|
+
import w from "../Drawer/index.mjs";
|
|
6
|
+
const F = ({
|
|
7
|
+
title: t,
|
|
8
|
+
description: a,
|
|
9
|
+
confirmLabel: n = "تایید",
|
|
10
|
+
cancelLabel: s = "انصراف",
|
|
11
|
+
onConfirm: r,
|
|
12
|
+
onCancel: o,
|
|
13
|
+
confirmLoading: m,
|
|
14
|
+
headerActionElement: i,
|
|
15
|
+
closeIconAriaLabel: v,
|
|
16
|
+
onClose: l,
|
|
17
|
+
children: p,
|
|
18
|
+
footer: c,
|
|
19
|
+
...u
|
|
20
|
+
}) => /* @__PURE__ */ e(
|
|
21
|
+
w,
|
|
22
|
+
{
|
|
23
|
+
...u,
|
|
24
|
+
position: "center",
|
|
25
|
+
onClose: l,
|
|
26
|
+
header: t || a || i ? {
|
|
27
|
+
title: t,
|
|
28
|
+
description: a,
|
|
29
|
+
haveCloseIcon: !0,
|
|
30
|
+
closeIconAriaLabel: v,
|
|
31
|
+
actionElement: i
|
|
32
|
+
} : void 0,
|
|
33
|
+
footer: c !== void 0 ? c : r || o ? {
|
|
34
|
+
element: /* @__PURE__ */ h("div", { className: "crow:flex crow:gap-3 crow:justify-end crow:w-full", children: [
|
|
35
|
+
o && /* @__PURE__ */ e(
|
|
36
|
+
d,
|
|
37
|
+
{
|
|
38
|
+
variant: "outline",
|
|
39
|
+
color: "gray",
|
|
40
|
+
onClick: () => {
|
|
41
|
+
o?.(), l();
|
|
42
|
+
},
|
|
43
|
+
children: s
|
|
44
|
+
}
|
|
45
|
+
),
|
|
46
|
+
r && /* @__PURE__ */ e(
|
|
47
|
+
d,
|
|
48
|
+
{
|
|
49
|
+
variant: "primary",
|
|
50
|
+
color: "primary",
|
|
51
|
+
isLoading: m,
|
|
52
|
+
onClick: r,
|
|
53
|
+
children: n
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
] })
|
|
57
|
+
} : void 0,
|
|
58
|
+
children: p
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
export {
|
|
62
|
+
F as default
|
|
63
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";require('../assets/styles.css');const i=require("react/jsx-runtime"),I=require("../clsx-C11secjj.cjs"),y=require("react"),R=require("../IconArrowLeft2-CNA3H0xY.cjs"),v=require("../IconArrowRight2-CF_bdH81.cjs"),P=require("../Button/index.cjs");;/* empty css */const g="...";function f(s,d){const n=d-s+1;return Array.from({length:n},(a,t)=>t+s)}function C({totalCount:s,pageSize:d,siblingCount:n,currentPage:a}){const t=Math.ceil(s/d);if(n+5>=t)return f(1,t);const r=Math.max(a-n,1),w=Math.min(a+n,t),u=r>2,o=w<t-1,h=1,l=t;if(!u&&o){let c=2+n;return r>1&&(c+=1),[...f(1,c),g,t]}if(u&&!o){let c=2+n;w<t&&(c+=1);const e=f(t-c+1,t);return[h,g,...e]}const x=f(r,w);return[h,g,...x,g,l]}const S=s=>{const{totalCount:d,pageSize:n,onPageChange:a,siblingCount:t=1,defaultCurrent:m=1,navigationButtonsWithText:r=!0,hideOnSinglePage:w,className:u}=s,[o,h]=y.useState(m),l=C({totalCount:d,pageSize:n,siblingCount:t,currentPage:o}),x=l[l.length-1];if(w&&l.length<2)return null;function c(e){typeof a=="function"&&a(e),h(e)}return i.jsxs("div",{className:I.clsx("crow:flex crow:justify-between crow:w-full crow:px-4 crow:text-gray-600",u),children:[i.jsx(P,{disabled:o===1,onClick:()=>c(o-1),rightIcon:i.jsx(v.IconArrowRight2,{}),variant:r?"text":"secondary",size:r?"medium":"small",children:r&&"صفحه قبل"}),i.jsx("div",{className:"crow:flex crow:items-center crow:gap-x-1 crow:md:gap-x-4",children:l.map((e,j)=>typeof e=="string"?i.jsx("div",{children:g},`${e}-${j}`):i.jsx("button",{className:I.clsx("crow:ss02 crow:w-9 crow:h-9 crow:md:w-11 crow:md:h-11 crow:flex crow:justify-center crow:items-center crow:font-h6-bold crow:md:font-h5-bold crow:transition crow:border crow:border-solid crow:border-transparent crow:rounded-lg",e===o?"crow:bg-primary-500 crow:text-white":"crow:hover:text-primary-500 crow:hover:border-primary-200",u),onClick:()=>c(e),children:e},e))}),i.jsx(P,{disabled:o===x,onClick:()=>c(o+1),leftIcon:i.jsx(R.IconArrowLeft2,{}),variant:r?"text":"secondary",size:r?"medium":"small",children:r&&"صفحه بعد"})]})};module.exports=S;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface PaginationProps {
|
|
2
|
+
/** Total number of items across all pages. */
|
|
3
|
+
totalCount: number;
|
|
4
|
+
/** Number of items per page. */
|
|
5
|
+
pageSize: number;
|
|
6
|
+
/** Called with the newly selected page number when the user navigates. */
|
|
7
|
+
onPageChange?: (page: number) => void;
|
|
8
|
+
/** Number of page buttons shown on each side of the current page. @default 1 */
|
|
9
|
+
siblingCount?: number;
|
|
10
|
+
/** Page number to display on first render. @default 1 */
|
|
11
|
+
defaultCurrent?: number;
|
|
12
|
+
/** Shows text labels ("Previous" / "Next") inside the navigation buttons. @default true */
|
|
13
|
+
navigationButtonsWithText?: boolean;
|
|
14
|
+
/** Hides the entire pagination when only one page exists. @default false */
|
|
15
|
+
hideOnSinglePage?: boolean;
|
|
16
|
+
/** Extra class names on the pagination container. */
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
declare const Pagination: (props: PaginationProps) => import("react").JSX.Element | null;
|
|
20
|
+
export default Pagination;
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/Pagination/index.tsx"],"names":[],"mappings":"AAQA,OAAO,kBAAkB,CAAC;AAE1B,MAAM,WAAW,eAAe;IAC9B,8CAA8C;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,gCAAgC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,gFAAgF;IAChF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yDAAyD;IACzD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,2FAA2F;IAC3F,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,4EAA4E;IAC5E,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,UAAU,GAAI,OAAO,eAAe,uCA8EzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as y, jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import { c as p } from "../clsx-OuTLNxxd.js";
|
|
4
|
+
import { useState as v } from "react";
|
|
5
|
+
import { I as C } from "../IconArrowLeft2-cxcPyDqS.js";
|
|
6
|
+
import { I as R } from "../IconArrowRight2-BoXg0Gkw.js";
|
|
7
|
+
import I from "../Button/index.mjs";
|
|
8
|
+
import '../assets/styles.css';/* empty css */
|
|
9
|
+
const m = "...";
|
|
10
|
+
function h(a, d) {
|
|
11
|
+
const e = d - a + 1;
|
|
12
|
+
return Array.from({ length: e }, (s, t) => t + a);
|
|
13
|
+
}
|
|
14
|
+
function S({
|
|
15
|
+
totalCount: a,
|
|
16
|
+
pageSize: d,
|
|
17
|
+
siblingCount: e,
|
|
18
|
+
currentPage: s
|
|
19
|
+
}) {
|
|
20
|
+
const t = Math.ceil(a / d);
|
|
21
|
+
if (e + 5 >= t)
|
|
22
|
+
return h(1, t);
|
|
23
|
+
const r = Math.max(s - e, 1), f = Math.min(s + e, t), w = r > 2, n = f < t - 1, g = 1, l = t;
|
|
24
|
+
if (!w && n) {
|
|
25
|
+
let c = 2 + e;
|
|
26
|
+
return r > 1 && (c += 1), [...h(1, c), m, t];
|
|
27
|
+
}
|
|
28
|
+
if (w && !n) {
|
|
29
|
+
let c = 2 + e;
|
|
30
|
+
f < t && (c += 1);
|
|
31
|
+
const o = h(t - c + 1, t);
|
|
32
|
+
return [g, m, ...o];
|
|
33
|
+
}
|
|
34
|
+
const u = h(r, f);
|
|
35
|
+
return [g, m, ...u, m, l];
|
|
36
|
+
}
|
|
37
|
+
const B = (a) => {
|
|
38
|
+
const {
|
|
39
|
+
totalCount: d,
|
|
40
|
+
pageSize: e,
|
|
41
|
+
onPageChange: s,
|
|
42
|
+
siblingCount: t = 1,
|
|
43
|
+
defaultCurrent: x = 1,
|
|
44
|
+
navigationButtonsWithText: r = !0,
|
|
45
|
+
hideOnSinglePage: f,
|
|
46
|
+
className: w
|
|
47
|
+
} = a, [n, g] = v(x), l = S({
|
|
48
|
+
totalCount: d,
|
|
49
|
+
pageSize: e,
|
|
50
|
+
siblingCount: t,
|
|
51
|
+
currentPage: n
|
|
52
|
+
}), u = l[l.length - 1];
|
|
53
|
+
if (f && l.length < 2)
|
|
54
|
+
return null;
|
|
55
|
+
function c(o) {
|
|
56
|
+
typeof s == "function" && s(o), g(o);
|
|
57
|
+
}
|
|
58
|
+
return /* @__PURE__ */ y(
|
|
59
|
+
"div",
|
|
60
|
+
{
|
|
61
|
+
className: p(
|
|
62
|
+
"crow:flex crow:justify-between crow:w-full crow:px-4 crow:text-gray-600",
|
|
63
|
+
w
|
|
64
|
+
),
|
|
65
|
+
children: [
|
|
66
|
+
/* @__PURE__ */ i(
|
|
67
|
+
I,
|
|
68
|
+
{
|
|
69
|
+
disabled: n === 1,
|
|
70
|
+
onClick: () => c(n - 1),
|
|
71
|
+
rightIcon: /* @__PURE__ */ i(R, {}),
|
|
72
|
+
variant: r ? "text" : "secondary",
|
|
73
|
+
size: r ? "medium" : "small",
|
|
74
|
+
children: r && "صفحه قبل"
|
|
75
|
+
}
|
|
76
|
+
),
|
|
77
|
+
/* @__PURE__ */ i("div", { className: "crow:flex crow:items-center crow:gap-x-1 crow:md:gap-x-4", children: l.map((o, P) => typeof o == "string" ? /* @__PURE__ */ i("div", { children: m }, `${o}-${P}`) : /* @__PURE__ */ i(
|
|
78
|
+
"button",
|
|
79
|
+
{
|
|
80
|
+
className: p(
|
|
81
|
+
"crow:ss02 crow:w-9 crow:h-9 crow:md:w-11 crow:md:h-11 crow:flex crow:justify-center crow:items-center crow:font-h6-bold crow:md:font-h5-bold crow:transition crow:border crow:border-solid crow:border-transparent crow:rounded-lg",
|
|
82
|
+
o === n ? "crow:bg-primary-500 crow:text-white" : "crow:hover:text-primary-500 crow:hover:border-primary-200",
|
|
83
|
+
w
|
|
84
|
+
),
|
|
85
|
+
onClick: () => c(o),
|
|
86
|
+
children: o
|
|
87
|
+
},
|
|
88
|
+
o
|
|
89
|
+
)) }),
|
|
90
|
+
/* @__PURE__ */ i(
|
|
91
|
+
I,
|
|
92
|
+
{
|
|
93
|
+
disabled: n === u,
|
|
94
|
+
onClick: () => c(n + 1),
|
|
95
|
+
leftIcon: /* @__PURE__ */ i(C, {}),
|
|
96
|
+
variant: r ? "text" : "secondary",
|
|
97
|
+
size: r ? "medium" : "small",
|
|
98
|
+
children: r && "صفحه بعد"
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
};
|
|
105
|
+
export {
|
|
106
|
+
B as default
|
|
107
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PaginationProps } from '.';
|
|
2
|
+
export declare const DOTS = "...";
|
|
3
|
+
interface GetPaginationRangeArguments extends Required<Pick<PaginationProps, 'totalCount' | 'pageSize' | 'siblingCount'>> {
|
|
4
|
+
currentPage: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function getPaginationRange({ totalCount, pageSize, siblingCount, currentPage, }: GetPaginationRangeArguments): (string | number)[];
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/components/Pagination/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,GAAG,CAAC;AAEzC,eAAO,MAAM,IAAI,QAAQ,CAAC;AAO1B,UAAU,2BACR,SAAQ,QAAQ,CAAC,IAAI,CAAC,eAAe,EAAE,YAAY,GAAG,UAAU,GAAG,cAAc,CAAC,CAAC;IACnF,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,WAAW,GACZ,EAAE,2BAA2B,uBA2D7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";require('./assets/styles.css');const e=require("react/jsx-runtime"),r=require("./clsx-C11secjj.cjs"),t=require("react"),S=require("./Drawer/index.cjs"),D=require("./useFlipPosition-BfF6YXxl.cjs"),O=require("./useOutsideClick-DGu3KM8Q.cjs"),A=require("./IconArrowDown2-C1dLVveG.cjs"),E=require("./index-Djgl0aBZ.cjs");;/* empty css */const I=t.createContext({toggleWrapperVisibility:()=>{}}),F=()=>t.useContext(I),g="crow:duration-300",v=400,V=N=>{const{dropdownType:w="popover",disabled:n,isLoading:s,wrapperClassName:W,customInput:d,children:x,drawerProps:f,inputProps:P,popoverClassName:y,popoverPosition:T}=N,m=T??"bottom-left",[c,a]=t.useState(!1),[h,p]=t.useState(!1),[i,j]=t.useState(m),o=t.useRef(null),{anchorRef:q,popperRef:R}=D.useFlipPosition({initialPosition:m,minVisible:180,onPositionChange(l){j(b=>b===l?b:l)}}),k=O.useOutsideClick(()=>{w==="popover"&&c&&(a(!1),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{p(!1)},v))});function C(){if(n||s)return;const l=!h;o.current&&clearTimeout(o.current),l?(p(!0),o.current=setTimeout(()=>{a(!0)},0)):(a(!1),o.current=setTimeout(()=>{p(!1)},v))}const u=r.clsx({"crow:!cursor-not-allowed":n,"crow:!cursor-wait":s,"crow:!cursor-pointer":!s&&!n});return e.jsxs("div",{ref:k,className:r.clsx("crow:relative",W),children:[e.jsx("button",{ref:q,type:"button",className:r.clsx("crow:w-full",u),onClick:C,children:d?d(c):e.jsx(E.Input,{leftIcon:s?e.jsx("div",{className:"dot-flashing crow:mr-2"}):e.jsx(A.IconArrowDown2,{width:20,height:20,className:r.clsx("crow:transition",g,{"crow:rotate-180":c})}),containerClassName:r.clsx(u,{"crow:items-baseline":s}),className:r.clsx("crow:caret-transparent",u),disabled:n,...P})}),e.jsx(I.Provider,{value:{toggleWrapperVisibility:C},children:h&&e.jsx(e.Fragment,{children:w==="popover"?e.jsx("div",{ref:R,className:r.clsx("crow:absolute crow:min-w-[300px] crow:overflow-y-auto crow:overflow-x-hidden crow:shadow-lg crow:w-full crow:max-h-[360px] crow:transition-all crow:bg-surface crow:z-50 crow:rounded-lg crow:border crow:border-solid crow:border-gray-200 crow:pb-3",g,c?"crow:opacity-100":"crow:opacity-0 crow:max-h-0 crow:overflow-y-hidden",{"crow:bottom-0 crow:translate-y-[calc(100%+8px)]":i.includes("bottom"),"crow:top-0 crow:translate-y-[calc(-100%-8px)]":i.includes("top")},{"crow:right-0":i.endsWith("left"),"crow:left-0":i.endsWith("right"),"crow:left-1/2 crow:-translate-x-1/2":i.endsWith("center")},y),children:x}):e.jsx(S,{...f,open:c,onClose:()=>a(!1),containerClassName:r.clsx("crow:!pb-3 crow:!px-0",f?.containerClassName),children:x})})})]})};exports.PickerWrapper=V;exports.usePickerWrapperContext=F;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as O, jsx as o, Fragment as A } from "react/jsx-runtime";
|
|
3
|
+
import { c as r } from "./clsx-OuTLNxxd.js";
|
|
4
|
+
import { createContext as E, useContext as V, useState as w, useRef as _ } from "react";
|
|
5
|
+
import j from "./Drawer/index.mjs";
|
|
6
|
+
import { u as F } from "./useFlipPosition-B1mqg_YA.js";
|
|
7
|
+
import { u as L } from "./useOutsideClick-CpfAm3CM.js";
|
|
8
|
+
import { I as M } from "./IconArrowDown2-7ddwV5IE.js";
|
|
9
|
+
import { I as U } from "./index-1uytR4Ez.js";
|
|
10
|
+
import './assets/styles.css';/* empty css */
|
|
11
|
+
const I = E({
|
|
12
|
+
toggleWrapperVisibility: () => {
|
|
13
|
+
}
|
|
14
|
+
}), Y = () => V(I), g = "crow:duration-300", v = 400, Z = (N) => {
|
|
15
|
+
const {
|
|
16
|
+
dropdownType: u = "popover",
|
|
17
|
+
disabled: i,
|
|
18
|
+
isLoading: t,
|
|
19
|
+
wrapperClassName: W,
|
|
20
|
+
customInput: m,
|
|
21
|
+
children: f,
|
|
22
|
+
drawerProps: d,
|
|
23
|
+
inputProps: y,
|
|
24
|
+
popoverClassName: P,
|
|
25
|
+
popoverPosition: T
|
|
26
|
+
} = N, h = T ?? "bottom-left", [s, n] = w(!1), [b, l] = w(!1), [c, R] = w(h), e = _(null), { anchorRef: S, popperRef: k } = F({
|
|
27
|
+
initialPosition: h,
|
|
28
|
+
minVisible: 180,
|
|
29
|
+
onPositionChange(a) {
|
|
30
|
+
R((C) => C === a ? C : a);
|
|
31
|
+
}
|
|
32
|
+
}), D = L(() => {
|
|
33
|
+
u === "popover" && s && (n(!1), e.current && clearTimeout(e.current), e.current = setTimeout(() => {
|
|
34
|
+
l(!1);
|
|
35
|
+
}, v));
|
|
36
|
+
});
|
|
37
|
+
function x() {
|
|
38
|
+
if (i || t) return;
|
|
39
|
+
const a = !b;
|
|
40
|
+
e.current && clearTimeout(e.current), a ? (l(!0), e.current = setTimeout(() => {
|
|
41
|
+
n(!0);
|
|
42
|
+
}, 0)) : (n(!1), e.current = setTimeout(() => {
|
|
43
|
+
l(!1);
|
|
44
|
+
}, v));
|
|
45
|
+
}
|
|
46
|
+
const p = r({
|
|
47
|
+
"crow:!cursor-not-allowed": i,
|
|
48
|
+
"crow:!cursor-wait": t,
|
|
49
|
+
"crow:!cursor-pointer": !t && !i
|
|
50
|
+
});
|
|
51
|
+
return /* @__PURE__ */ O(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
ref: D,
|
|
55
|
+
className: r("crow:relative", W),
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ o(
|
|
58
|
+
"button",
|
|
59
|
+
{
|
|
60
|
+
ref: S,
|
|
61
|
+
type: "button",
|
|
62
|
+
className: r("crow:w-full", p),
|
|
63
|
+
onClick: x,
|
|
64
|
+
children: m ? m(s) : /* @__PURE__ */ o(
|
|
65
|
+
U,
|
|
66
|
+
{
|
|
67
|
+
leftIcon: t ? /* @__PURE__ */ o("div", { className: "dot-flashing crow:mr-2" }) : /* @__PURE__ */ o(
|
|
68
|
+
M,
|
|
69
|
+
{
|
|
70
|
+
width: 20,
|
|
71
|
+
height: 20,
|
|
72
|
+
className: r("crow:transition", g, {
|
|
73
|
+
"crow:rotate-180": s
|
|
74
|
+
})
|
|
75
|
+
}
|
|
76
|
+
),
|
|
77
|
+
containerClassName: r(p, {
|
|
78
|
+
"crow:items-baseline": t
|
|
79
|
+
}),
|
|
80
|
+
className: r("crow:caret-transparent", p),
|
|
81
|
+
disabled: i,
|
|
82
|
+
...y
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
),
|
|
87
|
+
/* @__PURE__ */ o(
|
|
88
|
+
I.Provider,
|
|
89
|
+
{
|
|
90
|
+
value: {
|
|
91
|
+
toggleWrapperVisibility: x
|
|
92
|
+
},
|
|
93
|
+
children: b && /* @__PURE__ */ o(A, { children: u === "popover" ? /* @__PURE__ */ o(
|
|
94
|
+
"div",
|
|
95
|
+
{
|
|
96
|
+
ref: k,
|
|
97
|
+
className: r(
|
|
98
|
+
"crow:absolute crow:min-w-[300px] crow:overflow-y-auto crow:overflow-x-hidden crow:shadow-lg crow:w-full crow:max-h-[360px] crow:transition-all crow:bg-surface crow:z-50 crow:rounded-lg crow:border crow:border-solid crow:border-gray-200 crow:pb-3",
|
|
99
|
+
g,
|
|
100
|
+
s ? "crow:opacity-100" : "crow:opacity-0 crow:max-h-0 crow:overflow-y-hidden",
|
|
101
|
+
{
|
|
102
|
+
"crow:bottom-0 crow:translate-y-[calc(100%+8px)]": c.includes("bottom"),
|
|
103
|
+
"crow:top-0 crow:translate-y-[calc(-100%-8px)]": c.includes("top")
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"crow:right-0": c.endsWith("left"),
|
|
107
|
+
"crow:left-0": c.endsWith("right"),
|
|
108
|
+
"crow:left-1/2 crow:-translate-x-1/2": c.endsWith("center")
|
|
109
|
+
},
|
|
110
|
+
P
|
|
111
|
+
),
|
|
112
|
+
children: f
|
|
113
|
+
}
|
|
114
|
+
) : /* @__PURE__ */ o(
|
|
115
|
+
j,
|
|
116
|
+
{
|
|
117
|
+
...d,
|
|
118
|
+
open: s,
|
|
119
|
+
onClose: () => n(!1),
|
|
120
|
+
containerClassName: r("crow:!pb-3 crow:!px-0", d?.containerClassName),
|
|
121
|
+
children: f
|
|
122
|
+
}
|
|
123
|
+
) })
|
|
124
|
+
}
|
|
125
|
+
)
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
};
|
|
130
|
+
export {
|
|
131
|
+
Z as P,
|
|
132
|
+
Y as u
|
|
133
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PopperPosition } from '../Form/Wrappers/PickerWrapper/type';
|
|
2
|
+
export declare const DURATION_CLASS = "crow:duration-200";
|
|
3
|
+
export declare const REMOVE_CONTAINER_TIMEOUT = 200;
|
|
4
|
+
export declare const POSITION_CLASS_NAMES: Record<PopperPosition, string>;
|
|
5
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/components/Popconfirm/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAE1E,eAAO,MAAM,cAAc,sBAAsB,CAAC;AAClD,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAE5C,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAU/D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";require('../assets/styles.css');const o=require("react/jsx-runtime"),f=require("../clsx-C11secjj.cjs"),r=require("react"),_=require("../useFlipPosition-BfF6YXxl.cjs"),D=require("../useOutsideClick-DGu3KM8Q.cjs");;/* empty css */const p=require("../Button/index.cjs"),z="crow:duration-200",M=200,F={bottom:"crow:bottom-0 crow:translate-y-[calc(100%+8px)] crow:right-0","bottom-right":"crow:bottom-0 crow:translate-y-[calc(100%+8px)] crow:left-0","bottom-center":"crow:bottom-0 crow:translate-y-[calc(100%+8px)] crow:left-1/2 crow:-translate-x-1/2","bottom-left":"crow:bottom-0 crow:translate-y-[calc(100%+8px)] crow:right-0",top:"crow:top-0 crow:-translate-y-[calc(100%+8px)] crow:right-0","top-right":"crow:top-0 crow:-translate-y-[calc(100%+8px)] crow:left-0","top-center":"crow:top-0 crow:-translate-y-[calc(100%+8px)] crow:left-1/2 crow:-translate-x-1/2","top-left":"crow:top-0 crow:-translate-y-[calc(100%+8px)] crow:right-0"},U=m=>{const{trigger:x,title:s,description:a,confirmLabel:g="تایید",cancelLabel:y="انصراف",onConfirm:h,onCancel:b,confirmLoading:C,disabled:N=!1,position:l="top-center",className:k,wrapperClassName:v}=m,[e,w]=r.useState(!1),[u,d]=r.useState(!1),[I,P]=r.useState(l),t=r.useRef(null),T=r.useId(),{anchorRef:j,popperRef:E}=_.useFlipPosition({initialPosition:l,minVisible:180,padding:8,onPositionChange(n){P(n)}}),O=D.useOutsideClick(()=>{c()});function i(){t.current&&(clearTimeout(t.current),t.current=null)}function R(){N||(i(),d(!0),t.current=setTimeout(()=>{w(!0)},0))}function c(){i(),w(!1),t.current=setTimeout(()=>{d(!1)},M)}function S(){u?c():R()}function L(){h?.(),c()}function q(){b?.(),c()}return r.useEffect(()=>{if(!e)return;function n(A){A.key==="Escape"&&c()}return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[e]),r.useEffect(()=>()=>i(),[]),o.jsxs("div",{ref:O,className:f.clsx("crow:relative crow:inline-block",v),children:[x(S,j,e),u&&o.jsxs("div",{ref:E,id:T,role:"dialog","aria-hidden":!e,className:f.clsx("crow:absolute crow:z-50 crow:w-max crow:max-w-[280px] crow:flex crow:flex-col crow:gap-3 crow:rounded-2xl crow:border crow:border-gray-200 crow:bg-white crow:p-4 crow:shadow-lg","crow:dark:bg-gray-700 crow:dark:border-gray-600","crow:transition-all",z,e?"crow:opacity-100 crow:scale-100":"crow:opacity-0 crow:scale-95",F[I],k),children:[o.jsxs("div",{className:"crow:flex crow:flex-col crow:gap-1",children:[s&&o.jsx("div",{className:"crow:font-h5-bold crow:text-gray-800 crow:dark:text-white",children:s}),a&&o.jsx("div",{className:"crow:font-p3-regular crow:text-gray-600 crow:dark:text-gray-300",children:a})]}),o.jsxs("div",{className:"crow:flex crow:gap-2 crow:justify-end",children:[o.jsx(p,{variant:"outline",color:"gray",size:"small",onClick:q,children:y}),o.jsx(p,{variant:"primary",color:"primary",size:"small",isLoading:C,onClick:L,children:g})]})]})]})};module.exports=U;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/Popconfirm/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAsC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAGpE,OAAO,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAI/C,QAAA,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAgJnC,CAAC;AAEF,eAAe,UAAU,CAAC;AAC1B,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as e, jsx as n } from "react/jsx-runtime";
|
|
3
|
+
import { c as d } from "../clsx-OuTLNxxd.js";
|
|
4
|
+
import { useState as a, useRef as M, useId as U, useEffect as u } from "react";
|
|
5
|
+
import { u as V } from "../useFlipPosition-B1mqg_YA.js";
|
|
6
|
+
import { u as B } from "../useOutsideClick-CpfAm3CM.js";
|
|
7
|
+
import '../assets/styles.css';/* empty css */
|
|
8
|
+
import g from "../Button/index.mjs";
|
|
9
|
+
const F = "crow:duration-200", K = 200, q = {
|
|
10
|
+
bottom: "crow:bottom-0 crow:translate-y-[calc(100%+8px)] crow:right-0",
|
|
11
|
+
"bottom-right": "crow:bottom-0 crow:translate-y-[calc(100%+8px)] crow:left-0",
|
|
12
|
+
"bottom-center": "crow:bottom-0 crow:translate-y-[calc(100%+8px)] crow:left-1/2 crow:-translate-x-1/2",
|
|
13
|
+
"bottom-left": "crow:bottom-0 crow:translate-y-[calc(100%+8px)] crow:right-0",
|
|
14
|
+
top: "crow:top-0 crow:-translate-y-[calc(100%+8px)] crow:right-0",
|
|
15
|
+
"top-right": "crow:top-0 crow:-translate-y-[calc(100%+8px)] crow:left-0",
|
|
16
|
+
"top-center": "crow:top-0 crow:-translate-y-[calc(100%+8px)] crow:left-1/2 crow:-translate-x-1/2",
|
|
17
|
+
"top-left": "crow:top-0 crow:-translate-y-[calc(100%+8px)] crow:right-0"
|
|
18
|
+
}, Z = (x) => {
|
|
19
|
+
const {
|
|
20
|
+
trigger: y,
|
|
21
|
+
title: l,
|
|
22
|
+
description: s,
|
|
23
|
+
confirmLabel: h = "تایید",
|
|
24
|
+
cancelLabel: b = "انصراف",
|
|
25
|
+
onConfirm: C,
|
|
26
|
+
onCancel: N,
|
|
27
|
+
confirmLoading: v,
|
|
28
|
+
disabled: k = !1,
|
|
29
|
+
position: w = "top-center",
|
|
30
|
+
className: I,
|
|
31
|
+
wrapperClassName: T
|
|
32
|
+
} = x, [o, f] = a(!1), [m, p] = a(!1), [P, E] = a(w), r = M(null), O = U(), { anchorRef: L, popperRef: R } = V({
|
|
33
|
+
initialPosition: w,
|
|
34
|
+
minVisible: 180,
|
|
35
|
+
padding: 8,
|
|
36
|
+
onPositionChange(c) {
|
|
37
|
+
E(c);
|
|
38
|
+
}
|
|
39
|
+
}), S = B(() => {
|
|
40
|
+
t();
|
|
41
|
+
});
|
|
42
|
+
function i() {
|
|
43
|
+
r.current && (clearTimeout(r.current), r.current = null);
|
|
44
|
+
}
|
|
45
|
+
function A() {
|
|
46
|
+
k || (i(), p(!0), r.current = setTimeout(() => {
|
|
47
|
+
f(!0);
|
|
48
|
+
}, 0));
|
|
49
|
+
}
|
|
50
|
+
function t() {
|
|
51
|
+
i(), f(!1), r.current = setTimeout(() => {
|
|
52
|
+
p(!1);
|
|
53
|
+
}, K);
|
|
54
|
+
}
|
|
55
|
+
function _() {
|
|
56
|
+
m ? t() : A();
|
|
57
|
+
}
|
|
58
|
+
function D() {
|
|
59
|
+
C?.(), t();
|
|
60
|
+
}
|
|
61
|
+
function j() {
|
|
62
|
+
N?.(), t();
|
|
63
|
+
}
|
|
64
|
+
return u(() => {
|
|
65
|
+
if (!o) return;
|
|
66
|
+
function c(z) {
|
|
67
|
+
z.key === "Escape" && t();
|
|
68
|
+
}
|
|
69
|
+
return document.addEventListener("keydown", c), () => document.removeEventListener("keydown", c);
|
|
70
|
+
}, [o]), u(() => () => i(), []), /* @__PURE__ */ e(
|
|
71
|
+
"div",
|
|
72
|
+
{
|
|
73
|
+
ref: S,
|
|
74
|
+
className: d("crow:relative crow:inline-block", T),
|
|
75
|
+
children: [
|
|
76
|
+
y(_, L, o),
|
|
77
|
+
m && /* @__PURE__ */ e(
|
|
78
|
+
"div",
|
|
79
|
+
{
|
|
80
|
+
ref: R,
|
|
81
|
+
id: O,
|
|
82
|
+
role: "dialog",
|
|
83
|
+
"aria-hidden": !o,
|
|
84
|
+
className: d(
|
|
85
|
+
"crow:absolute crow:z-50 crow:w-max crow:max-w-[280px] crow:flex crow:flex-col crow:gap-3 crow:rounded-2xl crow:border crow:border-gray-200 crow:bg-white crow:p-4 crow:shadow-lg",
|
|
86
|
+
"crow:dark:bg-gray-700 crow:dark:border-gray-600",
|
|
87
|
+
"crow:transition-all",
|
|
88
|
+
F,
|
|
89
|
+
o ? "crow:opacity-100 crow:scale-100" : "crow:opacity-0 crow:scale-95",
|
|
90
|
+
q[P],
|
|
91
|
+
I
|
|
92
|
+
),
|
|
93
|
+
children: [
|
|
94
|
+
/* @__PURE__ */ e("div", { className: "crow:flex crow:flex-col crow:gap-1", children: [
|
|
95
|
+
l && /* @__PURE__ */ n("div", { className: "crow:font-h5-bold crow:text-gray-800 crow:dark:text-white", children: l }),
|
|
96
|
+
s && /* @__PURE__ */ n("div", { className: "crow:font-p3-regular crow:text-gray-600 crow:dark:text-gray-300", children: s })
|
|
97
|
+
] }),
|
|
98
|
+
/* @__PURE__ */ e("div", { className: "crow:flex crow:gap-2 crow:justify-end", children: [
|
|
99
|
+
/* @__PURE__ */ n(
|
|
100
|
+
g,
|
|
101
|
+
{
|
|
102
|
+
variant: "outline",
|
|
103
|
+
color: "gray",
|
|
104
|
+
size: "small",
|
|
105
|
+
onClick: j,
|
|
106
|
+
children: b
|
|
107
|
+
}
|
|
108
|
+
),
|
|
109
|
+
/* @__PURE__ */ n(
|
|
110
|
+
g,
|
|
111
|
+
{
|
|
112
|
+
variant: "primary",
|
|
113
|
+
color: "primary",
|
|
114
|
+
size: "small",
|
|
115
|
+
isLoading: v,
|
|
116
|
+
onClick: D,
|
|
117
|
+
children: h
|
|
118
|
+
}
|
|
119
|
+
)
|
|
120
|
+
] })
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
)
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
);
|
|
127
|
+
};
|
|
128
|
+
export {
|
|
129
|
+
Z as default
|
|
130
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { PopperPosition } from '../Form/Wrappers/PickerWrapper/type';
|
|
3
|
+
export interface PopconfirmProps {
|
|
4
|
+
/** Render-prop that returns the trigger element. Receives `toggle`, a `ref` to attach to the trigger, and `isOpen`. */
|
|
5
|
+
trigger: (toggle: () => void, ref: React.Ref<HTMLElement>, isOpen: boolean) => ReactNode;
|
|
6
|
+
/** Bold heading inside the popover panel. */
|
|
7
|
+
title?: ReactNode;
|
|
8
|
+
/** Body copy explaining the action being confirmed. */
|
|
9
|
+
description?: ReactNode;
|
|
10
|
+
/** Label for the confirm (primary) button. @default 'تایید' */
|
|
11
|
+
confirmLabel?: ReactNode;
|
|
12
|
+
/** Label for the cancel (outline) button. @default 'انصراف' */
|
|
13
|
+
cancelLabel?: ReactNode;
|
|
14
|
+
/** Called when the user clicks the confirm button. */
|
|
15
|
+
onConfirm?: () => void;
|
|
16
|
+
/** Called when the user clicks the cancel button. */
|
|
17
|
+
onCancel?: () => void;
|
|
18
|
+
/** Shows a loading spinner on the confirm button and disables it. @default false */
|
|
19
|
+
confirmLoading?: boolean;
|
|
20
|
+
/** Prevents the popover from opening. @default false */
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
/** Preferred display position relative to the trigger. Auto-flips if there is insufficient space. @default 'top-center' */
|
|
23
|
+
position?: PopperPosition;
|
|
24
|
+
/** Extra class names on the popover panel. */
|
|
25
|
+
className?: string;
|
|
26
|
+
/** Extra class names on the trigger wrapper element. */
|
|
27
|
+
wrapperClassName?: string;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/components/Popconfirm/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAE1E,MAAM,WAAW,eAAe;IAC9B,uHAAuH;IACvH,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,OAAO,KAAK,SAAS,CAAC;IACzF,6CAA6C;IAC7C,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,uDAAuD;IACvD,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,+DAA+D;IAC/D,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,+DAA+D;IAC/D,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,oFAAoF;IACpF,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wDAAwD;IACxD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,2HAA2H;IAC3H,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require('../../assets/styles.css');const r=require("react/jsx-runtime"),e=require("../../clsx-C11secjj.cjs");require("react");;/* empty css */const u={primary:{track:"crow:bg-primary-100",fill:"crow:bg-primary-500",text:"crow:text-primary-500"},secondary:{track:"crow:bg-secondary-100",fill:"crow:bg-secondary-500",text:"crow:text-secondary-500"},success:{track:"crow:bg-success-100",fill:"crow:bg-success-500",text:"crow:text-success-600"},error:{track:"crow:bg-error-100",fill:"crow:bg-error-500",text:"crow:text-error-500"},warning:{track:"crow:bg-warning-100",fill:"crow:bg-warning-500",text:"crow:text-warning-700"}},m={thin:"crow:h-1",medium:"crow:h-2",thick:"crow:h-4"},p=n=>{const{title:i,current:c,total:o=100,color:l="primary",currentShowType:w="percentage",size:g="thin",striped:s=!1,animated:d=!1,className:x}=n,a=c/o*100,t=u[l];return r.jsxs("div",{className:e.clsx("crow:flex crow:flex-col crow:gap-2",x),children:[r.jsxs("div",{className:e.clsx("crow:flex crow:items-center crow:justify-between crow:font-p2-regular",t.text),children:[r.jsx("span",{children:i}),r.jsx("span",{className:"crow:ss02",children:w==="percentage"?`${Math.floor(a)}%`:`${c} از ${o}`})]}),r.jsx("div",{className:e.clsx("crow:rounded-sm crow:relative crow:overflow-hidden",m[g],t.track),children:r.jsx("div",{className:e.clsx("crow:rounded-sm crow:absolute crow:right-0 crow:h-full crow:top-0 crow:transition-all crow:duration-300",t.fill,s&&"crow:[background-image:repeating-linear-gradient(45deg,rgba(255,255,255,0.15)_0,rgba(255,255,255,0.15)_1px,transparent_0,transparent_50%)] crow:[background-size:1rem_1rem]",d&&s&&"crow:animate-pulse"),style:{width:c>o?"100%":`${a}%`}})})]})};module.exports=p;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export interface ProgressBarProps {
|
|
3
|
+
/** Label text rendered above the bar. */
|
|
4
|
+
title: string;
|
|
5
|
+
/** Fill color of the progress bar. @default 'primary' */
|
|
6
|
+
color?: 'primary' | 'secondary' | 'success' | 'error' | 'warning';
|
|
7
|
+
/** Current progress value. */
|
|
8
|
+
current: number;
|
|
9
|
+
/** Maximum (total) value. Used to compute the fill percentage. */
|
|
10
|
+
total: number;
|
|
11
|
+
/** Whether to display the current value as a `'percentage'` or the raw `'value'`. @default 'percentage' */
|
|
12
|
+
currentShowType?: 'percentage' | 'value';
|
|
13
|
+
/** Bar height. @default 'medium' */
|
|
14
|
+
size?: 'thin' | 'medium' | 'thick';
|
|
15
|
+
/** Applies a diagonal stripe pattern to the fill. @default false */
|
|
16
|
+
striped?: boolean;
|
|
17
|
+
/** Animates the stripe pattern. Requires `striped` to be true. @default false */
|
|
18
|
+
animated?: boolean;
|
|
19
|
+
/** Extra class names on the root wrapper. */
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
declare const ProgressBar: FC<ProgressBarProps>;
|
|
23
|
+
export default ProgressBar;
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/Bar/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,kBAAkB,CAAC;AAE1B,MAAM,WAAW,gBAAgB;IAC/B,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,KAAK,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IAClE,8BAA8B;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,kEAAkE;IAClE,KAAK,EAAE,MAAM,CAAC;IACd,2GAA2G;IAC3G,eAAe,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC;IACzC,oCAAoC;IACpC,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACnC,oEAAoE;IACpE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAuCD,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAqDrC,CAAC;AACF,eAAe,WAAW,CAAC"}
|