negodesign 0.0.81 → 0.0.82

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.
Files changed (278) hide show
  1. package/README.md +133 -133
  2. package/dist/components/NegoDesign.svelte +21 -21
  3. package/dist/components/pages/admin/01/ui/AdminContent.svelte +14 -14
  4. package/dist/components/pages/admin/01/ui/AdminPanel.svelte +46 -46
  5. package/dist/components/pages/product-details/shared/ProductDetailFilesVertical.svelte +103 -103
  6. package/dist/components/pages/profile-user/shared/ProfileUserAddress.svelte +83 -83
  7. package/dist/components/pages/profile-user/shared/ProfileUserTabs.svelte +80 -80
  8. package/dist/components/pages/security/auth/PageAuth01.svelte +62 -62
  9. package/dist/components/pages/security/auth/PageAuth02.svelte +40 -40
  10. package/dist/components/pages/security/auth/PageAuth03.svelte +40 -40
  11. package/dist/components/pages/security/login/01/ui/FormLogin.svelte +91 -63
  12. package/dist/components/pages/security/login/01/ui/FormLogin.svelte.d.ts +2 -0
  13. package/dist/components/pages/security/login/01/ui/FormLoginEmailPassword.svelte +49 -26
  14. package/dist/components/pages/security/login/01/ui/FormLoginEmailPassword.svelte.d.ts +2 -0
  15. package/dist/components/pages/security/login/01/ui/FormLoginPhonePassword.svelte +49 -26
  16. package/dist/components/pages/security/login/01/ui/FormLoginPhonePassword.svelte.d.ts +2 -0
  17. package/dist/components/pages/security/login/01/ui/FormLoginUsernamePassword.svelte +49 -26
  18. package/dist/components/pages/security/login/01/ui/FormLoginUsernamePassword.svelte.d.ts +2 -0
  19. package/dist/components/pages/security/login/01/ui/LoginCard01.svelte +148 -132
  20. package/dist/components/pages/security/login/01/ui/LoginCard01.svelte.d.ts +2 -0
  21. package/dist/components/pages/security/login/01/ui/PageLogin01.svelte +66 -64
  22. package/dist/components/pages/security/login/02/ui/FormLogin02.svelte +82 -72
  23. package/dist/components/pages/security/login/02/ui/FormLogin02.svelte.d.ts +1 -0
  24. package/dist/components/pages/security/login/02/ui/FormLoginEmailPassword02.svelte +27 -26
  25. package/dist/components/pages/security/login/02/ui/FormLoginEmailPassword02.svelte.d.ts +1 -0
  26. package/dist/components/pages/security/login/02/ui/FormLoginPhonePassword02.svelte +27 -26
  27. package/dist/components/pages/security/login/02/ui/FormLoginPhonePassword02.svelte.d.ts +1 -0
  28. package/dist/components/pages/security/login/02/ui/FormLoginUsernamePassword02.svelte +27 -26
  29. package/dist/components/pages/security/login/02/ui/FormLoginUsernamePassword02.svelte.d.ts +1 -0
  30. package/dist/components/pages/security/login/02/ui/LoginCard02.svelte +15 -2
  31. package/dist/components/pages/security/login/02/ui/LoginCard02.svelte.d.ts +1 -0
  32. package/dist/components/pages/security/login/02/ui/PageLogin02.svelte +2 -0
  33. package/dist/components/pages/security/login/03/ui/FormLogin03.svelte +94 -91
  34. package/dist/components/pages/security/login/03/ui/FormLogin03.svelte.d.ts +1 -0
  35. package/dist/components/pages/security/login/03/ui/FormLoginEmailPassword03.svelte +27 -26
  36. package/dist/components/pages/security/login/03/ui/FormLoginEmailPassword03.svelte.d.ts +1 -0
  37. package/dist/components/pages/security/login/03/ui/FormLoginPhonePassword03.svelte +27 -26
  38. package/dist/components/pages/security/login/03/ui/FormLoginPhonePassword03.svelte.d.ts +1 -0
  39. package/dist/components/pages/security/login/03/ui/FormLoginUsernamePassword03.svelte +27 -26
  40. package/dist/components/pages/security/login/03/ui/FormLoginUsernamePassword03.svelte.d.ts +1 -0
  41. package/dist/components/pages/security/login/03/ui/LoginCard03.svelte +15 -2
  42. package/dist/components/pages/security/login/03/ui/LoginCard03.svelte.d.ts +1 -0
  43. package/dist/components/pages/security/login/03/ui/PageLogin03.svelte +2 -0
  44. package/dist/components/pages/security/login/PageLogin.svelte +30 -30
  45. package/dist/components/pages/security/login/types.d.ts +1 -0
  46. package/dist/components/pages/security/register/01/ui/PageRegister01.svelte +78 -76
  47. package/dist/components/pages/security/register/01/ui/RegisterCard01.svelte +107 -104
  48. package/dist/components/pages/security/register/01/ui/RegisterCard01.svelte.d.ts +1 -0
  49. package/dist/components/pages/security/register/02/ui/PageRegister02.svelte +2 -0
  50. package/dist/components/pages/security/register/02/ui/RegisterCard02.svelte +3 -1
  51. package/dist/components/pages/security/register/02/ui/RegisterCard02.svelte.d.ts +1 -0
  52. package/dist/components/pages/security/register/03/ui/PageRegister03.svelte +2 -0
  53. package/dist/components/pages/security/register/03/ui/RegisterCard03.svelte +3 -1
  54. package/dist/components/pages/security/register/03/ui/RegisterCard03.svelte.d.ts +1 -0
  55. package/dist/components/pages/security/register/FormRegister.svelte +148 -146
  56. package/dist/components/pages/security/register/FormRegister.svelte.d.ts +1 -0
  57. package/dist/components/pages/security/register/types.d.ts +1 -0
  58. package/dist/components/ui/avatar/avatar-fallback.svelte +29 -29
  59. package/dist/components/ui/avatar/avatar-image.svelte +38 -38
  60. package/dist/components/ui/avatar/avatar.svelte +39 -39
  61. package/dist/components/ui/badge/badge.svelte +46 -46
  62. package/dist/components/ui/banner/AdCardBanner.svelte +74 -74
  63. package/dist/components/ui/banner/CtaCardBanner.svelte +118 -118
  64. package/dist/components/ui/banner/CtaCardImageBanner.svelte +94 -94
  65. package/dist/components/ui/breadcrumb/core/breadcrumb-list.svelte +31 -31
  66. package/dist/components/ui/button/ButtonBack.svelte +18 -18
  67. package/dist/components/ui/button/ButtonLogin.svelte +19 -15
  68. package/dist/components/ui/button/ButtonLoginWith.svelte +57 -57
  69. package/dist/components/ui/button/ButtonSend.svelte +15 -15
  70. package/dist/components/ui/button/button.svelte +100 -86
  71. package/dist/components/ui/button/button.svelte.d.ts +1 -0
  72. package/dist/components/ui/card/core/highlight/01/CardHighlight01.svelte +103 -103
  73. package/dist/components/ui/card/core/highlight/02/CardHighlight02.svelte +99 -99
  74. package/dist/components/ui/card/core/highlight/CardHighlight.svelte +22 -22
  75. package/dist/components/ui/card/core/media/01/CardMedia01.svelte +133 -133
  76. package/dist/components/ui/card/core/media/02/CardMedia02.svelte +127 -127
  77. package/dist/components/ui/card/core/media/CardMedia.svelte +18 -18
  78. package/dist/components/ui/card/core/product/01/CardProduct01.svelte +136 -136
  79. package/dist/components/ui/card/core/product/02/CardProduct02.svelte +124 -124
  80. package/dist/components/ui/card/core/product/CardProduct.svelte +22 -22
  81. package/dist/components/ui/card/core/profile/01/CardProfile01.svelte +134 -134
  82. package/dist/components/ui/card/core/profile/02/CardProfile02.svelte +132 -132
  83. package/dist/components/ui/card/core/profile/CardProfile.svelte +18 -18
  84. package/dist/components/ui/card/core/promotion/CardPromotion.svelte +139 -139
  85. package/dist/components/ui/card/core/promotion/CardPromotionPrice.svelte +32 -32
  86. package/dist/components/ui/card/core/shared/CardButton.svelte +42 -42
  87. package/dist/components/ui/card/core/shared/CardCart.svelte +36 -36
  88. package/dist/components/ui/card/core/shared/CardDescription.svelte +41 -41
  89. package/dist/components/ui/card/core/shared/CardFavorite.svelte +33 -33
  90. package/dist/components/ui/card/core/shared/CardLogo.svelte +19 -19
  91. package/dist/components/ui/card/core/shared/CardPhoneOrWhatsapp.svelte +45 -45
  92. package/dist/components/ui/card/core/shared/CardStarRating.svelte +24 -24
  93. package/dist/components/ui/card/core/shared/CardTags.svelte +95 -95
  94. package/dist/components/ui/card/core/shared/CardThumbnailVideo.svelte +232 -232
  95. package/dist/components/ui/card/core/shared/CardTitlePrice.svelte +24 -24
  96. package/dist/components/ui/card/core/shared/TruncatableText.svelte +49 -49
  97. package/dist/components/ui/carousel/carousel-content.svelte +56 -56
  98. package/dist/components/ui/carousel/carousel-item.svelte +29 -29
  99. package/dist/components/ui/carousel/carousel-next.svelte +40 -40
  100. package/dist/components/ui/carousel/carousel-previous.svelte +40 -40
  101. package/dist/components/ui/carousel/carousel.svelte +225 -225
  102. package/dist/components/ui/carousel/core/badge/ui/CarouselBadge.svelte +108 -108
  103. package/dist/components/ui/carousel/core/grid/shared/ui/CarouselGridSlot.svelte +38 -38
  104. package/dist/components/ui/carousel/core/hero/ui/CarouselHero.svelte +181 -181
  105. package/dist/components/ui/carousel/core/highlights/ui/CarouselHighlights.svelte +67 -67
  106. package/dist/components/ui/carousel/core/product/ui/CarouselProduct.svelte +57 -57
  107. package/dist/components/ui/carousel/core/promotion/ui/CarouselPromotion.svelte +67 -67
  108. package/dist/components/ui/carousel/core/shared/ui/CarouselHeader.svelte +59 -59
  109. package/dist/components/ui/checkbox/checkbox.svelte +96 -96
  110. package/dist/components/ui/collapsible/collapsible-content.svelte +30 -30
  111. package/dist/components/ui/collapsible/collapsible-trigger.svelte +51 -51
  112. package/dist/components/ui/collapsible/collapsible.svelte +66 -66
  113. package/dist/components/ui/data-table/flex-render.svelte +40 -40
  114. package/dist/components/ui/datatable/ui/DataTableActions.svelte +28 -28
  115. package/dist/components/ui/datatable/ui/DataTableCheckbox.svelte +22 -22
  116. package/dist/components/ui/datatable/ui/DataTableContent.svelte +59 -59
  117. package/dist/components/ui/datatable/ui/DataTableCore.svelte +148 -148
  118. package/dist/components/ui/datatable/ui/DataTableDragHandle.svelte +8 -8
  119. package/dist/components/ui/datatable/ui/DataTableListFilter.svelte +60 -60
  120. package/dist/components/ui/datatable/ui/DataTableListPagination.svelte +35 -35
  121. package/dist/components/ui/drawer/drawer-close.svelte +41 -41
  122. package/dist/components/ui/drawer/drawer-content.svelte +81 -81
  123. package/dist/components/ui/drawer/drawer-description.svelte +19 -19
  124. package/dist/components/ui/drawer/drawer-footer.svelte +20 -20
  125. package/dist/components/ui/drawer/drawer-header.svelte +20 -20
  126. package/dist/components/ui/drawer/drawer-nested.svelte +34 -34
  127. package/dist/components/ui/drawer/drawer-overlay.svelte +25 -25
  128. package/dist/components/ui/drawer/drawer-portal.svelte +19 -19
  129. package/dist/components/ui/drawer/drawer-title.svelte +19 -19
  130. package/dist/components/ui/drawer/drawer-trigger.svelte +42 -42
  131. package/dist/components/ui/drawer/drawer.svelte +74 -74
  132. package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-group.svelte +25 -25
  133. package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +69 -69
  134. package/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte +106 -106
  135. package/dist/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte +27 -27
  136. package/dist/components/ui/dropdown-menu/dropdown-menu-group.svelte +21 -21
  137. package/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte +60 -60
  138. package/dist/components/ui/dropdown-menu/dropdown-menu-label.svelte +27 -27
  139. package/dist/components/ui/dropdown-menu/dropdown-menu-portal.svelte +6 -6
  140. package/dist/components/ui/dropdown-menu/dropdown-menu-radio-group.svelte +43 -43
  141. package/dist/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte +70 -70
  142. package/dist/components/ui/dropdown-menu/dropdown-menu-separator.svelte +20 -20
  143. package/dist/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte +33 -33
  144. package/dist/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +57 -57
  145. package/dist/components/ui/dropdown-menu/dropdown-menu-sub.svelte +76 -76
  146. package/dist/components/ui/dropdown-menu/dropdown-menu-trigger.svelte +68 -68
  147. package/dist/components/ui/dropdown-menu/dropdown-menu.svelte +53 -53
  148. package/dist/components/ui/empty/empty-content.svelte +19 -19
  149. package/dist/components/ui/empty/empty-description.svelte +19 -19
  150. package/dist/components/ui/empty/empty-header.svelte +19 -19
  151. package/dist/components/ui/empty/empty-media.svelte +41 -41
  152. package/dist/components/ui/empty/empty-title.svelte +19 -19
  153. package/dist/components/ui/empty/empty.svelte +19 -19
  154. package/dist/components/ui/footer/ui/Footer.svelte +18 -18
  155. package/dist/components/ui/form/ui/calendar/Calendar.svelte +193 -193
  156. package/dist/components/ui/form/ui/calendar/CalendarCard.svelte +89 -89
  157. package/dist/components/ui/form/ui/calendar/DaysGrid.svelte +75 -75
  158. package/dist/components/ui/form/ui/calendar/MonthSelect.svelte +49 -49
  159. package/dist/components/ui/form/ui/calendar/YearSelect.svelte +116 -116
  160. package/dist/components/ui/form/ui/input-base.svelte +83 -83
  161. package/dist/components/ui/form/ui/input-calendar-interval.svelte +178 -178
  162. package/dist/components/ui/form/ui/input-calendar.svelte +109 -109
  163. package/dist/components/ui/form/ui/input-email-or-phone.svelte +23 -23
  164. package/dist/components/ui/form/ui/input-email.svelte +23 -23
  165. package/dist/components/ui/form/ui/input-password-confirm.svelte +23 -23
  166. package/dist/components/ui/form/ui/input-password.svelte +23 -23
  167. package/dist/components/ui/form/ui/input-phone.svelte +43 -37
  168. package/dist/components/ui/form/ui/input-select.svelte +246 -246
  169. package/dist/components/ui/form/ui/input-username.svelte +22 -22
  170. package/dist/components/ui/grid/core/ui/01/Grid01.svelte +30 -30
  171. package/dist/components/ui/grid/core/ui/02/Grid02.svelte +30 -30
  172. package/dist/components/ui/grid/core/ui/ItemsPanel.svelte +26 -26
  173. package/dist/components/ui/grid/core/ui/ItemsPanelCarousel.svelte +37 -37
  174. package/dist/components/ui/grid/core/ui/ItemsPanelGrid.svelte +43 -43
  175. package/dist/components/ui/grid/core/ui/ItemsSimpleGrid.svelte +45 -45
  176. package/dist/components/ui/grid/core/ui/shared/DescriptionGrid.svelte +23 -23
  177. package/dist/components/ui/grid/core/ui/shared/IconRenderGrid.svelte +23 -23
  178. package/dist/components/ui/grid/core/ui/shared/TitleGrid.svelte +19 -19
  179. package/dist/components/ui/hero/SimpleHero.svelte +65 -65
  180. package/dist/components/ui/input-otp/input-otp-group.svelte +22 -22
  181. package/dist/components/ui/input-otp/input-otp-separator.svelte +27 -27
  182. package/dist/components/ui/input-otp/input-otp-slot.svelte +63 -63
  183. package/dist/components/ui/input-otp/input-otp.svelte +181 -181
  184. package/dist/components/ui/label/core/LabelOr.svelte +25 -25
  185. package/dist/components/ui/label/label.svelte +19 -19
  186. package/dist/components/ui/language-switcher/language-switcher.svelte +48 -48
  187. package/dist/components/ui/light-switch/light-switch.svelte +48 -48
  188. package/dist/components/ui/link/link-forget-password.svelte +12 -12
  189. package/dist/components/ui/link/link-privacy-polity.svelte +12 -12
  190. package/dist/components/ui/link/link-terms-of-service.svelte +12 -12
  191. package/dist/components/ui/modal/core/ui/ModalCore.svelte +132 -132
  192. package/dist/components/ui/modal/form/index.d.ts +3 -2
  193. package/dist/components/ui/modal/form/index.js +2 -1
  194. package/dist/components/ui/modal/form/types.d.ts +41 -0
  195. package/dist/components/ui/modal/form/ui/ModalForm.svelte +11 -6
  196. package/dist/components/ui/modal/form/ui/ModalFormEmailOrPhone.svelte +204 -0
  197. package/dist/components/ui/modal/form/ui/ModalFormEmailOrPhone.svelte.d.ts +4 -0
  198. package/dist/components/ui/modal/grid/ui/02/ModalGridSelection02.svelte +146 -146
  199. package/dist/components/ui/modal/share/ui/ModalShareSelection.svelte +156 -156
  200. package/dist/components/ui/nav/ui/ComplexMenu.svelte +51 -51
  201. package/dist/components/ui/nav/ui/Menu.svelte +72 -72
  202. package/dist/components/ui/nav/ui/SimpleMenu.svelte +14 -14
  203. package/dist/components/ui/nav/ui/mobile/ComplexMenuMobile.svelte +125 -125
  204. package/dist/components/ui/nav/ui/mobile/MenuMobile.svelte +54 -54
  205. package/dist/components/ui/nav/ui/shared/MenuButton.svelte +51 -51
  206. package/dist/components/ui/nav/ui/shared/MenuLinks.svelte +40 -40
  207. package/dist/components/ui/nav/ui/shared/MenuListItem.svelte +44 -44
  208. package/dist/components/ui/nav/ui/shared/MenuLogo.svelte +13 -13
  209. package/dist/components/ui/nav/ui/shared/dropdown/DropdownNavigationMenuItemGrid.svelte +30 -30
  210. package/dist/components/ui/nav/ui/shared/navigation/NavDropdown.svelte +88 -88
  211. package/dist/components/ui/nav/ui/shared/navigation/NavigationMenuItem.svelte +17 -17
  212. package/dist/components/ui/nav/ui/shared/navigation/NavigationMenuItemCard.svelte +53 -53
  213. package/dist/components/ui/nav/ui/shared/navigation/NavigationMenuItemGrid.svelte +35 -35
  214. package/dist/components/ui/nav/ui/shared/navigation/NavigationMenuItemList.svelte +24 -24
  215. package/dist/components/ui/nav/ui/shared/navigation/NavigationMenuItems.svelte +21 -21
  216. package/dist/components/ui/panel/CarouselSlot.svelte +57 -57
  217. package/dist/components/ui/panel/LeftHero.svelte +114 -114
  218. package/dist/components/ui/panel/NotFoundEmpty.svelte +66 -66
  219. package/dist/components/ui/phone-input/country-selector.svelte +87 -87
  220. package/dist/components/ui/phone-input/flag.svelte +11 -11
  221. package/dist/components/ui/phone-input/phone-input.svelte +163 -163
  222. package/dist/components/ui/popover/popover-close.svelte +25 -25
  223. package/dist/components/ui/popover/popover-content.svelte +92 -92
  224. package/dist/components/ui/popover/popover-portal.svelte +6 -6
  225. package/dist/components/ui/popover/popover-trigger.svelte +68 -68
  226. package/dist/components/ui/popover/popover.svelte +53 -53
  227. package/dist/components/ui/search/SearchInput.svelte +32 -32
  228. package/dist/components/ui/search/shared/SearchInputCore.svelte +66 -66
  229. package/dist/components/ui/separator/separator.svelte +28 -28
  230. package/dist/components/ui/sidebar/core/MenuBarSidebar.svelte +70 -70
  231. package/dist/components/ui/sidebar/core/ui/navbar/NavMenuBarSidebar.svelte +97 -97
  232. package/dist/components/ui/sidebar/core/ui/navbar/NavMenuBottomSidebar.svelte +33 -33
  233. package/dist/components/ui/sidebar/core/ui/navbar/NavMenuTopBarSidebar.svelte +101 -101
  234. package/dist/components/ui/sidebar/core/ui/navbar/nav-menu-header-sidebar.svelte +77 -77
  235. package/dist/components/ui/sidebar/sidebar-content.svelte +24 -24
  236. package/dist/components/ui/sidebar/sidebar-footer.svelte +21 -21
  237. package/dist/components/ui/sidebar/sidebar-group-content.svelte +21 -21
  238. package/dist/components/ui/sidebar/sidebar-menu-action.svelte +38 -38
  239. package/dist/components/ui/sidebar/sidebar-menu-button.svelte +70 -70
  240. package/dist/components/ui/sidebar/sidebar-menu-sub-button.svelte +39 -39
  241. package/dist/components/ui/sidebar/sidebar-provider.svelte +62 -62
  242. package/dist/components/ui/sidebar/sidebar-rail.svelte +36 -36
  243. package/dist/components/ui/sidebar/sidebar-separator.svelte +21 -21
  244. package/dist/components/ui/sidebar/sidebar-trigger.svelte +36 -36
  245. package/dist/components/ui/sidebar/sidebar.svelte +118 -118
  246. package/dist/components/ui/skeleton/skeleton.svelte +19 -19
  247. package/dist/components/ui/star-rating/star-rating-star.svelte +66 -66
  248. package/dist/components/ui/star-rating/star-rating.svelte +149 -149
  249. package/dist/components/ui/table/table-body.svelte +15 -15
  250. package/dist/components/ui/table/table-caption.svelte +20 -20
  251. package/dist/components/ui/table/table-cell.svelte +15 -15
  252. package/dist/components/ui/table/table-footer.svelte +20 -20
  253. package/dist/components/ui/table/table-head.svelte +15 -15
  254. package/dist/components/ui/table/table-header.svelte +20 -20
  255. package/dist/components/ui/table/table-row.svelte +15 -15
  256. package/dist/components/ui/table/table.svelte +17 -17
  257. package/dist/components/ui/tabs/data/TabModel.d.ts +1 -0
  258. package/dist/components/ui/tabs/ui/tab-underline.svelte +47 -43
  259. package/dist/components/ui/underline-tabs/underline-tabs-content.svelte +33 -33
  260. package/dist/components/ui/underline-tabs/underline-tabs-list.svelte +40 -40
  261. package/dist/components/ui/underline-tabs/underline-tabs-trigger.svelte +91 -91
  262. package/dist/components/ui/underline-tabs/underline-tabs.svelte +61 -61
  263. package/dist/docs/ApiTable.svelte +42 -42
  264. package/dist/docs/CodeBlock.svelte +26 -26
  265. package/dist/docs/DocsHeader.svelte +25 -25
  266. package/dist/docs/DocsSidebar.svelte +108 -108
  267. package/dist/docs/components.js +624 -584
  268. package/dist/globals.css +27 -7
  269. package/dist/i18n/langs/en.d.ts +3 -1
  270. package/dist/i18n/langs/en.js +3 -1
  271. package/dist/i18n/langs/pt.d.ts +3 -1
  272. package/dist/i18n/langs/pt.js +3 -1
  273. package/dist/i18n/translations.d.ts +6 -2
  274. package/dist/index.d.ts +12 -0
  275. package/dist/index.js +12 -0
  276. package/dist/styles/globals.css +283 -283
  277. package/dist/types/index.d.ts +3 -1
  278. package/package.json +81 -81
@@ -1,66 +1,66 @@
1
- <script lang="ts">
2
- import * as Empty from "../empty/index.js";
3
- import { t } from "../../../i18n";
4
- import { HugeiconsIcon } from "@hugeicons/svelte";
5
- import { Search01Icon } from "@hugeicons/core-free-icons";
6
- import type { NotFoundEmptyProps } from "./type";
7
-
8
- let {
9
- title,
10
- description,
11
- icon = Search01Icon,
12
- className = "",
13
- actionHref = "#/",
14
- actionLabel,
15
- onAction,
16
- showAction = false,
17
- children,
18
- }: NotFoundEmptyProps = $props();
19
-
20
- const resolvedTitle = $derived(title ?? $t("empty.title"));
21
- const resolvedDescription = $derived(description ?? $t("empty.description"));
22
- </script>
23
-
24
- <Empty.Root class="w-full py-8 {className}">
25
- <Empty.Header>
26
- {#if icon}
27
- <Empty.Media variant="icon">
28
- <HugeiconsIcon {icon} class="size-6 text-muted-foreground" />
29
- </Empty.Media>
30
- {/if}
31
- <Empty.Title class="text-base font-semibold">
32
- {resolvedTitle}
33
- </Empty.Title>
34
- <Empty.Description class="text-sm text-muted-foreground max-w-sm">
35
- {resolvedDescription}
36
- </Empty.Description>
37
- </Empty.Header>
38
-
39
- {#if children}
40
- <Empty.Content>
41
- {@render children()}
42
- </Empty.Content>
43
- {:else if showAction || onAction}
44
- <Empty.Content>
45
- {#if onAction}
46
- <button
47
- type="button"
48
- onclick={onAction}
49
- class="text-xs font-medium text-primary hover:underline"
50
- >
51
- {actionLabel ?? $t("empty.contact_support")}
52
- </button>
53
- {:else}
54
- <Empty.Description class="text-xs">
55
- {$t("empty.support")}
56
- <a
57
- href={actionHref}
58
- class="text-primary hover:underline font-medium ml-1"
59
- >
60
- {actionLabel ?? $t("empty.contact_support")}
61
- </a>
62
- </Empty.Description>
63
- {/if}
64
- </Empty.Content>
65
- {/if}
66
- </Empty.Root>
1
+ <script lang="ts">
2
+ import * as Empty from "../empty/index.js";
3
+ import { t } from "../../../i18n";
4
+ import { HugeiconsIcon } from "@hugeicons/svelte";
5
+ import { Search01Icon } from "@hugeicons/core-free-icons";
6
+ import type { NotFoundEmptyProps } from "./type";
7
+
8
+ let {
9
+ title,
10
+ description,
11
+ icon = Search01Icon,
12
+ className = "",
13
+ actionHref = "#/",
14
+ actionLabel,
15
+ onAction,
16
+ showAction = false,
17
+ children,
18
+ }: NotFoundEmptyProps = $props();
19
+
20
+ const resolvedTitle = $derived(title ?? $t("empty.title"));
21
+ const resolvedDescription = $derived(description ?? $t("empty.description"));
22
+ </script>
23
+
24
+ <Empty.Root class="w-full py-8 {className}">
25
+ <Empty.Header>
26
+ {#if icon}
27
+ <Empty.Media variant="icon">
28
+ <HugeiconsIcon {icon} class="size-6 text-muted-foreground" />
29
+ </Empty.Media>
30
+ {/if}
31
+ <Empty.Title class="text-base font-semibold">
32
+ {resolvedTitle}
33
+ </Empty.Title>
34
+ <Empty.Description class="text-sm text-muted-foreground max-w-sm">
35
+ {resolvedDescription}
36
+ </Empty.Description>
37
+ </Empty.Header>
38
+
39
+ {#if children}
40
+ <Empty.Content>
41
+ {@render children()}
42
+ </Empty.Content>
43
+ {:else if showAction || onAction}
44
+ <Empty.Content>
45
+ {#if onAction}
46
+ <button
47
+ type="button"
48
+ onclick={onAction}
49
+ class="text-xs font-medium text-primary hover:underline"
50
+ >
51
+ {actionLabel ?? $t("empty.contact_support")}
52
+ </button>
53
+ {:else}
54
+ <Empty.Description class="text-xs">
55
+ {$t("empty.support")}
56
+ <a
57
+ href={actionHref}
58
+ class="text-primary hover:underline font-medium ml-1"
59
+ >
60
+ {actionLabel ?? $t("empty.contact_support")}
61
+ </a>
62
+ </Empty.Description>
63
+ {/if}
64
+ </Empty.Content>
65
+ {/if}
66
+ </Empty.Root>
@@ -1,87 +1,87 @@
1
- <script lang="ts" module>
2
- import type { Country } from "./types";
3
-
4
- export const COUNTRIES: Country[] = [
5
- { id: "ao", iso2: "ao", name: "Angola", dialCode: "244" },
6
- { id: "br", iso2: "br", name: "Brazil", dialCode: "55" },
7
- { id: "cv", iso2: "cv", name: "Cape Verde", dialCode: "238" },
8
- { id: "cn", iso2: "cn", name: "China", dialCode: "86" },
9
- { id: "fr", iso2: "fr", name: "France", dialCode: "33" },
10
- { id: "gw", iso2: "gw", name: "Guinea-Bissau", dialCode: "245" },
11
- { id: "jp", iso2: "jp", name: "Japan", dialCode: "81" },
12
- { id: "mz", iso2: "mz", name: "Mozambique", dialCode: "258" },
13
- { id: "pt", iso2: "pt", name: "Portugal", dialCode: "351" },
14
- {
15
- id: "st",
16
- iso2: "st",
17
- name: "São Tomé and Príncipe",
18
- dialCode: "239",
19
- },
20
- { id: "za", iso2: "za", name: "South Africa", dialCode: "27" },
21
- { id: "es", iso2: "es", name: "Spain", dialCode: "34" },
22
- { id: "gb", iso2: "gb", name: "United Kingdom", dialCode: "44" },
23
- { id: "us", iso2: "us", name: "United States", dialCode: "1" },
24
- ];
25
- </script>
26
-
27
- <script lang="ts">
28
- import { cn } from "../../../utils.js";
29
- import { HugeiconsIcon } from "@hugeicons/svelte";
30
- import { GlobalIcon } from "@hugeicons/core-free-icons";
31
- import type { CountryCode } from "./types";
32
-
33
- interface Props {
34
- selected?: CountryCode | null;
35
- dialCode?: string;
36
- disabled?: boolean;
37
- onselect?: (val: CountryCode | null) => void;
38
- order?: (a: Country, b: Country) => number;
39
- }
40
-
41
- let {
42
- selected = $bindable(null),
43
- // eslint-disable-next-line no-useless-assignment
44
- dialCode = $bindable(""),
45
- disabled = false,
46
- onselect = undefined,
47
- order = (a, b) => {
48
- return a.name.localeCompare(b.name);
49
- },
50
- }: Props = $props();
51
-
52
- let ordered = $derived(COUNTRIES.slice().sort(order));
53
-
54
- function handleChange(e: Event) {
55
- selected = (e.currentTarget as HTMLSelectElement).value;
56
- onselect?.(selected);
57
- }
58
-
59
- $effect(() => {
60
- const country = COUNTRIES.find((c) => c.iso2 === selected);
61
- dialCode = country?.dialCode ?? "";
62
- });
63
- </script>
64
-
65
- <div class="relative flex shrink-0 items-center">
66
- <HugeiconsIcon
67
- icon={GlobalIcon}
68
- strokeWidth={2}
69
- class="text-muted-foreground pointer-events-none absolute left-2.5 size-4"
70
- />
71
- <select
72
- value={selected ?? ""}
73
- onchange={handleChange}
74
- aria-label="Country code"
75
- {disabled}
76
- class={cn(
77
- "border-input bg-input/30 focus-visible:ring-ring/50 dark:bg-input/30 focus-visible:border-ring h-9 w-fit appearance-none rounded-l-md rounded-r-none border py-1 pr-8 pl-8 text-sm transition-[color,box-shadow] focus-visible:ring-[3px] outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>option]:bg-background",
78
- disabled ? "cursor-not-allowed opacity-50" : "",
79
- )}
80
- >
81
- {#each ordered as country (country.id)}
82
- <option value={country.iso2}>
83
- (+{country.dialCode})
84
- </option>
85
- {/each}
86
- </select>
87
- </div>
1
+ <script lang="ts" module>
2
+ import type { Country } from "./types";
3
+
4
+ export const COUNTRIES: Country[] = [
5
+ { id: "ao", iso2: "ao", name: "Angola", dialCode: "244" },
6
+ { id: "br", iso2: "br", name: "Brazil", dialCode: "55" },
7
+ { id: "cv", iso2: "cv", name: "Cape Verde", dialCode: "238" },
8
+ { id: "cn", iso2: "cn", name: "China", dialCode: "86" },
9
+ { id: "fr", iso2: "fr", name: "France", dialCode: "33" },
10
+ { id: "gw", iso2: "gw", name: "Guinea-Bissau", dialCode: "245" },
11
+ { id: "jp", iso2: "jp", name: "Japan", dialCode: "81" },
12
+ { id: "mz", iso2: "mz", name: "Mozambique", dialCode: "258" },
13
+ { id: "pt", iso2: "pt", name: "Portugal", dialCode: "351" },
14
+ {
15
+ id: "st",
16
+ iso2: "st",
17
+ name: "São Tomé and Príncipe",
18
+ dialCode: "239",
19
+ },
20
+ { id: "za", iso2: "za", name: "South Africa", dialCode: "27" },
21
+ { id: "es", iso2: "es", name: "Spain", dialCode: "34" },
22
+ { id: "gb", iso2: "gb", name: "United Kingdom", dialCode: "44" },
23
+ { id: "us", iso2: "us", name: "United States", dialCode: "1" },
24
+ ];
25
+ </script>
26
+
27
+ <script lang="ts">
28
+ import { cn } from "../../../utils.js";
29
+ import { HugeiconsIcon } from "@hugeicons/svelte";
30
+ import { GlobalIcon } from "@hugeicons/core-free-icons";
31
+ import type { CountryCode } from "./types";
32
+
33
+ interface Props {
34
+ selected?: CountryCode | null;
35
+ dialCode?: string;
36
+ disabled?: boolean;
37
+ onselect?: (val: CountryCode | null) => void;
38
+ order?: (a: Country, b: Country) => number;
39
+ }
40
+
41
+ let {
42
+ selected = $bindable(null),
43
+ // eslint-disable-next-line no-useless-assignment
44
+ dialCode = $bindable(""),
45
+ disabled = false,
46
+ onselect = undefined,
47
+ order = (a, b) => {
48
+ return a.name.localeCompare(b.name);
49
+ },
50
+ }: Props = $props();
51
+
52
+ let ordered = $derived(COUNTRIES.slice().sort(order));
53
+
54
+ function handleChange(e: Event) {
55
+ selected = (e.currentTarget as HTMLSelectElement).value;
56
+ onselect?.(selected);
57
+ }
58
+
59
+ $effect(() => {
60
+ const country = COUNTRIES.find((c) => c.iso2 === selected);
61
+ dialCode = country?.dialCode ?? "";
62
+ });
63
+ </script>
64
+
65
+ <div class="relative flex shrink-0 items-center">
66
+ <HugeiconsIcon
67
+ icon={GlobalIcon}
68
+ strokeWidth={2}
69
+ class="text-muted-foreground pointer-events-none absolute left-2.5 size-4"
70
+ />
71
+ <select
72
+ value={selected ?? ""}
73
+ onchange={handleChange}
74
+ aria-label="Country code"
75
+ {disabled}
76
+ class={cn(
77
+ "border-input bg-input/30 focus-visible:ring-ring/50 dark:bg-input/30 focus-visible:border-ring h-9 w-fit appearance-none rounded-l-md rounded-r-none border py-1 pr-8 pl-8 text-sm transition-[color,box-shadow] focus-visible:ring-[3px] outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>option]:bg-background",
78
+ disabled ? "cursor-not-allowed opacity-50" : "",
79
+ )}
80
+ >
81
+ {#each ordered as country (country.id)}
82
+ <option value={country.iso2}>
83
+ (+{country.dialCode})
84
+ </option>
85
+ {/each}
86
+ </select>
87
+ </div>
@@ -1,12 +1,12 @@
1
- <script lang="ts">
2
- import type { Country } from './types';
3
-
4
- interface Props {
5
- country?: Country | null;
6
- }
7
-
8
- let { country = null }: Props = $props();
9
- </script>
10
-
11
- <span class="bg-foreground/20 flex h-4 w-6 shrink-0 overflow-clip rounded-sm">
1
+ <script lang="ts">
2
+ import type { Country } from './types';
3
+
4
+ interface Props {
5
+ country?: Country | null;
6
+ }
7
+
8
+ let { country = null }: Props = $props();
9
+ </script>
10
+
11
+ <span class="bg-foreground/20 flex h-4 w-6 shrink-0 overflow-clip rounded-sm">
12
12
  </span>
@@ -1,163 +1,163 @@
1
- <script lang="ts" module>
2
- import type { TelInputOptions } from "./types";
3
-
4
- export const defaultOptions: TelInputOptions = {
5
- spaces: true,
6
- autoPlaceholder: true,
7
- };
8
- </script>
9
-
10
- <script lang="ts">
11
- import CountrySelector, { COUNTRIES } from "./country-selector.svelte";
12
- import { type PhoneInputProps } from ".";
13
- import { cn } from "../../../utils.js";
14
-
15
- let {
16
- class: className = undefined,
17
- defaultCountry = "ao",
18
- country = $bindable(defaultCountry),
19
- options = defaultOptions,
20
- placeholder,
21
- readonly = false,
22
- disabled = false,
23
- value = $bindable(""),
24
- valid = $bindable(true),
25
- // eslint-disable-next-line no-useless-assignment
26
- detailedValue = $bindable(null),
27
- order = undefined,
28
- name = undefined,
29
- ...rest
30
- }: PhoneInputProps = $props();
31
-
32
- let el: HTMLInputElement | undefined = $state();
33
- let dialCode = $state("");
34
- let number = $state("");
35
- let displayNumber = $state("");
36
- let lastEmitted = $state("");
37
-
38
- const currentCountry = $derived(
39
- COUNTRIES.find((c) => c.iso2 === country) ?? null,
40
- );
41
-
42
- function nationalDigits(input: string): string {
43
- return input.replace(/\D/g, "");
44
- }
45
-
46
- function formatNational(input: string): string {
47
- const digits = nationalDigits(input);
48
- if (!options?.spaces) return digits;
49
- return digits.match(/.{1,3}/g)?.join(" ") ?? "";
50
- }
51
-
52
- function formatFull(code: string, input: string): string {
53
- const national = nationalDigits(input);
54
- if (!national) return "";
55
- return options?.spaces
56
- ? `+${code} ${formatNational(national)}`
57
- : `+${code}${national}`;
58
- }
59
-
60
- function parseValue(
61
- input: string,
62
- ): { code: string; number: string } | null {
63
- const digits = nationalDigits(input);
64
- if (!digits) return null;
65
- for (const c of COUNTRIES) {
66
- if (
67
- digits.startsWith(c.dialCode) &&
68
- digits.length > c.dialCode.length
69
- ) {
70
- return {
71
- code: c.dialCode,
72
- number: digits.slice(c.dialCode.length),
73
- };
74
- }
75
- }
76
- const exact = COUNTRIES.find((c) => digits === c.dialCode);
77
- if (exact) return { code: exact.dialCode, number: "" };
78
- return { code: "", number: digits };
79
- }
80
-
81
- function isValidNumber(input: string): boolean {
82
- const length = nationalDigits(input).length;
83
- if (!length) return true;
84
- return length >= 6 && length <= 15;
85
- }
86
-
87
- function handleNumberInput(e: Event) {
88
- const input = (e.currentTarget as HTMLInputElement).value;
89
- displayNumber = input;
90
- number = input.replace(/[^\d]/g, "");
91
- }
92
-
93
- function focus() {
94
- setTimeout(() => {
95
- el?.focus();
96
- }, 0);
97
- }
98
-
99
- $effect(() => {
100
- const full = formatFull(dialCode, number);
101
- if (value !== full) {
102
- value = full;
103
- lastEmitted = full;
104
- }
105
- valid = isValidNumber(number);
106
- detailedValue = {
107
- country: currentCountry,
108
- code: dialCode,
109
- number: nationalDigits(number),
110
- };
111
- });
112
-
113
- $effect(() => {
114
- const incoming = value;
115
- if (incoming === lastEmitted) return;
116
- lastEmitted = incoming;
117
- const parsed = parseValue(incoming);
118
- if (!parsed) {
119
- if (!nationalDigits(incoming)) {
120
- number = "";
121
- displayNumber = "";
122
- }
123
- return;
124
- }
125
- if (parsed.code) {
126
- const matched = COUNTRIES.find((c) => c.dialCode === parsed.code);
127
- if (matched && matched.iso2 !== country) country = matched.iso2;
128
- }
129
- dialCode = parsed.code;
130
- number = parsed.number;
131
- displayNumber = formatNational(parsed.number);
132
- });
133
- </script>
134
-
135
- <div class={cn("flex h-9 w-full min-w-0 items-center")}>
136
- <div class="">
137
- <CountrySelector
138
- {order}
139
- {disabled}
140
- bind:selected={country}
141
- bind:dialCode
142
- onselect={focus}
143
- />
144
- </div>
145
- <input
146
- type="tel"
147
- {name}
148
- bind:this={el}
149
- bind:value={displayNumber}
150
- oninput={handleNumberInput}
151
- {placeholder}
152
- {readonly}
153
- {disabled}
154
- aria-invalid={!valid}
155
- class={cn(
156
- "border-input bg-transparent border-l-none selection:bg-primary dark:bg-input/30 selection:text-primary-foreground ring-offset-background placeholder:text-muted-foreground flex h-9 w-full min-w-0 flex-1 rounded-r-md rounded-l-none border-y border-r px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
157
- "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
158
- "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
159
- className,
160
- )}
161
- {...rest}
162
- />
163
- </div>
1
+ <script lang="ts" module>
2
+ import type { TelInputOptions } from "./types";
3
+
4
+ export const defaultOptions: TelInputOptions = {
5
+ spaces: true,
6
+ autoPlaceholder: true,
7
+ };
8
+ </script>
9
+
10
+ <script lang="ts">
11
+ import CountrySelector, { COUNTRIES } from "./country-selector.svelte";
12
+ import { type PhoneInputProps } from ".";
13
+ import { cn } from "../../../utils.js";
14
+
15
+ let {
16
+ class: className = undefined,
17
+ defaultCountry = "ao",
18
+ country = $bindable(defaultCountry),
19
+ options = defaultOptions,
20
+ placeholder,
21
+ readonly = false,
22
+ disabled = false,
23
+ value = $bindable(""),
24
+ valid = $bindable(true),
25
+ // eslint-disable-next-line no-useless-assignment
26
+ detailedValue = $bindable(null),
27
+ order = undefined,
28
+ name = undefined,
29
+ ...rest
30
+ }: PhoneInputProps = $props();
31
+
32
+ let el: HTMLInputElement | undefined = $state();
33
+ let dialCode = $state("");
34
+ let number = $state("");
35
+ let displayNumber = $state("");
36
+ let lastEmitted = $state("");
37
+
38
+ const currentCountry = $derived(
39
+ COUNTRIES.find((c) => c.iso2 === country) ?? null,
40
+ );
41
+
42
+ function nationalDigits(input: string): string {
43
+ return input.replace(/\D/g, "");
44
+ }
45
+
46
+ function formatNational(input: string): string {
47
+ const digits = nationalDigits(input);
48
+ if (!options?.spaces) return digits;
49
+ return digits.match(/.{1,3}/g)?.join(" ") ?? "";
50
+ }
51
+
52
+ function formatFull(code: string, input: string): string {
53
+ const national = nationalDigits(input);
54
+ if (!national) return "";
55
+ return options?.spaces
56
+ ? `+${code} ${formatNational(national)}`
57
+ : `+${code}${national}`;
58
+ }
59
+
60
+ function parseValue(
61
+ input: string,
62
+ ): { code: string; number: string } | null {
63
+ const digits = nationalDigits(input);
64
+ if (!digits) return null;
65
+ for (const c of COUNTRIES) {
66
+ if (
67
+ digits.startsWith(c.dialCode) &&
68
+ digits.length > c.dialCode.length
69
+ ) {
70
+ return {
71
+ code: c.dialCode,
72
+ number: digits.slice(c.dialCode.length),
73
+ };
74
+ }
75
+ }
76
+ const exact = COUNTRIES.find((c) => digits === c.dialCode);
77
+ if (exact) return { code: exact.dialCode, number: "" };
78
+ return { code: "", number: digits };
79
+ }
80
+
81
+ function isValidNumber(input: string): boolean {
82
+ const length = nationalDigits(input).length;
83
+ if (!length) return true;
84
+ return length >= 6 && length <= 15;
85
+ }
86
+
87
+ function handleNumberInput(e: Event) {
88
+ const input = (e.currentTarget as HTMLInputElement).value;
89
+ displayNumber = input;
90
+ number = input.replace(/[^\d]/g, "");
91
+ }
92
+
93
+ function focus() {
94
+ setTimeout(() => {
95
+ el?.focus();
96
+ }, 0);
97
+ }
98
+
99
+ $effect(() => {
100
+ const full = formatFull(dialCode, number);
101
+ if (value !== full) {
102
+ value = full;
103
+ lastEmitted = full;
104
+ }
105
+ valid = isValidNumber(number);
106
+ detailedValue = {
107
+ country: currentCountry,
108
+ code: dialCode,
109
+ number: nationalDigits(number),
110
+ };
111
+ });
112
+
113
+ $effect(() => {
114
+ const incoming = value;
115
+ if (incoming === lastEmitted) return;
116
+ lastEmitted = incoming;
117
+ const parsed = parseValue(incoming);
118
+ if (!parsed) {
119
+ if (!nationalDigits(incoming)) {
120
+ number = "";
121
+ displayNumber = "";
122
+ }
123
+ return;
124
+ }
125
+ if (parsed.code) {
126
+ const matched = COUNTRIES.find((c) => c.dialCode === parsed.code);
127
+ if (matched && matched.iso2 !== country) country = matched.iso2;
128
+ }
129
+ dialCode = parsed.code;
130
+ number = parsed.number;
131
+ displayNumber = formatNational(parsed.number);
132
+ });
133
+ </script>
134
+
135
+ <div class={cn("flex h-9 w-full min-w-0 items-center")}>
136
+ <div class="">
137
+ <CountrySelector
138
+ {order}
139
+ {disabled}
140
+ bind:selected={country}
141
+ bind:dialCode
142
+ onselect={focus}
143
+ />
144
+ </div>
145
+ <input
146
+ type="tel"
147
+ {name}
148
+ bind:this={el}
149
+ bind:value={displayNumber}
150
+ oninput={handleNumberInput}
151
+ {placeholder}
152
+ {readonly}
153
+ {disabled}
154
+ aria-invalid={!valid}
155
+ class={cn(
156
+ "border-input bg-transparent border-l-none selection:bg-primary dark:bg-input/30 selection:text-primary-foreground ring-offset-background placeholder:text-muted-foreground flex h-9 w-full min-w-0 flex-1 rounded-r-md rounded-l-none border-y border-r px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
157
+ "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
158
+ "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
159
+ className,
160
+ )}
161
+ {...rest}
162
+ />
163
+ </div>