@thairath/tr-design-system 0.2.8 → 0.2.10

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/dist/index.esm.js CHANGED
@@ -6169,7 +6169,8 @@ var TRO_FooterItemGroup = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "
6169
6169
  // footer.tsx
6170
6170
  var TROFooter = _ref => {
6171
6171
  var {
6172
- dataFile = '/data/menu.json'
6172
+ dataFile = '/data/menu.json',
6173
+ loading
6173
6174
  } = _ref;
6174
6175
  var [data, setData] = useState(null);
6175
6176
  var [error, setError] = useState(false);
@@ -6179,7 +6180,7 @@ var TROFooter = _ref => {
6179
6180
  setError(true);
6180
6181
  });
6181
6182
  }, []);
6182
- if (!data) return /*#__PURE__*/React.createElement("div", null, "Loading...");
6183
+ if (!data) return /*#__PURE__*/React.createElement("div", null, loading);
6183
6184
  var firstMenu = data && data.naviMenu && data.naviMenu[0] || undefined;
6184
6185
  var sportsMenu = data.naviMenu[5];
6185
6186
  var shopping = data.naviMenu[10];
@@ -6651,14 +6652,18 @@ var TROENHeader = _ref => {
6651
6652
  return () => window.removeEventListener('scroll', handleScroll);
6652
6653
  }, [isMobileView]);
6653
6654
  if (!data) return /*#__PURE__*/React.createElement("div", null, loading);
6654
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TROEN_Header, null, /*#__PURE__*/React.createElement(TROEN_HeaderTOP, null, /*#__PURE__*/React.createElement(TROEN_WrapIcon, null, /*#__PURE__*/React.createElement(Logo, {
6655
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TROEN_Header, {
6656
+ className: "troen--header"
6657
+ }, /*#__PURE__*/React.createElement(TROEN_HeaderTOP, null, /*#__PURE__*/React.createElement(TROEN_WrapIcon, null, /*#__PURE__*/React.createElement(Logo, {
6655
6658
  fill: logoColor,
6656
6659
  mode: "auto-width",
6657
6660
  name: "tr_online_en",
6658
6661
  size: "24"
6659
6662
  })), isMobileView && /*#__PURE__*/React.createElement(HamburgerButton, {
6660
6663
  onClick: () => setIsOpen(!isOpen)
6661
- }))), /*#__PURE__*/React.createElement(TROEN_NavigatorBar, null, !isMobileView && /*#__PURE__*/React.createElement(TROEN_WrapIcon, {
6664
+ }))), /*#__PURE__*/React.createElement(TROEN_NavigatorBar, {
6665
+ className: "troen--navigator-bar"
6666
+ }, !isMobileView && /*#__PURE__*/React.createElement(TROEN_WrapIcon, {
6662
6667
  className: "hide ".concat(showStickyLogo ? 'show' : '')
6663
6668
  }, /*#__PURE__*/React.createElement(Logo, {
6664
6669
  fill: "Color",
@@ -6678,8 +6683,11 @@ var TROENHeader = _ref => {
6678
6683
  isOpen: isOpen,
6679
6684
  onClick: () => setIsOpen(false)
6680
6685
  }), /*#__PURE__*/React.createElement(TROEN_SlideNavigatore, {
6681
- isOpen: isOpen
6682
- }, /*#__PURE__*/React.createElement(TROEN_SlidebarTop, null, /*#__PURE__*/React.createElement(TROEN_WrapIcon, {
6686
+ isOpen: isOpen,
6687
+ className: "troen--slide-navigator"
6688
+ }, /*#__PURE__*/React.createElement(TROEN_SlidebarTop, {
6689
+ className: "troen--slide-bar-top"
6690
+ }, /*#__PURE__*/React.createElement(TROEN_WrapIcon, {
6683
6691
  onClick: () => setIsOpen(false)
6684
6692
  }, /*#__PURE__*/React.createElement("svg", {
6685
6693
  xmlns: "http://www.w3.org/2000/svg",
@@ -6753,7 +6761,8 @@ var TROENHeader = _ref => {
6753
6761
  d: "M11.6342 20.1378C11.8461 20.1378 12.0788 19.9753 12.1513 19.778L12.5109 18.7919C12.5834 18.5933 12.4691 18.4308 12.2572 18.4308H11.8893C11.6774 18.4308 11.5631 18.2683 11.6356 18.0697L13.8754 11.9697C13.9479 11.7711 14.1472 11.5072 14.3187 11.3822L14.465 11.2753C14.6364 11.1503 14.9487 11.0489 15.1619 11.0489H16.5195C16.7313 11.0489 16.9975 11.1947 17.1118 11.3725L17.332 11.7169C17.4463 11.8947 17.6791 11.9392 17.8505 11.8142L19.4269 10.6628C19.5984 10.5378 19.6444 10.2905 19.5315 10.1114L18.8847 9.09888C18.7704 8.9211 18.5042 8.77527 18.2924 8.77527H13.7068C13.4949 8.77527 13.1813 8.87805 13.0113 9.00305L11.3039 10.253C11.1324 10.378 10.9345 10.6433 10.862 10.8405L8.20964 18.0697C8.13716 18.2683 7.9044 18.4308 7.69254 18.4308H7.12108C7.06812 18.4308 7.01376 18.4405 6.96079 18.46C6.8019 18.5141 6.65695 18.6433 6.60259 18.7919L6.24299 19.778C6.17051 19.9766 6.2848 20.1391 6.49666 20.1391H11.6342V20.1378Z",
6754
6762
  fill: "white"
6755
6763
  })))), /*#__PURE__*/React.createElement(TROEN_SlidebarContainer, {
6756
- onClick: () => setIsOpen(false)
6764
+ onClick: () => setIsOpen(false),
6765
+ className: "troen--slide-container"
6757
6766
  }, /*#__PURE__*/React.createElement(SlidebarNavLink, {
6758
6767
  href: "/",
6759
6768
  label: "Home"
@@ -6761,7 +6770,9 @@ var TROENHeader = _ref => {
6761
6770
  key: index,
6762
6771
  href: item.link,
6763
6772
  label: item.catergory
6764
- }))), /*#__PURE__*/React.createElement(TROEN_SlidebarNavOther, null, /*#__PURE__*/React.createElement("h3", null, "Thairath Website"), /*#__PURE__*/React.createElement("ul", {
6773
+ }))), /*#__PURE__*/React.createElement(TROEN_SlidebarNavOther, {
6774
+ className: "troen--slide-nav-other"
6775
+ }, /*#__PURE__*/React.createElement("h3", null, "Thairath Website"), /*#__PURE__*/React.createElement("ul", {
6765
6776
  className: "troen--slidebar-website-menu"
6766
6777
  }, data.thairathWebsite.map((item, index) => /*#__PURE__*/React.createElement("li", {
6767
6778
  key: index
@@ -6779,7 +6790,9 @@ var TROENHeader = _ref => {
6779
6790
  target: "_blank",
6780
6791
  rel: "noopener noreferrer",
6781
6792
  onClick: () => setIsOpen(false)
6782
- }, item.name))))), /*#__PURE__*/React.createElement(TROEN_SlidebarNavOther, null, /*#__PURE__*/React.createElement("ul", {
6793
+ }, item.name))))), /*#__PURE__*/React.createElement(TROEN_SlidebarNavOther, {
6794
+ className: "troen--slide-nav-other"
6795
+ }, /*#__PURE__*/React.createElement("ul", {
6783
6796
  className: "troen--slidebar-website-menu"
6784
6797
  }, data.otherLinks.map((item, index) => /*#__PURE__*/React.createElement("li", {
6785
6798
  key: index
@@ -6863,10 +6876,10 @@ var TRO_FooterBottom = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "pro
6863
6876
  // src/components/organisms/FooterEN/footerEN.tsx
6864
6877
  var TROENFooter = _ref => {
6865
6878
  var {
6866
- dataFile = '/data/menuEN.json'
6879
+ dataFile = '/data/menuEN.json',
6880
+ loading
6867
6881
  } = _ref;
6868
6882
  var [data, setData] = useState(null);
6869
- var [error, setError] = useState(false);
6870
6883
  useEffect(() => {
6871
6884
  var controller = new AbortController();
6872
6885
  fetch(dataFile, {
@@ -6876,15 +6889,21 @@ var TROENFooter = _ref => {
6876
6889
  });
6877
6890
  return () => controller.abort();
6878
6891
  }, [dataFile]);
6879
- if (!data) return /*#__PURE__*/React.createElement("div", null, "Loading...");
6880
- return /*#__PURE__*/React.createElement(TRO_FooterWrap, null, /*#__PURE__*/React.createElement(TRO_FooterTop, null, /*#__PURE__*/React.createElement(Logo, {
6892
+ if (!data) return /*#__PURE__*/React.createElement("div", null, loading);
6893
+ return /*#__PURE__*/React.createElement(TRO_FooterWrap, {
6894
+ className: "troen--footer"
6895
+ }, /*#__PURE__*/React.createElement(TRO_FooterTop, null, /*#__PURE__*/React.createElement(Logo, {
6881
6896
  fill: "Color",
6882
6897
  mode: "auto-width",
6883
6898
  name: "tr_online_en",
6884
6899
  size: "30"
6885
- })), /*#__PURE__*/React.createElement(TRO_FooterContainer, null, /*#__PURE__*/React.createElement("div", {
6900
+ })), /*#__PURE__*/React.createElement(TRO_FooterContainer, {
6901
+ className: "troen--footer-container"
6902
+ }, /*#__PURE__*/React.createElement("div", {
6886
6903
  className: "troen--footer-wrap-main-manu"
6887
- }, /*#__PURE__*/React.createElement(TRO_FooterMenu, null, /*#__PURE__*/React.createElement("h3", null, "Sections"), /*#__PURE__*/React.createElement("ul", {
6904
+ }, /*#__PURE__*/React.createElement(TRO_FooterMenu, {
6905
+ className: "troen--footer-menu"
6906
+ }, /*#__PURE__*/React.createElement("h3", null, "Sections"), /*#__PURE__*/React.createElement("ul", {
6888
6907
  className: "troen--footer-menu"
6889
6908
  }, data.naviMenu.map((item, index) => /*#__PURE__*/React.createElement("li", {
6890
6909
  key: index
@@ -6892,7 +6911,9 @@ var TROENFooter = _ref => {
6892
6911
  href: item.link,
6893
6912
  target: "_blank",
6894
6913
  rel: "noopener noreferrer"
6895
- }, item.catergory))))), /*#__PURE__*/React.createElement(TRO_FooterMenu, null, /*#__PURE__*/React.createElement("h3", null, "Thairath Website"), /*#__PURE__*/React.createElement("ul", {
6914
+ }, item.catergory))))), /*#__PURE__*/React.createElement(TRO_FooterMenu, {
6915
+ className: "troen--footer-menu"
6916
+ }, /*#__PURE__*/React.createElement("h3", null, "Thairath Website"), /*#__PURE__*/React.createElement("ul", {
6896
6917
  className: "troen--footer-menu"
6897
6918
  }, data.thairathWebsite.map((item, index) => /*#__PURE__*/React.createElement("li", {
6898
6919
  key: index
@@ -6900,7 +6921,9 @@ var TROENFooter = _ref => {
6900
6921
  href: item.link,
6901
6922
  target: "_blank",
6902
6923
  rel: "noopener noreferrer"
6903
- }, item.name)))))), /*#__PURE__*/React.createElement(TRO_FooterMenu, null, /*#__PURE__*/React.createElement("h3", null, "Follow Us"), /*#__PURE__*/React.createElement("ul", {
6924
+ }, item.name)))))), /*#__PURE__*/React.createElement(TRO_FooterMenu, {
6925
+ className: "troen--footer-menu"
6926
+ }, /*#__PURE__*/React.createElement("h3", null, "Follow Us"), /*#__PURE__*/React.createElement("ul", {
6904
6927
  className: "troen--footer-menu-followus"
6905
6928
  }, data.social.map((item, index) => /*#__PURE__*/React.createElement("li", {
6906
6929
  key: index
@@ -6931,7 +6954,9 @@ var TROENFooter = _ref => {
6931
6954
  }, /*#__PURE__*/React.createElement(Icon, {
6932
6955
  name: "desktop",
6933
6956
  size: 26
6934
- }))))), /*#__PURE__*/React.createElement(TRO_FooterMenu, null, /*#__PURE__*/React.createElement("div", {
6957
+ }))))), /*#__PURE__*/React.createElement(TRO_FooterMenu, {
6958
+ className: "troen--footer-menu"
6959
+ }, /*#__PURE__*/React.createElement("div", {
6935
6960
  className: "trorn--footer-myapp"
6936
6961
  }, /*#__PURE__*/React.createElement("i", null, /*#__PURE__*/React.createElement(Icon, {
6937
6962
  fill: "#00B400",
@@ -6995,7 +7020,9 @@ var TROENFooter = _ref => {
6995
7020
  mode: "auto-width",
6996
7021
  name: "inet",
6997
7022
  size: "24"
6998
- })))))), /*#__PURE__*/React.createElement(TRO_FooterBottom, null, /*#__PURE__*/React.createElement("ul", {
7023
+ })))))), /*#__PURE__*/React.createElement(TRO_FooterBottom, {
7024
+ className: "troen--footer-bottom"
7025
+ }, /*#__PURE__*/React.createElement("ul", {
6999
7026
  className: "troen--footer-website-menu"
7000
7027
  }, data.otherLinks.map((item, index) => /*#__PURE__*/React.createElement("li", {
7001
7028
  key: index
@@ -8011,5 +8038,5 @@ var TROLThemeProvider = _ref => {
8011
8038
  };
8012
8039
  var useThemeMode = () => useContext(ThemeContext);
8013
8040
 
8014
- export { Button, ButtonWithIcon, CardArticle, Checkbox, Icon, Logo, NavigatorBar, NavigatorFollowUs, NavigatorSlide, RadioButton, Search, Select, TROENFooter, TROENHeader, TROFooter, TROHeader, TROLThemeProvider, Textarea, Textbox, AddCircleIcon as add_circle, AddCircleFilledIcon as add_circle_filled, AppleAppStoreLogo as appleAppStore, ArrowCircleDownIcon as arrow_circle_down, ArrowCircleDownFilledIcon as arrow_circle_down_filled, ArrowCircleLeftIcon as arrow_circle_left, ArrowCircleLeftFilledIcon as arrow_circle_left_filled, ArrowCircleRightIcon as arrow_circle_right, ArrowCircleRightFilledIcon as arrow_circle_right_filled, ArrowCircleUpIcon as arrow_circle_up, ArrowCircleUpFilledIcon as arrow_circle_up_filled, ArrowDownwardAltIcon as arrow_downward_alt, ArrowLeftAltIcon as arrow_left_alt, ArrowRightAltIcon as arrow_right_alt, ArrowUpwardAltIcon as arrow_upward_alt, BedtimeIcon as bedtime, BedtimeFilledIcon as bedtime_filled, BookmarkIcon as bookmark, BookmarkFilledIcon as bookmark_filled, CalendarIcon as calendar, CalendarFilledIcon as calendar_filled, ClearDayIcon as clear_day, ClearDayFilledIcon as clear_day_filled, CloudDoneIcon as cloud_done, CloudDoneFilledIcon as cloud_done_filled, CloudDownloadIcon as cloud_download, CloudDownloadFilledIcon as cloud_download_filled, CloudUpLoadIcon as cloud_upload, CloudUpLoadFilledIcon as cloud_upload_filled, DesktopIcon as desktop, DesktopFilledIcon as desktop_filled, FacebookIcon as facebook, FacebookColorIcon as facebook_color, FeedIcon as feed, FirstPageIcon as first_page, GoogleIcon as google, GooglePlayStoreLogo as googlePlayStore, GoogleColorIcon as google_color, HamburgerIcon as hamburger, HomeIcon as home, HomeFilledIcon as home_filled, HuaweiAppGalleryLogo as huaweiAppGallery, InetLogo as inet, InfoIcon as info, InstagramIcon as instagram, InstagramColorIcon as instagram_color, KeyboardArrowDownIcon as keyboard_arrow_down, KeyboardArrowLeftIcon as keyboard_arrow_left, KeyboardArrowRightIcon as keyboard_arrow_right, KeyboardArrowUpIcon as keyboard_arrow_up, LastPageIcon as last_page, LineAppIcon as line_app, LineAppColorIcon as line_app_color, LinkIcon as link, LockIcon as lock, LockFilledIcon as lock_filled, LogoutIcon as logout, MailIcon as mail, MailFilledIcon as mail_filled, MessagerIcon as messager, MessagerColorIcon as messager_color, MirrorLogo as mirror, MobileIcon as mobile, MobileFilledIcon as mobile_filled, NotifationIcon as notifation, NotifationFilledIcon as notifation_filled, NotificationsActiveIcon as notifications_active, NotificationsActiveFilledIcon as notifications_active_filled, NotificationsOffIcon as notifications_off, NotificationsOffFilledIcon as notifications_off_filled, NotificationsUnreadIcon as notifications_unread, NotificationsUnreadFilledIcon as notifications_unread_filled, PublicIcon as public, SearchIcon as search, ShareIcon as share, ShareFilledIcon as share_filled, SocilaXIcon as social_x, SOPNLogo as sonp, Text as text, Thumbnail as thumbmail, TiktokIcon as tiktok, TiktokColorIcon as tiktok_color, TRFutureperfectLogo as trFuturePerfect, TRLogisticsLogo as trLogistics, TRMoneyLogo as trMoney, TROlineLogo as trOnline, TROlineENLogo as trOnlineEN, TRPlusLogo as trPlus, TRSportLogo as trSport, TRTVLogo as trTV, TrenVG3Logo as trendVG3, TROAppIcon as tro_app, useThemeMode, UserIcon as user, UserFilledIcon as user_filled, VisibilityIcon as visibility, VisibilityFilledIcon as visibility_filled, VisibilityOffIcon as visibility_off, VisibilityOffFilledIcon as visibility_off_filled, YoutubeIcon as youtube };
8041
+ export { Button, ButtonWithIcon, CardArticle, Checkbox, Icon, Logo, NavigatorBar, NavigatorFollowUs, NavigatorSlide, RadioButton, Search, Select, TROENFooter, TROENHeader, TROFooter, TROHeader, TROLThemeProvider, Text, Textarea, Textbox, AddCircleIcon as add_circle, AddCircleFilledIcon as add_circle_filled, AppleAppStoreLogo as appleAppStore, ArrowCircleDownIcon as arrow_circle_down, ArrowCircleDownFilledIcon as arrow_circle_down_filled, ArrowCircleLeftIcon as arrow_circle_left, ArrowCircleLeftFilledIcon as arrow_circle_left_filled, ArrowCircleRightIcon as arrow_circle_right, ArrowCircleRightFilledIcon as arrow_circle_right_filled, ArrowCircleUpIcon as arrow_circle_up, ArrowCircleUpFilledIcon as arrow_circle_up_filled, ArrowDownwardAltIcon as arrow_downward_alt, ArrowLeftAltIcon as arrow_left_alt, ArrowRightAltIcon as arrow_right_alt, ArrowUpwardAltIcon as arrow_upward_alt, BedtimeIcon as bedtime, BedtimeFilledIcon as bedtime_filled, BookmarkIcon as bookmark, BookmarkFilledIcon as bookmark_filled, CalendarIcon as calendar, CalendarFilledIcon as calendar_filled, ClearDayIcon as clear_day, ClearDayFilledIcon as clear_day_filled, CloudDoneIcon as cloud_done, CloudDoneFilledIcon as cloud_done_filled, CloudDownloadIcon as cloud_download, CloudDownloadFilledIcon as cloud_download_filled, CloudUpLoadIcon as cloud_upload, CloudUpLoadFilledIcon as cloud_upload_filled, DesktopIcon as desktop, DesktopFilledIcon as desktop_filled, FacebookIcon as facebook, FacebookColorIcon as facebook_color, FeedIcon as feed, FirstPageIcon as first_page, GoogleIcon as google, GooglePlayStoreLogo as googlePlayStore, GoogleColorIcon as google_color, HamburgerIcon as hamburger, HomeIcon as home, HomeFilledIcon as home_filled, HuaweiAppGalleryLogo as huaweiAppGallery, InetLogo as inet, InfoIcon as info, InstagramIcon as instagram, InstagramColorIcon as instagram_color, KeyboardArrowDownIcon as keyboard_arrow_down, KeyboardArrowLeftIcon as keyboard_arrow_left, KeyboardArrowRightIcon as keyboard_arrow_right, KeyboardArrowUpIcon as keyboard_arrow_up, LastPageIcon as last_page, LineAppIcon as line_app, LineAppColorIcon as line_app_color, LinkIcon as link, LockIcon as lock, LockFilledIcon as lock_filled, LogoutIcon as logout, MailIcon as mail, MailFilledIcon as mail_filled, MessagerIcon as messager, MessagerColorIcon as messager_color, MirrorLogo as mirror, MobileIcon as mobile, MobileFilledIcon as mobile_filled, NotifationIcon as notifation, NotifationFilledIcon as notifation_filled, NotificationsActiveIcon as notifications_active, NotificationsActiveFilledIcon as notifications_active_filled, NotificationsOffIcon as notifications_off, NotificationsOffFilledIcon as notifications_off_filled, NotificationsUnreadIcon as notifications_unread, NotificationsUnreadFilledIcon as notifications_unread_filled, PublicIcon as public, SearchIcon as search, ShareIcon as share, ShareFilledIcon as share_filled, SocilaXIcon as social_x, SOPNLogo as sonp, Thumbnail as thumbmail, TiktokIcon as tiktok, TiktokColorIcon as tiktok_color, TRFutureperfectLogo as trFuturePerfect, TRLogisticsLogo as trLogistics, TRMoneyLogo as trMoney, TROlineLogo as trOnline, TROlineENLogo as trOnlineEN, TRPlusLogo as trPlus, TRSportLogo as trSport, TRTVLogo as trTV, TrenVG3Logo as trendVG3, TROAppIcon as tro_app, useThemeMode, UserIcon as user, UserFilledIcon as user_filled, VisibilityIcon as visibility, VisibilityFilledIcon as visibility_filled, VisibilityOffIcon as visibility_off, VisibilityOffFilledIcon as visibility_off_filled, YoutubeIcon as youtube };
8015
8042
  //# sourceMappingURL=index.esm.js.map