From 4edb2ff22bed5eca6c0f9c8f962c4ea7cfd78e56 Mon Sep 17 00:00:00 2001 From: Viet An Date: Fri, 15 May 2026 14:32:09 +0700 Subject: [PATCH] changes --- app/assets/styles/utils.scss | 67 +++++++++++++- app/components/Modal.vue | 90 +++++++++++-------- app/components/SearchBox.vue | 3 +- app/components/datatable/TimeOption.vue | 1 + app/components/imports/AddProductForm.vue | 3 + app/components/imports/DeleteProduct.vue | 1 + .../imports/DeleteProductVariant.vue | 1 + app/components/imports/IMEIButton.vue | 1 + app/components/media/FileUpload.vue | 1 + app/composables/useModal.js | 35 -------- app/layouts/default.vue | 19 ++-- 11 files changed, 139 insertions(+), 83 deletions(-) delete mode 100644 app/composables/useModal.js diff --git a/app/assets/styles/utils.scss b/app/assets/styles/utils.scss index 184deb6..0d89591 100644 --- a/app/assets/styles/utils.scss +++ b/app/assets/styles/utils.scss @@ -262,7 +262,6 @@ $containers: ("3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "4xl", " } // ─── Shared keywords (auto, px, full, min, max, fit) ─────────────────────── -// These are identical in value across w-, h-, and size- $shared-keywords: ( "auto": auto, "px": 1px, @@ -281,7 +280,6 @@ $shared-keywords: ( } // ─── Viewport keywords ───────────────────────────────────────────────────── -// dvw/dvh/lvw/lvh/svw/svh apply equally to w-, h-, and size- $viewport-keywords: ( "dvw": 100dvw, "dvh": 100dvh, @@ -305,3 +303,68 @@ $viewport-keywords: ( .h-screen { height: 100vh; } + +// ─── Inset / positional offset classes ──────────────────────────────────── +$inset-types: ( + "inset": ( + top, + right, + bottom, + left, + ), + "inset-x": ( + left, + right, + ), + "inset-y": ( + top, + bottom, + ), + "top": ( + top, + ), + "right": ( + right, + ), + "bottom": ( + bottom, + ), + "left": ( + left, + ), +); + +// ─── Numeric: 0 → 48, using the same --spacing scale ────────────────────── +@each $prefix, $props in $inset-types { + @for $i from 0 through 48 { + .#{$prefix}-#{$i} { + @include set-props($props, calc(var(--spacing) * #{$i})); + } + } +} + +// ─── Fractions ───────────────────────────────────────────────────────────── +@each $prefix, $props in $inset-types { + @each $name, $pair in $fractions { + $num: list.nth($pair, 1); + $den: list.nth($pair, 2); + .#{$prefix}-#{$name} { + @include set-props($props, calc(#{$num} / #{$den} * 100%)); + } + } +} + +// ─── Keywords ────────────────────────────────────────────────────────────── +$inset-keywords: ( + "auto": auto, + "px": 1px, + "full": 100%, +); + +@each $prefix, $props in $inset-types { + @each $name, $value in $inset-keywords { + .#{$prefix}-#{$name} { + @include set-props($props, $value); + } + } +} diff --git a/app/components/Modal.vue b/app/components/Modal.vue index a2f7327..4e1eff7 100644 --- a/app/components/Modal.vue +++ b/app/components/Modal.vue @@ -1,19 +1,18 @@