From 0735fbe7399a9d07b3a73f10e55a655a52f3e525 Mon Sep 17 00:00:00 2001 From: Takusea <53995265+takusea@users.noreply.github.com> Date: Sun, 8 Dec 2024 05:04:09 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B7=E3=83=A7=E3=83=BC=E3=83=88=E3=82=AB?= =?UTF-8?q?=E3=83=83=E3=83=88=E3=82=AD=E3=83=BC=E5=89=B2=E3=82=8A=E5=BD=93?= =?UTF-8?q?=E3=81=A6=E3=83=80=E3=82=A4=E3=82=A2=E3=83=AD=E3=82=B0=E3=81=AE?= =?UTF-8?q?=E3=83=AA=E3=83=87=E3=82=B6=E3=82=A4=E3=83=B3=20(#2348)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Hiroshiba Co-authored-by: github-actions[bot] --- src/components/Base/BaseButton.vue | 2 +- src/components/Base/BaseIconButton.stories.ts | 36 ++ src/components/Base/BaseIconButton.vue | 62 +++ src/components/Base/BaseScrollArea.vue | 1 + .../Dialog/HotkeyRecordingDialog.vue | 2 +- src/components/Dialog/HotkeySettingDialog.vue | 360 +++++++++--------- src/styles/v2/colors.scss | 3 + src/styles/v2/variables.scss | 1 + ...nbutton--default-dark-storybook-win32.png" | Bin 0 -> 901 bytes ...button--default-light-storybook-win32.png" | Bin 0 -> 857 bytes ...button--disabled-dark-storybook-win32.png" | Bin 0 -> 892 bytes ...utton--disabled-light-storybook-win32.png" | Bin 0 -> 852 bytes 12 files changed, 282 insertions(+), 185 deletions(-) create mode 100644 src/components/Base/BaseIconButton.stories.ts create mode 100644 src/components/Base/BaseIconButton.vue create mode 100644 "tests/e2e/storybook/\343\202\271\343\202\257\343\203\252\343\203\274\343\203\263\343\202\267\343\203\247\343\203\203\343\203\210.spec.mts-snapshots/components-base-baseiconbutton--default-dark-storybook-win32.png" create mode 100644 "tests/e2e/storybook/\343\202\271\343\202\257\343\203\252\343\203\274\343\203\263\343\202\267\343\203\247\343\203\203\343\203\210.spec.mts-snapshots/components-base-baseiconbutton--default-light-storybook-win32.png" create mode 100644 "tests/e2e/storybook/\343\202\271\343\202\257\343\203\252\343\203\274\343\203\263\343\202\267\343\203\247\343\203\203\343\203\210.spec.mts-snapshots/components-base-baseiconbutton--disabled-dark-storybook-win32.png" create mode 100644 "tests/e2e/storybook/\343\202\271\343\202\257\343\203\252\343\203\274\343\203\263\343\202\267\343\203\247\343\203\203\343\203\210.spec.mts-snapshots/components-base-baseiconbutton--disabled-light-storybook-win32.png" diff --git a/src/components/Base/BaseButton.vue b/src/components/Base/BaseButton.vue index 24a42845f1..406e2b6794 100644 --- a/src/components/Base/BaseButton.vue +++ b/src/components/Base/BaseButton.vue @@ -31,7 +31,7 @@ defineEmits<{ .button { display: flex; - justify-content: space-between; + justify-content: center; align-items: center; text-wrap: nowrap; height: vars.$size-control; diff --git a/src/components/Base/BaseIconButton.stories.ts b/src/components/Base/BaseIconButton.stories.ts new file mode 100644 index 0000000000..34d45c08e8 --- /dev/null +++ b/src/components/Base/BaseIconButton.stories.ts @@ -0,0 +1,36 @@ +import type { Meta, StoryObj } from "@storybook/vue3"; + +import { TooltipProvider } from "radix-vue"; +import BaseIconButton from "./BaseIconButton.vue"; + +const meta: Meta = { + component: BaseIconButton, + render: (args) => ({ + components: { BaseIconButton, TooltipProvider }, + setup() { + return { args }; + }, + template: ` + + + `, + }), +}; + +export default meta; +type Story = StoryObj; + +export const Default: Story = { + args: { + label: "Default", + icon: "settings", + }, +}; + +export const Disabled: Story = { + args: { + label: "Disabled", + icon: "settings", + disabled: true, + }, +}; diff --git a/src/components/Base/BaseIconButton.vue b/src/components/Base/BaseIconButton.vue new file mode 100644 index 0000000000..267b00f776 --- /dev/null +++ b/src/components/Base/BaseIconButton.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/src/components/Base/BaseScrollArea.vue b/src/components/Base/BaseScrollArea.vue index 013d81d7ed..b1bc064f4e 100644 --- a/src/components/Base/BaseScrollArea.vue +++ b/src/components/Base/BaseScrollArea.vue @@ -52,6 +52,7 @@ import { .ScrollAreaScrollbar { user-select: none; touch-action: none; + z-index: vars.$z-index-scrollbar; } .ScrollAreaScrollbar[data-orientation="vertical"] { diff --git a/src/components/Dialog/HotkeyRecordingDialog.vue b/src/components/Dialog/HotkeyRecordingDialog.vue index d608f85746..46047b9b65 100644 --- a/src/components/Dialog/HotkeyRecordingDialog.vue +++ b/src/components/Dialog/HotkeyRecordingDialog.vue @@ -44,7 +44,7 @@ /> - - - - - +
+
+ {{ hotkeySetting.action }} +
+
+ +
+
+ +
+
+ + + +
@@ -132,6 +122,9 @@ diff --git a/src/styles/v2/colors.scss b/src/styles/v2/colors.scss index 94dc830f0f..d68687ce67 100644 --- a/src/styles/v2/colors.scss +++ b/src/styles/v2/colors.scss @@ -12,6 +12,7 @@ $primitive-red: #d04756; // ライトテーマの色 :root[is-dark-theme="false"] { --color-v2-background: #{color.adjust($primitive-primary, $lightness: 25%)}; + --color-v2-background-alt: #{color.adjust($primitive-white, $lightness: -5%)}; --color-v2-background-drawer: #{rgba(color.adjust($primitive-primary, $lightness: 20%), 0.75)}; --color-v2-surface: #{$primitive-white}; @@ -48,6 +49,7 @@ $primitive-red: #d04756; // ダークテーマの色 :root[is-dark-theme="true"] { --color-v2-background: #{$primitive-black}; + --color-v2-background-alt: #{color.adjust($primitive-black, $lightness: 2%)}; --color-v2-background-drawer: #{rgba($primitive-black, 0.75)}; --color-v2-surface: #{color.adjust($primitive-black, $lightness: 3%)}; @@ -82,6 +84,7 @@ $primitive-red: #d04756; } $background: var(--color-v2-background); +$background-alt: var(--color-v2-background-alt); $background-drawer: var(--color-v2-background-drawer); $surface: var(--color-v2-surface); diff --git a/src/styles/v2/variables.scss b/src/styles/v2/variables.scss index fe64a25ba5..abe056c97a 100644 --- a/src/styles/v2/variables.scss +++ b/src/styles/v2/variables.scss @@ -23,6 +23,7 @@ $radius-2: calc(var(--radius-basis) * 2); $transition-duration: 100ms; +$z-index-scrollbar: 100; $z-index-fullscreen-dialog: 1000; $z-index-dropdown: 1010; $z-index-fixed: 1020; diff --git "a/tests/e2e/storybook/\343\202\271\343\202\257\343\203\252\343\203\274\343\203\263\343\202\267\343\203\247\343\203\203\343\203\210.spec.mts-snapshots/components-base-baseiconbutton--default-dark-storybook-win32.png" "b/tests/e2e/storybook/\343\202\271\343\202\257\343\203\252\343\203\274\343\203\263\343\202\267\343\203\247\343\203\203\343\203\210.spec.mts-snapshots/components-base-baseiconbutton--default-dark-storybook-win32.png" new file mode 100644 index 0000000000000000000000000000000000000000..40d858a05fb500c7d87abc6114cd6525ba53a6d8 GIT binary patch literal 901 zcmV;01A6?4P)Px&KS@MERCt{2-7#ofbsPuq7cFK8eS>YL3j{(q?gVL|=z$QSki|h`ZaSnUgC-6c z)1p*rm14V8E7%AoR3tiNGOcJc7*X!BgrdX}JVlx*H(fxuOwY-s#=FZ?E+MZya-Yxk z|Ghtt-}>df|L@;5m`(=(008i)J@%*@0001hKtKfm0H9q6r~m)}v;_eb004ltAfN&O z0MHhWwYaaaaQAX9++EhzE}b4oEMzkInc3T`_x@O& z&p(WA0RR9vvbqM->AltA+3!Ca>D$+fwpLz0GhI5o#sB~S=qzzxP*WGq4eu|V20_p_ zJo9$yaC!m&0H6cK1k{PEV^4L*?TxDU*NesV&1w|)v^$%>I)3;K0ssKe8TMW?lZtj~ zQ4lso)Y{s$v*YvS2dm7~!WZY8kEKSnoxf5+P)V>`0001vtjC``aiX!ZvvFtPhv?ME z>HePG^ja;x^WwX82TZqrTG}2ejP&>XQ;4d?k6z7R{&D9awG99Oz)=%F#kV{^`RRIX zcUjvkebu~Wskm9UVSVnk`QMW25dZ*y4$$H~r~m)}kgWKCnw^|~W9Z)_rs2Two@-9W zo*$^&Ff?^@GLuw~0001VfW2o>Q-#@EH_kpC){jr>>CZhIm6m?qez49=EnI&kT{lPR zSWo|R`F!@zl{*`bp#lH^Z~%L!_*S})H;?cQf*{PD`}*F*{c^by^kuUHy)pODbce^E zFv1rA0Dyz(8ce5~YpDyjmnY({Lj506`STZEeqTZb007`X;?AH}u3Rf^?e|4nr4OW2 z0000EEPhB*Y5GR78bsCdcXMyOG<{9 zS`zn*Z;Zm1ci+o}b%om6#b?GB6Ko6s0D#WY;ytK~TicC=?TT~?006)tYB8V&>(z$8 zd~4NTlIaHk0DunF;xE1c005AzR==PE002Ou1XKV30NR3p3IG5=TM$qI003wU0xAFi b0BzxKQcSh+)UW1n00000NkvXXu0mjfBr}z+ literal 0 HcmV?d00001 diff --git "a/tests/e2e/storybook/\343\202\271\343\202\257\343\203\252\343\203\274\343\203\263\343\202\267\343\203\247\343\203\203\343\203\210.spec.mts-snapshots/components-base-baseiconbutton--default-light-storybook-win32.png" "b/tests/e2e/storybook/\343\202\271\343\202\257\343\203\252\343\203\274\343\203\263\343\202\267\343\203\247\343\203\203\343\203\210.spec.mts-snapshots/components-base-baseiconbutton--default-light-storybook-win32.png" new file mode 100644 index 0000000000000000000000000000000000000000..a79bc9a8261221c77bfcb36c073b8f9e4b4a842f GIT binary patch literal 857 zcmeAS@N?(olHy`uVBq!ia0y~yV0i#!D{wFYNt3z>4M2*qILO_JVcj{ImkbQd!k#XU zAr*7p-c<~UE|+2daQ&{HMnHnpQIQ$02Yp-o3WO_H<&oSR~c>HvUhgWv;)c0jpAl|+sS`F{d@nN^L6k4|J(n6t@- zxAWX}=K7>wlY1v3UpL*;*UiT6{%u|B>A;{rVCoucY;0>ieZ_ZvSFa`VveUvQISQ~i zN~{z6^z>`N=6m~7-fez4V>T!dN?hkV^3Iy-RQ7nm?*3hSioYaVT;0AX_UFIuny>S- zzU6KFqTzGwjtM@55IK5fmLc<$bGKcH)W*t6|n2L>d= zqf%Fg+^{n5|MzNsZK^7IIqUK_&#$T5S4{t=b#{go3(!g(7vGO-bJw@nvIjIPtjK$I zx|VTEQ|qeYkqt!J1Y_oG-sV=R@eL2pD%ZBUr_dHcD%0L*)?}!{aDq{^YPVL z|NQ(YdhX@T*FS#c1bVlld(NZV8m;$T;#z;jr@j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