rimecms 0.26.7 → 0.26.9

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 (280) hide show
  1. package/dist/adapter-sqlite/where.js +7 -1
  2. package/dist/core/areas/api/get.server.js +6 -2
  3. package/dist/core/collections/nested/hooks/index.server.js +3 -1
  4. package/dist/core/collections/upload/upload.d.ts +8 -8
  5. package/dist/core/collections/upload/util/path.js +2 -1
  6. package/dist/core/config/types.d.ts +1 -1
  7. package/dist/core/dev/generate/sanitize/index.js +707 -707
  8. package/dist/core/errors/handler.server.js +3 -3
  9. package/dist/core/fields/util.js +2 -1
  10. package/dist/core/i18n/en/common.js +60 -60
  11. package/dist/core/i18n/en/errors.js +13 -12
  12. package/dist/core/i18n/en/fields.js +11 -11
  13. package/dist/core/i18n/en/mail.js +2 -2
  14. package/dist/core/i18n/fr/common.js +64 -64
  15. package/dist/core/i18n/fr/errors.js +11 -11
  16. package/dist/core/i18n/fr/fields.js +11 -11
  17. package/dist/core/i18n/fr/mail.js +2 -2
  18. package/dist/core/logger/index.server.js +136 -136
  19. package/dist/core/operations/hooks/before-upsert/validate-fields.server.js +5 -5
  20. package/dist/core/plugins/cache/HeaderButton.svelte +11 -11
  21. package/dist/fields/blocks/component/AddBlockButton.svelte +161 -161
  22. package/dist/fields/blocks/component/Block.svelte +157 -157
  23. package/dist/fields/blocks/component/BlockActions.svelte +36 -36
  24. package/dist/fields/blocks/component/Blocks.svelte +154 -154
  25. package/dist/fields/blocks/component/Cell.svelte +12 -12
  26. package/dist/fields/blocks/component/ToggleBlockButton.svelte +11 -11
  27. package/dist/fields/checkbox/component/Checkbox.svelte +51 -51
  28. package/dist/fields/combobox/component/ComboBox.svelte +88 -88
  29. package/dist/fields/combobox/component/combobox.css +24 -24
  30. package/dist/fields/date/component/Cell.svelte +5 -5
  31. package/dist/fields/date/component/Date.svelte +92 -92
  32. package/dist/fields/email/component/Email.svelte +58 -58
  33. package/dist/fields/group/component/Group.svelte +131 -131
  34. package/dist/fields/link/component/Cell.svelte +9 -9
  35. package/dist/fields/link/component/Link.svelte +269 -269
  36. package/dist/fields/link/component/RessourceInput.svelte +183 -183
  37. package/dist/fields/number/component/Number.svelte +118 -118
  38. package/dist/fields/number/component/number.css +52 -52
  39. package/dist/fields/radio/component/Radio.svelte +56 -53
  40. package/dist/fields/relation/component/Cell.svelte +51 -51
  41. package/dist/fields/relation/component/Relation.svelte +226 -226
  42. package/dist/fields/relation/component/default/Default.svelte +218 -218
  43. package/dist/fields/relation/component/upload/Browse.svelte +227 -227
  44. package/dist/fields/relation/component/upload/Upload.svelte +112 -112
  45. package/dist/fields/relation/component/upload/upload.css +72 -72
  46. package/dist/fields/rich-text/component/Cell.svelte +5 -5
  47. package/dist/fields/rich-text/component/RichText.svelte +95 -95
  48. package/dist/fields/rich-text/component/bubble-menu/bubble-menu.css +15 -15
  49. package/dist/fields/rich-text/component/bubble-menu/bubble-menu.svelte +148 -148
  50. package/dist/fields/rich-text/component/bubble-menu/icon-button/icon-button.css +10 -10
  51. package/dist/fields/rich-text/component/bubble-menu/icon-button/icon-button.svelte +23 -17
  52. package/dist/fields/rich-text/component/bubble-menu/node-selector/node-selector.css +37 -37
  53. package/dist/fields/rich-text/component/bubble-menu/node-selector/node-selector.svelte +93 -89
  54. package/dist/fields/rich-text/component/drag-handle/drag-handle.css +12 -12
  55. package/dist/fields/rich-text/component/drag-handle/drag-handle.svelte +27 -27
  56. package/dist/fields/rich-text/component/styles/rich-text.css +142 -142
  57. package/dist/fields/rich-text/component/suggestion/suggestion.svelte +79 -79
  58. package/dist/fields/rich-text/core/extensions/current-node/current-node.css +3 -3
  59. package/dist/fields/rich-text/core/extensions/drag-handle/drag-handle.js +10 -7
  60. package/dist/fields/rich-text/core/extensions/drag-handle/helpers/cloneElement.js +4 -1
  61. package/dist/fields/rich-text/core/extensions/drag-handle/helpers/dragHandler.js +4 -4
  62. package/dist/fields/rich-text/core/extensions/drag-handle/helpers/findNextElementFromCursor.js +4 -4
  63. package/dist/fields/rich-text/core/extensions/drag-handle/helpers/getInnerCoords.js +1 -1
  64. package/dist/fields/rich-text/core/features/fields/fields.css +16 -16
  65. package/dist/fields/rich-text/core/features/fields/fields.svelte +50 -50
  66. package/dist/fields/rich-text/core/features/hr/hr.css +15 -15
  67. package/dist/fields/rich-text/core/features/link/component/link-selector.css +2 -2
  68. package/dist/fields/rich-text/core/features/link/component/link-selector.svelte +266 -266
  69. package/dist/fields/rich-text/core/features/resource/resource.svelte +134 -134
  70. package/dist/fields/rich-text/core/features/upload/upload.svelte +230 -230
  71. package/dist/fields/rich-text/core/render-rich-text.svelte +162 -162
  72. package/dist/fields/rich-text/core/svelte/node-view-wrapper.svelte +25 -18
  73. package/dist/fields/rich-text/util.js +2 -1
  74. package/dist/fields/select/component/Select.svelte +194 -194
  75. package/dist/fields/separator/component/Separator.svelte +5 -5
  76. package/dist/fields/slug/component/Cell.svelte +4 -4
  77. package/dist/fields/slug/component/Slug.svelte +99 -99
  78. package/dist/fields/tabs/component/Tabs.svelte +96 -96
  79. package/dist/fields/text/component/Text.svelte +54 -54
  80. package/dist/fields/textarea/component/TextArea.svelte +51 -51
  81. package/dist/fields/time/component/Time.svelte +44 -44
  82. package/dist/fields/toggle/component/Cell.svelte +10 -10
  83. package/dist/fields/toggle/component/Toggle.svelte +36 -36
  84. package/dist/fields/tree/component/AddItemButton.svelte +35 -29
  85. package/dist/fields/tree/component/Cell.svelte +12 -12
  86. package/dist/fields/tree/component/ToggleBlockButton.svelte +11 -11
  87. package/dist/fields/tree/component/Tree.svelte +150 -150
  88. package/dist/fields/tree/component/TreeBlock.svelte +174 -174
  89. package/dist/fields/tree/component/TreeBlockActions.svelte +13 -13
  90. package/dist/fields/tree/index.js +3 -2
  91. package/dist/live.d.ts +2 -2
  92. package/dist/live.js +2 -2
  93. package/dist/panel/components/Root.svelte +70 -70
  94. package/dist/panel/components/fields/Error.svelte +35 -35
  95. package/dist/panel/components/fields/FieldsPreview.svelte +71 -71
  96. package/dist/panel/components/fields/FieldsPreviewTrigger.svelte +11 -11
  97. package/dist/panel/components/fields/Hint.svelte +12 -12
  98. package/dist/panel/components/fields/Label.svelte +31 -26
  99. package/dist/panel/components/fields/LabelFor.svelte +26 -26
  100. package/dist/panel/components/fields/RenderFields.svelte +102 -102
  101. package/dist/panel/components/sections/auth/AuthForm.svelte +102 -102
  102. package/dist/panel/components/sections/collection/Empty.svelte +18 -18
  103. package/dist/panel/components/sections/collection/StatusDot.svelte +13 -13
  104. package/dist/panel/components/sections/collection/bulk-upload/BulkUploadDialog.svelte +30 -28
  105. package/dist/panel/components/sections/collection/bulk-upload/DropZone.svelte +176 -169
  106. package/dist/panel/components/sections/collection/folder/Folder.svelte +38 -38
  107. package/dist/panel/components/sections/collection/folder/FolderEdit.svelte +57 -57
  108. package/dist/panel/components/sections/collection/folder/FolderWithActions.svelte +223 -223
  109. package/dist/panel/components/sections/collection/grid/CollectionGrid.svelte +102 -102
  110. package/dist/panel/components/sections/collection/grid/create-directory-dialog/CreateDirectoryDialog.svelte +50 -50
  111. package/dist/panel/components/sections/collection/grid/grid-item/GridItem.svelte +56 -56
  112. package/dist/panel/components/sections/collection/header/ButtonCreate.svelte +29 -29
  113. package/dist/panel/components/sections/collection/header/DisplayMode.svelte +59 -59
  114. package/dist/panel/components/sections/collection/header/Header.svelte +11 -11
  115. package/dist/panel/components/sections/collection/header/SearchInput.svelte +41 -41
  116. package/dist/panel/components/sections/collection/header/SelectUI.svelte +51 -51
  117. package/dist/panel/components/sections/collection/header/Separator.svelte +4 -4
  118. package/dist/panel/components/sections/collection/list/CollectionList.svelte +46 -46
  119. package/dist/panel/components/sections/collection/list/header/Header.svelte +56 -56
  120. package/dist/panel/components/sections/collection/list/row/Row.svelte +115 -115
  121. package/dist/panel/components/sections/collection/tree/CollectionTree.svelte +139 -139
  122. package/dist/panel/components/sections/collection/tree/CollectionTreeNode.svelte +56 -56
  123. package/dist/panel/components/sections/collection/upload-thumb-cell/UploadThumbCell.svelte +64 -64
  124. package/dist/panel/components/sections/document/AuthAPIKeyDialog.svelte +66 -66
  125. package/dist/panel/components/sections/document/AuthFooter.svelte +81 -81
  126. package/dist/panel/components/sections/document/ButtonSave.svelte +34 -27
  127. package/dist/panel/components/sections/document/ButtonStatus.svelte +79 -79
  128. package/dist/panel/components/sections/document/CurrentlyEdited.svelte +36 -36
  129. package/dist/panel/components/sections/document/Document.svelte +223 -223
  130. package/dist/panel/components/sections/document/FloatingUI.svelte +69 -69
  131. package/dist/panel/components/sections/document/Header.svelte +105 -105
  132. package/dist/panel/components/sections/document/Settings.svelte +167 -167
  133. package/dist/panel/components/sections/document/Versions.svelte +89 -89
  134. package/dist/panel/components/sections/document/upload-header/UploadHeader.svelte +205 -205
  135. package/dist/panel/components/sections/document/upload-header/drop-zone/DropZone.svelte +141 -141
  136. package/dist/panel/components/sections/live/Consumer.svelte +14 -14
  137. package/dist/panel/components/sections/live/Provider.svelte +10 -10
  138. package/dist/panel/components/sections/live/SidePanel.svelte +56 -56
  139. package/dist/panel/components/sections/live/side-panel.css +10 -8
  140. package/dist/panel/components/sections/page-layout/Page.svelte +23 -23
  141. package/dist/panel/components/sections/unauthorized/Unauthorized.svelte +22 -22
  142. package/dist/panel/components/ui/breadcrumb/BreadCrumb.svelte +40 -40
  143. package/dist/panel/components/ui/button/button.svelte +226 -226
  144. package/dist/panel/components/ui/calendar/calendar-cell.svelte +6 -2
  145. package/dist/panel/components/ui/calendar/calendar-day.svelte +6 -2
  146. package/dist/panel/components/ui/calendar/calendar-grid-body.svelte +6 -2
  147. package/dist/panel/components/ui/calendar/calendar-grid-head.svelte +6 -2
  148. package/dist/panel/components/ui/calendar/calendar-grid-row.svelte +6 -2
  149. package/dist/panel/components/ui/calendar/calendar-grid.svelte +6 -2
  150. package/dist/panel/components/ui/calendar/calendar-head-cell.svelte +6 -2
  151. package/dist/panel/components/ui/calendar/calendar-header.svelte +6 -2
  152. package/dist/panel/components/ui/calendar/calendar-heading.svelte +6 -2
  153. package/dist/panel/components/ui/calendar/calendar-months.svelte +21 -16
  154. package/dist/panel/components/ui/calendar/calendar-next-button.svelte +13 -8
  155. package/dist/panel/components/ui/calendar/calendar-prev-button.svelte +13 -8
  156. package/dist/panel/components/ui/calendar/calendar.css +88 -88
  157. package/dist/panel/components/ui/calendar/calendar.svelte +50 -50
  158. package/dist/panel/components/ui/card/card-content.svelte +17 -12
  159. package/dist/panel/components/ui/card/card-description.svelte +14 -9
  160. package/dist/panel/components/ui/card/card-footer.svelte +17 -12
  161. package/dist/panel/components/ui/card/card-header.svelte +15 -10
  162. package/dist/panel/components/ui/card/card-title.svelte +25 -19
  163. package/dist/panel/components/ui/card/card.svelte +19 -14
  164. package/dist/panel/components/ui/card-document/card-document.svelte +73 -73
  165. package/dist/panel/components/ui/card-resource/card-resource.svelte +108 -108
  166. package/dist/panel/components/ui/checkbox/checkbox.css +28 -28
  167. package/dist/panel/components/ui/checkbox/checkbox.svelte +13 -13
  168. package/dist/panel/components/ui/command/command-dialog.css +24 -24
  169. package/dist/panel/components/ui/command/command-dialog.svelte +28 -18
  170. package/dist/panel/components/ui/command/command-empty.css +2 -2
  171. package/dist/panel/components/ui/command/command-empty.svelte +7 -3
  172. package/dist/panel/components/ui/command/command-group.css +20 -20
  173. package/dist/panel/components/ui/command/command-group.svelte +17 -17
  174. package/dist/panel/components/ui/command/command-input-select.svelte +50 -45
  175. package/dist/panel/components/ui/command/command-input.svelte +57 -57
  176. package/dist/panel/components/ui/command/command-item.css +18 -18
  177. package/dist/panel/components/ui/command/command-item.svelte +7 -3
  178. package/dist/panel/components/ui/command/command-list.css +4 -4
  179. package/dist/panel/components/ui/command/command-list.svelte +7 -3
  180. package/dist/panel/components/ui/command/command-separator.css +4 -4
  181. package/dist/panel/components/ui/command/command-separator.svelte +7 -3
  182. package/dist/panel/components/ui/command/command.css +5 -5
  183. package/dist/panel/components/ui/command/command.svelte +8 -8
  184. package/dist/panel/components/ui/context-menu/ContextMenu.svelte +10 -5
  185. package/dist/panel/components/ui/context-menu/ContextMenu.svelte.d.ts +2 -2
  186. package/dist/panel/components/ui/context-menu/ContextMenuItem.svelte +8 -8
  187. package/dist/panel/components/ui/context-menu/context-menu-item.css +20 -20
  188. package/dist/panel/components/ui/context-menu/context-menu.css +12 -12
  189. package/dist/panel/components/ui/dialog/dialog-content.css +45 -45
  190. package/dist/panel/components/ui/dialog/dialog-content.svelte +33 -33
  191. package/dist/panel/components/ui/dialog/dialog-description.css +2 -2
  192. package/dist/panel/components/ui/dialog/dialog-description.svelte +7 -3
  193. package/dist/panel/components/ui/dialog/dialog-footer.svelte +20 -20
  194. package/dist/panel/components/ui/dialog/dialog-header.svelte +22 -22
  195. package/dist/panel/components/ui/dialog/dialog-overlay.css +6 -6
  196. package/dist/panel/components/ui/dialog/dialog-overlay.svelte +7 -3
  197. package/dist/panel/components/ui/dialog/dialog-title.css +3 -3
  198. package/dist/panel/components/ui/dialog/dialog-title.svelte +7 -3
  199. package/dist/panel/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +55 -55
  200. package/dist/panel/components/ui/dropdown-menu/dropdown-menu-content.css +8 -8
  201. package/dist/panel/components/ui/dropdown-menu/dropdown-menu-content.svelte +14 -9
  202. package/dist/panel/components/ui/dropdown-menu/dropdown-menu-group-heading.css +5 -5
  203. package/dist/panel/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte +10 -10
  204. package/dist/panel/components/ui/dropdown-menu/dropdown-menu-item.css +19 -19
  205. package/dist/panel/components/ui/dropdown-menu/dropdown-menu-item.svelte +9 -9
  206. package/dist/panel/components/ui/dropdown-menu/dropdown-menu-radio-item.css +17 -17
  207. package/dist/panel/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte +17 -17
  208. package/dist/panel/components/ui/dropdown-menu/dropdown-menu-separator.css +3 -3
  209. package/dist/panel/components/ui/dropdown-menu/dropdown-menu-separator.svelte +12 -4
  210. package/dist/panel/components/ui/dropdown-menu/dropdown-menu-trigger.svelte +6 -2
  211. package/dist/panel/components/ui/input/input.svelte +93 -93
  212. package/dist/panel/components/ui/label/label.css +7 -7
  213. package/dist/panel/components/ui/label/label.svelte +8 -8
  214. package/dist/panel/components/ui/language-switcher/LanguageSwitcher.svelte +48 -48
  215. package/dist/panel/components/ui/nav/Nav.svelte +151 -151
  216. package/dist/panel/components/ui/nav/NavGroup.svelte +85 -85
  217. package/dist/panel/components/ui/nav/NavItem.svelte +42 -42
  218. package/dist/panel/components/ui/nav/NavItemButton.svelte +39 -38
  219. package/dist/panel/components/ui/nav/NavItemButtonCaret.svelte +8 -8
  220. package/dist/panel/components/ui/nav/UserButton.svelte +90 -90
  221. package/dist/panel/components/ui/page-header/PageHeader.svelte +80 -80
  222. package/dist/panel/components/ui/pane/pane-resizer.svelte +12 -12
  223. package/dist/panel/components/ui/popover/popover-content.css +7 -7
  224. package/dist/panel/components/ui/popover/popover-content.svelte +16 -10
  225. package/dist/panel/components/ui/radio-group/radio-group-item.svelte +8 -7
  226. package/dist/panel/components/ui/radio-group/radio-group.css +23 -23
  227. package/dist/panel/components/ui/radio-group/radio-group.svelte +8 -8
  228. package/dist/panel/components/ui/radio-row-group/radio-row-group-item.svelte +9 -9
  229. package/dist/panel/components/ui/radio-row-group/radio-row-group.css +27 -27
  230. package/dist/panel/components/ui/radio-row-group/radio-row-group.svelte +14 -9
  231. package/dist/panel/components/ui/scroll-area/scroll-area-scrollbar.svelte +14 -14
  232. package/dist/panel/components/ui/scroll-area/scroll-area.css +21 -21
  233. package/dist/panel/components/ui/scroll-area/scroll-area.svelte +26 -26
  234. package/dist/panel/components/ui/separator/separator.svelte +25 -25
  235. package/dist/panel/components/ui/sheet/sheet-content.svelte +33 -33
  236. package/dist/panel/components/ui/sheet/sheet-description.svelte +6 -2
  237. package/dist/panel/components/ui/sheet/sheet-footer.svelte +10 -5
  238. package/dist/panel/components/ui/sheet/sheet-header.svelte +10 -5
  239. package/dist/panel/components/ui/sheet/sheet-overlay.svelte +7 -3
  240. package/dist/panel/components/ui/sheet/sheet-title.svelte +6 -2
  241. package/dist/panel/components/ui/sheet/sheet.css +81 -81
  242. package/dist/panel/components/ui/sheet/sheet.svelte +5 -5
  243. package/dist/panel/components/ui/sonner/sonner.css +12 -12
  244. package/dist/panel/components/ui/sonner/sonner.svelte +15 -15
  245. package/dist/panel/components/ui/spin-loader/SpinLoader.svelte +2 -2
  246. package/dist/panel/components/ui/spin-loader/spin-loader.css +10 -10
  247. package/dist/panel/components/ui/switch/switch.css +36 -36
  248. package/dist/panel/components/ui/switch/switch.svelte +9 -9
  249. package/dist/panel/components/ui/tabs/tabs-content.svelte +6 -2
  250. package/dist/panel/components/ui/tabs/tabs-list.svelte +2 -2
  251. package/dist/panel/components/ui/tabs/tabs-trigger.svelte +6 -2
  252. package/dist/panel/components/ui/tabs/tabs.css +47 -49
  253. package/dist/panel/components/ui/tabs/tabs.svelte +5 -5
  254. package/dist/panel/components/ui/tag/tag.svelte +49 -45
  255. package/dist/panel/components/ui/tooltip/tooltip-content.svelte +31 -31
  256. package/dist/panel/pages/area/Area.svelte +17 -17
  257. package/dist/panel/pages/area/AreaVersionsDoc.svelte +19 -19
  258. package/dist/panel/pages/area/load.server.js +10 -2
  259. package/dist/panel/pages/auth/forgot-password/ForgotPassword.svelte +46 -46
  260. package/dist/panel/pages/auth/reset-password/ResetPassword.svelte +54 -54
  261. package/dist/panel/pages/auth/sign-in/SignIn.svelte +41 -41
  262. package/dist/panel/pages/collection/Collection.svelte +121 -121
  263. package/dist/panel/pages/collection/load.server.js +8 -2
  264. package/dist/panel/pages/collection-document/CollectionDocVersions.svelte +26 -26
  265. package/dist/panel/pages/collection-document/CollectionDocument.svelte +20 -20
  266. package/dist/panel/pages/collection-document/actions.server.js +3 -1
  267. package/dist/panel/pages/collection-document/load.server.js +4 -1
  268. package/dist/panel/pages/dashboard/Dashboard.svelte +109 -109
  269. package/dist/panel/pages/index.actions.server.js +1 -1
  270. package/dist/panel/pages/index.load.server.js +1 -1
  271. package/dist/panel/pages/live/Live.svelte +199 -192
  272. package/dist/panel/style/font.css +32 -32
  273. package/dist/panel/style/index.css +81 -81
  274. package/dist/panel/style/palette.css +27 -28
  275. package/dist/panel/style/radius.css +8 -8
  276. package/dist/panel/style/shadow.css +8 -8
  277. package/dist/panel/style/size.css +41 -41
  278. package/dist/panel/style/util.css +1 -1
  279. package/dist/util/cases.d.ts +1 -1
  280. package/package.json +233 -233
@@ -1,7 +1,11 @@
1
1
  <script lang="ts">
2
- import { Calendar as CalendarPrimitive } from 'bits-ui';
2
+ import { Calendar as CalendarPrimitive } from 'bits-ui';
3
3
 
4
- let { ref = $bindable(null), class: className, ...restProps }: CalendarPrimitive.GridBodyProps = $props();
4
+ let {
5
+ ref = $bindable(null),
6
+ class: className,
7
+ ...restProps
8
+ }: CalendarPrimitive.GridBodyProps = $props();
5
9
  </script>
6
10
 
7
11
  <CalendarPrimitive.GridBody bind:ref class={className} {...restProps} />
@@ -1,7 +1,11 @@
1
1
  <script lang="ts">
2
- import { Calendar as CalendarPrimitive } from 'bits-ui';
2
+ import { Calendar as CalendarPrimitive } from 'bits-ui';
3
3
 
4
- let { ref = $bindable(null), class: className, ...restProps }: CalendarPrimitive.GridHeadProps = $props();
4
+ let {
5
+ ref = $bindable(null),
6
+ class: className,
7
+ ...restProps
8
+ }: CalendarPrimitive.GridHeadProps = $props();
5
9
  </script>
6
10
 
7
11
  <CalendarPrimitive.GridHead bind:ref class={className} {...restProps} />
@@ -1,7 +1,11 @@
1
1
  <script lang="ts">
2
- import { Calendar as CalendarPrimitive } from 'bits-ui';
2
+ import { Calendar as CalendarPrimitive } from 'bits-ui';
3
3
 
4
- let { ref = $bindable(null), class: className, ...restProps }: CalendarPrimitive.GridRowProps = $props();
4
+ let {
5
+ ref = $bindable(null),
6
+ class: className,
7
+ ...restProps
8
+ }: CalendarPrimitive.GridRowProps = $props();
5
9
  </script>
6
10
 
7
11
  <CalendarPrimitive.GridRow bind:ref class="rz-calendar-grid-row {className}" {...restProps} />
@@ -1,7 +1,11 @@
1
1
  <script lang="ts">
2
- import { Calendar as CalendarPrimitive } from 'bits-ui';
2
+ import { Calendar as CalendarPrimitive } from 'bits-ui';
3
3
 
4
- let { ref = $bindable(null), class: className, ...restProps }: CalendarPrimitive.GridProps = $props();
4
+ let {
5
+ ref = $bindable(null),
6
+ class: className,
7
+ ...restProps
8
+ }: CalendarPrimitive.GridProps = $props();
5
9
  </script>
6
10
 
7
11
  <CalendarPrimitive.Grid bind:ref class="rz-calendar-grid {className}" {...restProps} />
@@ -1,7 +1,11 @@
1
1
  <script lang="ts">
2
- import { Calendar as CalendarPrimitive } from 'bits-ui';
2
+ import { Calendar as CalendarPrimitive } from 'bits-ui';
3
3
 
4
- let { ref = $bindable(null), class: className, ...restProps }: CalendarPrimitive.HeadCellProps = $props();
4
+ let {
5
+ ref = $bindable(null),
6
+ class: className,
7
+ ...restProps
8
+ }: CalendarPrimitive.HeadCellProps = $props();
5
9
  </script>
6
10
 
7
11
  <CalendarPrimitive.HeadCell bind:ref class="rz-calendar-head-cell {className}" {...restProps} />
@@ -1,7 +1,11 @@
1
1
  <script lang="ts">
2
- import { Calendar as CalendarPrimitive } from 'bits-ui';
2
+ import { Calendar as CalendarPrimitive } from 'bits-ui';
3
3
 
4
- let { ref = $bindable(null), class: className, ...restProps }: CalendarPrimitive.HeaderProps = $props();
4
+ let {
5
+ ref = $bindable(null),
6
+ class: className,
7
+ ...restProps
8
+ }: CalendarPrimitive.HeaderProps = $props();
5
9
  </script>
6
10
 
7
11
  <CalendarPrimitive.Header bind:ref class="rz-calendar-header {className}" {...restProps} />
@@ -1,7 +1,11 @@
1
1
  <script lang="ts">
2
- import { Calendar as CalendarPrimitive } from 'bits-ui';
2
+ import { Calendar as CalendarPrimitive } from 'bits-ui';
3
3
 
4
- let { ref = $bindable(null), class: className, ...restProps }: CalendarPrimitive.HeadingProps = $props();
4
+ let {
5
+ ref = $bindable(null),
6
+ class: className,
7
+ ...restProps
8
+ }: CalendarPrimitive.HeadingProps = $props();
5
9
  </script>
6
10
 
7
11
  <CalendarPrimitive.Heading bind:ref class="rz-calendar-heading {className}" {...restProps} />
@@ -1,26 +1,31 @@
1
1
  <script lang="ts">
2
- import type { WithElementRef } from 'bits-ui';
3
- import type { HTMLAttributes } from 'svelte/elements';
4
- type PrimitiveDivAttributes = WithElementRef<HTMLAttributes<HTMLDivElement>>;
2
+ import type { WithElementRef } from 'bits-ui';
3
+ import type { HTMLAttributes } from 'svelte/elements';
4
+ type PrimitiveDivAttributes = WithElementRef<HTMLAttributes<HTMLDivElement>>;
5
5
 
6
- let { ref = $bindable(null), class: className, children, ...restProps }: PrimitiveDivAttributes = $props();
6
+ let {
7
+ ref = $bindable(null),
8
+ class: className,
9
+ children,
10
+ ...restProps
11
+ }: PrimitiveDivAttributes = $props();
7
12
  </script>
8
13
 
9
14
  <div bind:this={ref} class="rz-calendar-months {className}" {...restProps}>
10
- {@render children?.()}
15
+ {@render children?.()}
11
16
  </div>
12
17
 
13
18
  <style>
14
- .rz-calendar-months {
15
- margin-top: var(--rz-size-4);
16
- display: flex;
17
- flex-direction: column;
18
- gap: var(--rz-size-4);
19
- }
19
+ .rz-calendar-months {
20
+ margin-top: var(--rz-size-4);
21
+ display: flex;
22
+ flex-direction: column;
23
+ gap: var(--rz-size-4);
24
+ }
20
25
 
21
- @media (min-width: 640px) {
22
- .rz-calendar-months {
23
- flex-direction: row;
24
- }
25
- }
26
+ @media (min-width: 640px) {
27
+ .rz-calendar-months {
28
+ flex-direction: row;
29
+ }
30
+ }
26
31
  </style>
@@ -1,17 +1,22 @@
1
1
  <script lang="ts">
2
- import { Calendar as CalendarPrimitive } from 'bits-ui';
3
- import { ChevronRight } from '@lucide/svelte';
2
+ import { Calendar as CalendarPrimitive } from 'bits-ui';
3
+ import { ChevronRight } from '@lucide/svelte';
4
4
 
5
- let { ref = $bindable(null), class: className, children, ...restProps }: CalendarPrimitive.NextButtonProps = $props();
5
+ let {
6
+ ref = $bindable(null),
7
+ class: className,
8
+ children,
9
+ ...restProps
10
+ }: CalendarPrimitive.NextButtonProps = $props();
6
11
  </script>
7
12
 
8
13
  {#snippet Fallback()}
9
- <ChevronRight size={16} />
14
+ <ChevronRight size={16} />
10
15
  {/snippet}
11
16
 
12
17
  <CalendarPrimitive.NextButton
13
- bind:ref
14
- class="rz-calendar-next-button rz-button rz-button--outline {className}"
15
- children={children || Fallback}
16
- {...restProps}
18
+ bind:ref
19
+ class="rz-calendar-next-button rz-button rz-button--outline {className}"
20
+ children={children || Fallback}
21
+ {...restProps}
17
22
  />
@@ -1,17 +1,22 @@
1
1
  <script lang="ts">
2
- import { Calendar as CalendarPrimitive } from 'bits-ui';
3
- import { ChevronLeft } from '@lucide/svelte';
2
+ import { Calendar as CalendarPrimitive } from 'bits-ui';
3
+ import { ChevronLeft } from '@lucide/svelte';
4
4
 
5
- let { ref = $bindable(null), class: className, children, ...restProps }: CalendarPrimitive.PrevButtonProps = $props();
5
+ let {
6
+ ref = $bindable(null),
7
+ class: className,
8
+ children,
9
+ ...restProps
10
+ }: CalendarPrimitive.PrevButtonProps = $props();
6
11
  </script>
7
12
 
8
13
  {#snippet Fallback()}
9
- <ChevronLeft size="16" />
14
+ <ChevronLeft size="16" />
10
15
  {/snippet}
11
16
 
12
17
  <CalendarPrimitive.PrevButton
13
- bind:ref
14
- class="rz-calendar-prev-button rz-button rz-button--outline {className}"
15
- children={children || Fallback}
16
- {...restProps}
18
+ bind:ref
19
+ class="rz-calendar-prev-button rz-button rz-button--outline {className}"
20
+ children={children || Fallback}
21
+ {...restProps}
17
22
  />
@@ -1,33 +1,33 @@
1
1
  .rz-calendar {
2
- background-color: var(--rz-popover-bg);
3
- border-radius: var(--rz-radius-lg);
4
- padding: var(--rz-size-3);
2
+ background-color: var(--rz-popover-bg);
3
+ border-radius: var(--rz-radius-lg);
4
+ padding: var(--rz-size-3);
5
5
  }
6
6
 
7
7
  .rz-date__popover-content {
8
- border-radius: var(--rz-radius-md);
8
+ border-radius: var(--rz-radius-md);
9
9
  }
10
10
  /**************************************/
11
11
  /* Cell
12
12
  /**************************************/
13
13
 
14
14
  .rz-calendar-cell {
15
- position: relative;
16
- padding: 0;
17
- flex: 1;
18
- text-align: center;
19
- font-size: var(--rz-text-sm);
20
- &:has([data-selected][data-outside-month]) {
21
- background-color: hsl(var(--rz-color-spot) / 0.5);
22
- }
23
- &:focus-within {
24
- position: relative;
25
- z-index: 20;
26
- }
27
- &:has([data-selected]) {
28
- background-color: hsl(var(--rz-color-spot));
29
- border-radius: var(--rz-radius-md);
30
- }
15
+ position: relative;
16
+ padding: 0;
17
+ flex: 1;
18
+ text-align: center;
19
+ font-size: var(--rz-text-sm);
20
+ &:has([data-selected][data-outside-month]) {
21
+ background-color: hsl(var(--rz-color-spot) / 0.5);
22
+ }
23
+ &:focus-within {
24
+ position: relative;
25
+ z-index: 20;
26
+ }
27
+ &:has([data-selected]) {
28
+ background-color: hsl(var(--rz-color-spot));
29
+ border-radius: var(--rz-radius-md);
30
+ }
31
31
  }
32
32
 
33
33
  /**************************************/
@@ -35,69 +35,69 @@
35
35
  /**************************************/
36
36
 
37
37
  .rz-calendar-day {
38
- display: inline-flex;
39
- align-items: center;
40
- justify-content: center;
41
- font-size: var(--rz-text-sm);
42
- border-radius: var(--rz-radius-md);
43
- white-space: nowrap;
44
- transition: colors 0.2s ease-in-out;
45
- width: var(--rz-size-8);
46
- height: var(--rz-size-8);
47
- padding: 0;
48
- font-variation-settings: 'wght' 400;
49
- font-weight: 400;
38
+ display: inline-flex;
39
+ align-items: center;
40
+ justify-content: center;
41
+ font-size: var(--rz-text-sm);
42
+ border-radius: var(--rz-radius-md);
43
+ white-space: nowrap;
44
+ transition: colors 0.2s ease-in-out;
45
+ width: var(--rz-size-8);
46
+ height: var(--rz-size-8);
47
+ padding: 0;
48
+ font-variation-settings: 'wght' 400;
49
+ font-weight: 400;
50
50
  }
51
51
 
52
52
  .rz-calendar-day:focus-visible {
53
- outline: none;
54
- box-shadow:
55
- 0 0 0 var(--rz-ring-offset, 0px) hsl(var(--rz-ring-offset-bg, var(--rz-gray-6)) / 1),
56
- 0 0 0 calc(var(--rz-ring-offset, 0px) + 1px) hsl(var(--rz-color-ring) / var(--rz-ring-opacity, 1));
53
+ outline: none;
54
+ box-shadow:
55
+ 0 0 0 var(--rz-ring-offset, 0px) hsl(var(--rz-ring-offset-bg, var(--rz-gray-6)) / 1),
56
+ 0 0 0 calc(var(--rz-ring-offset, 0px) + 1px) hsl(var(--rz-color-ring) / var(--rz-ring-opacity, 1));
57
57
  }
58
58
 
59
59
  .rz-calendar-day:hover {
60
- background-color: hsl(var(--rz-gray-13));
61
- color: hsl(var(--rz-color-fg));
60
+ background-color: hsl(var(--rz-gray-13));
61
+ color: hsl(var(--rz-color-fg));
62
62
  }
63
63
 
64
64
  .rz-calendar-day[data-today]:not([data-selected]) {
65
- border: 1px solid hsl(var(--rz-color-border));
66
- color: hsl(var(--rz-color-fg));
65
+ border: 1px solid hsl(var(--rz-color-border));
66
+ color: hsl(var(--rz-color-fg));
67
67
  }
68
68
 
69
69
  .rz-calendar-day[data-selected] {
70
- background-color: hsl(var(--rz-color-spot));
71
- color: hsl(var(--rz-color-spot-fg));
72
- opacity: 1;
70
+ background-color: hsl(var(--rz-color-spot));
71
+ color: hsl(var(--rz-color-spot-fg));
72
+ opacity: 1;
73
73
  }
74
74
 
75
75
  .rz-calendar-day[data-selected]:hover,
76
76
  .rz-calendar-day[data-selected]:focus {
77
- background-color: hsl(var(--rz-color-spot));
78
- color: hsl(var(--rz-color-spot-fg));
77
+ background-color: hsl(var(--rz-color-spot));
78
+ color: hsl(var(--rz-color-spot-fg));
79
79
  }
80
80
 
81
81
  .rz-calendar-day[data-disabled] {
82
- color: hsl(var(--rz-color-fg) / 0.7);
83
- opacity: 0.5;
82
+ color: hsl(var(--rz-color-fg) / 0.7);
83
+ opacity: 0.5;
84
84
  }
85
85
 
86
86
  .rz-calendar-day[data-unavailable] {
87
- color: hsl(var(--rz-color-fg) / 0.5);
88
- text-decoration: line-through;
87
+ color: hsl(var(--rz-color-fg) / 0.5);
88
+ text-decoration: line-through;
89
89
  }
90
90
 
91
91
  .rz-calendar-day[data-outside-month] {
92
- color: hsl(var(--rz-color-fg) / 0.7);
93
- pointer-events: none;
94
- opacity: 0.5;
92
+ color: hsl(var(--rz-color-fg) / 0.7);
93
+ pointer-events: none;
94
+ opacity: 0.5;
95
95
  }
96
96
 
97
97
  .rz-calendar-day[data-outside-month][data-selected] {
98
- background-color: hsl(var(--rz-color-spot) / 0.5);
99
- color: hsl(var(--rz-color-fg));
100
- opacity: 0.3;
98
+ background-color: hsl(var(--rz-color-spot) / 0.5);
99
+ color: hsl(var(--rz-color-fg));
100
+ opacity: 0.3;
101
101
  }
102
102
 
103
103
  /**************************************/
@@ -105,8 +105,8 @@
105
105
  /**************************************/
106
106
 
107
107
  .rz-calendar-grid {
108
- width: 100%;
109
- border-collapse: collapse;
108
+ width: 100%;
109
+ border-collapse: collapse;
110
110
  }
111
111
 
112
112
  /**************************************/
@@ -114,10 +114,10 @@
114
114
  /**************************************/
115
115
 
116
116
  .rz-calendar-grid-row {
117
- display: flex;
118
- width: 100%;
119
- margin-top: var(--rz-size-2);
120
- gap: var(--rz-size-1);
117
+ display: flex;
118
+ width: 100%;
119
+ margin-top: var(--rz-size-2);
120
+ gap: var(--rz-size-1);
121
121
  }
122
122
 
123
123
  /**************************************/
@@ -125,12 +125,12 @@
125
125
  /**************************************/
126
126
 
127
127
  .rz-calendar-header {
128
- position: relative;
129
- display: flex;
130
- width: 100%;
131
- align-items: center;
132
- justify-content: space-between;
133
- padding-top: var(--rz-size-1);
128
+ position: relative;
129
+ display: flex;
130
+ width: 100%;
131
+ align-items: center;
132
+ justify-content: space-between;
133
+ padding-top: var(--rz-size-1);
134
134
  }
135
135
 
136
136
  /**************************************/
@@ -138,11 +138,11 @@
138
138
  /**************************************/
139
139
 
140
140
  .rz-calendar-head-cell {
141
- color: hsl(var(--rz-color-fg) / 0.7);
142
- flex: 1;
143
- font-size: var(--rz-text-xs);
144
- font-variation-settings: 'wght' 400;
145
- font-weight: 400;
141
+ color: hsl(var(--rz-color-fg) / 0.7);
142
+ flex: 1;
143
+ font-size: var(--rz-text-xs);
144
+ font-variation-settings: 'wght' 400;
145
+ font-weight: 400;
146
146
  }
147
147
 
148
148
  /**************************************/
@@ -150,9 +150,9 @@
150
150
  /**************************************/
151
151
 
152
152
  .rz-calendar-heading {
153
- font-size: var(--rz-text-sm);
154
- font-variation-settings: 'wght' 500;
155
- font-weight: 500;
153
+ font-size: var(--rz-text-sm);
154
+ font-variation-settings: 'wght' 500;
155
+ font-weight: 500;
156
156
  }
157
157
 
158
158
  /**************************************/
@@ -161,27 +161,27 @@
161
161
 
162
162
  /** Next */
163
163
  .rz-calendar-next-button {
164
- height: var(--rz-size-7);
165
- width: var(--rz-size-7);
166
- background-color: transparent;
167
- padding: 0;
168
- opacity: 0.5;
169
- transition: opacity 0.2s ease;
164
+ height: var(--rz-size-7);
165
+ width: var(--rz-size-7);
166
+ background-color: transparent;
167
+ padding: 0;
168
+ opacity: 0.5;
169
+ transition: opacity 0.2s ease;
170
170
  }
171
171
 
172
172
  .rz-calendar-next-button:hover {
173
- opacity: 1;
173
+ opacity: 1;
174
174
  }
175
175
 
176
176
  /** Prev */
177
177
  .rz-calendar-prev-button {
178
- height: var(--rz-size-7);
179
- width: var(--rz-size-7);
180
- background-color: transparent;
181
- padding: 0;
182
- opacity: 0.5;
178
+ height: var(--rz-size-7);
179
+ width: var(--rz-size-7);
180
+ background-color: transparent;
181
+ padding: 0;
182
+ opacity: 0.5;
183
183
  }
184
184
 
185
185
  .rz-calendar-prev-button:hover {
186
- opacity: 1;
186
+ opacity: 1;
187
187
  }
@@ -1,57 +1,57 @@
1
1
  <script lang="ts">
2
- import { Calendar as CalendarPrimitive, type WithoutChildrenOrChild } from 'bits-ui';
3
- import * as Calendar from './index.js';
4
- import './calendar.css';
2
+ import { Calendar as CalendarPrimitive, type WithoutChildrenOrChild } from 'bits-ui';
3
+ import * as Calendar from './index.js';
4
+ import './calendar.css';
5
5
 
6
- let {
7
- ref = $bindable(null),
8
- value = $bindable(),
9
- placeholder = $bindable(),
10
- class: className,
11
- weekdayFormat = 'short',
12
- ...restProps
13
- }: WithoutChildrenOrChild<CalendarPrimitive.RootProps> = $props();
6
+ let {
7
+ ref = $bindable(null),
8
+ value = $bindable(),
9
+ placeholder = $bindable(),
10
+ class: className,
11
+ weekdayFormat = 'short',
12
+ ...restProps
13
+ }: WithoutChildrenOrChild<CalendarPrimitive.RootProps> = $props();
14
14
  </script>
15
15
 
16
16
  <CalendarPrimitive.Root
17
- bind:ref
18
- bind:value
19
- bind:placeholder
20
- {weekdayFormat}
21
- class="rz-calendar {className}"
22
- {...restProps as any}
17
+ bind:ref
18
+ bind:value
19
+ bind:placeholder
20
+ {weekdayFormat}
21
+ class="rz-calendar {className}"
22
+ {...restProps as any}
23
23
  >
24
- {#snippet children({ months, weekdays })}
25
- <Calendar.Header>
26
- <Calendar.PrevButton />
27
- <Calendar.Heading />
28
- <Calendar.NextButton />
29
- </Calendar.Header>
30
- <Calendar.Months>
31
- {#each months as month, index (index)}
32
- <Calendar.Grid>
33
- <Calendar.GridHead>
34
- <Calendar.GridRow>
35
- {#each weekdays as weekday, index (index)}
36
- <Calendar.HeadCell>
37
- {weekday.slice(0, 2)}
38
- </Calendar.HeadCell>
39
- {/each}
40
- </Calendar.GridRow>
41
- </Calendar.GridHead>
42
- <Calendar.GridBody>
43
- {#each month.weeks as weekDates, index (index)}
44
- <Calendar.GridRow>
45
- {#each weekDates as date, index (index)}
46
- <Calendar.Cell {date} month={month.value}>
47
- <Calendar.Day />
48
- </Calendar.Cell>
49
- {/each}
50
- </Calendar.GridRow>
51
- {/each}
52
- </Calendar.GridBody>
53
- </Calendar.Grid>
54
- {/each}
55
- </Calendar.Months>
56
- {/snippet}
24
+ {#snippet children({ months, weekdays })}
25
+ <Calendar.Header>
26
+ <Calendar.PrevButton />
27
+ <Calendar.Heading />
28
+ <Calendar.NextButton />
29
+ </Calendar.Header>
30
+ <Calendar.Months>
31
+ {#each months as month, index (index)}
32
+ <Calendar.Grid>
33
+ <Calendar.GridHead>
34
+ <Calendar.GridRow>
35
+ {#each weekdays as weekday, index (index)}
36
+ <Calendar.HeadCell>
37
+ {weekday.slice(0, 2)}
38
+ </Calendar.HeadCell>
39
+ {/each}
40
+ </Calendar.GridRow>
41
+ </Calendar.GridHead>
42
+ <Calendar.GridBody>
43
+ {#each month.weeks as weekDates, index (index)}
44
+ <Calendar.GridRow>
45
+ {#each weekDates as date, index (index)}
46
+ <Calendar.Cell {date} month={month.value}>
47
+ <Calendar.Day />
48
+ </Calendar.Cell>
49
+ {/each}
50
+ </Calendar.GridRow>
51
+ {/each}
52
+ </Calendar.GridBody>
53
+ </Calendar.Grid>
54
+ {/each}
55
+ </Calendar.Months>
56
+ {/snippet}
57
57
  </CalendarPrimitive.Root>
@@ -1,21 +1,26 @@
1
1
  <script lang="ts">
2
- import type { WithElementRef } from 'bits-ui';
3
- import type { HTMLAttributes } from 'svelte/elements';
4
- type PrimitiveDivAttributes = WithElementRef<HTMLAttributes<HTMLDivElement>>;
2
+ import type { WithElementRef } from 'bits-ui';
3
+ import type { HTMLAttributes } from 'svelte/elements';
4
+ type PrimitiveDivAttributes = WithElementRef<HTMLAttributes<HTMLDivElement>>;
5
5
 
6
- let { ref = $bindable(null), class: className, children, ...restProps }: PrimitiveDivAttributes = $props();
6
+ let {
7
+ ref = $bindable(null),
8
+ class: className,
9
+ children,
10
+ ...restProps
11
+ }: PrimitiveDivAttributes = $props();
7
12
  </script>
8
13
 
9
14
  <div bind:this={ref} class="rz-card-content {className}" {...restProps}>
10
- {@render children?.()}
15
+ {@render children?.()}
11
16
  </div>
12
17
 
13
18
  <style>
14
- .rz-card-content {
15
- padding: var(--rz-size-6);
16
- padding-top: 0;
17
- }
18
- .rz-card-content > :global(* + *) {
19
- margin-top: var(--rz-size-4);
20
- }
19
+ .rz-card-content {
20
+ padding: var(--rz-size-6);
21
+ padding-top: 0;
22
+ }
23
+ .rz-card-content > :global(* + *) {
24
+ margin-top: var(--rz-size-4);
25
+ }
21
26
  </style>