kaze 0.16.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 70692c92f436ae83178d631efa5e3b076b205af9fb38865643da09778b3dc5bd
4
- data.tar.gz: 79e38f700d7725df90445290a1299f3a42c7eb09e44ccf225474cb359f268952
3
+ metadata.gz: 14990e2a122a189d6f282073cc6e49a13160653cf148f029fa300e7e7dc9ae18
4
+ data.tar.gz: 4f1a884301c4ea47f3e7e2623fd440964ae4fc46025b683db55c2b755a6af77b
5
5
  SHA512:
6
- metadata.gz: 9c9070cd7055e4a06f18193ad13f715fef0cf6e002eb60e7424ee7cd2fe2696155d30918d7b686aa1a5f40229d727c9a1ad374a521cd8c3ad074d6d1f82ac6c7
7
- data.tar.gz: d23b59dc85ce9d0b974b2e15d2bdd7a2b92892e671c68af00b3d7ca695376985f6a06e8cbd10fdce2ed1acb4bf42e5223d82fb42cd9d558f7f59e9bd4406f4eb
6
+ metadata.gz: 28cec2d89313d97b3ccd2f365f53a58f4a947b4ddcea84c3a601879ab84b069f395b9d27552811da3552444718f64aef6a3ccfab8705fbf910559dead8ab86e0
7
+ data.tar.gz: b886f24aceaba7998b6ab01b9b1d15bc49ae5010cd641de0b3eaaf3793d3733686596a01b7cdd47ffccbe13ebad8064def8dc829c202bd39a5fb2d3babdc1f4b
data/lib/kaze/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Kaze
2
- VERSION = '0.16.0'
2
+ VERSION = '0.18.0'
3
3
  end
@@ -6,10 +6,7 @@ import ResponsiveNavLink from '@/Components/ResponsiveNavLink'
6
6
  import { Link, usePage } from '@inertiajs/react'
7
7
  import { dashboard_path, logout_path, profile_edit_path } from '@/routes'
8
8
 
9
- export default function AuthenticatedLayout({
10
- header,
11
- children,
12
- }: PropsWithChildren<{ header?: ReactNode }>) {
9
+ export default function AuthenticatedLayout({ header, children }: PropsWithChildren<{ header?: ReactNode }>) {
13
10
  const user = usePage().props.auth.user
14
11
 
15
12
  const [showingNavigationDropdown, setShowingNavigationDropdown] = useState(false)
@@ -5,10 +5,7 @@ import UpdateProfileInformationForm from './Partials/UpdateProfileInformationFor
5
5
  import { Head } from '@inertiajs/react'
6
6
  import { PageProps } from '@/types'
7
7
 
8
- export default function Edit({
9
- mustVerifyEmail,
10
- status,
11
- }: PageProps<{ mustVerifyEmail: boolean; status?: string }>) {
8
+ export default function Edit({ mustVerifyEmail, status }: PageProps<{ mustVerifyEmail: boolean; status?: string }>) {
12
9
  return (
13
10
  <AuthenticatedLayout
14
11
  header={<h2 className="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">Profile</h2>}
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "devDependencies": {
9
9
  "@headlessui/react": "^2.0.4",
10
- "@inertiajs/react": "^1.1.0",
10
+ "@inertiajs/react": "^2.0.0",
11
11
  "@tailwindcss/forms": "^0.5.7",
12
12
  "@types/node": "^18.13.0",
13
13
  "@types/react": "^18.0.28",
@@ -19,7 +19,7 @@
19
19
  "react": "^18.2.0",
20
20
  "react-dom": "^18.2.0",
21
21
  "tailwindcss": "^3.2.1",
22
- "typescript": "^5.0.2",
22
+ "typescript": "~5.5.3",
23
23
  "vite": "^5.2.11",
24
24
  "vite-plugin-rails": "^0.5.0"
25
25
  }
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import { computed, onMounted, onUnmounted, watch } from 'vue'
2
+ import { computed, onMounted, onUnmounted, ref, watch } from 'vue'
3
3
 
4
4
  const props = withDefaults(
5
5
  defineProps<{
@@ -15,14 +15,24 @@ const props = withDefaults(
15
15
  )
16
16
 
17
17
  const emit = defineEmits(['close'])
18
+ const dialog = ref()
19
+ const showSlot = ref(props.show)
18
20
 
19
21
  watch(
20
22
  () => props.show,
21
23
  () => {
22
24
  if (props.show) {
23
25
  document.body.style.overflow = 'hidden'
26
+ showSlot.value = true
27
+
28
+ dialog.value?.showModal()
24
29
  } else {
25
- document.body.style.overflow = 'visible'
30
+ document.body.style.overflow = ''
31
+
32
+ setTimeout(() => {
33
+ dialog.value?.close()
34
+ showSlot.value = false
35
+ }, 200)
26
36
  }
27
37
  },
28
38
  )
@@ -34,8 +44,12 @@ const close = () => {
34
44
  }
35
45
 
36
46
  const closeOnEscape = (e: KeyboardEvent) => {
37
- if (e.key === 'Escape' && props.show) {
38
- close()
47
+ if (e.key === 'Escape') {
48
+ e.preventDefault()
49
+
50
+ if (props.show) {
51
+ close()
52
+ }
39
53
  }
40
54
  }
41
55
 
@@ -43,7 +57,8 @@ onMounted(() => document.addEventListener('keydown', closeOnEscape))
43
57
 
44
58
  onUnmounted(() => {
45
59
  document.removeEventListener('keydown', closeOnEscape)
46
- document.body.style.overflow = 'visible'
60
+
61
+ document.body.style.overflow = ''
47
62
  })
48
63
 
49
64
  const maxWidthClass = computed(() => {
@@ -58,39 +73,37 @@ const maxWidthClass = computed(() => {
58
73
  </script>
59
74
 
60
75
  <template>
61
- <Teleport to="body">
62
- <Transition leave-active-class="duration-200">
63
- <div v-show="show" class="fixed inset-0 overflow-y-auto px-4 py-6 sm:px-0 z-50" scroll-region>
64
- <Transition
65
- enter-active-class="ease-out duration-300"
66
- enter-from-class="opacity-0"
67
- enter-to-class="opacity-100"
68
- leave-active-class="ease-in duration-200"
69
- leave-from-class="opacity-100"
70
- leave-to-class="opacity-0"
71
- >
72
- <div v-show="show" class="fixed inset-0 transform transition-all" @click="close">
73
- <div class="absolute inset-0 bg-gray-500 dark:bg-gray-900 opacity-75" />
74
- </div>
75
- </Transition>
76
+ <dialog class="z-50 m-0 min-h-full min-w-full overflow-y-auto bg-transparent backdrop:bg-transparent" ref="dialog">
77
+ <div class="fixed inset-0 z-50 overflow-y-auto px-4 py-6 sm:px-0" scroll-region>
78
+ <Transition
79
+ enter-active-class="ease-out duration-300"
80
+ enter-from-class="opacity-0"
81
+ enter-to-class="opacity-100"
82
+ leave-active-class="ease-in duration-200"
83
+ leave-from-class="opacity-100"
84
+ leave-to-class="opacity-0"
85
+ >
86
+ <div v-show="show" class="fixed inset-0 transform transition-all" @click="close">
87
+ <div class="absolute inset-0 bg-gray-500 opacity-75 dark:bg-gray-900" />
88
+ </div>
89
+ </Transition>
76
90
 
77
- <Transition
78
- enter-active-class="ease-out duration-300"
79
- enter-from-class="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
80
- enter-to-class="opacity-100 translate-y-0 sm:scale-100"
81
- leave-active-class="ease-in duration-200"
82
- leave-from-class="opacity-100 translate-y-0 sm:scale-100"
83
- leave-to-class="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
91
+ <Transition
92
+ enter-active-class="ease-out duration-300"
93
+ enter-from-class="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
94
+ enter-to-class="opacity-100 translate-y-0 sm:scale-100"
95
+ leave-active-class="ease-in duration-200"
96
+ leave-from-class="opacity-100 translate-y-0 sm:scale-100"
97
+ leave-to-class="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
98
+ >
99
+ <div
100
+ v-show="show"
101
+ class="mb-6 transform overflow-hidden rounded-lg bg-white shadow-xl transition-all sm:mx-auto sm:w-full dark:bg-gray-800"
102
+ :class="maxWidthClass"
84
103
  >
85
- <div
86
- v-show="show"
87
- class="mb-6 bg-white dark:bg-gray-800 rounded-lg overflow-hidden shadow-xl transform transition-all sm:w-full sm:mx-auto"
88
- :class="maxWidthClass"
89
- >
90
- <slot v-if="show" />
91
- </div>
92
- </Transition>
93
- </div>
94
- </Transition>
95
- </Teleport>
104
+ <slot v-if="showSlot" />
105
+ </div>
106
+ </Transition>
107
+ </div>
108
+ </dialog>
96
109
  </template>
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "devDependencies": {
9
9
  "@headlessui/vue": "^1.7.22",
10
- "@inertiajs/vue3": "^1.1.0",
10
+ "@inertiajs/vue3": "^2.0.0",
11
11
  "@tailwindcss/forms": "^0.5.7",
12
12
  "@types/node": "^18.13.0",
13
13
  "@vitejs/plugin-vue": "^5.0.5",
@@ -15,7 +15,7 @@
15
15
  "axios": "^1.6.4",
16
16
  "postcss": "^8.4.31",
17
17
  "tailwindcss": "^3.2.1",
18
- "typescript": "^5.0.2",
18
+ "typescript": "~5.5.3",
19
19
  "vite": "^5.2.11",
20
20
  "vite-plugin-rails": "^0.5.0",
21
21
  "vue": "^3.4.27",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kaze
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cuong Giang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-16 00:00:00.000000000 Z
11
+ date: 2024-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -272,7 +272,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
272
272
  - !ruby/object:Gem::Version
273
273
  version: '0'
274
274
  requirements: []
275
- rubygems_version: 3.5.11
275
+ rubygems_version: 3.5.16
276
276
  signing_key:
277
277
  specification_version: 4
278
278
  summary: Opinionated minimal Rails authentication scaffolding with Hotwire, React,