@stacksjs/defaults 0.70.54

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 (286) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +2 -0
  3. package/package.json +20 -0
  4. package/resources/assets/fonts/013717e9.woff +0 -0
  5. package/resources/assets/fonts/03355817.woff2 +0 -0
  6. package/resources/assets/fonts/0380de7e.woff2 +0 -0
  7. package/resources/assets/fonts/0ba5d32a.woff +0 -0
  8. package/resources/assets/fonts/0bd57ddf.woff2 +0 -0
  9. package/resources/assets/fonts/19de0a60.woff2 +0 -0
  10. package/resources/assets/fonts/20b87e84.woff +0 -0
  11. package/resources/assets/fonts/4bbc67e1.woff +0 -0
  12. package/resources/assets/fonts/576fb0d7.woff +0 -0
  13. package/resources/assets/fonts/5ea10ee5.woff2 +0 -0
  14. package/resources/assets/fonts/6413fc0a.woff +0 -0
  15. package/resources/assets/fonts/72c114cf.woff +0 -0
  16. package/resources/assets/fonts/73c57e73.woff2 +0 -0
  17. package/resources/assets/fonts/813dca6c.woff +0 -0
  18. package/resources/assets/fonts/8a9b0995.woff2 +0 -0
  19. package/resources/assets/fonts/90b4832f.woff +0 -0
  20. package/resources/assets/fonts/9394ab85.woff2 +0 -0
  21. package/resources/assets/fonts/9b3c7d7f.woff2 +0 -0
  22. package/resources/assets/fonts/Monaco.ttf +0 -0
  23. package/resources/assets/fonts/b1b36d74.woff +0 -0
  24. package/resources/assets/fonts/b5d74798.woff2 +0 -0
  25. package/resources/assets/fonts/b9f81a4d.woff +0 -0
  26. package/resources/assets/fonts/c9784008.woff2 +0 -0
  27. package/resources/assets/fonts/cf692227.woff +0 -0
  28. package/resources/assets/fonts/d1c6ab51.woff2 +0 -0
  29. package/resources/assets/fonts/e2eb62fc.woff +0 -0
  30. package/resources/assets/fonts/fe21f8d8.woff2 +0 -0
  31. package/resources/assets/fonts/nps/CampmateScript-Regular.woff2 +0 -0
  32. package/resources/assets/fonts/nps/NPS_2026-variable.woff2 +0 -0
  33. package/resources/assets/fonts/nps/RedwoodSerif-Regular.woff2 +0 -0
  34. package/resources/assets/fonts/nps/SequoiaSans-Regular.woff2 +0 -0
  35. package/resources/assets/fonts/nps/Switchback-Regular.woff2 +0 -0
  36. package/resources/assets/images/app-icon.png +0 -0
  37. package/resources/assets/images/bg-img.png +0 -0
  38. package/resources/assets/images/park-ridge.svg +15 -0
  39. package/resources/assets/images/topography.svg +1 -0
  40. package/resources/assets/scripts/main.ts +2153 -0
  41. package/resources/assets/styles/README.md +19 -0
  42. package/resources/assets/styles/docs/main.css +1 -0
  43. package/resources/assets/styles/docs/overrides.css +1 -0
  44. package/resources/assets/styles/docs/vars.css +8 -0
  45. package/resources/assets/styles/main.css +1419 -0
  46. package/resources/components/Button.stx +70 -0
  47. package/resources/components/Buttons/BaseButton.stx +39 -0
  48. package/resources/components/Buttons/Counter.stx +28 -0
  49. package/resources/components/Buttons/ToggleDark.stx +11 -0
  50. package/resources/components/Container.stx +10 -0
  51. package/resources/components/Dashboard/.gitkeep +0 -0
  52. package/resources/components/Dashboard/Auth/ForgotPassword.stx +127 -0
  53. package/resources/components/Dashboard/Auth/Login.stx +212 -0
  54. package/resources/components/Dashboard/Auth/Register.stx +306 -0
  55. package/resources/components/Dashboard/Avatar.stx +123 -0
  56. package/resources/components/Dashboard/Billing/ActivePlan.stx +57 -0
  57. package/resources/components/Dashboard/Billing/CardBrands.stx +32 -0
  58. package/resources/components/Dashboard/Billing/CardForm.stx +34 -0
  59. package/resources/components/Dashboard/Billing/OneTimePayment.stx +28 -0
  60. package/resources/components/Dashboard/Billing/PaymentForm.stx +33 -0
  61. package/resources/components/Dashboard/Billing/PaymentMethod.stx +66 -0
  62. package/resources/components/Dashboard/Billing/PaymentMethodList.stx +52 -0
  63. package/resources/components/Dashboard/Billing/Plans.stx +136 -0
  64. package/resources/components/Dashboard/Buttons/AppButton.stx +48 -0
  65. package/resources/components/Dashboard/Buttons/IconButton.stx +20 -0
  66. package/resources/components/Dashboard/Card.stx +78 -0
  67. package/resources/components/Dashboard/Chart.stx +75 -0
  68. package/resources/components/Dashboard/CodeEditor.stx +41 -0
  69. package/resources/components/Dashboard/Commerce/BulkActionBar.stx +70 -0
  70. package/resources/components/Dashboard/Commerce/CategoriesTable.stx +133 -0
  71. package/resources/components/Dashboard/Commerce/CouponsTable.stx +161 -0
  72. package/resources/components/Dashboard/Commerce/CustomersTable.stx +142 -0
  73. package/resources/components/Dashboard/Commerce/Delivery/DeliveryRoutesTable.stx +80 -0
  74. package/resources/components/Dashboard/Commerce/Delivery/DigitalDeliveryTable.stx +85 -0
  75. package/resources/components/Dashboard/Commerce/Delivery/DriversTable.stx +99 -0
  76. package/resources/components/Dashboard/Commerce/Delivery/LicenseKeysTable.stx +92 -0
  77. package/resources/components/Dashboard/Commerce/Delivery/LicenseTemplatesTable.stx +88 -0
  78. package/resources/components/Dashboard/Commerce/Delivery/Pagination.stx +122 -0
  79. package/resources/components/Dashboard/Commerce/Delivery/SearchFilter.stx +23 -0
  80. package/resources/components/Dashboard/Commerce/Delivery/ShippingMethodsTable.stx +80 -0
  81. package/resources/components/Dashboard/Commerce/Delivery/ShippingRatesTable.stx +59 -0
  82. package/resources/components/Dashboard/Commerce/Delivery/ShippingZonesTable.stx +71 -0
  83. package/resources/components/Dashboard/Commerce/Delivery/TabNavigation.stx +36 -0
  84. package/resources/components/Dashboard/Commerce/Forms/CouponsForm.stx +191 -0
  85. package/resources/components/Dashboard/Commerce/OrdersTable.stx +131 -0
  86. package/resources/components/Dashboard/Commerce/ProductsTable.stx +170 -0
  87. package/resources/components/Dashboard/CreateRecordModal.stx +363 -0
  88. package/resources/components/Dashboard/DashboardLayout.stx +155 -0
  89. package/resources/components/Dashboard/Deployments/ActivityFeed.stx +54 -0
  90. package/resources/components/Dashboard/Deployments/DeployScript.stx +23 -0
  91. package/resources/components/Dashboard/Deployments/DeploymentHistory.stx +97 -0
  92. package/resources/components/Dashboard/Deployments/DeploymentList.stx +94 -0
  93. package/resources/components/Dashboard/Deployments/LiveTerminalOutput.stx +18 -0
  94. package/resources/components/Dashboard/Elements/Dropdown.stx +57 -0
  95. package/resources/components/Dashboard/Email/EmailActivityChart.stx +111 -0
  96. package/resources/components/Dashboard/Email/EmailCompose.stx +72 -0
  97. package/resources/components/Dashboard/Email/EmailDetail.stx +105 -0
  98. package/resources/components/Dashboard/Email/EmailList.stx +117 -0
  99. package/resources/components/Dashboard/Email/EmailSearch.stx +40 -0
  100. package/resources/components/Dashboard/Email/EmailSidebar.stx +133 -0
  101. package/resources/components/Dashboard/GlobalSearch.stx +124 -0
  102. package/resources/components/Dashboard/MobileSidebar.stx +47 -0
  103. package/resources/components/Dashboard/Modals/BaseModal.stx +50 -0
  104. package/resources/components/Dashboard/Modals/Popups/Alert.stx +112 -0
  105. package/resources/components/Dashboard/Modals/Popups/Toast.stx +70 -0
  106. package/resources/components/Dashboard/Modals/ToastWrapper.stx +35 -0
  107. package/resources/components/Dashboard/Monitoring/ErrorDetailModal.stx +228 -0
  108. package/resources/components/Dashboard/Monitoring/ErrorsTable.stx +184 -0
  109. package/resources/components/Dashboard/Navbar.stx +194 -0
  110. package/resources/components/Dashboard/NavbarModern.stx +188 -0
  111. package/resources/components/Dashboard/NotificationErrorModal.stx +105 -0
  112. package/resources/components/Dashboard/NotificationStatusBadge.stx +20 -0
  113. package/resources/components/Dashboard/Pagination.stx +90 -0
  114. package/resources/components/Dashboard/Queue/QueueTable.stx +127 -0
  115. package/resources/components/Dashboard/Settings/Forms/AIForm.stx +126 -0
  116. package/resources/components/Dashboard/Settings/Forms/AnalyticsForm.stx +52 -0
  117. package/resources/components/Dashboard/Settings/Forms/AppForm.stx +157 -0
  118. package/resources/components/Dashboard/Settings/Forms/CLIForm.stx +66 -0
  119. package/resources/components/Dashboard/Settings/Forms/CacheForm.stx +253 -0
  120. package/resources/components/Dashboard/Settings/Forms/CloudForm.stx +441 -0
  121. package/resources/components/Dashboard/Settings/Forms/DNSForm.stx +307 -0
  122. package/resources/components/Dashboard/Settings/Forms/DatabaseForm.stx +168 -0
  123. package/resources/components/Dashboard/Settings/Forms/EmailForm.stx +100 -0
  124. package/resources/components/Dashboard/Settings/Forms/FileSystemForm.stx +259 -0
  125. package/resources/components/Dashboard/Settings/Forms/HashingForm.stx +119 -0
  126. package/resources/components/Dashboard/Settings/Forms/LibraryForm.stx +389 -0
  127. package/resources/components/Dashboard/Settings/Forms/QueueForm.stx +219 -0
  128. package/resources/components/Dashboard/Settings/Forms/SearchEngineForm.stx +48 -0
  129. package/resources/components/Dashboard/Settings/Forms/SecurityForm.stx +143 -0
  130. package/resources/components/Dashboard/Settings/Forms/ServicesForm.stx +194 -0
  131. package/resources/components/Dashboard/Settings/Forms/StorageForm.stx +191 -0
  132. package/resources/components/Dashboard/Settings/Forms/TeamsForm.stx +33 -0
  133. package/resources/components/Dashboard/Settings/SettingsFormManager.stx +181 -0
  134. package/resources/components/Dashboard/SettingsHeader.stx +88 -0
  135. package/resources/components/Dashboard/SettingsSidebar.stx +234 -0
  136. package/resources/components/Dashboard/Sidebar.stx +23 -0
  137. package/resources/components/Dashboard/SidebarModern.stx +249 -0
  138. package/resources/components/Dashboard/Skeleton/LoadingCard.stx +15 -0
  139. package/resources/components/Dashboard/Skeleton/LoadingDetails.stx +26 -0
  140. package/resources/components/Dashboard/Table.stx +82 -0
  141. package/resources/components/Dashboard/TerminalContainer.stx +97 -0
  142. package/resources/components/Dashboard/Tooltip.stx +166 -0
  143. package/resources/components/Dashboard/Transaction/index.stx +88 -0
  144. package/resources/components/Dashboard/UI/ActivityTable.stx +54 -0
  145. package/resources/components/Dashboard/UI/Avatar.stx +102 -0
  146. package/resources/components/Dashboard/UI/Badge.stx +66 -0
  147. package/resources/components/Dashboard/UI/Button.stx +73 -0
  148. package/resources/components/Dashboard/UI/Card.stx +51 -0
  149. package/resources/components/Dashboard/UI/ChartCard.stx +36 -0
  150. package/resources/components/Dashboard/UI/Checkbox.stx +74 -0
  151. package/resources/components/Dashboard/UI/ConfirmDialog.stx +74 -0
  152. package/resources/components/Dashboard/UI/DataTable.stx +45 -0
  153. package/resources/components/Dashboard/UI/Dropdown.stx +72 -0
  154. package/resources/components/Dashboard/UI/DropdownItem.stx +80 -0
  155. package/resources/components/Dashboard/UI/EmptyState.stx +50 -0
  156. package/resources/components/Dashboard/UI/FilterBar.stx +48 -0
  157. package/resources/components/Dashboard/UI/Input.stx +77 -0
  158. package/resources/components/Dashboard/UI/Modal.stx +75 -0
  159. package/resources/components/Dashboard/UI/PageHeader.stx +69 -0
  160. package/resources/components/Dashboard/UI/PageLayout.stx +84 -0
  161. package/resources/components/Dashboard/UI/Pagination.stx +126 -0
  162. package/resources/components/Dashboard/UI/QuickLinks.stx +31 -0
  163. package/resources/components/Dashboard/UI/RouterLink.stx +31 -0
  164. package/resources/components/Dashboard/UI/Select.stx +84 -0
  165. package/resources/components/Dashboard/UI/ServiceHealth.stx +38 -0
  166. package/resources/components/Dashboard/UI/StatsCard.stx +79 -0
  167. package/resources/components/Dashboard/UI/Table.stx +143 -0
  168. package/resources/components/Dashboard/UI/Tabs.stx +45 -0
  169. package/resources/components/Dashboard/UI/Textarea.stx +93 -0
  170. package/resources/components/Dashboard/UI/Toggle.stx +84 -0
  171. package/resources/components/Dashboard/UI/WindowControls.stx +135 -0
  172. package/resources/components/Dashboard/Widget.stx +89 -0
  173. package/resources/components/Dashboard/WindowControls.stx +119 -0
  174. package/resources/components/Dashboard/index.ts +106 -0
  175. package/resources/components/Docs/Demo/ComboboxCode.md +114 -0
  176. package/resources/components/Docs/Demo/ComboboxDemo.stx +91 -0
  177. package/resources/components/Docs/Demo/DialogCode.md +42 -0
  178. package/resources/components/Docs/Demo/DialogDemo.stx +76 -0
  179. package/resources/components/Docs/Demo/DocsPlayground.stx +39 -0
  180. package/resources/components/Docs/Demo/DropdownCode.md +109 -0
  181. package/resources/components/Docs/Demo/DropdownDemo.stx +82 -0
  182. package/resources/components/Docs/Demo/Hero.stx +100 -0
  183. package/resources/components/Docs/Demo/ListboxCode.md +87 -0
  184. package/resources/components/Docs/Demo/ListboxDemo.stx +59 -0
  185. package/resources/components/Docs/Demo/NotificationCode.md +173 -0
  186. package/resources/components/Docs/Demo/NotificationDemo.stx +99 -0
  187. package/resources/components/Docs/Demo/PopoverCode.md +161 -0
  188. package/resources/components/Docs/Demo/PopoverDemo.stx +96 -0
  189. package/resources/components/Docs/Demo/RadioGroupCode.md +98 -0
  190. package/resources/components/Docs/Demo/RadioGroupDemo.stx +53 -0
  191. package/resources/components/Docs/Demo/StepperCode.md +216 -0
  192. package/resources/components/Docs/Demo/StepperDemo.stx +137 -0
  193. package/resources/components/Docs/Demo/SwitchCode.md +24 -0
  194. package/resources/components/Docs/Demo/SwitchDemo.stx +28 -0
  195. package/resources/components/Docs/Home.stx +7 -0
  196. package/resources/components/Docs/HomeContributors.stx +23 -0
  197. package/resources/components/Docs/HomeSponsors.stx +17 -0
  198. package/resources/components/Docs/HomeTeam.stx +18 -0
  199. package/resources/components/Docs/TeamMember.stx +79 -0
  200. package/resources/components/Email/EmailButton.stx +32 -0
  201. package/resources/components/Email/EmailDivider.stx +20 -0
  202. package/resources/components/Email/EmailImage.stx +24 -0
  203. package/resources/components/Email/EmailLayout.stx +55 -0
  204. package/resources/components/Email/EmailLink.stx +22 -0
  205. package/resources/components/Email/EmailSection.stx +20 -0
  206. package/resources/components/Email/EmailText.stx +30 -0
  207. package/resources/components/Forum/ForumBreadcrumb.stx +38 -0
  208. package/resources/components/Forum/ForumCategory.stx +16 -0
  209. package/resources/components/Forum/ForumCategoryItem.stx +46 -0
  210. package/resources/components/Forum/ForumLayout.stx +36 -0
  211. package/resources/components/Forum/ForumPagination.stx +39 -0
  212. package/resources/components/Forum/ForumPost.stx +71 -0
  213. package/resources/components/Forum/ForumReplyForm.stx +76 -0
  214. package/resources/components/Forum/ForumSidebar.stx +86 -0
  215. package/resources/components/Forum/ForumTopicItem.stx +77 -0
  216. package/resources/components/Forum/ForumTopicList.stx +23 -0
  217. package/resources/components/HelloWorld.stx +253 -0
  218. package/resources/components/Logo.stx +10 -0
  219. package/resources/components/Marketing/CallToAction.stx +30 -0
  220. package/resources/components/Marketing/ComingSoon.stx +155 -0
  221. package/resources/components/Marketing/Faqs.stx +99 -0
  222. package/resources/components/Marketing/Feature.stx +32 -0
  223. package/resources/components/Marketing/Fields.stx +28 -0
  224. package/resources/components/Marketing/Footer.stx +33 -0
  225. package/resources/components/Marketing/Header.stx +51 -0
  226. package/resources/components/Marketing/Hero.stx +46 -0
  227. package/resources/components/Marketing/Layout.stx +26 -0
  228. package/resources/components/Marketing/NavLink.stx +13 -0
  229. package/resources/components/Marketing/Plan.stx +43 -0
  230. package/resources/components/Marketing/Pricing.stx +120 -0
  231. package/resources/components/Marketing/PrimaryFeatures.stx +80 -0
  232. package/resources/components/Marketing/PrimaryFeatures2.stx +98 -0
  233. package/resources/components/Marketing/SecondaryFeatures.stx +80 -0
  234. package/resources/components/Marketing/Testimonials.stx +120 -0
  235. package/resources/components/Pagination.stx +149 -0
  236. package/resources/components/Playground.stx +9 -0
  237. package/resources/components/README.md +87 -0
  238. package/resources/components/Storefront/AnnouncementBar.stx +17 -0
  239. package/resources/components/Storefront/CartDrawer.stx +227 -0
  240. package/resources/components/Storefront/CheckoutSteps.stx +50 -0
  241. package/resources/components/Storefront/Footer.stx +81 -0
  242. package/resources/components/Storefront/Header.stx +66 -0
  243. package/resources/components/Storefront/OrderSummary.stx +79 -0
  244. package/resources/components/Storefront/ProductCard.stx +63 -0
  245. package/resources/components/Storefront/ProductGallery.stx +88 -0
  246. package/resources/components/Storefront/QuantitySelector.stx +97 -0
  247. package/resources/components/index.ts +13 -0
  248. package/resources/emails/email-verification.stx +46 -0
  249. package/resources/emails/layouts/base.html +113 -0
  250. package/resources/emails/password-changed.stx +55 -0
  251. package/resources/emails/password-reset.stx +43 -0
  252. package/resources/emails/subscription-confirmation.stx +99 -0
  253. package/resources/emails/welcome.stx +48 -0
  254. package/resources/functions/README.md +28 -0
  255. package/resources/functions/counter.ts +13 -0
  256. package/resources/functions/dark.ts +4 -0
  257. package/resources/functions/dashboard/analytics.ts +238 -0
  258. package/resources/functions/dashboard/config-io.ts +316 -0
  259. package/resources/functions/dashboard/data.ts +375 -0
  260. package/resources/functions/dashboard/library.ts +250 -0
  261. package/resources/functions/dashboard/sidebar.ts +537 -0
  262. package/resources/functions/dashboard/system.ts +150 -0
  263. package/resources/layouts/403.stx +188 -0
  264. package/resources/layouts/404.stx +34 -0
  265. package/resources/layouts/README.md +14 -0
  266. package/resources/layouts/dashboard/default.stx +20 -0
  267. package/resources/layouts/dashboard/guest.stx +10 -0
  268. package/resources/layouts/default.stx +3 -0
  269. package/resources/layouts/maintenance.stx +11 -0
  270. package/resources/layouts/storefront.stx +73 -0
  271. package/resources/layouts/system-tray/default.stx +3 -0
  272. package/resources/modules/.gitkeep +0 -0
  273. package/resources/plugins/.gitkeep +0 -0
  274. package/resources/plugins/preloader.ts +308 -0
  275. package/resources/types/README.md +3 -0
  276. package/resources/views/cart.stx +149 -0
  277. package/resources/views/checkout/contact.stx +101 -0
  278. package/resources/views/checkout/payment.stx +114 -0
  279. package/resources/views/checkout/shipping.stx +120 -0
  280. package/resources/views/coming-soon.stx +9 -0
  281. package/resources/views/dashboard/custom-page.stx +45 -0
  282. package/resources/views/dashboard/index.stx +24 -0
  283. package/resources/views/emails/welcome.stx +0 -0
  284. package/resources/views/errors/tester.stx +26 -0
  285. package/resources/views/index.stx +2865 -0
  286. package/resources/views/orders/[id].stx +130 -0
@@ -0,0 +1,173 @@
1
+ ```vue
2
+ <script lang="ts" setup>
3
+ import { ref } from '@stacksjs/stx'
4
+ import { Notification, notification } from '@stacksjs/notifications'
5
+
6
+ type Position = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'top-center' | 'bottom-center'
7
+ type Theme = 'light' | 'dark' | 'system'
8
+
9
+ const position = ref<Position>('top-right')
10
+ const theme = ref<Theme>('light')
11
+
12
+ const showBasicNotification = () => {
13
+ notification('This is a basic notification')
14
+ }
15
+
16
+ const showSuccessNotification = () => {
17
+ notification.success('Operation completed successfully!', {
18
+ description: 'Your changes have been saved.',
19
+ duration: 3000
20
+ })
21
+ }
22
+
23
+ const showErrorNotification = () => {
24
+ notification.error('Error occurred', {
25
+ description: 'Please try again later.',
26
+ closeButton: true
27
+ })
28
+ }
29
+
30
+ const showLoadingNotification = () => {
31
+ const loadingId = notification.loading('Processing your request...', {
32
+ duration: 3000
33
+ })
34
+
35
+ // Simulate async operation
36
+ setTimeout(() => {
37
+ notification.success('Process completed!', {
38
+ id: loadingId
39
+ })
40
+ }, 3000)
41
+ }
42
+
43
+ const showPromiseNotification = () => {
44
+ const promise = new Promise((resolve, reject) => {
45
+ setTimeout(() => {
46
+ if (Math.random() > 0.5) {
47
+ resolve('Data successfully fetched!')
48
+ } else {
49
+ reject('Failed to fetch data')
50
+ }
51
+ }, 2000)
52
+ })
53
+
54
+ notification.promise(promise, {
55
+ loading: 'Fetching data...',
56
+ success: (data) => data,
57
+ error: (error) => error
58
+ })
59
+ }
60
+
61
+ const showCustomNotification = () => {
62
+ notification.custom('Custom Notification', {
63
+ description: 'This is a custom styled notification',
64
+ duration: 4000,
65
+ style: {
66
+ background: 'linear-gradient(to right, #00b09b, #96c93d)',
67
+ color: 'white'
68
+ }
69
+ })
70
+ }
71
+ </script>
72
+
73
+ <template>
74
+ <div class="p-6 space-y-6">
75
+ <h2 class="mb-4 font-bold text-2xl">Notification Demo</h2>
76
+
77
+ <div class="space-y-4">
78
+ <div class="flex flex-wrap gap-4">
79
+ <button
80
+ @click="showBasicNotification"
81
+ class="px-4 py-2 text-white bg-blue-500 hover:bg-blue-600 rounded"
82
+ >
83
+ Basic Notification
84
+ </button>
85
+
86
+ <button
87
+ @click="showSuccessNotification"
88
+ class="px-4 py-2 text-white bg-green-500 hover:bg-green-600 rounded"
89
+ >
90
+ Success Notification
91
+ </button>
92
+
93
+ <button
94
+ @click="showErrorNotification"
95
+ class="px-4 py-2 text-white bg-red-500 hover:bg-red-600 rounded"
96
+ >
97
+ Error Notification
98
+ </button>
99
+
100
+ <button
101
+ @click="showLoadingNotification"
102
+ class="px-4 py-2 text-white bg-yellow-500 hover:bg-yellow-600 rounded"
103
+ >
104
+ Loading Notification
105
+ </button>
106
+
107
+ <button
108
+ @click="showPromiseNotification"
109
+ class="px-4 py-2 text-white bg-purple-500 hover:bg-purple-600 rounded"
110
+ >
111
+ Promise Notification
112
+ </button>
113
+
114
+ <button
115
+ @click="showCustomNotification"
116
+ class="px-4 py-2 text-white bg-gray-500 hover:bg-gray-600 rounded"
117
+ >
118
+ Custom Notification
119
+ </button>
120
+ </div>
121
+
122
+ <div class="space-y-2">
123
+ <label class="block">
124
+ Position:
125
+ <select
126
+ v-model="position"
127
+ class="ml-2 p-1 border rounded"
128
+ >
129
+ <option value="top-right">Top Right</option>
130
+ <option value="top-left">Top Left</option>
131
+ <option value="bottom-right">Bottom Right</option>
132
+ <option value="bottom-left">Bottom Left</option>
133
+ <option value="top-center">Top Center</option>
134
+ <option value="bottom-center">Bottom Center</option>
135
+ </select>
136
+ </label>
137
+
138
+ <label class="block">
139
+ Theme:
140
+ <select
141
+ v-model="theme"
142
+ class="ml-2 p-1 border rounded"
143
+ >
144
+ <option value="light">Light</option>
145
+ <option value="dark">Dark</option>
146
+ <option value="system">System</option>
147
+ </select>
148
+ </label>
149
+ </div>
150
+ </div>
151
+
152
+ <Notification
153
+ :position="position"
154
+ :theme="theme"
155
+ :close-button="true"
156
+ />
157
+ </div>
158
+ </template>
159
+
160
+ <style scoped>
161
+ .space-y-6 > * + * {
162
+ margin-top: 1.5rem;
163
+ }
164
+
165
+ .space-y-4 > * + * {
166
+ margin-top: 1rem;
167
+ }
168
+
169
+ .space-y-2 > * + * {
170
+ margin-top: 0.5rem;
171
+ }
172
+ </style>
173
+ ```
@@ -0,0 +1,99 @@
1
+ <script>
2
+ interface NotificationDemoProps {
3
+ position?: string
4
+ theme?: string
5
+ }
6
+
7
+ const { position = 'top-right', theme = 'light' } = defineProps<NotificationDemoProps>()
8
+ </script>
9
+ <div class="max-w-4xl">
10
+ <DocsPlayground>
11
+ <div class="flex flex-wrap gap-3">
12
+ <button
13
+ class="px-4 py-2 text-white bg-blue-500 hover:bg-blue-600 rounded"
14
+ data-action="show-notification"
15
+ data-type="basic"
16
+ >
17
+ Basic Notification
18
+ </button>
19
+
20
+ <button
21
+ class="px-4 py-2 text-white bg-green-500 hover:bg-green-600 rounded"
22
+ data-action="show-notification"
23
+ data-type="success"
24
+ >
25
+ Success Notification
26
+ </button>
27
+
28
+ <button
29
+ class="px-4 py-2 text-white bg-red-500 hover:bg-red-600 rounded"
30
+ data-action="show-notification"
31
+ data-type="error"
32
+ >
33
+ Error Notification
34
+ </button>
35
+
36
+ <button
37
+ class="px-4 py-2 text-white bg-yellow-500 hover:bg-yellow-600 rounded"
38
+ data-action="show-notification"
39
+ data-type="loading"
40
+ >
41
+ Loading Notification
42
+ </button>
43
+
44
+ <button
45
+ class="px-4 py-2 text-white bg-purple-500 hover:bg-purple-600 rounded"
46
+ data-action="show-notification"
47
+ data-type="promise"
48
+ >
49
+ Promise Notification
50
+ </button>
51
+
52
+ <button
53
+ class="px-4 py-2 text-white bg-gray-500 hover:bg-gray-600 rounded"
54
+ data-action="show-notification"
55
+ data-type="custom"
56
+ >
57
+ Custom Notification
58
+ </button>
59
+ </div>
60
+
61
+ <div class="mt-3 space-y-2">
62
+ <label class="block">
63
+ Position:
64
+ <select
65
+ name="position"
66
+ class="ml-2 p-1 font-semibold text-center text-white bg-blue-500 border rounded"
67
+ data-action="change-position"
68
+ >
69
+ <option value="top-right" {{ position == 'top-right' ? 'selected' : '' }}>Top Right</option>
70
+ <option value="top-left" {{ position == 'top-left' ? 'selected' : '' }}>Top Left</option>
71
+ <option value="bottom-right" {{ position == 'bottom-right' ? 'selected' : '' }}>Bottom Right</option>
72
+ <option value="bottom-left" {{ position == 'bottom-left' ? 'selected' : '' }}>Bottom Left</option>
73
+ <option value="top-center" {{ position == 'top-center' ? 'selected' : '' }}>Top Center</option>
74
+ <option value="bottom-center" {{ position == 'bottom-center' ? 'selected' : '' }}>Bottom Center</option>
75
+ </select>
76
+ </label>
77
+
78
+ <label class="block">
79
+ Theme:
80
+ <select
81
+ name="theme"
82
+ class="ml-2 p-2 font-semibold text-center text-white bg-blue-500 border rounded"
83
+ data-action="change-theme"
84
+ >
85
+ <option value="light" {{ theme == 'light' ? 'selected' : '' }}>Light</option>
86
+ <option value="dark" {{ theme == 'dark' ? 'selected' : '' }}>Dark</option>
87
+ <option value="system" {{ theme == 'system' ? 'selected' : '' }}>System</option>
88
+ </select>
89
+ </label>
90
+ </div>
91
+
92
+ <div slot="code">
93
+ <!-- NotificationCode component would be rendered here -->
94
+ </div>
95
+ </DocsPlayground>
96
+ </div>
97
+
98
+ <!-- Notification container would be rendered here with position and theme props -->
99
+ <div id="notification-container" data-position="{{ position }}" data-theme="{{ theme }}"></div>
@@ -0,0 +1,161 @@
1
+ ```vue
2
+
3
+ <script lang="ts" setup>
4
+ import { Popover, PopoverButton, PopoverPanel } from '@stacksjs/popover'
5
+
6
+ const solutions = [
7
+ {
8
+ name: 'Insights',
9
+ description: 'Measure actions your users take',
10
+ href: '##',
11
+ icon: `
12
+ <svg
13
+ width="48"
14
+ height="48"
15
+ viewBox="0 0 48 48"
16
+ fill="none"
17
+ aria-hidden="true"
18
+ xmlns="http://www.w3.org/2000/svg"
19
+ >
20
+ <rect width="48" height="48" rx="8" fill="#FFEDD5" />
21
+ <path
22
+ d="M24 11L35.2583 17.5V30.5L24 37L12.7417 30.5V17.5L24 11Z"
23
+ stroke="#FB923C"
24
+ stroke-width="2"
25
+ />
26
+ <path
27
+ fill-rule="evenodd"
28
+ clip-rule="evenodd"
29
+ d="M16.7417 19.8094V28.1906L24 32.3812L31.2584 28.1906V19.8094L24 15.6188L16.7417 19.8094Z"
30
+ stroke="#FDBA74"
31
+ stroke-width="2"
32
+ />
33
+ <path
34
+ fill-rule="evenodd"
35
+ clip-rule="evenodd"
36
+ d="M20.7417 22.1196V25.882L24 27.7632L27.2584 25.882V22.1196L24 20.2384L20.7417 22.1196Z"
37
+ stroke="#FDBA74"
38
+ stroke-width="2"
39
+ />
40
+ </svg>
41
+ `,
42
+ },
43
+ {
44
+ name: 'Automations',
45
+ description: 'Create your own targeted content',
46
+ href: '##',
47
+ icon: `
48
+ <svg
49
+ width="48"
50
+ height="48"
51
+ viewBox="0 0 48 48"
52
+ fill="none"
53
+ xmlns="http://www.w3.org/2000/svg"
54
+ >
55
+ <rect width="48" height="48" rx="8" fill="#FFEDD5" />
56
+ <path
57
+ d="M28.0413 20L23.9998 13L19.9585 20M32.0828 27.0001L36.1242 34H28.0415M19.9585 34H11.8755L15.9171 27"
58
+ stroke="#FB923C"
59
+ stroke-width="2"
60
+ />
61
+ <path
62
+ fill-rule="evenodd"
63
+ clip-rule="evenodd"
64
+ d="M18.804 30H29.1963L24.0001 21L18.804 30Z"
65
+ stroke="#FDBA74"
66
+ stroke-width="2"
67
+ />
68
+ </svg>
69
+ `,
70
+ },
71
+ {
72
+ name: 'Reports',
73
+ description: 'Keep track of your growth',
74
+ href: '##',
75
+ icon: `
76
+ <svg
77
+ width="48"
78
+ height="48"
79
+ viewBox="0 0 48 48"
80
+ fill="none"
81
+ xmlns="http://www.w3.org/2000/svg"
82
+ >
83
+ <rect width="48" height="48" rx="8" fill="#FFEDD5" />
84
+ <rect x="13" y="32" width="2" height="4" fill="#FDBA74" />
85
+ <rect x="17" y="28" width="2" height="8" fill="#FDBA74" />
86
+ <rect x="21" y="24" width="2" height="12" fill="#FDBA74" />
87
+ <rect x="25" y="20" width="2" height="16" fill="#FDBA74" />
88
+ <rect x="29" y="16" width="2" height="20" fill="#FB923C" />
89
+ <rect x="33" y="12" width="2" height="24" fill="#FB923C" />
90
+ </svg>
91
+ `,
92
+ },
93
+ ]
94
+
95
+ </script>
96
+
97
+ <template>
98
+ <Popover v-slot="{ open }" class="relative">
99
+ <PopoverButton
100
+ :class=": ? 'text-white' 'text-white/90' open"
101
+ class="inline-flex gap-2 items-center justify-center px-4 py-2.5 font-medium text-sm text-white bg-indigo-600 hover:bg-indigo-700 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 shadow-sm duration-200 transition-all group"
102
+ >
103
+ <span>Example</span>
104
+ <div class="h-5 w-5 i-hugeicons-arrow-down-01" />
105
+ </PopoverButton>
106
+
107
+ <transition
108
+ enter-active-class="duration-200 ease-out transition"
109
+ enter-from-class="opacity-0 translate-y-1"
110
+ enter-to-class="opacity-100 translate-y-0"
111
+ leave-active-class="duration-150 ease-in transition"
112
+ leave-from-class="opacity-100 translate-y-0"
113
+ leave-to-class="opacity-0 translate-y-1"
114
+ >
115
+ <PopoverPanel
116
+ class="absolute left-1/2 z-50 mt-3 px-4 sm:px-0 max-w-sm w-screen transform -translate-x-1/2"
117
+ >
118
+ <div class="overflow-hidden ring-1 ring-black/5 rounded-lg shadow-lg">
119
+ <div class="flex relative flex-col gap-8 lg:grid-cols-2 p-7 bg-white">
120
+ <a
121
+ v-for="item in solutions"
122
+ :key="item.name"
123
+ :href="item.href"
124
+ class="flex items-center -m-3 p-2 hover:bg-gray-50 rounded-lg focus-visible:ring focus-visible:ring-orange-500/50 focus:outline-none duration-150 ease-in-out transition"
125
+ >
126
+ <div
127
+ class="flex items-center justify-center shrink-0 h-10 w-10 sm:h-12 sm:w-12 text-white"
128
+ >
129
+ <div v-html="item.icon" />
130
+ </div>
131
+ <div class="ml-4">
132
+ <p class="font-medium text-gray-900 text-sm">
133
+ {{ item.name }}
134
+ </p>
135
+ <p class="text-gray-500 text-sm">
136
+ {{ item.description }}
137
+ </p>
138
+ </div>
139
+ </a>
140
+ </div>
141
+ <div class="p-4 bg-gray-50">
142
+ <a
143
+ href="##"
144
+ class="flow-root px-2 py-2 hover:bg-gray-100 rounded-md focus-visible:ring focus-visible:ring-orange-500/50 focus:outline-none duration-150 ease-in-out transition"
145
+ >
146
+ <span class="flex items-center">
147
+ <span class="font-medium text-gray-900 text-sm">
148
+ Documentation
149
+ </span>
150
+ </span>
151
+ <span class="block text-gray-500 text-sm">
152
+ Start integrating products and tools
153
+ </span>
154
+ </a>
155
+ </div>
156
+ </div>
157
+ </PopoverPanel>
158
+ </transition>
159
+ </Popover>
160
+ </template>
161
+ ```
@@ -0,0 +1,96 @@
1
+ <script>
2
+ interface PopoverDemoProps {
3
+ solutions?: string
4
+ isOpen?: boolean
5
+ }
6
+
7
+ const { solutions = [, isOpen = false } = defineProps<PopoverDemoProps>()
8
+
9
+ {
10
+ name: 'Insights',
11
+ description: 'Measure actions your users take',
12
+ href: '##',
13
+ iconBg: '#FFEDD5',
14
+ iconStroke: '#FB923C',
15
+ },
16
+ {
17
+ name: 'Automations',
18
+ description: 'Create your own targeted content',
19
+ href: '##',
20
+ iconBg: '#FFEDD5',
21
+ iconStroke: '#FB923C',
22
+ },
23
+ {
24
+ name: 'Reports',
25
+ description: 'Keep track of your growth',
26
+ href: '##',
27
+ iconBg: '#FFEDD5',
28
+ iconStroke: '#FB923C',
29
+ },
30
+ ]
31
+ </script>
32
+ <div class="max-w-4xl">
33
+ <DocsPlayground>
34
+ <div class="items-center mx-auto my-12 space-y-4 h-[150px] w-3/5">
35
+ <div class="relative">
36
+ <button
37
+ class="inline-flex gap-2 items-center justify-center px-4 py-2.5 font-medium text-sm text-white bg-indigo-600 hover:bg-indigo-700 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 shadow-sm duration-200 transition-all : ? 'text-white' 'text-white/90' {{ }} group isOpen"
38
+ data-action="toggle-popover"
39
+ >
40
+ <span>Example</span>
41
+ <div class="h-5 w-5 i-hugeicons-arrow-down-01"></div>
42
+ </button>
43
+
44
+ @if(isOpen)
45
+ <div class="absolute left-1/2 z-50 mt-3 px-4 sm:px-0 max-w-sm w-screen transform -translate-x-1/2">
46
+ <div class="overflow-hidden ring-1 ring-black/5 rounded-lg shadow-lg">
47
+ <div class="flex relative flex-col gap-8 lg:grid-cols-2 p-7 bg-white">
48
+ @foreach(solutions as item)
49
+ <a
50
+ href="{{ item.href }}"
51
+ class="flex items-center -m-3 p-2 hover:bg-gray-50 rounded-lg focus-visible:ring focus-visible:ring-orange-500/50 focus:outline-none duration-150 ease-in-out transition"
52
+ >
53
+ <div class="flex items-center justify-center shrink-0 h-10 w-10 sm:h-12 sm:w-12 text-white">
54
+ <div class="h-12 w-12 rounded-lg" style="background: {{ item.iconBg }}">
55
+ <svg class="p-2 h-full w-full" viewBox="0 0 24 24" fill="none" stroke="{{ item.iconStroke }}" stroke-width="1.5">
56
+ <circle cx="12" cy="12" r="8" />
57
+ </svg>
58
+ </div>
59
+ </div>
60
+ <div class="ml-4">
61
+ <p class="font-medium text-gray-900 text-sm">
62
+ {{ item.name }}
63
+ </p>
64
+ <p class="text-gray-500 text-sm">
65
+ {{ item.description }}
66
+ </p>
67
+ </div>
68
+ </a>
69
+ @endforeach
70
+ </div>
71
+ <div class="p-4 bg-gray-50">
72
+ <a
73
+ href="##"
74
+ class="flow-root px-2 py-2 hover:bg-gray-100 rounded-md focus-visible:ring focus-visible:ring-orange-500/50 focus:outline-none duration-150 ease-in-out transition"
75
+ >
76
+ <span class="flex items-center">
77
+ <span class="font-medium text-gray-900 text-sm">
78
+ Documentation
79
+ </span>
80
+ </span>
81
+ <span class="block text-gray-500 text-sm">
82
+ Start integrating products and tools
83
+ </span>
84
+ </a>
85
+ </div>
86
+ </div>
87
+ </div>
88
+ @endif
89
+ </div>
90
+ </div>
91
+
92
+ <div slot="code">
93
+ <!-- PopoverCode component would be rendered here -->
94
+ </div>
95
+ </DocsPlayground>
96
+ </div>
@@ -0,0 +1,98 @@
1
+ ```vue
2
+ <script lang="ts" setup>
3
+ import { ref } from '@stacksjs/stx'
4
+ import { RadioGroup, RadioGroupLabel, RadioGroupOption, RadioGroupDescription } from '@stacksjs/radio-group'
5
+
6
+ const plans = [
7
+ {
8
+ name: 'Startup',
9
+ ram: '12GB',
10
+ cpus: '6 CPUs',
11
+ disk: '160 GB SSD disk',
12
+ },
13
+ {
14
+ name: 'Business',
15
+ ram: '16GB',
16
+ cpus: '8 CPUs',
17
+ disk: '512 GB SSD disk',
18
+ },
19
+ {
20
+ name: 'Enterprise',
21
+ ram: '32GB',
22
+ cpus: '12 CPUs',
23
+ disk: '1024 GB SSD disk',
24
+ },
25
+ ]
26
+
27
+ const selected = ref(plans[0])
28
+ </script>
29
+
30
+ <template>
31
+ <RadioGroup v-model="selected">
32
+ <RadioGroupLabel class="sr-only">
33
+ Server size
34
+ </RadioGroupLabel>
35
+ <div class="space-y-2">
36
+ <RadioGroupOption
37
+ v-for="plan in plans"
38
+ :key="plan.name"
39
+ v-slot="{ active, checked }"
40
+ as="template"
41
+ :value="plan"
42
+ >
43
+ <div
44
+ :class="[
45
+ active
46
+ ? 'ring-2 ring-white/60 ring-offset-2 ring-offset-sky-300'
47
+ : '',
48
+ checked ? 'bg-sky-900/75 text-white ' : 'bg-white ',
49
+ ]"
50
+ class="flex relative px-5 py-4 rounded-lg focus:outline-none shadow-md cursor-pointer"
51
+ >
52
+ <div class="flex items-center justify-between w-full">
53
+ <div class="flex items-center">
54
+ <div class="text-sm">
55
+ <RadioGroupLabel
56
+ as="p"
57
+ :class=": ? 'text-gray-900' 'text-white' checked"
58
+ class="font-medium"
59
+ >
60
+ {{ plan.name }}
61
+ </RadioGroupLabel>
62
+ <RadioGroupDescription
63
+ as="span"
64
+ :class=": ? 'text-gray-500' 'text-sky-100' checked"
65
+ class="inline"
66
+ >
67
+ <span> {{ plan.ram }}/{{ plan.cpus }}</span>
68
+ <span aria-hidden="true"> &middot; </span>
69
+ <span>{{ plan.disk }}</span>
70
+ </RadioGroupDescription>
71
+ </div>
72
+ </div>
73
+ <div v-show="checked" class="shrink-0 text-white">
74
+ <svg class="h-6 w-6" viewBox="0 0 24 24" fill="none">
75
+ <circle
76
+ cx="12"
77
+ cy="12"
78
+ r="12"
79
+ fill="#fff"
80
+ fill-opacity="0.2"
81
+ />
82
+ <path
83
+ d="M7 13l3 3 7-7"
84
+ stroke="#fff"
85
+ stroke-width="1.5"
86
+ stroke-linecap="round"
87
+ stroke-linejoin="round"
88
+ />
89
+ </svg>
90
+ </div>
91
+ </div>
92
+ </div>
93
+ </RadioGroupOption>
94
+ </div>
95
+ </RadioGroup>
96
+ </template>
97
+
98
+ ```
@@ -0,0 +1,53 @@
1
+ <script>
2
+ interface RadioGroupDemoProps {
3
+ plans?: string
4
+ selected?: boolean
5
+ }
6
+
7
+ const { plans = [, selected = plans[0] } = defineProps<RadioGroupDemoProps>()
8
+
9
+ { name: 'Startup', ram: '12GB', cpus: '6 CPUs', disk: '160 GB SSD disk' },
10
+ { name: 'Business', ram: '16GB', cpus: '8 CPUs', disk: '512 GB SSD disk' },
11
+ { name: 'Enterprise', ram: '32GB', cpus: '12 CPUs', disk: '1024 GB SSD disk' },
12
+ ]
13
+ </script>
14
+ <div class="max-w-4xl">
15
+ <DocsPlayground>
16
+ <div class="space-y-2">
17
+ @foreach(plans as plan)
18
+ <div
19
+ class="flex relative px-5 py-4 text-white ring-2 ring-offset-2 ring-offset-sky-300' ring-white/60 rounded-lg focus:outline-none shadow-md cursor-pointer selected.name : ? 'bg-sky-900/75 'bg-white' {{ }} == plan.name"
20
+ data-action="select-plan"
21
+ data-plan-name="{{ plan.name }}"
22
+ >
23
+ <div class="flex items-center justify-between w-full">
24
+ <div class="flex items-center">
25
+ <div class="text-sm">
26
+ <p class="font-medium selected.name : ? 'text-gray-900' 'text-white' {{ }} == plan.name">
27
+ {{ plan.name }}
28
+ </p>
29
+ <span class="inline selected.name : ? 'text-gray-500' 'text-sky-100' {{ }} == plan.name">
30
+ <span>{{ plan.ram }}/{{ plan.cpus }}</span>
31
+ <span aria-hidden="true"> &middot; </span>
32
+ <span>{{ plan.disk }}</span>
33
+ </span>
34
+ </div>
35
+ </div>
36
+ @if(selected.name == plan.name)
37
+ <div class="shrink-0 text-white">
38
+ <svg class="h-6 w-6" viewBox="0 0 24 24" fill="none">
39
+ <circle cx="12" cy="12" r="12" fill="#fff" fill-opacity="0.2" />
40
+ <path d="M7 13l3 3 7-7" stroke="#fff" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
41
+ </svg>
42
+ </div>
43
+ @endif
44
+ </div>
45
+ </div>
46
+ @endforeach
47
+ </div>
48
+
49
+ <div slot="code">
50
+ <!-- RadioGroupDemoCode component would be rendered here -->
51
+ </div>
52
+ </DocsPlayground>
53
+ </div>