@sydsoft/base 1.4.0 → 1.6.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/README.md +9 -0
- package/dist/esm/_lib/baseFunctions.d.ts +5 -0
- package/dist/esm/_lib/baseFunctions.js +38 -0
- package/dist/esm/_lib/inputMask.d.ts +7 -0
- package/dist/esm/_lib/inputMask.js +228 -0
- package/dist/esm/box/Box.d.ts +9 -0
- package/dist/esm/box/Box.js +15 -0
- package/dist/esm/box/Box.module.css +152 -0
- package/dist/esm/box/BoxContent.d.ts +9 -0
- package/dist/esm/box/BoxContent.js +7 -0
- package/dist/esm/box/BoxFooter.d.ts +10 -0
- package/dist/esm/box/BoxFooter.js +8 -0
- package/dist/esm/box/BoxHeader.d.ts +16 -0
- package/dist/esm/box/BoxHeader.js +9 -0
- package/dist/esm/box/index.d.ts +9 -0
- package/dist/esm/box/index.js +9 -0
- package/dist/esm/form/Button.d.ts +27 -0
- package/dist/esm/form/Button.js +76 -0
- package/dist/esm/form/Checkbox.d.ts +23 -0
- package/dist/esm/form/Checkbox.js +23 -0
- package/dist/esm/form/Dialog.d.ts +19 -0
- package/dist/esm/form/Dialog.js +40 -0
- package/dist/esm/form/Form.d.ts +10 -0
- package/dist/esm/form/Form.js +12 -0
- package/dist/esm/form/FormOlustur.d.ts +39 -0
- package/dist/esm/form/FormOlustur.js +51 -0
- package/dist/esm/form/Input.d.ts +62 -0
- package/dist/esm/form/Input.js +207 -0
- package/dist/esm/form/Label.d.ts +7 -0
- package/dist/esm/form/Label.js +12 -0
- package/dist/esm/form/SearchableInput.d.ts +35 -0
- package/dist/esm/form/SearchableInput.js +313 -0
- package/dist/esm/form/UploadBase.d.ts +25 -0
- package/dist/esm/form/UploadBase.js +86 -0
- package/dist/esm/form/index.d.ts +9 -0
- package/dist/esm/form/index.js +9 -0
- package/dist/esm/form/styles/Button.module.css +144 -0
- package/dist/esm/form/styles/Input.module.css +220 -0
- package/dist/esm/form/styles/Label.module.css +31 -0
- package/dist/esm/form/styles/SearchableInput.module.css +79 -0
- package/dist/esm/grid/index.d.ts +37 -0
- package/dist/esm/grid/index.js +63 -0
- package/dist/esm/grid/index.module.css +805 -0
- package/dist/esm/icon/icons.json +22 -0
- package/dist/esm/icon/index.d.ts +27 -3
- package/dist/esm/icon/index.js +18 -37
- package/dist/esm/index.d.ts +7 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/modal/index.d.ts +23 -0
- package/dist/esm/modal/index.js +66 -0
- package/dist/esm/modal/index.module.css +74 -0
- package/dist/esm/popover/index.d.ts +12 -0
- package/dist/esm/popover/index.js +142 -0
- package/dist/esm/tooltip/index.d.ts +11 -0
- package/dist/esm/tooltip/index.js +119 -0
- package/package.json +5 -4
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"close": {
|
|
3
|
+
"viewBox": "0 -960 960 960",
|
|
4
|
+
"content": "<path d=\"m336-280-56-56 144-144-144-143 56-56 144 144 143-144 56 56-144 143 144 144-56 56-143-144-144 144Z\"/>"
|
|
5
|
+
},
|
|
6
|
+
"search": {
|
|
7
|
+
"viewBox": "0 0 24 24",
|
|
8
|
+
"content": "<path d=\"M0 0h24v24H0V0z\" fill=\"none\"/><path d=\"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z\"/>"
|
|
9
|
+
},
|
|
10
|
+
"edit": {
|
|
11
|
+
"content": "<path d=\"M200-200h57l391-391-57-57-391 391v57Zm-80 80v-170l528-527q12-11 26.5-17t30.5-6q16 0 31 6t26 18l55 56q12 11 17.5 26t5.5 30q0 16-5.5 30.5T817-647L290-120H120Zm640-584-56-56 56 56Zm-141 85-28-29 57 57-29-28Z\" />",
|
|
12
|
+
"viewBox": "0 -960 960 960"
|
|
13
|
+
},
|
|
14
|
+
"keyboard_arrow_up": {
|
|
15
|
+
"content": "<path d=\"M480-528 296-344l-56-56 240-240 240 240-56 56-184-184Z\"/>",
|
|
16
|
+
"viewBox": "0 -960 960 960"
|
|
17
|
+
},
|
|
18
|
+
"keyboard_arrow_down": {
|
|
19
|
+
"content": "<path d=\"M480-344 240-584l56-56 184 184 184-184 56 56-240 240Z\"/>",
|
|
20
|
+
"viewBox": "0 -960 960 960"
|
|
21
|
+
}
|
|
22
|
+
}
|
package/dist/esm/icon/index.d.ts
CHANGED
|
@@ -1,10 +1,34 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const iconMap: {
|
|
3
|
+
close: {
|
|
4
|
+
viewBox: string;
|
|
5
|
+
content: string;
|
|
6
|
+
};
|
|
7
|
+
search: {
|
|
8
|
+
viewBox: string;
|
|
9
|
+
content: string;
|
|
10
|
+
};
|
|
11
|
+
edit: {
|
|
12
|
+
content: string;
|
|
13
|
+
viewBox: string;
|
|
14
|
+
};
|
|
15
|
+
keyboard_arrow_up: {
|
|
16
|
+
content: string;
|
|
17
|
+
viewBox: string;
|
|
18
|
+
};
|
|
19
|
+
keyboard_arrow_down: {
|
|
20
|
+
content: string;
|
|
21
|
+
viewBox: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export type IconName = keyof typeof iconMap;
|
|
3
25
|
interface Props {
|
|
26
|
+
name: IconName;
|
|
27
|
+
color?: string;
|
|
28
|
+
fontSize?: number | string;
|
|
4
29
|
style?: React.CSSProperties;
|
|
5
30
|
className?: string;
|
|
6
|
-
iconOzel?: "word" | "excel" | "tl" | "connect" | "dualwindow";
|
|
7
|
-
iconMui?: "error" | "error_outline" | "warning" | "report_problem" | "add_alert" | "notification_important" | "album" | "av_timer" | "closed_caption" | "equalizer" | "explicit" | "fast_forward" | "fast_rewind" | "games" | "gamepad" | "hearing" | "high_quality" | "loop" | "sync" | "mic" | "mic_none" | "mic_off" | "movie" | "movie_creation" | "library_add" | "queue" | "add_to_photos" | "library_books" | "library_music" | "new_releases" | "not_interested" | "do_not_disturb" | "pause" | "pause_circle_filled" | "pause_circle_outline" | "play_arrow" | "play_circle_filled" | "play_circle_outline" | "playlist_add" | "queue_music" | "radio" | "recent_actors" | "repeat" | "repeat_one" | "replay" | "shuffle" | "skip_next" | "skip_previous" | "snooze" | "stop" | "subtitles" | "surround_sound" | "video_library" | "videocam" | "videocam_off" | "volume_down" | "volume_mute" | "volume_off" | "volume_up" | "web" | "hd" | "sort_by_alpha" | "airplay" | "forward_10" | "forward_30" | "forward_5" | "replay_10" | "replay_30" | "replay_5" | "add_to_queue" | "fiber_dvr" | "fiber_new" | "playlist_play" | "art_track" | "fiber_manual_record" | "fiber_smart_record" | "music_video" | "subscriptions" | "playlist_add_check" | "queue_play_next" | "remove_from_queue" | "slow_motion_video" | "web_asset" | "fiber_pin" | "branding_watermark" | "call_to_action" | "featured_play_list" | "featured_video" | "note" | "video_call" | "video_label" | "4k" | "missed_video_call" | "control_camera" | "business" | "domain" | "call" | "call_end" | "call_made" | "call_merge" | "merge_type" | "call_missed" | "call_received" | "call_split" | "chat" | "clear_all" | "comment" | "contacts" | "dialer_sip" | "dialpad" | "email" | "mail" | "markunread" | "local_post_office" | "forum" | "question_answer" | "import_export" | "invert_colors_off" | "live_help" | "location_off" | "location_on" | "place" | "room" | "message" | "chat_bubble" | "chat_bubble_outline" | "no_sim" | "signal_cellular_no_sim" | "phone" | "local_phone" | "portable_wifi_off" | "contact_phone" | "contact_mail" | "ring_volume" | "speaker_phone" | "stay_current_landscape" | "stay_primary_landscape" | "stay_current_portrait" | "stay_primary_portrait" | "smartphone" | "swap_calls" | "textsms" | "sms" | "voicemail" | "vpn_key" | "phonelink_erase" | "phonelink_lock" | "phonelink_ring" | "phonelink_setup" | "present_to_all" | "import_contacts" | "mail_outline" | "screen_share" | "stop_screen_share" | "call_missed_outgoing" | "rss_feed" | "alternate_email" | "mobile_screen_share" | "add_call" | "cancel_presentation" | "pause_presentation" | "unsubscribe" | "cell_wifi" | "sentiment_satisfied_alt" | "list_alt" | "domain_disabled" | "lightbulb" | "add" | "add_box" | "add_circle" | "add_circle_outline" | "control_point" | "archive" | "backspace" | "block" | "clear" | "close" | "content_copy" | "content_cut" | "content_paste" | "create" | "mode_edit" | "edit" | "drafts" | "filter_list" | "flag" | "assistant_photo" | "forward" | "gesture" | "inbox" | "link" | "insert_link" | "redo" | "remove" | "remove_circle" | "do_not_disturb_on" | "remove_circle_outline" | "reply" | "reply_all" | "report" | "save" | "select_all" | "send" | "sort" | "text_format" | "undo" | "font_download" | "move_to_inbox" | "unarchive" | "next_week" | "weekend" | "delete_sweep" | "low_priority" | "outlined_flag" | "link_off" | "report_off" | "save_alt" | "ballot" | "file_copy" | "how_to_reg" | "how_to_vote" | "waves" | "where_to_vote" | "add_link" | "inventory" | "access_alarm" | "alarm" | "access_alarms" | "access_time" | "query_builder" | "schedule" | "add_alarm" | "alarm_add" | "airplanemode_off" | "airplanemode_on" | "flight" | "local_airport" | "battery_alert" | "battery_charging_full" | "battery_full" | "battery_std" | "battery_unknown" | "bluetooth" | "bluetooth_connected" | "bluetooth_disabled" | "bluetooth_searching" | "bluetooth_audio" | "brightness_auto" | "brightness_high" | "brightness_7" | "brightness_low" | "brightness_5" | "brightness_medium" | "brightness_6" | "data_usage" | "developer_mode" | "devices" | "phonelink" | "dvr" | "gps_fixed" | "my_location" | "gps_not_fixed" | "location_searching" | "gps_off" | "location_disabled" | "graphic_eq" | "network_cell" | "network_wifi" | "nfc" | "now_wallpaper" | "now_widgets" | "screen_lock_landscape" | "screen_lock_portrait" | "screen_lock_rotation" | "screen_rotation" | "sd_storage" | "sd_card" | "settings_system_daydream" | "signal_cellular_4_bar" | "signal_cellular_connected_no_internet_4_bar" | "signal_cellular_null" | "signal_cellular_off" | "signal_wifi_4_bar" | "signal_wifi_4_bar_lock" | "signal_wifi_off" | "storage" | "usb" | "wifi_lock" | "wifi_tethering" | "add_to_home_screen" | "device_thermostat" | "mobile_friendly" | "mobile_off" | "signal_cellular_alt" | "attach_file" | "attach_money" | "border_all" | "border_bottom" | "border_clear" | "border_color" | "border_horizontal" | "border_inner" | "border_left" | "border_outer" | "border_right" | "border_style" | "border_top" | "border_vertical" | "format_align_center" | "format_align_justify" | "format_align_left" | "format_align_right" | "format_bold" | "format_clear" | "format_color_fill" | "format_color_reset" | "format_color_text" | "format_indent_decrease" | "format_indent_increase" | "format_italic" | "format_line_spacing" | "format_list_bulleted" | "format_list_numbered" | "format_paint" | "format_quote" | "format_size" | "format_strikethrough" | "format_textdirection_l_to_r" | "format_textdirection_r_to_l" | "format_underlined" | "functions" | "insert_chart" | "poll" | "assessment" | "insert_comment" | "insert_drive_file" | "insert_emoticon" | "tag_faces" | "mood" | "insert_invitation" | "event" | "insert_photo" | "image" | "photo" | "mode_comment" | "publish" | "space_bar" | "strikethrough_s" | "vertical_align_bottom" | "vertical_align_center" | "vertical_align_top" | "wrap_text" | "money_off" | "drag_handle" | "format_shapes" | "highlight" | "linear_scale" | "short_text" | "text_fields" | "monetization_on" | "title" | "table_chart" | "add_comment" | "format_list_numbered_rtl" | "scatter_plot" | "score" | "insert_chart_outlined" | "bar_chart" | "notes" | "attachment" | "cloud" | "cloud_circle" | "cloud_done" | "cloud_download" | "cloud_off" | "cloud_queue" | "cloud_upload" | "backup" | "file_download" | "get_app" | "file_upload" | "folder" | "folder_open" | "folder_shared" | "create_new_folder" | "cast" | "cast_connected" | "computer" | "laptop" | "desktop_mac" | "desktop_windows" | "developer_board" | "dock" | "headset" | "headset_mic" | "keyboard" | "keyboard_arrow_down" | "keyboard_arrow_left" | "keyboard_arrow_right" | "keyboard_arrow_up" | "keyboard_backspace" | "keyboard_capslock" | "keyboard_hide" | "keyboard_return" | "keyboard_tab" | "keyboard_voice" | "laptop_chromebook" | "laptop_mac" | "laptop_windows" | "memory" | "mouse" | "phone_android" | "phone_iphone" | "phonelink_off" | "router" | "scanner" | "security" | "sim_card" | "speaker" | "speaker_group" | "tablet" | "tablet_android" | "tablet_mac" | "toys" | "tv" | "watch" | "device_hub" | "power_input" | "devices_other" | "videogame_asset" | "device_unknown" | "headset_off" | "adjust" | "assistant" | "audiotrack" | "blur_circular" | "blur_linear" | "blur_off" | "blur_on" | "brightness_1" | "brightness_2" | "brightness_3" | "brightness_4" | "broken_image" | "brush" | "camera" | "camera_alt" | "photo_camera" | "local_see" | "camera_front" | "camera_rear" | "camera_roll" | "center_focus_strong" | "center_focus_weak" | "collections" | "photo_library" | "color_lens" | "palette" | "colorize" | "compare" | "control_point_duplicate" | "crop_16_9" | "crop_3_2" | "crop" | "crop_5_4" | "crop_landscape" | "crop_7_5" | "crop_din" | "crop_free" | "crop_original" | "crop_portrait" | "crop_square" | "dehaze" | "details" | "exposure" | "exposure_neg_1" | "exposure_neg_2" | "exposure_plus_1" | "exposure_plus_2" | "exposure_zero" | "filter_1" | "filter_2" | "filter_3" | "filter" | "filter_4" | "filter_5" | "filter_6" | "filter_7" | "filter_8" | "filter_9" | "filter_9_plus" | "filter_b_and_w" | "filter_center_focus" | "filter_drama" | "filter_frames" | "filter_hdr" | "landscape" | "terrain" | "filter_none" | "filter_tilt_shift" | "filter_vintage" | "flare" | "flash_auto" | "flash_off" | "flash_on" | "flip" | "gradient" | "grain" | "grid_off" | "grid_on" | "hdr_off" | "hdr_on" | "hdr_strong" | "hdr_weak" | "healing" | "image_aspect_ratio" | "iso" | "leak_add" | "leak_remove" | "lens" | "looks_3" | "looks" | "looks_4" | "looks_5" | "looks_6" | "looks_one" | "looks_two" | "loupe" | "monochrome_photos" | "music_note" | "nature" | "nature_people" | "navigate_before" | "chevron_left" | "navigate_next" | "chevron_right" | "panorama" | "panorama_fisheye" | "radio_button_unchecked" | "panorama_horizontal" | "panorama_vertical" | "panorama_wide_angle" | "photo_album" | "picture_as_pdf" | "portrait" | "remove_red_eye" | "visibility" | "rotate_90_degrees_ccw" | "rotate_left" | "rotate_right" | "slideshow" | "straighten" | "style" | "switch_camera" | "switch_video" | "texture" | "timelapse" | "timer_10" | "timer_3" | "timer" | "timer_off" | "tonality" | "transform" | "tune" | "view_comfy" | "view_compact" | "wb_auto" | "wb_cloudy" | "wb_incandescent" | "wb_sunny" | "collections_bookmark" | "photo_size_select_actual" | "photo_size_select_large" | "photo_size_select_small" | "vignette" | "wb_iridescent" | "crop_rotate" | "linked_camera" | "add_a_photo" | "movie_filter" | "photo_filter" | "burst_mode" | "shutter_speed" | "add_photo_alternate" | "image_search" | "music_off" | "beenhere" | "directions" | "directions_bike" | "directions_bus" | "directions_car" | "directions_ferry" | "directions_subway" | "directions_transit" | "directions_train" | "directions_walk" | "hotel" | "local_hotel" | "layers" | "layers_clear" | "local_atm" | "local_attraction" | "local_play" | "local_bar" | "local_cafe" | "free_breakfast" | "local_car_wash" | "local_convenience_store" | "local_drink" | "local_florist" | "local_gas_station" | "local_grocery_store" | "shopping_cart" | "local_hospital" | "local_laundry_service" | "local_library" | "local_mall" | "local_movies" | "theaters" | "local_offer" | "local_parking" | "local_pharmacy" | "local_pizza" | "local_printshop" | "print" | "local_restaurant" | "restaurant_menu" | "local_shipping" | "local_taxi" | "location_history" | "map" | "navigation" | "pin_drop" | "rate_review" | "satellite" | "store_mall_directory" | "store" | "traffic" | "directions_run" | "add_location" | "edit_location" | "near_me" | "person_pin_circle" | "zoom_out_map" | "restaurant" | "ev_station" | "streetview" | "subway" | "train" | "tram" | "transfer_within_a_station" | "atm" | "category" | "not_listed_location" | "departure_board" | "360" | "edit_attributes" | "transit_enterexit" | "fastfood" | "trip_origin" | "compass_calibration" | "money" | "apps" | "arrow_back" | "arrow_drop_down" | "arrow_drop_down_circle" | "arrow_drop_up" | "arrow_forward" | "cancel" | "check" | "expand_less" | "expand_more" | "fullscreen" | "fullscreen_exit" | "menu" | "keyboard_control" | "more_vert" | "refresh" | "unfold_less" | "unfold_more" | "arrow_upward" | "subdirectory_arrow_left" | "subdirectory_arrow_right" | "arrow_downward" | "first_page" | "last_page" | "arrow_left" | "arrow_right" | "arrow_back_ios" | "arrow_forward_ios" | "adb" | "disc_full" | "do_not_disturb_alt" | "drive_eta" | "time_to_leave" | "event_available" | "event_busy" | "event_note" | "folder_special" | "mms" | "more" | "network_locked" | "phone_bluetooth_speaker" | "phone_forwarded" | "phone_in_talk" | "phone_locked" | "phone_missed" | "phone_paused" | "sim_card_alert" | "sms_failed" | "feedback" | "sync_disabled" | "sync_problem" | "system_update" | "tap_and_play" | "vibration" | "voice_chat" | "vpn_lock" | "airline_seat_flat" | "airline_seat_flat_angled" | "airline_seat_individual_suite" | "airline_seat_legroom_extra" | "airline_seat_legroom_normal" | "airline_seat_legroom_reduced" | "airline_seat_recline_extra" | "airline_seat_recline_normal" | "confirmation_number" | "live_tv" | "ondemand_video" | "personal_video" | "power" | "wc" | "wifi" | "enhanced_encryption" | "network_check" | "no_encryption" | "rv_hookup" | "do_not_disturb_off" | "priority_high" | "power_off" | "tv_off" | "wifi_off" | "phone_callback" | "pie_chart" | "pie_chart_outlined" | "bubble_chart" | "multiline_chart" | "show_chart" | "cake" | "group" | "people" | "group_add" | "location_city" | "mood_bad" | "notifications" | "notifications_none" | "notifications_off" | "notifications_on" | "notifications_paused" | "pages" | "party_mode" | "people_outline" | "person" | "person_add" | "person_outline" | "perm_identity" | "plus_one" | "public" | "school" | "share" | "whatshot" | "sentiment_dissatisfied" | "sentiment_neutral" | "sentiment_satisfied" | "sentiment_very_dissatisfied" | "sentiment_very_satisfied" | "thumb_down_alt" | "thumb_up_alt" | "check_box" | "check_box_outline_blank" | "radio_button_on" | "star" | "grade" | "star_half" | "star_outline" | "3d_rotation" | "accessibility" | "account_balance" | "account_balance_wallet" | "account_box" | "account_circle" | "add_shopping_cart" | "alarm_off" | "alarm_on" | "android" | "announcement" | "aspect_ratio" | "assignment" | "assignment_ind" | "assignment_late" | "assignment_return" | "assignment_returned" | "assignment_turned_in" | "autorenew" | "book" | "class" | "bookmark" | "turned_in" | "bookmark_outline" | "turned_in_not" | "bug_report" | "build" | "cached" | "change_history" | "chrome_reader_mode" | "code" | "credit_card" | "payment" | "dashboard" | "delete" | "description" | "dns" | "done" | "done_all" | "exit_to_app" | "explore" | "extension" | "face" | "favorite" | "favorite_outline" | "find_in_page" | "find_replace" | "flip_to_back" | "flip_to_front" | "group_work" | "help" | "highlight_remove" | "history" | "restore" | "home" | "hourglass_empty" | "hourglass_full" | "https" | "lock" | "info" | "info_outline" | "input" | "invert_colors_on" | "label" | "label_outline" | "language" | "launch" | "open_in_new" | "list" | "lock_open" | "lock_outline" | "loyalty" | "markunread_mailbox" | "note_add" | "open_in_browser" | "open_with" | "pageview" | "perm_camera_mic" | "perm_contact_calendar" | "perm_data_setting" | "perm_device_information" | "perm_media" | "perm_phone_msg" | "perm_scan_wifi" | "picture_in_picture" | "polymer" | "power_settings_new" | "receipt" | "redeem" | "card_giftcard" | "search" | "settings" | "settings_applications" | "settings_backup_restore" | "settings_bluetooth" | "settings_cell" | "settings_display" | "settings_ethernet" | "settings_input_antenna" | "settings_input_component" | "settings_input_composite" | "settings_input_hdmi" | "settings_input_svideo" | "settings_overscan" | "settings_phone" | "settings_power" | "settings_remote" | "settings_voice" | "shop" | "shop_two" | "shopping_basket" | "speaker_notes" | "spellcheck" | "stars" | "subject" | "supervisor_account" | "swap_horiz" | "swap_vert" | "swap_vertical_circle" | "system_update_tv" | "tab" | "tab_unselected" | "thumb_down" | "thumb_up" | "thumbs_up_down" | "toc" | "today" | "toll" | "track_changes" | "translate" | "trending_down" | "trending_neutral" | "trending_up" | "verified_user" | "view_agenda" | "view_array" | "view_carousel" | "view_column" | "view_day" | "view_headline" | "view_list" | "view_module" | "view_quilt" | "view_stream" | "view_week" | "visibility_off" | "card_membership" | "card_travel" | "work" | "youtube_searched_for" | "eject" | "camera_enhance" | "help_outline" | "reorder" | "zoom_in" | "zoom_out" | "http" | "event_seat" | "flight_land" | "flight_takeoff" | "play_for_work" | "gif" | "indeterminate_check_box" | "offline_pin" | "all_out" | "copyright" | "fingerprint" | "gavel" | "lightbulb_outline" | "picture_in_picture_alt" | "important_devices" | "touch_app" | "accessible" | "compare_arrows" | "date_range" | "donut_large" | "donut_small" | "line_style" | "line_weight" | "motorcycle" | "opacity" | "pets" | "pregnant_woman" | "record_voice_over" | "rounded_corner" | "rowing" | "timeline" | "update" | "watch_later" | "pan_tool" | "euro_symbol" | "g_translate" | "remove_shopping_cart" | "restore_page" | "speaker_notes_off" | "delete_forever" | "accessibility_new" | "check_circle_outline" | "delete_outline" | "done_outline" | "maximize" | "minimize" | "offline_bolt" | "swap_horizontal_circle" | "accessible_forward" | "calendar_today" | "calendar_view_day" | "label_important" | "restore_from_trash" | "supervised_user_circle" | "text_rotate_up" | "text_rotate_vertical" | "text_rotation_angledown" | "text_rotation_angleup" | "text_rotation_down" | "text_rotation_none" | "commute" | "arrow_right_alt" | "work_off" | "work_outline" | "drag_indicator" | "horizontal_split" | "label_important_outline" | "vertical_split" | "voice_over_off" | "segment" | "contact_support" | "compress" | "filter_list_alt" | "expand" | "edit_off" | "10k" | "10mp" | "11mp" | "12mp" | "13mp" | "14mp" | "15mp" | "16mp" | "17mp" | "18mp" | "19mp" | "1k" | "1k_plus" | "20mp" | "21mp" | "22mp" | "23mp" | "24mp" | "2k" | "2k_plus" | "2mp" | "3k" | "3k_plus" | "3mp" | "4k_plus" | "4mp" | "5k" | "5k_plus" | "5mp" | "6k" | "6k_plus" | "6mp" | "7k" | "7k_plus" | "7mp" | "8k" | "8k_plus" | "8mp" | "9k" | "9k_plus" | "9mp" | "account_tree" | "add_chart" | "add_ic_call" | "add_moderator" | "all_inbox" | "approval" | "assistant_direction" | "assistant_navigation" | "bookmarks" | "bus_alert" | "cases" | "circle_notifications" | "closed_caption_off" | "connected_tv" | "dangerous" | "dashboard_customize" | "desktop_access_disabled" | "drive_file_move_outline" | "drive_file_rename_outline" | "drive_folder_upload" | "duo" | "explore_off" | "file_download_done" | "rtt" | "grid_view" | "hail" | "home_filled" | "imagesearch_roller" | "label_off" | "library_add_check" | "logout" | "margin" | "mark_as_unread" | "menu_open" | "mp" | "offline_share" | "padding" | "panorama_photosphere" | "panorama_photosphere_select" | "person_add_disabled" | "phone_disabled" | "phone_enabled" | "pivot_table_chart" | "print_disabled" | "railway_alert" | "recommend" | "remove_done" | "remove_moderator" | "repeat_on" | "repeat_one_on" | "replay_circle_filled" | "reset_tv" | "sd" | "shield" | "shuffle_on" | "speed" | "stacked_bar_chart" | "stream" | "swipe" | "switch_account" | "tag" | "thumb_down_off_alt" | "thumb_up_off_alt" | "toggle_off" | "toggle_on" | "two_wheeler" | "upload_file" | "view_in_ar" | "waterfall_chart" | "wb_shade" | "wb_twighlight" | "home_work" | "schedule_send" | "bolt" | "send_and_archive" | "workspaces_filled" | "file_present" | "workspaces_outline" | "fit_screen" | "saved_search" | "storefront" | "amp_stories" | "dynamic_feed" | "euro" | "height" | "policy" | "sync_alt" | "menu_book" | "emoji_flags" | "emoji_food_beverage" | "emoji_nature" | "emoji_people" | "emoji_symbols" | "emoji_transportation" | "post_add" | "people_alt" | "emoji_emotions" | "emoji_events" | "emoji_objects" | "sports_basketball" | "sports_cricket" | "sports_esports" | "sports_football" | "sports_golf" | "sports_hockey" | "sports_mma" | "sports_motorsports" | "sports_rugby" | "sports_soccer" | "sports" | "sports_volleyball" | "sports_tennis" | "sports_handball" | "sports_kabaddi" | "eco" | "museum" | "flip_camera_android" | "flip_camera_ios" | "cancel_schedule_send" | "apartment" | "bathtub" | "deck" | "fireplace" | "house" | "king_bed" | "nights_stay" | "outdoor_grill" | "single_bed" | "square_foot" | "double_arrow" | "sports_baseball" | "attractions" | "bakery_dining" | "breakfast_dining" | "car_rental" | "car_repair" | "dinner_dining" | "dry_cleaning" | "hardware" | "liquor" | "lunch_dining" | "nightlife" | "park" | "ramen_dining" | "celebration" | "theater_comedy" | "badge" | "festival" | "icecream" | "volunteer_activism" | "contactless" | "delivery_dining" | "brunch_dining" | "takeout_dining" | "ac_unit" | "airport_shuttle" | "all_inclusive" | "beach_access" | "business_center" | "casino" | "child_care" | "child_friendly" | "fitness_center" | "golf_course" | "hot_tub" | "kitchen" | "pool" | "room_service" | "smoke_free" | "smoking_rooms" | "spa" | "no_meeting_room" | "meeting_room" | "goat" | "5g" | "ad_units" | "add_business" | "add_location_alt" | "add_road" | "add_to_drive" | "addchart" | "admin_panel_settings" | "agriculture" | "alt_route" | "analytics" | "anchor" | "animation" | "api" | "app_blocking" | "app_registration" | "app_settings_alt" | "architecture" | "arrow_circle_down" | "arrow_circle_up" | "article" | "attach_email" | "auto_awesome" | "auto_awesome_mosaic" | "auto_awesome_motion" | "auto_delete" | "auto_fix_high" | "auto_fix_normal" | "auto_fix_off" | "auto_stories" | "baby_changing_station" | "backpack" | "backup_table" | "batch_prediction" | "bedtime" | "bento" | "bike_scooter" | "biotech" | "block_flipped" | "browser_not_supported" | "build_circle" | "calculate" | "campaign" | "carpenter" | "cast_for_education" | "charging_station" | "checkroom" | "circle" | "cleaning_services" | "close_fullscreen" | "closed_caption_disabled" | "comment_bank" | "construction" | "corporate_fare" | "countertops" | "design_services" | "directions_off" | "dirty_lens" | "do_not_step" | "do_not_touch" | "domain_verification" | "drive_file_move" | "dry" | "dynamic_form" | "east" | "edit_road" | "electric_bike" | "electric_car" | "electric_moped" | "electric_rickshaw" | "electric_scooter" | "electrical_services" | "elevator" | "engineering" | "escalator" | "escalator_warning" | "face_retouching_natural" | "fact_check" | "family_restroom" | "fence" | "filter_alt" | "fire_extinguisher" | "fire_hydrant" | "flaky" | "food_bank" | "forward_to_inbox" | "foundation" | "grading" | "grass" | "handyman" | "hdr_enhanced_select" | "hearing_disabled" | "help_center" | "highlight_alt" | "history_edu" | "history_toggle_off" | "home_repair_service" | "horizontal_rule" | "hourglass_bottom" | "hourglass_disabled" | "hourglass_top" | "house_siding" | "hvac" | "image_not_supported" | "insights" | "integration_instructions" | "ios_share" | "legend_toggle" | "local_fire_department" | "local_police" | "location_pin" | "lock_clock" | "login" | "maps_ugc" | "mark_chat_read" | "mark_chat_unread" | "mark_email_read" | "mark_email_unread" | "mediation" | "medical_services" | "mic_external_off" | "mic_external_on" | "microwave" | "military_tech" | "miscellaneous_services" | "model_training" | "monitor" | "moped" | "more_time" | "motion_photos_off" | "motion_photos_on" | "motion_photos_paused" | "motion_photos_pause" | "multiple_stop" | "nat" | "near_me_disabled" | "next_plan" | "night_shelter" | "nightlight_round" | "no_cell" | "no_drinks" | "no_flash" | "no_food" | "no_meals" | "no_meals_ouline" | "no_photography" | "no_stroller" | "no_transfer" | "north" | "north_east" | "north_west" | "not_accessible" | "not_started" | "online_prediction" | "open_in_full" | "outbox" | "outgoing_mail" | "outlet" | "panorama_horizontal_select" | "panorama_vertical_select" | "panorama_wide_angle_select" | "payments" | "pedal_bike" | "pending" | "pending_actions" | "person_add_alt" | "person_add_alt_1" | "person_remove" | "person_remove_alt_1" | "person_search" | "pest_control" | "pest_control_rodent" | "photo_camera_back" | "photo_camera_front" | "plagiarism" | "play_disabled" | "plumbing" | "point_of_sale" | "preview" | "privacy_tip" | "psychology" | "public_off" | "push_pin" | "qr_code" | "qr_code_scanner" | "quickreply" | "read_more" | "receipt_long" | "request_quote" | "rice_bowl" | "roofing" | "room_preferences" | "rule" | "rule_folder" | "run_circle" | "science" | "screen_search_desktop" | "search_off" | "self_improvement" | "sensor_door" | "sensor_window" | "set_meal" | "shopping_bag" | "signal_cellular_0_bar" | "signal_wifi_0_bar" | "smart_button" | "snippet_folder" | "soap" | "source" | "topic" | "south" | "south_east" | "south_west" | "sports_bar" | "stairs" | "star_rate" | "sticky_note_2" | "stop_circle" | "stroller" | "subscript" | "subtitles_off" | "superscript" | "support" | "support_agent" | "switch_left" | "switch_right" | "table_rows" | "table_view" | "tapas" | "taxi_alert" | "text_snippet" | "tour" | "tty" | "umbrella" | "upgrade" | "verified" | "video_settings" | "view_sidebar" | "wash" | "water_damage" | "west" | "wheelchair_pickup" | "wifi_calling" | "wifi_protected_setup" | "wine_bar" | "wrong_location" | "wysiwyg" | "leaderboard" | "6_ft_apart" | "book_online" | "clean_hands" | "connect_without_contact" | "coronavirus" | "elderly" | "follow_the_signs" | "leave_bags_at_home" | "masks" | "reduce_capacity" | "sanitizer" | "send_to_mobile" | "sick" | "add_task" | "contact_page" | "disabled_by_default" | "facebook" | "groups" | "luggage" | "no_backpack" | "no_luggage" | "outbond" | "published_with_changes" | "request_page" | "stacked_line_chart" | "unpublished" | "align_horizontal_center" | "align_horizontal_left" | "align_horizontal_right" | "align_vertical_bottom" | "align_vertical_center" | "align_vertical_top" | "horizontal_distribute" | "qr_code_2" | "update_disabled" | "vertical_distribute";
|
|
8
31
|
[key: string]: any;
|
|
9
32
|
}
|
|
33
|
+
export declare const Icon: React.FC<Props>;
|
|
10
34
|
export {};
|
package/dist/esm/icon/index.js
CHANGED
|
@@ -1,41 +1,22 @@
|
|
|
1
1
|
import { __assign, __rest } from "tslib";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import icons from "./icons.json";
|
|
4
|
+
import { isDev } from "../_lib/baseFunctions";
|
|
5
|
+
var customIcons = {};
|
|
6
|
+
// Root klasörde customIcons.json varsa yükle
|
|
7
|
+
try {
|
|
8
|
+
customIcons = require(process.cwd() + "/customIcons.json");
|
|
9
|
+
isDev && console.log("customIcons.json yüklendi:", Object.keys(customIcons));
|
|
10
|
+
}
|
|
11
|
+
catch (err) {
|
|
12
|
+
isDev && console.log("customIcons.json bulunamadı, sadece default ikonlar kullanılacak.");
|
|
13
|
+
}
|
|
14
|
+
// Default ikonlar + custom ikonlar
|
|
15
|
+
export var iconMap = __assign(__assign({}, icons), customIcons);
|
|
16
|
+
// https://fonts.google.com/icons adresinden ikonu seçtikten sonra kopyalayalıp alıyoruz. Icon adı da en atta hangisiyse onu ekleyelim, isimler karışmasın
|
|
3
17
|
export var Icon = function (_a) {
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
if (iconOzel) {
|
|
10
|
-
var findIcon = ozelIkonlar.filter(function (key) { return key["name"] === iconOzel; });
|
|
11
|
-
if (findIcon.length > 0) {
|
|
12
|
-
var icon = findIcon[0];
|
|
13
|
-
if (icon.full) {
|
|
14
|
-
return (_jsx("svg", __assign({ style: __assign(__assign({ fill: "currentcolor" }, ortakStyle), style), className: className }, icon.attr, other, { dangerouslySetInnerHTML: { __html: icon.full } })));
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
return (_jsx("svg", { style: __assign(__assign({ fill: "currentcolor" }, ortakStyle), style), className: className, viewBox: icon.viewBox, children: _jsx("path", { fill: icon.fill || "currentColor", d: icon.path }) }));
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return null;
|
|
18
|
+
var name = _a.name, fontSize = _a.fontSize, color = _a.color, className = _a.className, style = _a.style, other = __rest(_a, ["name", "fontSize", "color", "className", "style"]);
|
|
19
|
+
var defaultStyle = __assign({ userSelect: "none", width: "1em", height: "1em", display: "inline-block", verticalAlign: "middle", fontSize: fontSize || "1.5rem", color: color || "inherit", flexShrink: 0 }, style);
|
|
20
|
+
var svgString = iconMap[name];
|
|
21
|
+
return (_jsx("span", __assign({ className: className, style: __assign(__assign({}, defaultStyle), style) }, other, { children: (svgString && (_jsx("svg", { viewBox: svgString.viewBox, fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: _jsx("g", { dangerouslySetInnerHTML: { __html: svgString.content } }) }))) || _jsx("span", { children: "\u26A0\uFE0F" }) })));
|
|
22
22
|
};
|
|
23
|
-
var ozelIkonlar = [
|
|
24
|
-
{
|
|
25
|
-
name: "word",
|
|
26
|
-
path: "M31.999 4.977v22.063c0 0.188-0.067 0.34-0.199 0.461-0.135 0.125-0.295 0.184-0.48 0.184h-11.412v-3.060h9.309v-1.393h-9.317v-1.705h9.309v-1.392h-9.303v-1.72h9.307v-1.376h-9.307v-1.724h9.307v-1.392h-9.307v-1.705h9.307v-1.391h-9.307v-1.74h9.307v-1.325h-9.307v-3.457h11.416c0.199 0 0.36 0.064 0.477 0.199 0.14 0.132 0.2 0.293 0.199 0.475zM18.2 0.855v30.296l-18.2-3.149v-23.912l18.2-3.24zM15.453 9.799l-2.279 0.14-1.461 9.047h-0.033c-0.072-0.428-0.34-1.927-0.82-4.489l-0.852-4.351-2.139 0.107-0.856 4.244c-0.5 2.472-0.779 3.911-0.852 4.315h-0.020l-1.3-8.333-1.96 0.104 2.1 10.511 2.179 0.14 0.82-4.091c0.48-2.4 0.76-3.795 0.82-4.176h0.060c0.081 0.407 0.341 1.832 0.82 4.28l0.82 4.211 2.36 0.14 2.64-11.8z",
|
|
27
|
-
viewBox: "0 0 32 32",
|
|
28
|
-
fill: "#2b579a"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
name: "excel",
|
|
32
|
-
path: "M31.404 4.136h-10.72v1.984h3.16v3.139h-3.16v1h3.16v3.143h-3.16v1.028h3.16v2.972h-3.16v1.191h3.16v2.979h-3.16v1.191h3.16v2.996h-3.16v2.185h10.72c0.169-0.051 0.311-0.251 0.424-0.597 0.113-0.349 0.172-0.633 0.172-0.848v-21.999c0-0.171-0.059-0.273-0.172-0.309-0.113-0.035-0.255-0.053-0.424-0.053zM30.013 25.755h-5.143v-2.993h5.143v2.996zM30.013 21.571h-5.143v-2.98h5.143zM30.013 17.4h-5.143v-2.959h5.143v2.961zM30.013 13.4h-5.143v-3.139h5.143v3.14zM30.013 9.241h-5.143v-3.12h5.143v3.14zM0 3.641v24.801l18.88 3.265v-31.416l-18.88 3.36zM11.191 22.403c-0.072-0.195-0.411-1.021-1.011-2.484-0.599-1.461-0.96-2.312-1.065-2.555h-0.033l-2.025 4.82-2.707-0.183 3.211-6-2.94-6 2.76-0.145 1.824 4.695h0.036l2.060-4.908 2.852-0.18-3.396 6.493 3.5 6.624-3.065-0.18z",
|
|
33
|
-
viewBox: "0 0 32 32",
|
|
34
|
-
fill: "#217346"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
name: "tl",
|
|
38
|
-
path: "M18 13c0 6.062-4.937 11-11 11h-2.5c-0.281 0-0.5-0.219-0.5-0.5v-9.547l-3.359 1.031c-0.047 0.016-0.094 0.016-0.141 0.016-0.109 0-0.203-0.031-0.297-0.094-0.125-0.094-0.203-0.25-0.203-0.406v-2c0-0.219 0.141-0.406 0.359-0.484l3.641-1.109v-1.453l-3.359 1.031c-0.047 0.016-0.094 0.016-0.141 0.016-0.109 0-0.203-0.031-0.297-0.094-0.125-0.094-0.203-0.25-0.203-0.406v-2c0-0.219 0.141-0.406 0.359-0.484l3.641-1.109v-3.906c0-0.281 0.219-0.5 0.5-0.5h2.5c0.281 0 0.5 0.219 0.5 0.5v2.828l5.859-1.813c0.141-0.047 0.313-0.016 0.438 0.078s0.203 0.25 0.203 0.406v2c0 0.219-0.141 0.406-0.359 0.484l-6.141 1.891v1.453l5.859-1.813c0.141-0.047 0.313-0.016 0.438 0.078s0.203 0.25 0.203 0.406v2c0 0.219-0.141 0.406-0.359 0.484l-6.141 1.891v7.609c3.906-0.266 7-3.516 7-7.484 0-0.281 0.219-0.5 0.5-0.5h2.5c0.281 0 0.5 0.219 0.5 0.5z",
|
|
39
|
-
viewBox: "0 0 18 28"
|
|
40
|
-
}
|
|
41
|
-
];
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
export * from "./_lib/baseFunctions";
|
|
1
2
|
export * from "./alert";
|
|
3
|
+
export * from "./box";
|
|
2
4
|
export * from "./datetime";
|
|
5
|
+
export * from "./form";
|
|
6
|
+
export * from "./grid";
|
|
3
7
|
export * from "./icon";
|
|
8
|
+
export * from "./modal";
|
|
9
|
+
export * from "./popover";
|
|
10
|
+
export * from "./tooltip";
|
package/dist/esm/index.js
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
export * from "./_lib/baseFunctions";
|
|
1
2
|
export * from "./alert";
|
|
3
|
+
export * from "./box";
|
|
2
4
|
export * from "./datetime";
|
|
5
|
+
export * from "./form";
|
|
6
|
+
export * from "./grid";
|
|
3
7
|
export * from "./icon";
|
|
8
|
+
export * from "./modal";
|
|
9
|
+
export * from "./popover";
|
|
10
|
+
export * from "./tooltip";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2023
|
|
3
|
+
* @author: izzetseydaoglu
|
|
4
|
+
* @last-modified: 9.02.2024 06:07
|
|
5
|
+
*/
|
|
6
|
+
import React from "react";
|
|
7
|
+
interface Props {
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
open: boolean;
|
|
10
|
+
close?: Function;
|
|
11
|
+
keepMounted?: boolean;
|
|
12
|
+
hideBackdrop?: boolean;
|
|
13
|
+
hideEsc?: boolean;
|
|
14
|
+
hideCloseButton?: boolean;
|
|
15
|
+
fullScreen?: boolean;
|
|
16
|
+
modalStyle?: React.CSSProperties;
|
|
17
|
+
backdropStyle?: React.CSSProperties;
|
|
18
|
+
vertialAlign?: "flex-start" | "center" | "flex-end";
|
|
19
|
+
horizontalAlign?: "flex-start" | "center" | "flex-end";
|
|
20
|
+
refModal?: any;
|
|
21
|
+
}
|
|
22
|
+
export declare const Modal: React.NamedExoticComponent<Props>;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { __assign } from "tslib";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* Copyright (c) 2023
|
|
5
|
+
* @author: izzetseydaoglu
|
|
6
|
+
* @last-modified: 9.02.2024 06:07
|
|
7
|
+
*/
|
|
8
|
+
import { memo, useEffect, useRef, useState } from "react";
|
|
9
|
+
import ReactDOM from "react-dom";
|
|
10
|
+
import styles from "./index.module.css";
|
|
11
|
+
export var Modal = memo(function MemoFunction(_a) {
|
|
12
|
+
var _b = _a.refModal, refModal = _b === void 0 ? null : _b, children = _a.children, _c = _a.open, open = _c === void 0 ? false : _c, close = _a.close, _d = _a.keepMounted, keepMounted = _d === void 0 ? false : _d, _e = _a.fullScreen, fullScreen = _e === void 0 ? false : _e, _f = _a.hideBackdrop, hideBackdrop = _f === void 0 ? true : _f, _g = _a.hideEsc, hideEsc = _g === void 0 ? false : _g, _h = _a.hideCloseButton, hideCloseButton = _h === void 0 ? false : _h, modalStyle = _a.modalStyle, backdropStyle = _a.backdropStyle, _j = _a.vertialAlign, vertialAlign = _j === void 0 ? "center" : _j, _k = _a.horizontalAlign, horizontalAlign = _k === void 0 ? "center" : _k;
|
|
13
|
+
var _l = useState(null), modalDiv = _l[0], setModalDiv = _l[1];
|
|
14
|
+
var ref = useRef(null);
|
|
15
|
+
useEffect(function () {
|
|
16
|
+
if (refModal)
|
|
17
|
+
refModal.current = ref.current;
|
|
18
|
+
}, [ref.current]);
|
|
19
|
+
var onClose = function () {
|
|
20
|
+
if (close)
|
|
21
|
+
close();
|
|
22
|
+
};
|
|
23
|
+
var checkHideBackDrop = function (e) {
|
|
24
|
+
if (open && ref.current && !ref.current.contains(e.target))
|
|
25
|
+
onClose();
|
|
26
|
+
};
|
|
27
|
+
var checkESC = function (e) {
|
|
28
|
+
if (e.keyCode === 27 || e.key === "Escape" || e.code === "Escape")
|
|
29
|
+
onClose();
|
|
30
|
+
};
|
|
31
|
+
useEffect(function () {
|
|
32
|
+
if (open) {
|
|
33
|
+
if (hideBackdrop)
|
|
34
|
+
window.addEventListener("mousedown", checkHideBackDrop);
|
|
35
|
+
if (hideEsc)
|
|
36
|
+
window.addEventListener("keydown", checkESC);
|
|
37
|
+
}
|
|
38
|
+
return function () {
|
|
39
|
+
if (hideBackdrop)
|
|
40
|
+
window.removeEventListener("mousedown", checkHideBackDrop);
|
|
41
|
+
if (hideEsc)
|
|
42
|
+
window.removeEventListener("keydown", checkESC);
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
useEffect(function () {
|
|
46
|
+
if (!modalDiv) {
|
|
47
|
+
var modalDivCheck = document.getElementById("smodal");
|
|
48
|
+
if (modalDivCheck) {
|
|
49
|
+
setModalDiv(modalDivCheck);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
var div = document.createElement("div");
|
|
53
|
+
div.setAttribute("id", "smodal");
|
|
54
|
+
document.body.appendChild(div);
|
|
55
|
+
setModalDiv(div);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return function () {
|
|
59
|
+
onClose();
|
|
60
|
+
};
|
|
61
|
+
}, []);
|
|
62
|
+
if ((!keepMounted && !open) || typeof window === "undefined")
|
|
63
|
+
return null;
|
|
64
|
+
var Component = (_jsx("div", { className: "".concat(styles.backdrop, " ").concat(open ? styles.backdrop_open : ""), style: __assign({ alignItems: vertialAlign, justifyContent: horizontalAlign }, backdropStyle), children: _jsxs("div", { ref: ref, className: "".concat(styles.modal, " ").concat(fullScreen ? styles.fullscreen : ""), style: modalStyle, children: [!hideCloseButton && (_jsx("div", { className: styles.close_fixed, children: _jsx("div", { className: styles.close, onClick: onClose, children: "\u2715" }) })), children] }) }));
|
|
65
|
+
return modalDiv ? ReactDOM.createPortal(Component, modalDiv) : null;
|
|
66
|
+
});
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
.backdrop {
|
|
2
|
+
position: fixed;
|
|
3
|
+
z-index: 1300;
|
|
4
|
+
inset: 0;
|
|
5
|
+
display: none;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
background: rgba(0, 0, 0, 0.23);
|
|
9
|
+
width: 100%;
|
|
10
|
+
height: 100%;
|
|
11
|
+
outline: none;
|
|
12
|
+
}
|
|
13
|
+
.backdrop_open {
|
|
14
|
+
display: flex !important;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.modal {
|
|
18
|
+
position: relative;
|
|
19
|
+
min-width: 200px;
|
|
20
|
+
max-width: 90%;
|
|
21
|
+
max-height: calc(100% - 64px);
|
|
22
|
+
overflow-x: hidden;
|
|
23
|
+
border-radius: 8px;
|
|
24
|
+
background: transparent;
|
|
25
|
+
box-shadow: rgb(0 0 0 / 32%) 0 4px 8px, rgb(0 0 0 / 40%) 0 8px 40px;
|
|
26
|
+
margin: 15px;
|
|
27
|
+
padding: 0;
|
|
28
|
+
z-index: 1;
|
|
29
|
+
outline: none;
|
|
30
|
+
}
|
|
31
|
+
.fullscreen {
|
|
32
|
+
width: 100vw;
|
|
33
|
+
max-width: 100vw;
|
|
34
|
+
height: 100vh;
|
|
35
|
+
max-height: 100vh;
|
|
36
|
+
border-radius: 0;
|
|
37
|
+
margin: 0;
|
|
38
|
+
}
|
|
39
|
+
.close_fixed {
|
|
40
|
+
position: absolute;
|
|
41
|
+
top: 0;
|
|
42
|
+
right: 1px;
|
|
43
|
+
z-index: 1000;
|
|
44
|
+
text-align: right;
|
|
45
|
+
border-radius: inherit;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.close {
|
|
49
|
+
position: fixed;
|
|
50
|
+
background: #e7e7e7;
|
|
51
|
+
padding: 0 7px;
|
|
52
|
+
font-size: 11px;
|
|
53
|
+
transform: translateX(-100%);
|
|
54
|
+
border-radius: inherit;
|
|
55
|
+
border-top-left-radius: 0;
|
|
56
|
+
border-bottom-right-radius: 0;
|
|
57
|
+
border-bottom-left-radius: 50%;
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
}
|
|
60
|
+
.close:hover {
|
|
61
|
+
zoom: 1.3;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.sbox_header {
|
|
65
|
+
position: sticky;
|
|
66
|
+
top: 0;
|
|
67
|
+
z-index: 10;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.sbox_footer {
|
|
71
|
+
position: sticky;
|
|
72
|
+
bottom: 0;
|
|
73
|
+
z-index: 10;
|
|
74
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type position = "top" | "bottom" | "left" | "right";
|
|
3
|
+
interface Props {
|
|
4
|
+
Component: React.ReactElement;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
position?: position;
|
|
7
|
+
removeWhenClickInside?: boolean;
|
|
8
|
+
arrow?: boolean;
|
|
9
|
+
distance?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare const Popover: React.NamedExoticComponent<Props>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { __assign, __rest } from "tslib";
|
|
2
|
+
import React, { memo, useEffect } from "react";
|
|
3
|
+
import { createRoot } from "react-dom/client";
|
|
4
|
+
export var Popover = memo(function MemoFunction(_a) {
|
|
5
|
+
// const refChildren = useRef<any>(null);
|
|
6
|
+
var children = _a.children, Component = _a.Component, _b = _a.position, position = _b === void 0 ? "top" : _b, _c = _a.arrow, arrow = _c === void 0 ? false : _c, _d = _a.distance, distance = _d === void 0 ? 5 : _d, _e = _a.removeWhenClickInside, removeWhenClickInside = _e === void 0 ? false : _e, other = __rest(_a, ["children", "Component", "position", "arrow", "distance", "removeWhenClickInside"]);
|
|
7
|
+
useEffect(function () {
|
|
8
|
+
if (typeof window === "undefined")
|
|
9
|
+
return null;
|
|
10
|
+
var cssCheck = document.getElementsByClassName("spopover_css")[0];
|
|
11
|
+
if (!cssCheck) {
|
|
12
|
+
var head = document.getElementsByTagName("head")[0];
|
|
13
|
+
var s = document.createElement("style");
|
|
14
|
+
s.setAttribute("type", "text/css");
|
|
15
|
+
s.classList.add("spopover_css");
|
|
16
|
+
s.appendChild(document.createTextNode(popoverCss));
|
|
17
|
+
head.appendChild(s);
|
|
18
|
+
}
|
|
19
|
+
return function () {
|
|
20
|
+
popoverSil();
|
|
21
|
+
};
|
|
22
|
+
}, []);
|
|
23
|
+
var checkHideBackDrop = function (e) {
|
|
24
|
+
var spopover = document.querySelector(".spopover");
|
|
25
|
+
if (spopover && !spopover.contains(e.target))
|
|
26
|
+
popoverSil();
|
|
27
|
+
};
|
|
28
|
+
var popoverEkle = function (e) {
|
|
29
|
+
popoverSil();
|
|
30
|
+
var popover = document.createElement("div");
|
|
31
|
+
popover.classList.add("spopover");
|
|
32
|
+
document.body.appendChild(popover);
|
|
33
|
+
// ReactDOM.render(children, popover)
|
|
34
|
+
var root = createRoot(popover); // createRoot(container!) if you use TypeScript
|
|
35
|
+
root.render(children);
|
|
36
|
+
var target = e.currentTarget;
|
|
37
|
+
setTimeout(function () {
|
|
38
|
+
popoverPosition({ target: target, position: position });
|
|
39
|
+
}, 100);
|
|
40
|
+
window.addEventListener("mousedown", checkHideBackDrop);
|
|
41
|
+
if (removeWhenClickInside)
|
|
42
|
+
popover.addEventListener("mouseup", popoverGecikmeliSil);
|
|
43
|
+
document.body.classList.add("spopover_open");
|
|
44
|
+
};
|
|
45
|
+
var popoverSil = function () {
|
|
46
|
+
var check = document.body.getElementsByClassName("spopover")[0];
|
|
47
|
+
if (check) {
|
|
48
|
+
if (removeWhenClickInside)
|
|
49
|
+
check.removeEventListener("mouseup", popoverGecikmeliSil);
|
|
50
|
+
check.remove();
|
|
51
|
+
}
|
|
52
|
+
window.removeEventListener("mousedown", checkHideBackDrop);
|
|
53
|
+
document.body.classList.remove("spopover_open");
|
|
54
|
+
};
|
|
55
|
+
var popoverGecikmeliSil = function () { return setTimeout(function () { return popoverSil(); }, 100); };
|
|
56
|
+
var popoverPosition = function (_a) {
|
|
57
|
+
var target = _a.target, position = _a.position;
|
|
58
|
+
var popover = document.body.getElementsByClassName("spopover")[0];
|
|
59
|
+
if (popover) {
|
|
60
|
+
var arrowMargin = arrow ? 5 : 0;
|
|
61
|
+
var margin = distance + arrowMargin;
|
|
62
|
+
if (arrow)
|
|
63
|
+
popover.classList.add("arrow");
|
|
64
|
+
var targetPosition = target.getBoundingClientRect();
|
|
65
|
+
var popoverPosition_1 = popover.getBoundingClientRect();
|
|
66
|
+
var style = [];
|
|
67
|
+
if (position === "top" || position === "bottom") {
|
|
68
|
+
if (position === "top") {
|
|
69
|
+
if (targetPosition.top - popoverPosition_1.height - margin < 0) {
|
|
70
|
+
style.push("top:" + (targetPosition.bottom + margin) + "px");
|
|
71
|
+
popover.classList.add("bottom");
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
style.push("top:" + (targetPosition.top - popoverPosition_1.height - margin) + "px");
|
|
75
|
+
popover.classList.add("top");
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (position === "bottom") {
|
|
79
|
+
if (targetPosition.bottom + popoverPosition_1.height + margin > window.innerHeight) {
|
|
80
|
+
style.push("top:" + (targetPosition.top - popoverPosition_1.height - margin) + "px");
|
|
81
|
+
popover.classList.add("top");
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
style.push("top:" + (targetPosition.bottom + margin) + "px");
|
|
85
|
+
popover.classList.add("bottom");
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (targetPosition.left + targetPosition.width / 2 - popoverPosition_1.width / 2 < 0) {
|
|
89
|
+
style.push("left:2px");
|
|
90
|
+
popover.classList.add("start");
|
|
91
|
+
}
|
|
92
|
+
else if (targetPosition.left + targetPosition.width / 2 + popoverPosition_1.width > window.innerWidth) {
|
|
93
|
+
style.push("right:2px");
|
|
94
|
+
popover.classList.add("end");
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
style.push("left:" + (targetPosition.left + targetPosition.width / 2) + "px");
|
|
98
|
+
style.push("transform:translate(-50%,0)");
|
|
99
|
+
popover.classList.add("center");
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
if (position === "left" || position === "right") {
|
|
103
|
+
if (position === "left") {
|
|
104
|
+
if (targetPosition.left - popoverPosition_1.width - margin < 0) {
|
|
105
|
+
style.push("left:" + (targetPosition.right + margin) + "px");
|
|
106
|
+
popover.classList.add("right");
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
style.push("left:" + (targetPosition.left - popoverPosition_1.width - margin) + "px");
|
|
110
|
+
popover.classList.add("left");
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if (position === "right") {
|
|
114
|
+
if (targetPosition.left + targetPosition.width / 2 + popoverPosition_1.width + margin > window.innerWidth) {
|
|
115
|
+
style.push("left:" + (targetPosition.left - popoverPosition_1.width - margin) + "px");
|
|
116
|
+
popover.classList.add("left");
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
style.push("left:" + (targetPosition.right + margin) + "px");
|
|
120
|
+
popover.classList.add("right");
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
if (targetPosition.top + targetPosition.height / 2 - popoverPosition_1.height / 2 < 0) {
|
|
124
|
+
style.push("top:2px");
|
|
125
|
+
popover.classList.add("start");
|
|
126
|
+
}
|
|
127
|
+
else if (targetPosition.top + targetPosition.height / 2 + popoverPosition_1.height / 2 > window.innerHeight) {
|
|
128
|
+
style.push("bottom:2px");
|
|
129
|
+
popover.classList.add("end");
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
style.push("top:" + (targetPosition.top + targetPosition.height / 2) + "px");
|
|
133
|
+
style.push("transform:translate(0,-50%)");
|
|
134
|
+
popover.classList.add("center");
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
popover.setAttribute("style", style.join(";"));
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
return React.cloneElement(Component, __assign({ onClick: popoverEkle }, other));
|
|
141
|
+
});
|
|
142
|
+
var popoverCss = "\n.spopover {\n position: fixed;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10000;\n}\n\n.spopover.arrow:after {\n content: \"\";\n position: absolute;\n margin-left: -5px;\n border-width: 5px;\n border-style: solid;\n}\n\n.spopover.arrow.top:after {\n top: 100%;\n border-color: #757575 transparent transparent transparent;\n}\n\n.spopover.arrow.top.start:after { left: 15px;}\n\n.spopover.arrow.top.center:after { left: 50%;}\n\n.spopover.arrow.top.end:after { right: 15px;}\n\n\n.spopover.arrow.bottom:after {\n bottom: 100%;\n border-color: transparent transparent #757575 transparent;\n}\n\n.spopover.arrow.bottom.start:after { left: 15px;}\n\n.spopover.arrow.bottom.center:after { left: 50%;}\n\n.spopover.bottom.end:after { right: 15px;}\n\n.spopover.arrow.left:after {\n margin-left: -1px;\n left: 100%;\n border-color: transparent transparent transparent #757575;\n}\n\n.spopover.arrow.left.start:after { top: 5px;}\n\n.spopover.arrow.left.center:after { top: 50%; margin-top: -5px;}\n\n.spopover.arrow.left.end:after { bottom: 15px;}\n\n.spopover.arrow.right:after {\n margin-right: -1px;\n right: 100%;\n border-color: transparent #757575 transparent transparent;\n}\n\n.spopover.arrow.right.start:after { top: 5px;}\n\n.spopover.arrow.right.center:after { top: 50%; margin-top: -5px;}\n\n.spopover.arrow.right.end:after { bottom: 15px;}\n";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React, { ReactElement } from "react";
|
|
2
|
+
export type typeTooltipPosition = "top" | "bottom" | "left" | "right";
|
|
3
|
+
interface Props {
|
|
4
|
+
children: ReactElement;
|
|
5
|
+
title: string;
|
|
6
|
+
position?: typeTooltipPosition;
|
|
7
|
+
arrow?: boolean;
|
|
8
|
+
distance?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const Tooltip: React.NamedExoticComponent<Props>;
|
|
11
|
+
export {};
|