@harjs/react-ui 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +27 -0
- package/dist/assets/css/components/charts/gantt/styles.css +62 -0
- package/dist/assets/css/components/charts/pie/pie.css +90 -0
- package/dist/assets/css/components/data-display/calendar/styles.css +15 -0
- package/dist/assets/css/components/data-display/calendar/styles.week-view.css +144 -0
- package/dist/assets/css/components/data-display/card/statuses.css +377 -0
- package/dist/assets/css/components/data-display/card/styles.css +26 -0
- package/dist/assets/css/components/data-display/chip/chip.css +13 -0
- package/dist/assets/css/components/data-display/diagram/styles.css +125 -0
- package/dist/assets/css/components/data-display/divider/divider.css +8 -0
- package/dist/assets/css/components/data-display/dnd/animations.css +11 -0
- package/dist/assets/css/components/data-display/dnd/shadow.css +26 -0
- package/dist/assets/css/components/data-display/dnd/styles.css +72 -0
- package/dist/assets/css/components/data-display/grid-system/column/position.css +21 -0
- package/dist/assets/css/components/data-display/grid-system/column/styles.css +379 -0
- package/dist/assets/css/components/data-display/grid-system/row/styles.css +35 -0
- package/dist/assets/css/components/data-display/grid-system/styles.css +6 -0
- package/dist/assets/css/components/data-display/kanban-board/styles.css +371 -0
- package/dist/assets/css/components/data-display/paper/styles.css +49 -0
- package/dist/assets/css/components/data-display/syntax-highlighter/core/jsx.template.css +65 -0
- package/dist/assets/css/components/data-display/syntax-highlighter/syntax-highlighter.css +58 -0
- package/dist/assets/css/components/data-display/table/filter-popup.css +11 -0
- package/dist/assets/css/components/data-display/table/properties-popup.css +42 -0
- package/dist/assets/css/components/data-display/table/scroll.css +208 -0
- package/dist/assets/css/components/data-display/table/styles.css +867 -0
- package/dist/assets/css/components/data-display/tabs/tabs.css +245 -0
- package/dist/assets/css/components/data-display/typography/paragraph/align.css +13 -0
- package/dist/assets/css/components/data-display/typography/paragraph/color.css +51 -0
- package/dist/assets/css/components/data-display/typography/paragraph/core.css +6 -0
- package/dist/assets/css/components/data-display/typography/paragraph/size.css +13 -0
- package/dist/assets/css/components/data-display/typography/title/align.css +13 -0
- package/dist/assets/css/components/data-display/typography/title/color.css +0 -0
- package/dist/assets/css/components/data-display/typography/title/core.css +5 -0
- package/dist/assets/css/components/data-display/typography/title/size.css +41 -0
- package/dist/assets/css/components/data-display/typography/typography.css +11 -0
- package/dist/assets/css/components/feedback/alert/statuses.css +224 -0
- package/dist/assets/css/components/feedback/alert/styles.css +61 -0
- package/dist/assets/css/components/feedback/drawer/content.css +7 -0
- package/dist/assets/css/components/feedback/drawer/header.css +56 -0
- package/dist/assets/css/components/feedback/drawer/styles.css +85 -0
- package/dist/assets/css/components/feedback/loading/loading.css +54 -0
- package/dist/assets/css/components/feedback/modal/content.css +6 -0
- package/dist/assets/css/components/feedback/modal/footer.css +9 -0
- package/dist/assets/css/components/feedback/modal/header.css +56 -0
- package/dist/assets/css/components/feedback/modal/media-queries/medium.css +11 -0
- package/dist/assets/css/components/feedback/modal/media-queries/small.css +11 -0
- package/dist/assets/css/components/feedback/modal/media-queries/x-large.css +5 -0
- package/dist/assets/css/components/feedback/modal/styles.css +53 -0
- package/dist/assets/css/components/feedback/notification/notification.css +157 -0
- package/dist/assets/css/components/feedback/popover/styles.css +53 -0
- package/dist/assets/css/components/feedback/popup-confirm/styles.css +165 -0
- package/dist/assets/css/components/feedback/progress/animations.css +10 -0
- package/dist/assets/css/components/feedback/progress/progress.css +50 -0
- package/dist/assets/css/components/feedback/progress/statuses.css +188 -0
- package/dist/assets/css/components/feedback/tooltip/styles.css +60 -0
- package/dist/assets/css/components/form/button/core/icon.css +37 -0
- package/dist/assets/css/components/form/button/core/position.css +19 -0
- package/dist/assets/css/components/form/button/core/shape.css +13 -0
- package/dist/assets/css/components/form/button/core/size.css +14 -0
- package/dist/assets/css/components/form/button/styles.css +32 -0
- package/dist/assets/css/components/form/button-action/styles.css +24 -0
- package/dist/assets/css/components/form/button-group/styles.css +26 -0
- package/dist/assets/css/components/form/checkbox/checkbox.css +53 -0
- package/dist/assets/css/components/form/checkbox/core/border.css +252 -0
- package/dist/assets/css/components/form/date-picker/calendar/calendar.css +14 -0
- package/dist/assets/css/components/form/date-picker/calendar/content.css +62 -0
- package/dist/assets/css/components/form/date-picker/calendar/footer.css +10 -0
- package/dist/assets/css/components/form/date-picker/calendar/header.css +86 -0
- package/dist/assets/css/components/form/date-picker/clock/clock.css +14 -0
- package/dist/assets/css/components/form/date-picker/clock/content.css +48 -0
- package/dist/assets/css/components/form/date-picker/clock/footer.css +6 -0
- package/dist/assets/css/components/form/date-picker/clock/header.css +8 -0
- package/dist/assets/css/components/form/date-picker/date-picker.css +36 -0
- package/dist/assets/css/components/form/input/core/addon.css +11 -0
- package/dist/assets/css/components/form/input/core/border.css +114 -0
- package/dist/assets/css/components/form/input/core/button.css +34 -0
- package/dist/assets/css/components/form/input/core/icon.css +22 -0
- package/dist/assets/css/components/form/input/otp/styles.css +20 -0
- package/dist/assets/css/components/form/input/phone/styles.css +50 -0
- package/dist/assets/css/components/form/input/styles.css +120 -0
- package/dist/assets/css/components/form/radio/core/border.css +252 -0
- package/dist/assets/css/components/form/radio/radio.css +69 -0
- package/dist/assets/css/components/form/select/options.css +117 -0
- package/dist/assets/css/components/form/select/styles.css +184 -0
- package/dist/assets/css/components/form/switch/core/border.css +208 -0
- package/dist/assets/css/components/form/switch/styles.css +61 -0
- package/dist/assets/css/components/form/text-editor/styles.css +130 -0
- package/dist/assets/css/components/form/upload/dropzone.css +166 -0
- package/dist/assets/css/components/form/upload/list-and-gird.css +183 -0
- package/dist/assets/css/components/form/upload/styles.css +215 -0
- package/dist/assets/css/components/layout/layout.css +130 -0
- package/dist/assets/css/components/layout/media-queries/large.css +19 -0
- package/dist/assets/css/components/layout/media-queries/medium.css +19 -0
- package/dist/assets/css/components/layout/media-queries/small.css +19 -0
- package/dist/assets/css/components/layout/media-queries/x-large.css +19 -0
- package/dist/assets/css/components/layout/media-queries/x-small.css +3 -0
- package/dist/assets/css/components/layout/media-queries/xx-large.css +19 -0
- package/dist/assets/css/components/layout/media-queries/xxx-large.css +20 -0
- package/dist/assets/css/components/navigation/breadcrumb/styles.css +0 -0
- package/dist/assets/css/components/navigation/menu/core/open-or-close.css +12 -0
- package/dist/assets/css/components/navigation/menu/styles.css +163 -0
- package/dist/assets/css/components/navigation/menu/variant/horizontal.css +3 -0
- package/dist/assets/css/components/navigation/menu/variant/vertical.css +3 -0
- package/dist/assets/css/components/navigation/pagination/styles.css +169 -0
- package/dist/assets/css/components/navigation/steps/animation.css +8 -0
- package/dist/assets/css/components/navigation/steps/styles.css +146 -0
- package/dist/assets/css/core/animation.css +164 -0
- package/dist/assets/css/core/ar-core.css +192 -0
- package/dist/assets/css/core/color-palette.css +111 -0
- package/dist/assets/css/core/utils.css +16 -0
- package/dist/assets/css/core/variants/animation.css +164 -0
- package/dist/assets/css/core/variants/border.css +18 -0
- package/dist/assets/css/core/variants/borderless.css +362 -0
- package/dist/assets/css/core/variants/dashed.css +362 -0
- package/dist/assets/css/core/variants/filled.css +428 -0
- package/dist/assets/css/core/variants/outlined.css +439 -0
- package/dist/assets/css/core/variants/surface.css +252 -0
- package/dist/assets/fonts/JetBrainsMono-Bold.ttf +0 -0
- package/dist/assets/fonts/JetBrainsMono-Regular.ttf +0 -0
- package/dist/components/charts/gantt/IProps.d.ts +24 -0
- package/dist/components/charts/gantt/IProps.js +1 -0
- package/dist/components/charts/gantt/index.d.ts +5 -0
- package/dist/components/charts/gantt/index.js +308 -0
- package/dist/components/charts/index.d.ts +2 -0
- package/dist/components/charts/index.js +2 -0
- package/dist/components/charts/pie/IProps.d.ts +7 -0
- package/dist/components/charts/pie/IProps.js +1 -0
- package/dist/components/charts/pie/index.d.ts +5 -0
- package/dist/components/charts/pie/index.js +56 -0
- package/dist/components/data-display/calendar/Body.d.ts +23 -0
- package/dist/components/data-display/calendar/Body.js +14 -0
- package/dist/components/data-display/calendar/Header.d.ts +20 -0
- package/dist/components/data-display/calendar/Header.js +26 -0
- package/dist/components/data-display/calendar/IProps.d.ts +14 -0
- package/dist/components/data-display/calendar/IProps.js +1 -0
- package/dist/components/data-display/calendar/index.d.ts +8 -0
- package/dist/components/data-display/calendar/index.js +27 -0
- package/dist/components/data-display/calendar/views/Day.d.ts +3 -0
- package/dist/components/data-display/calendar/views/Day.js +5 -0
- package/dist/components/data-display/calendar/views/Month.d.ts +3 -0
- package/dist/components/data-display/calendar/views/Month.js +5 -0
- package/dist/components/data-display/calendar/views/Week.d.ts +19 -0
- package/dist/components/data-display/calendar/views/Week.js +173 -0
- package/dist/components/data-display/card/IProps.d.ts +10 -0
- package/dist/components/data-display/card/IProps.js +1 -0
- package/dist/components/data-display/card/index.d.ts +5 -0
- package/dist/components/data-display/card/index.js +14 -0
- package/dist/components/data-display/chip/IProps.d.ts +6 -0
- package/dist/components/data-display/chip/IProps.js +1 -0
- package/dist/components/data-display/chip/index.d.ts +5 -0
- package/dist/components/data-display/chip/index.js +17 -0
- package/dist/components/data-display/diagram/IProps.d.ts +6 -0
- package/dist/components/data-display/diagram/IProps.js +1 -0
- package/dist/components/data-display/diagram/index.d.ts +5 -0
- package/dist/components/data-display/diagram/index.js +298 -0
- package/dist/components/data-display/divider/IProps.d.ts +6 -0
- package/dist/components/data-display/divider/IProps.js +1 -0
- package/dist/components/data-display/divider/index.d.ts +5 -0
- package/dist/components/data-display/divider/index.js +5 -0
- package/dist/components/data-display/dnd/IProps.d.ts +12 -0
- package/dist/components/data-display/dnd/IProps.js +1 -0
- package/dist/components/data-display/dnd/index.d.ts +5 -0
- package/dist/components/data-display/dnd/index.js +125 -0
- package/dist/components/data-display/grid-system/box/Box.d.ts +6 -0
- package/dist/components/data-display/grid-system/box/Box.js +13 -0
- package/dist/components/data-display/grid-system/column/Column.d.ts +4 -0
- package/dist/components/data-display/grid-system/column/Column.js +21 -0
- package/dist/components/data-display/grid-system/column/IProps.d.ts +13 -0
- package/dist/components/data-display/grid-system/column/IProps.js +1 -0
- package/dist/components/data-display/grid-system/index.d.ts +10 -0
- package/dist/components/data-display/grid-system/index.js +11 -0
- package/dist/components/data-display/grid-system/row/IProps.d.ts +4 -0
- package/dist/components/data-display/grid-system/row/IProps.js +1 -0
- package/dist/components/data-display/grid-system/row/Row.d.ts +4 -0
- package/dist/components/data-display/grid-system/row/Row.js +6 -0
- package/dist/components/data-display/kanban-board/IProps.d.ts +31 -0
- package/dist/components/data-display/kanban-board/IProps.js +1 -0
- package/dist/components/data-display/kanban-board/filter/DateFilters.d.ts +25 -0
- package/dist/components/data-display/kanban-board/filter/DateFilters.js +55 -0
- package/dist/components/data-display/kanban-board/filter/SelectFilters.d.ts +27 -0
- package/dist/components/data-display/kanban-board/filter/SelectFilters.js +43 -0
- package/dist/components/data-display/kanban-board/filter/index.d.ts +36 -0
- package/dist/components/data-display/kanban-board/filter/index.js +47 -0
- package/dist/components/data-display/kanban-board/index.d.ts +5 -0
- package/dist/components/data-display/kanban-board/index.js +309 -0
- package/dist/components/data-display/paper/IProps.d.ts +6 -0
- package/dist/components/data-display/paper/IProps.js +1 -0
- package/dist/components/data-display/paper/index.d.ts +5 -0
- package/dist/components/data-display/paper/index.js +12 -0
- package/dist/components/data-display/syntax-highlighter/Import.d.ts +4 -0
- package/dist/components/data-display/syntax-highlighter/Import.js +5 -0
- package/dist/components/data-display/syntax-highlighter/classes/Compiler.d.ts +7 -0
- package/dist/components/data-display/syntax-highlighter/classes/Compiler.js +92 -0
- package/dist/components/data-display/syntax-highlighter/classes/Parser.d.ts +9 -0
- package/dist/components/data-display/syntax-highlighter/classes/Parser.js +99 -0
- package/dist/components/data-display/syntax-highlighter/index.d.ts +11 -0
- package/dist/components/data-display/syntax-highlighter/index.js +41 -0
- package/dist/components/data-display/table/FilterPopup.d.ts +20 -0
- package/dist/components/data-display/table/FilterPopup.js +54 -0
- package/dist/components/data-display/table/Helpers.d.ts +2 -0
- package/dist/components/data-display/table/Helpers.js +10 -0
- package/dist/components/data-display/table/IProps.d.ts +99 -0
- package/dist/components/data-display/table/IProps.js +1 -0
- package/dist/components/data-display/table/PropertiesPopup.d.ts +31 -0
- package/dist/components/data-display/table/PropertiesPopup.js +90 -0
- package/dist/components/data-display/table/THeadCell.d.ts +34 -0
- package/dist/components/data-display/table/THeadCell.js +67 -0
- package/dist/components/data-display/table/body/Editable.d.ts +12 -0
- package/dist/components/data-display/table/body/Editable.js +59 -0
- package/dist/components/data-display/table/body/TBody.d.ts +36 -0
- package/dist/components/data-display/table/body/TBody.js +184 -0
- package/dist/components/data-display/table/header/ActionButtons.d.ts +14 -0
- package/dist/components/data-display/table/header/ActionButtons.js +65 -0
- package/dist/components/data-display/table/header/Header.d.ts +15 -0
- package/dist/components/data-display/table/header/Header.js +10 -0
- package/dist/components/data-display/table/index.d.ts +7 -0
- package/dist/components/data-display/table/index.js +639 -0
- package/dist/components/data-display/tabs/IProps.d.ts +9 -0
- package/dist/components/data-display/tabs/IProps.js +1 -0
- package/dist/components/data-display/tabs/index.d.ts +5 -0
- package/dist/components/data-display/tabs/index.js +110 -0
- package/dist/components/data-display/tabs/skeleton.d.ts +4 -0
- package/dist/components/data-display/tabs/skeleton.js +14 -0
- package/dist/components/data-display/typography/index.d.ts +6 -0
- package/dist/components/data-display/typography/index.js +9 -0
- package/dist/components/data-display/typography/paragraph/IProps.d.ts +7 -0
- package/dist/components/data-display/typography/paragraph/IProps.js +1 -0
- package/dist/components/data-display/typography/paragraph/Paragraph.d.ts +4 -0
- package/dist/components/data-display/typography/paragraph/Paragraph.js +14 -0
- package/dist/components/data-display/typography/title/IProps.d.ts +7 -0
- package/dist/components/data-display/typography/title/IProps.js +1 -0
- package/dist/components/data-display/typography/title/Title.d.ts +4 -0
- package/dist/components/data-display/typography/title/Title.js +13 -0
- package/dist/components/feedback/alert/IProps.d.ts +11 -0
- package/dist/components/feedback/alert/IProps.js +1 -0
- package/dist/components/feedback/alert/index.d.ts +5 -0
- package/dist/components/feedback/alert/index.js +50 -0
- package/dist/components/feedback/drawer/IProps.d.ts +18 -0
- package/dist/components/feedback/drawer/IProps.js +1 -0
- package/dist/components/feedback/drawer/index.d.ts +5 -0
- package/dist/components/feedback/drawer/index.js +94 -0
- package/dist/components/feedback/loading/index.d.ts +4 -0
- package/dist/components/feedback/loading/index.js +7 -0
- package/dist/components/feedback/modal/IProps.d.ts +14 -0
- package/dist/components/feedback/modal/IProps.js +1 -0
- package/dist/components/feedback/modal/index.d.ts +5 -0
- package/dist/components/feedback/modal/index.js +91 -0
- package/dist/components/feedback/notification/IProps.d.ts +9 -0
- package/dist/components/feedback/notification/IProps.js +1 -0
- package/dist/components/feedback/notification/index.d.ts +5 -0
- package/dist/components/feedback/notification/index.js +96 -0
- package/dist/components/feedback/popover/IProps.d.ts +16 -0
- package/dist/components/feedback/popover/IProps.js +1 -0
- package/dist/components/feedback/popover/index.d.ts +5 -0
- package/dist/components/feedback/popover/index.js +91 -0
- package/dist/components/feedback/popup-confirm/IProps.d.ts +10 -0
- package/dist/components/feedback/popup-confirm/IProps.js +1 -0
- package/dist/components/feedback/popup-confirm/index.d.ts +5 -0
- package/dist/components/feedback/popup-confirm/index.js +98 -0
- package/dist/components/feedback/progress/IProps.d.ts +6 -0
- package/dist/components/feedback/progress/IProps.js +1 -0
- package/dist/components/feedback/progress/index.d.ts +5 -0
- package/dist/components/feedback/progress/index.js +26 -0
- package/dist/components/feedback/tooltip/IProps.d.ts +6 -0
- package/dist/components/feedback/tooltip/IProps.js +1 -0
- package/dist/components/feedback/tooltip/index.d.ts +5 -0
- package/dist/components/feedback/tooltip/index.js +129 -0
- package/dist/components/form/button/IProps.d.ts +10 -0
- package/dist/components/form/button/IProps.js +1 -0
- package/dist/components/form/button/index.d.ts +5 -0
- package/dist/components/form/button/index.js +41 -0
- package/dist/components/form/button-action/IProps.d.ts +8 -0
- package/dist/components/form/button-action/IProps.js +1 -0
- package/dist/components/form/button-action/index.d.ts +5 -0
- package/dist/components/form/button-action/index.js +68 -0
- package/dist/components/form/button-group/index.d.ts +7 -0
- package/dist/components/form/button-group/index.js +31 -0
- package/dist/components/form/checkbox/IProps.d.ts +5 -0
- package/dist/components/form/checkbox/IProps.js +1 -0
- package/dist/components/form/checkbox/index.d.ts +5 -0
- package/dist/components/form/checkbox/index.js +24 -0
- package/dist/components/form/date-picker/DATE.d.ts +12 -0
- package/dist/components/form/date-picker/DATE.js +27 -0
- package/dist/components/form/date-picker/Props.d.ts +10 -0
- package/dist/components/form/date-picker/Props.js +1 -0
- package/dist/components/form/date-picker/index.d.ts +5 -0
- package/dist/components/form/date-picker/index.js +365 -0
- package/dist/components/form/input/IProps.d.ts +12 -0
- package/dist/components/form/input/IProps.js +1 -0
- package/dist/components/form/input/decimal/Decimal.d.ts +4 -0
- package/dist/components/form/input/decimal/Decimal.js +54 -0
- package/dist/components/form/input/decimal/IProps.d.ts +8 -0
- package/dist/components/form/input/decimal/IProps.js +1 -0
- package/dist/components/form/input/formatted-decimal/FormattedDecimal.d.ts +4 -0
- package/dist/components/form/input/formatted-decimal/FormattedDecimal.js +73 -0
- package/dist/components/form/input/formatted-decimal/IProps.d.ts +12 -0
- package/dist/components/form/input/formatted-decimal/IProps.js +1 -0
- package/dist/components/form/input/index.d.ts +15 -0
- package/dist/components/form/input/index.js +152 -0
- package/dist/components/form/input/otp/IProps.d.ts +6 -0
- package/dist/components/form/input/otp/IProps.js +1 -0
- package/dist/components/form/input/otp/Otp.d.ts +7 -0
- package/dist/components/form/input/otp/Otp.js +122 -0
- package/dist/components/form/input/phone/IProps.d.ts +11 -0
- package/dist/components/form/input/phone/IProps.js +1 -0
- package/dist/components/form/input/phone/Phone.d.ts +4 -0
- package/dist/components/form/input/phone/Phone.js +41 -0
- package/dist/components/form/radio/IProps.d.ts +12 -0
- package/dist/components/form/radio/IProps.js +1 -0
- package/dist/components/form/radio/index.d.ts +5 -0
- package/dist/components/form/radio/index.js +38 -0
- package/dist/components/form/select/Props.d.ts +35 -0
- package/dist/components/form/select/Props.js +1 -0
- package/dist/components/form/select/index.d.ts +5 -0
- package/dist/components/form/select/index.js +312 -0
- package/dist/components/form/switch/IProps.d.ts +5 -0
- package/dist/components/form/switch/IProps.js +1 -0
- package/dist/components/form/switch/index.d.ts +5 -0
- package/dist/components/form/switch/index.js +36 -0
- package/dist/components/form/text-editor/IProps.d.ts +18 -0
- package/dist/components/form/text-editor/IProps.js +1 -0
- package/dist/components/form/text-editor/index.d.ts +5 -0
- package/dist/components/form/text-editor/index.js +300 -0
- package/dist/components/form/upload/Buttons.d.ts +8 -0
- package/dist/components/form/upload/Buttons.js +27 -0
- package/dist/components/form/upload/Dropzone.d.ts +10 -0
- package/dist/components/form/upload/Dropzone.js +55 -0
- package/dist/components/form/upload/List.d.ts +12 -0
- package/dist/components/form/upload/List.js +21 -0
- package/dist/components/form/upload/Props.d.ts +16 -0
- package/dist/components/form/upload/Props.js +1 -0
- package/dist/components/form/upload/index.d.ts +9 -0
- package/dist/components/form/upload/index.js +184 -0
- package/dist/components/icons/Compiler.d.ts +9 -0
- package/dist/components/icons/Compiler.js +156 -0
- package/dist/components/icons/index.d.ts +10 -0
- package/dist/components/icons/index.js +6 -0
- package/dist/components/layout/Footer.d.ts +3 -0
- package/dist/components/layout/Footer.js +8 -0
- package/dist/components/layout/Header.d.ts +4 -0
- package/dist/components/layout/Header.js +8 -0
- package/dist/components/layout/IProps.d.ts +20 -0
- package/dist/components/layout/IProps.js +1 -0
- package/dist/components/layout/LSider.d.ts +4 -0
- package/dist/components/layout/LSider.js +53 -0
- package/dist/components/layout/Main.d.ts +4 -0
- package/dist/components/layout/Main.js +4 -0
- package/dist/components/layout/RSider.d.ts +3 -0
- package/dist/components/layout/RSider.js +13 -0
- package/dist/components/layout/Section.d.ts +4 -0
- package/dist/components/layout/Section.js +10 -0
- package/dist/components/layout/index.d.ts +12 -0
- package/dist/components/layout/index.js +32 -0
- package/dist/components/navigation/breadcrumb/IProps.d.ts +3 -0
- package/dist/components/navigation/breadcrumb/IProps.js +1 -0
- package/dist/components/navigation/breadcrumb/index.d.ts +5 -0
- package/dist/components/navigation/breadcrumb/index.js +8 -0
- package/dist/components/navigation/menu/IProps.d.ts +14 -0
- package/dist/components/navigation/menu/IProps.js +1 -0
- package/dist/components/navigation/menu/index.d.ts +5 -0
- package/dist/components/navigation/menu/index.js +89 -0
- package/dist/components/navigation/pagination/IProps.d.ts +8 -0
- package/dist/components/navigation/pagination/IProps.js +1 -0
- package/dist/components/navigation/pagination/index.d.ts +5 -0
- package/dist/components/navigation/pagination/index.js +74 -0
- package/dist/components/navigation/steps/IProps.d.ts +16 -0
- package/dist/components/navigation/steps/IProps.js +1 -0
- package/dist/components/navigation/steps/index.d.ts +5 -0
- package/dist/components/navigation/steps/index.js +102 -0
- package/dist/libs/core/application/contexts/Config.d.ts +26 -0
- package/dist/libs/core/application/contexts/Config.js +20 -0
- package/dist/libs/core/application/contexts/Language.d.ts +7 -0
- package/dist/libs/core/application/contexts/Language.js +7 -0
- package/dist/libs/core/application/contexts/Loading.d.ts +11 -0
- package/dist/libs/core/application/contexts/Loading.js +13 -0
- package/dist/libs/core/application/contexts/Notification.d.ts +25 -0
- package/dist/libs/core/application/contexts/Notification.js +29 -0
- package/dist/libs/core/application/contexts/index.d.ts +5 -0
- package/dist/libs/core/application/contexts/index.js +5 -0
- package/dist/libs/core/application/hooks/index.d.ts +41 -0
- package/dist/libs/core/application/hooks/index.js +17 -0
- package/dist/libs/core/application/hooks/useNotification.d.ts +16 -0
- package/dist/libs/core/application/hooks/useNotification.js +23 -0
- package/dist/libs/core/application/hooks/useTranslation.d.ts +9 -0
- package/dist/libs/core/application/hooks/useTranslation.js +25 -0
- package/dist/libs/core/application/hooks/useValidation.d.ts +7 -0
- package/dist/libs/core/application/hooks/useValidation.js +151 -0
- package/dist/libs/core/application/locales/index.d.ts +4 -0
- package/dist/libs/core/application/locales/index.js +3 -0
- package/dist/libs/core/application/locales/kanban-board/IKanbanBoardLocale.d.ts +5 -0
- package/dist/libs/core/application/locales/kanban-board/IKanbanBoardLocale.js +1 -0
- package/dist/libs/core/application/locales/kanban-board/en.d.ts +3 -0
- package/dist/libs/core/application/locales/kanban-board/en.js +5 -0
- package/dist/libs/core/application/locales/kanban-board/tr.d.ts +3 -0
- package/dist/libs/core/application/locales/kanban-board/tr.js +5 -0
- package/dist/libs/core/application/locales/notification/INotificationLocale.d.ts +59 -0
- package/dist/libs/core/application/locales/notification/INotificationLocale.js +1 -0
- package/dist/libs/core/application/locales/notification/en.d.ts +3 -0
- package/dist/libs/core/application/locales/notification/en.js +85 -0
- package/dist/libs/core/application/locales/notification/tr.d.ts +3 -0
- package/dist/libs/core/application/locales/notification/tr.js +85 -0
- package/dist/libs/core/application/locales/table/ITableLocale.d.ts +18 -0
- package/dist/libs/core/application/locales/table/ITableLocale.js +1 -0
- package/dist/libs/core/application/locales/table/en.d.ts +3 -0
- package/dist/libs/core/application/locales/table/en.js +22 -0
- package/dist/libs/core/application/locales/table/tr.d.ts +3 -0
- package/dist/libs/core/application/locales/table/tr.js +22 -0
- package/dist/libs/infrastructure/shared/DATE.d.ts +74 -0
- package/dist/libs/infrastructure/shared/DATE.js +148 -0
- package/dist/libs/infrastructure/shared/Enums.d.ts +18 -0
- package/dist/libs/infrastructure/shared/Enums.js +21 -0
- package/dist/libs/infrastructure/shared/NUMBER.d.ts +8 -0
- package/dist/libs/infrastructure/shared/NUMBER.js +10 -0
- package/dist/libs/infrastructure/shared/PHONE.d.ts +8 -0
- package/dist/libs/infrastructure/shared/PHONE.js +126 -0
- package/dist/libs/infrastructure/shared/Utils.d.ts +20 -0
- package/dist/libs/infrastructure/shared/Utils.js +349 -0
- package/dist/libs/infrastructure/shared/_old_DATE.d.ts +28 -0
- package/dist/libs/infrastructure/shared/_old_DATE.js +68 -0
- package/dist/libs/infrastructure/types/IGlobalProps.d.ts +183 -0
- package/dist/libs/infrastructure/types/IGlobalProps.js +1 -0
- package/dist/libs/infrastructure/types/index.d.ts +155 -0
- package/dist/libs/infrastructure/types/index.js +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useEffect, useRef, useState } from "react";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import "../../../assets/css/components/feedback/notification/notification.css";
|
|
5
|
+
const Notification = ({ title, message, status, direction = "bottom-left", trigger }) => {
|
|
6
|
+
const _firstLoad = useRef(false);
|
|
7
|
+
const _notificationItems = useRef([]);
|
|
8
|
+
const [items, setItems] = useState([]);
|
|
9
|
+
// useEffects
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
if (!_firstLoad.current) {
|
|
12
|
+
_firstLoad.current = true;
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
if (typeof status === "number") {
|
|
16
|
+
if (status >= 100 && status < 200) {
|
|
17
|
+
status = "information";
|
|
18
|
+
}
|
|
19
|
+
else if (status >= 200 && status < 300) {
|
|
20
|
+
status = "success";
|
|
21
|
+
}
|
|
22
|
+
else if (status >= 300 && status < 400) {
|
|
23
|
+
status = "warning";
|
|
24
|
+
}
|
|
25
|
+
else if (status >= 400 && status < 500) {
|
|
26
|
+
status = "error";
|
|
27
|
+
}
|
|
28
|
+
else if (status >= 500 && status < 600) {
|
|
29
|
+
status = "error";
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
setItems((prev) => [...prev, { id: Math.random(), title, message, status, direction }]);
|
|
33
|
+
}, [trigger]);
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
let clearTimeoutId = undefined;
|
|
36
|
+
items.forEach((item) => {
|
|
37
|
+
if (!item.timeoutId) {
|
|
38
|
+
const timeoutId = setTimeout(() => {
|
|
39
|
+
clearTimeoutId = item.timeoutId;
|
|
40
|
+
setItems((prev) => prev.filter((_item) => _item.id !== item.id));
|
|
41
|
+
}, 3000);
|
|
42
|
+
// Öncesinde timeoutId değerinin tanımlanması yapılıyor.
|
|
43
|
+
setItems((prev) => prev.map((prevItem) => (prevItem.id === item.id ? { ...prevItem, timeoutId } : prevItem)));
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
return () => {
|
|
47
|
+
if (items.length === 0)
|
|
48
|
+
return;
|
|
49
|
+
const item = items.find((x) => x.timeoutId == clearTimeoutId);
|
|
50
|
+
if (item) {
|
|
51
|
+
clearTimeout(item.timeoutId);
|
|
52
|
+
clearTimeoutId = undefined;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}, [items]);
|
|
56
|
+
const getBottomPosition = (index) => {
|
|
57
|
+
let bottom = 30; // Başlangıçta 30px'lik bir boşluk ekliyoruz.
|
|
58
|
+
// Önceki öğenin yüksekliğini dikkate alarak bottom hesaplanıyor.
|
|
59
|
+
if (_notificationItems.current[index - 1]) {
|
|
60
|
+
bottom = _notificationItems.current.slice(0, index).reduce((acc, el) => {
|
|
61
|
+
const rect = el.getBoundingClientRect();
|
|
62
|
+
return acc + rect.height + 20; // +20 değeri ara boşluğu arttırıyor.
|
|
63
|
+
}, 30); // 30px'lik boşluğu başlangıçta ekliyoruz.
|
|
64
|
+
}
|
|
65
|
+
return bottom;
|
|
66
|
+
};
|
|
67
|
+
return items.map((item, index) => {
|
|
68
|
+
const bottom = getBottomPosition(index);
|
|
69
|
+
return (React.createElement("div", { key: item.id, ref: (element) => {
|
|
70
|
+
if (!element)
|
|
71
|
+
return;
|
|
72
|
+
_notificationItems.current[index] = element;
|
|
73
|
+
}, className: "ar-notification-item", style: items.length > 5
|
|
74
|
+
? {
|
|
75
|
+
backgroundColor: `rgba(var(--white-rgb), ${index === items.length - 1 ? 1 : 0.1})`,
|
|
76
|
+
backdropFilter: "blur(10px)",
|
|
77
|
+
bottom: (index === 0 ? 30 : 10) * (index + 1),
|
|
78
|
+
}
|
|
79
|
+
: { bottom } },
|
|
80
|
+
React.createElement("div", { className: "icon" },
|
|
81
|
+
React.createElement("span", { className: String(item.status) }),
|
|
82
|
+
React.createElement("span", { className: String(item.status) }),
|
|
83
|
+
React.createElement("span", { className: String(item.status) }),
|
|
84
|
+
React.createElement("span", { className: String(item.status) }),
|
|
85
|
+
React.createElement("span", { className: String(item.status) })),
|
|
86
|
+
React.createElement("div", { className: "content" },
|
|
87
|
+
React.createElement("span", { className: "title" }, item.title),
|
|
88
|
+
React.createElement("span", { className: "message" }, item.message)),
|
|
89
|
+
React.createElement("div", { className: "close", onClick: () => {
|
|
90
|
+
if (item.timeoutId)
|
|
91
|
+
clearTimeout(item.timeoutId);
|
|
92
|
+
setItems((prev) => prev.filter((_item) => _item.id !== item.id));
|
|
93
|
+
} })));
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
export default Notification;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IChildrenProps } from "../../../libs/infrastructure/types/IGlobalProps";
|
|
2
|
+
interface IProps extends IChildrenProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
message?: string;
|
|
5
|
+
content?: React.JSX.Element;
|
|
6
|
+
onConfirm?: (confirm: boolean) => void;
|
|
7
|
+
windowBlur?: boolean;
|
|
8
|
+
fullWidth?: boolean;
|
|
9
|
+
config?: {
|
|
10
|
+
buttons: {
|
|
11
|
+
okay: string;
|
|
12
|
+
cancel?: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export default IProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import React, { useEffect, useRef, useState } from "react";
|
|
3
|
+
import "../../../assets/css/components/feedback/popover/styles.css";
|
|
4
|
+
import Button from "../../form/button";
|
|
5
|
+
import Typography from "../../data-display/typography";
|
|
6
|
+
import ReactDOM from "react-dom";
|
|
7
|
+
const { Title } = Typography;
|
|
8
|
+
const Popover = ({ children, title, message, content, onConfirm, windowBlur, fullWidth, config }) => {
|
|
9
|
+
// refs
|
|
10
|
+
const _arPopoverWrapper = useRef(null);
|
|
11
|
+
const _arPopover = useRef(null);
|
|
12
|
+
const _arPopoverElement = useRef(null);
|
|
13
|
+
const _arPopoverClassName = ["ar-popover-wrapper"];
|
|
14
|
+
if (fullWidth)
|
|
15
|
+
_arPopoverClassName.push("full-width");
|
|
16
|
+
// states
|
|
17
|
+
const [open, setOpen] = useState(false);
|
|
18
|
+
const [mounted, setMounted] = useState(false);
|
|
19
|
+
// methods
|
|
20
|
+
const handleClickOutSide = (event) => {
|
|
21
|
+
const target = event.target;
|
|
22
|
+
const isArSelectOptions = document.getElementsByClassName("ar-select-options").length === 0;
|
|
23
|
+
const isArCalendar = document.getElementsByClassName("ar-date-calendar").length === 0;
|
|
24
|
+
if (_arPopover.current && !_arPopover.current.contains(target) && isArCalendar && isArSelectOptions)
|
|
25
|
+
setOpen(false);
|
|
26
|
+
};
|
|
27
|
+
const handleKeys = (event) => {
|
|
28
|
+
const key = event.key;
|
|
29
|
+
const isArSelectOptions = document.getElementsByClassName("ar-select-options").length === 0;
|
|
30
|
+
const isArCalendar = document.getElementsByClassName("ar-date-calendar").length === 0;
|
|
31
|
+
if (key === "Escape" && isArCalendar && isArSelectOptions)
|
|
32
|
+
setOpen(false);
|
|
33
|
+
};
|
|
34
|
+
const handlePosition = () => {
|
|
35
|
+
if (_arPopoverWrapper.current && _arPopover.current && _arPopoverElement.current) {
|
|
36
|
+
const popoverRect = _arPopover.current.getBoundingClientRect();
|
|
37
|
+
const elementRect = _arPopoverElement.current.getBoundingClientRect();
|
|
38
|
+
if (elementRect) {
|
|
39
|
+
const screenCenterX = window.innerWidth / 2;
|
|
40
|
+
const screenCenterY = window.innerHeight / 2;
|
|
41
|
+
const sx = window.scrollX || document.documentElement.scrollLeft;
|
|
42
|
+
const sy = window.scrollY || document.documentElement.scrollTop;
|
|
43
|
+
_arPopover.current.style.visibility = "visible";
|
|
44
|
+
_arPopover.current.style.opacity = "1";
|
|
45
|
+
_arPopover.current.style.top = `${(elementRect.top > screenCenterY
|
|
46
|
+
? elementRect.top - popoverRect.height + elementRect.height
|
|
47
|
+
: elementRect.top) + sy}px`;
|
|
48
|
+
_arPopover.current.style.left = `${(elementRect.left > screenCenterX
|
|
49
|
+
? elementRect.right - (elementRect.width + 7.5) - popoverRect.width
|
|
50
|
+
: elementRect.left + elementRect.width + 7.5) + sx}px`;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
// useEffects
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
if (open) {
|
|
57
|
+
setTimeout(() => handlePosition(), 0);
|
|
58
|
+
!windowBlur && window.addEventListener("blur", () => setOpen(false));
|
|
59
|
+
document.addEventListener("click", handleClickOutSide);
|
|
60
|
+
document.addEventListener("keydown", handleKeys);
|
|
61
|
+
}
|
|
62
|
+
return () => {
|
|
63
|
+
!windowBlur && window.removeEventListener("blur", () => setOpen(false));
|
|
64
|
+
document.removeEventListener("click", handleClickOutSide);
|
|
65
|
+
document.removeEventListener("keydown", handleKeys);
|
|
66
|
+
};
|
|
67
|
+
}, [open]);
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
setMounted(true);
|
|
70
|
+
return () => setMounted(false);
|
|
71
|
+
}, []);
|
|
72
|
+
return (React.createElement("div", { ref: _arPopoverWrapper, className: _arPopoverClassName.map((c) => c).join(" "), role: "dialog" },
|
|
73
|
+
open &&
|
|
74
|
+
mounted &&
|
|
75
|
+
ReactDOM.createPortal(React.createElement("div", { ref: _arPopover, className: "ar-popover" },
|
|
76
|
+
title && (React.createElement("div", { className: "title" },
|
|
77
|
+
React.createElement(Title, { Level: "h4" }, title))),
|
|
78
|
+
message && React.createElement("p", { className: "message" }, message),
|
|
79
|
+
content && React.createElement("div", { className: "content" }, content),
|
|
80
|
+
onConfirm && (React.createElement("div", { className: "footer" },
|
|
81
|
+
React.createElement(Button, { color: "green", size: "small", onClick: () => {
|
|
82
|
+
onConfirm(true);
|
|
83
|
+
setOpen(false);
|
|
84
|
+
} }, config?.buttons.okay ?? "Evet"),
|
|
85
|
+
React.createElement(Button, { size: "small", onClick: () => {
|
|
86
|
+
onConfirm(false);
|
|
87
|
+
setOpen(false);
|
|
88
|
+
} }, config?.buttons.cancel ?? "Hayır")))), document.body),
|
|
89
|
+
React.createElement("div", { ref: _arPopoverElement, onClick: () => setOpen((prev) => !prev) }, children)));
|
|
90
|
+
};
|
|
91
|
+
export default Popover;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PopupButtonConfig, Status } from "../../../libs/core/application/contexts/Notification";
|
|
2
|
+
interface IProps {
|
|
3
|
+
title: string;
|
|
4
|
+
message?: string;
|
|
5
|
+
status: (Status | "save" | "delete") | number;
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
buttons?: PopupButtonConfig | null;
|
|
8
|
+
onConfirm?: ((confirm: boolean) => void) | null;
|
|
9
|
+
}
|
|
10
|
+
export default IProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import IProps from "./IProps";
|
|
3
|
+
import "../../../assets/css/components/feedback/popup-confirm/styles.css";
|
|
4
|
+
declare const PopupConfirm: ({ title, message, status, isOpen, buttons, onConfirm }: IProps) => false | React.ReactPortal;
|
|
5
|
+
export default PopupConfirm;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import React, { useContext, useEffect, useRef, useState } from "react";
|
|
3
|
+
import "../../../assets/css/components/feedback/popup-confirm/styles.css";
|
|
4
|
+
import Button from "../../form/button";
|
|
5
|
+
import ReactDOM from "react-dom";
|
|
6
|
+
import { NotificationContext } from "../../../libs/core/application/contexts/Notification";
|
|
7
|
+
import { ARIcon } from "../../icons";
|
|
8
|
+
import Row from "../../data-display/grid-system/row/Row";
|
|
9
|
+
import Column from "../../data-display/grid-system/column/Column";
|
|
10
|
+
const PopupConfirm = ({ title, message, status, isOpen, buttons, onConfirm }) => {
|
|
11
|
+
// contexts
|
|
12
|
+
const { setIsPopupOpen } = useContext(NotificationContext);
|
|
13
|
+
// refs
|
|
14
|
+
const _arNotificationPopupWrapper = useRef(null);
|
|
15
|
+
const _arNotificationPopup = useRef(null);
|
|
16
|
+
// states
|
|
17
|
+
const _notificaitonPopupWrapperClassName = ["ar-notification-popup-wrapper"];
|
|
18
|
+
const [className, setClassName] = useState(["ar-notification-popup", ""]);
|
|
19
|
+
// methods
|
|
20
|
+
const buttonColor = () => {
|
|
21
|
+
switch (status) {
|
|
22
|
+
case "success":
|
|
23
|
+
case "save":
|
|
24
|
+
return "green";
|
|
25
|
+
case "warning":
|
|
26
|
+
return "orange";
|
|
27
|
+
case "information":
|
|
28
|
+
return "cyan";
|
|
29
|
+
case "error":
|
|
30
|
+
case "delete":
|
|
31
|
+
return "red";
|
|
32
|
+
default:
|
|
33
|
+
return "light";
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
const buttonIcons = () => {
|
|
37
|
+
switch (status) {
|
|
38
|
+
case "success":
|
|
39
|
+
return React.createElement(ARIcon, { icon: "CheckAll", fill: "var(--success)", size: 24 });
|
|
40
|
+
case "save":
|
|
41
|
+
return React.createElement(ARIcon, { icon: "Floppy-Fill", fill: "var(--success)", size: 24 });
|
|
42
|
+
case "warning":
|
|
43
|
+
return React.createElement(ARIcon, { icon: "ExclamationDiamond-Fill", fill: "var(--warning)", size: 24 });
|
|
44
|
+
case "information":
|
|
45
|
+
return React.createElement(ARIcon, { icon: "Information-Circle-Fill", fill: "var(--information)", size: 24 });
|
|
46
|
+
case "error":
|
|
47
|
+
return React.createElement(ARIcon, { icon: "XCircle-Fill", fill: "var(--danger)", size: 24 });
|
|
48
|
+
case "delete":
|
|
49
|
+
return React.createElement(ARIcon, { icon: "Trash-Fill", fill: "var(--danger)", size: 24 });
|
|
50
|
+
default:
|
|
51
|
+
return "light";
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
// useEffects
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
setClassName((prev) => {
|
|
57
|
+
const updated = [...prev.slice(0, -1), isOpen ? "open" : ""];
|
|
58
|
+
return updated;
|
|
59
|
+
});
|
|
60
|
+
if (isOpen)
|
|
61
|
+
document.body.style.overflow = "hidden";
|
|
62
|
+
return () => {
|
|
63
|
+
document.body.style.removeProperty("overflow");
|
|
64
|
+
};
|
|
65
|
+
}, [isOpen]);
|
|
66
|
+
return (isOpen &&
|
|
67
|
+
ReactDOM.createPortal(React.createElement("div", { ref: _arNotificationPopupWrapper, className: _notificaitonPopupWrapperClassName.map((c) => c).join(" ") },
|
|
68
|
+
React.createElement("div", { className: "ar-notification-popup-bg", onMouseDown: (event) => {
|
|
69
|
+
event.stopPropagation();
|
|
70
|
+
const target = event.target;
|
|
71
|
+
if (_arNotificationPopup.current && !_arNotificationPopup.current.contains(target)) {
|
|
72
|
+
setClassName((prev) => {
|
|
73
|
+
const updated = [...prev.slice(0, -1), isOpen ? "open" : ""];
|
|
74
|
+
return updated;
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
} }),
|
|
78
|
+
React.createElement("div", { ref: _arNotificationPopup, className: className.map((c) => c).join(" ") },
|
|
79
|
+
React.createElement("div", { className: `icon ${status}` }, buttonIcons()),
|
|
80
|
+
React.createElement("div", { className: "content" },
|
|
81
|
+
React.createElement("span", { className: `title ${status}` }, title),
|
|
82
|
+
React.createElement("span", { className: "message" }, message)),
|
|
83
|
+
React.createElement("div", { className: "footer" },
|
|
84
|
+
React.createElement(Row, null,
|
|
85
|
+
React.createElement(Column, { size: buttons?.cancel ? 6 : 12 },
|
|
86
|
+
React.createElement(Button, { color: buttonColor(), onClick: (event) => {
|
|
87
|
+
buttons?.okay?.onClick?.(event);
|
|
88
|
+
onConfirm?.(true);
|
|
89
|
+
setIsPopupOpen?.((prev) => !prev);
|
|
90
|
+
}, fullWidth: true }, buttons?.okay?.children ?? "Tamam")),
|
|
91
|
+
buttons?.cancel && (React.createElement(Column, { size: 6 },
|
|
92
|
+
React.createElement(Button, { variant: "outlined", color: buttons.cancel.color ?? "gray", onClick: (event) => {
|
|
93
|
+
buttons?.cancel?.onClick?.(event);
|
|
94
|
+
onConfirm?.(false);
|
|
95
|
+
setIsPopupOpen?.((prev) => !prev);
|
|
96
|
+
}, fullWidth: true }, buttons.cancel.children ?? "Vazgeç"))))))), document.body));
|
|
97
|
+
};
|
|
98
|
+
export default PopupConfirm;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Utils from "../../../libs/infrastructure/shared/Utils";
|
|
3
|
+
import "../../../assets/css/components/feedback/progress/progress.css";
|
|
4
|
+
const Progress = ({ value, reverse, isVisibleValue = false }) => {
|
|
5
|
+
// variables
|
|
6
|
+
let _status = undefined;
|
|
7
|
+
const _arProgressClassName = [];
|
|
8
|
+
if (value >= 0 && value <= 25)
|
|
9
|
+
_status = !reverse ? "danger" : "success";
|
|
10
|
+
else if (value >= 26 && value <= 50)
|
|
11
|
+
_status = !reverse ? "warning" : "primary";
|
|
12
|
+
else if (value >= 51 && value <= 75)
|
|
13
|
+
_status = !reverse ? "primary" : "warning";
|
|
14
|
+
else if (value >= 76 && value <= 100)
|
|
15
|
+
_status = !reverse ? "success" : "danger";
|
|
16
|
+
_arProgressClassName.push(...Utils.GetClassName("filled", _status, undefined, { radius: "pill" }, undefined, undefined, undefined));
|
|
17
|
+
return (React.createElement("div", { className: "ar-progress" },
|
|
18
|
+
React.createElement("div", { className: `ar-progress-bar ${_arProgressClassName.map((c) => c).join(" ")}` }),
|
|
19
|
+
React.createElement("div", { className: `ar-progress-value ${_arProgressClassName.map((c) => c).join(" ")}`, style: {
|
|
20
|
+
width: `${value}%`,
|
|
21
|
+
transition: "width 250ms ease-in-out",
|
|
22
|
+
} }, !isVisibleValue && React.createElement("span", null,
|
|
23
|
+
"%",
|
|
24
|
+
value))));
|
|
25
|
+
};
|
|
26
|
+
export default Progress;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import React, { useCallback, useEffect, useRef, useState } from "react";
|
|
3
|
+
import ReactDOM from "react-dom";
|
|
4
|
+
import "../../../assets/css/components/feedback/tooltip/styles.css";
|
|
5
|
+
const Tooltip = ({ children, text, direction = "top" }) => {
|
|
6
|
+
// refs
|
|
7
|
+
const _arTooltip = useRef(null);
|
|
8
|
+
const _children = useRef(null);
|
|
9
|
+
// states
|
|
10
|
+
const [mouseEnter, setMouseEnter] = useState(false);
|
|
11
|
+
const [_direction, setDirection] = useState(direction);
|
|
12
|
+
// 💡 Donma ve sonsuz döngüyü engellemek için dışarıdan seçilen ana yönü bir ref'te saklıyoruz
|
|
13
|
+
const currentInitialDirection = useRef(direction);
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
currentInitialDirection.current = direction;
|
|
16
|
+
setDirection(direction); // Storybook panelinden elle yön değiştiğinde senkronize et
|
|
17
|
+
}, [direction]);
|
|
18
|
+
// methods
|
|
19
|
+
const handlePosition = useCallback(() => {
|
|
20
|
+
const child = _children.current;
|
|
21
|
+
const tooltip = _arTooltip.current;
|
|
22
|
+
if (!child || !tooltip)
|
|
23
|
+
return;
|
|
24
|
+
const margin = 17.5;
|
|
25
|
+
const windowWidth = window.innerWidth;
|
|
26
|
+
const windowHeight = window.innerHeight;
|
|
27
|
+
const childRect = child.getBoundingClientRect();
|
|
28
|
+
const tooltipRect = tooltip.getBoundingClientRect();
|
|
29
|
+
const spaceTop = childRect.top;
|
|
30
|
+
const spaceBottom = windowHeight - childRect.bottom;
|
|
31
|
+
const spaceLeft = childRect.left;
|
|
32
|
+
const spaceRight = windowWidth - childRect.right;
|
|
33
|
+
// 💡 Hesaplamaya state'ten değil, doğrudan orijinal seçilen yönden başlıyoruz
|
|
34
|
+
let finalDirection = currentInitialDirection.current;
|
|
35
|
+
// Sıkışma durumlarına göre yönü dinamik değiştir
|
|
36
|
+
if (finalDirection === "top" && spaceTop < tooltipRect.height + margin) {
|
|
37
|
+
finalDirection = "bottom";
|
|
38
|
+
}
|
|
39
|
+
else if (finalDirection === "bottom" && spaceBottom < tooltipRect.height + margin) {
|
|
40
|
+
finalDirection = "top";
|
|
41
|
+
}
|
|
42
|
+
else if (finalDirection === "left" && spaceLeft < tooltipRect.width + margin) {
|
|
43
|
+
finalDirection = "right";
|
|
44
|
+
}
|
|
45
|
+
else if (finalDirection === "right" && spaceRight < tooltipRect.width + margin) {
|
|
46
|
+
finalDirection = "left";
|
|
47
|
+
}
|
|
48
|
+
// Eğer hala hiçbir yere sığmıyorsa en geniş boşluğu bul
|
|
49
|
+
const maxSpace = Math.max(spaceTop, spaceBottom, spaceLeft, spaceRight);
|
|
50
|
+
if ((finalDirection === "top" && spaceTop < tooltipRect.height + margin) ||
|
|
51
|
+
(finalDirection === "bottom" && spaceBottom < tooltipRect.height + margin) ||
|
|
52
|
+
(finalDirection === "left" && spaceLeft < tooltipRect.width + margin) ||
|
|
53
|
+
(finalDirection === "right" && spaceRight < tooltipRect.width + margin)) {
|
|
54
|
+
if (maxSpace === spaceTop)
|
|
55
|
+
finalDirection = "top";
|
|
56
|
+
else if (maxSpace === spaceBottom)
|
|
57
|
+
finalDirection = "bottom";
|
|
58
|
+
else if (maxSpace === spaceLeft)
|
|
59
|
+
finalDirection = "left";
|
|
60
|
+
else if (maxSpace === spaceRight)
|
|
61
|
+
finalDirection = "right";
|
|
62
|
+
}
|
|
63
|
+
let top = 0;
|
|
64
|
+
let left = 0;
|
|
65
|
+
switch (finalDirection) {
|
|
66
|
+
case "top":
|
|
67
|
+
top = childRect.top - tooltipRect.height - margin;
|
|
68
|
+
left = childRect.left + childRect.width / 2 - tooltipRect.width / 2;
|
|
69
|
+
break;
|
|
70
|
+
case "right":
|
|
71
|
+
top = childRect.top + childRect.height / 2 - tooltipRect.height / 2;
|
|
72
|
+
left = childRect.right + margin;
|
|
73
|
+
break;
|
|
74
|
+
case "bottom":
|
|
75
|
+
top = childRect.bottom + margin;
|
|
76
|
+
left = childRect.left + childRect.width / 2 - tooltipRect.width / 2;
|
|
77
|
+
break;
|
|
78
|
+
case "left":
|
|
79
|
+
top = childRect.top + childRect.height / 2 - tooltipRect.height / 2;
|
|
80
|
+
left = childRect.left - tooltipRect.width - margin;
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
// Ekran taşma koruması
|
|
84
|
+
if (left < 10)
|
|
85
|
+
left = 10;
|
|
86
|
+
if (left + tooltipRect.width > windowWidth - 10) {
|
|
87
|
+
left = windowWidth - tooltipRect.width - 10;
|
|
88
|
+
}
|
|
89
|
+
tooltip.style.top = `${top}px`;
|
|
90
|
+
tooltip.style.left = `${left}px`;
|
|
91
|
+
// 💡 KRİTİK DEĞİŞİKLİK: Sadece yön gerçekten değiştiyse state güncellenir.
|
|
92
|
+
// Bu kontrol MutationObserver'ın yarattığı kısır döngüyü anında kırar.
|
|
93
|
+
setDirection((prev) => {
|
|
94
|
+
if (prev !== finalDirection)
|
|
95
|
+
return finalDirection;
|
|
96
|
+
return prev;
|
|
97
|
+
});
|
|
98
|
+
}, []); // Bağımlılık dizisini boş bırakarak fonksiyonun kimliğini sabitliyoruz
|
|
99
|
+
// useEffects
|
|
100
|
+
useEffect(() => {
|
|
101
|
+
window.addEventListener("resize", handlePosition);
|
|
102
|
+
window.addEventListener("scroll", handlePosition, { passive: true });
|
|
103
|
+
const observer = new MutationObserver(() => {
|
|
104
|
+
handlePosition();
|
|
105
|
+
});
|
|
106
|
+
observer.observe(document.body, {
|
|
107
|
+
attributes: true,
|
|
108
|
+
childList: true,
|
|
109
|
+
subtree: true,
|
|
110
|
+
});
|
|
111
|
+
return () => {
|
|
112
|
+
window.removeEventListener("resize", handlePosition);
|
|
113
|
+
window.removeEventListener("scroll", handlePosition);
|
|
114
|
+
observer.disconnect();
|
|
115
|
+
};
|
|
116
|
+
}, [handlePosition]);
|
|
117
|
+
useEffect(() => {
|
|
118
|
+
if (mouseEnter)
|
|
119
|
+
setTimeout(() => handlePosition(), 0);
|
|
120
|
+
}, [mouseEnter, handlePosition]);
|
|
121
|
+
return (React.createElement("div", { className: "ar-tooltip-wrapper" },
|
|
122
|
+
React.createElement("div", { ref: _children, onMouseEnter: () => setMouseEnter(true), onMouseLeave: () => setMouseEnter(false) }, children),
|
|
123
|
+
mouseEnter &&
|
|
124
|
+
ReactDOM.createPortal(React.createElement("div", { ref: _arTooltip, className: `ar-tooltip ${_direction}` }, Array.isArray(text) ? (text.map((t, index) => (React.createElement("span", { key: index, className: "text" },
|
|
125
|
+
React.createElement("span", { className: "bullet" }, "\u2022"),
|
|
126
|
+
React.createElement("span", null, t))))) : (React.createElement("span", { className: "text" }, text))), document.body)));
|
|
127
|
+
};
|
|
128
|
+
Tooltip.displayName = "Tooltip";
|
|
129
|
+
export default Tooltip;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IBorderProps, IChildrenProps, IColorProps, IIconProps, ISizeProps, IUpperCaseProps, IVariantProps } from "../../../libs/infrastructure/types/IGlobalProps";
|
|
2
|
+
interface IProps extends IChildrenProps, IVariantProps, IColorProps, IBorderProps, IIconProps, ISizeProps, IUpperCaseProps, Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "color"> {
|
|
3
|
+
shape?: "circle" | "square";
|
|
4
|
+
position?: {
|
|
5
|
+
type: "fixed" | "absolute";
|
|
6
|
+
inset: ("top" | "right" | "bottom" | "left")[];
|
|
7
|
+
};
|
|
8
|
+
fullWidth?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export default IProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import React, { useRef } from "react";
|
|
3
|
+
import "../../../assets/css/components/form/button/styles.css";
|
|
4
|
+
import Utils from "../../../libs/infrastructure/shared/Utils";
|
|
5
|
+
const Button = ({ children, variant = "filled", shape, color = "light", border = { radius: "sm" }, size = "normal", position, fullWidth, icon, upperCase, ...attributes }) => {
|
|
6
|
+
// refs
|
|
7
|
+
const _button = useRef(null);
|
|
8
|
+
const _arButtonClassName = ["ar-button"];
|
|
9
|
+
_arButtonClassName.push(...Utils.GetClassName(variant, undefined, color, border, size, icon, attributes.className));
|
|
10
|
+
if (!children)
|
|
11
|
+
_arButtonClassName.push("no-content");
|
|
12
|
+
if (fullWidth)
|
|
13
|
+
_arButtonClassName.push("full-width");
|
|
14
|
+
if (shape)
|
|
15
|
+
_arButtonClassName.push(`ar-button-shape ${shape}`);
|
|
16
|
+
if (position) {
|
|
17
|
+
_arButtonClassName.push(position.type);
|
|
18
|
+
_arButtonClassName.push(position.inset.map((_inset) => _inset).join(" "));
|
|
19
|
+
}
|
|
20
|
+
return (React.createElement("button", { ref: _button, ...attributes, type: attributes.type ?? "button", className: _arButtonClassName.map((c) => c).join(" "), onClick: (event) => {
|
|
21
|
+
// Disabled gelmesi durumunda işlem yapmasına izin verme...
|
|
22
|
+
if (attributes.disabled)
|
|
23
|
+
return;
|
|
24
|
+
(() => {
|
|
25
|
+
const _current = _button.current;
|
|
26
|
+
const addClass = "active";
|
|
27
|
+
if (_current && !_current.classList.contains(addClass)) {
|
|
28
|
+
// Sınıf ekleniyor...
|
|
29
|
+
_current.classList.add(addClass);
|
|
30
|
+
// Sınıf 500 milisaniye sonra kaldırlacak.
|
|
31
|
+
setTimeout(() => _current.classList.remove(addClass), 750);
|
|
32
|
+
}
|
|
33
|
+
})();
|
|
34
|
+
(() => attributes.onClick && attributes.onClick(event))();
|
|
35
|
+
} },
|
|
36
|
+
React.createElement("span", { className: "text" },
|
|
37
|
+
icon?.element,
|
|
38
|
+
React.createElement("span", null, !shape ? (typeof children === "string" && upperCase ? children.toLocaleUpperCase() : children) : ""))));
|
|
39
|
+
};
|
|
40
|
+
Button.displayName = "Button";
|
|
41
|
+
export default Button;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IColorProps, IIconProps } from "../../../libs/infrastructure/types/IGlobalProps";
|
|
2
|
+
interface IProps {
|
|
3
|
+
buttons: ({
|
|
4
|
+
text: string;
|
|
5
|
+
onClick: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
6
|
+
} & IColorProps & IIconProps)[];
|
|
7
|
+
}
|
|
8
|
+
export default IProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|