srcdev-nuxt-components 9.1.55 → 9.1.56

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 (100) hide show
  1. package/.claude/settings.json +29 -2
  2. package/.claude/skills/components/alert-content-inner.md +60 -0
  3. package/.claude/skills/components/display-dialog.md +80 -0
  4. package/.claude/skills/components/display-prompt.md +163 -0
  5. package/.claude/skills/components/display-toast.md +235 -0
  6. package/.claude/skills/index.md +7 -3
  7. package/.claude/skills/theming-colour-ramps.md +328 -0
  8. package/.claude/skills/theming-override-default.md +115 -186
  9. package/.claude/skills/theming-partial-override.md +88 -75
  10. package/README.md +166 -0
  11. package/app/app.config.ts +44 -0
  12. package/app/assets/styles/setup/01.config/_head.css +3 -3
  13. package/app/assets/styles/setup/02.colours/_amber.css +12 -10
  14. package/app/assets/styles/setup/02.colours/_blue.css +10 -9
  15. package/app/assets/styles/setup/02.colours/_green.css +12 -11
  16. package/app/assets/styles/setup/02.colours/_orange.css +12 -10
  17. package/app/assets/styles/setup/02.colours/_red.css +10 -9
  18. package/app/assets/styles/setup/02.colours/_slate.css +12 -11
  19. package/app/assets/styles/setup/02.colours/_sunset.css +12 -10
  20. package/app/assets/styles/setup/02.colours/_theme-params.css +18 -0
  21. package/app/assets/styles/setup/02.colours/index.css +1 -0
  22. package/app/assets/styles/setup/03.theming/_default.css +87 -0
  23. package/app/assets/styles/setup/03.theming/_error.css +14 -0
  24. package/app/assets/styles/setup/03.theming/_success.css +4 -0
  25. package/app/assets/styles/setup/03.theming/_theme-slots.css +16 -0
  26. package/app/assets/styles/setup/03.theming/_warning.css +13 -0
  27. package/app/assets/styles/setup/03.theming/index.css +6 -4
  28. package/app/assets/styles/setup/03.theming/theme-ramp.css +19 -0
  29. package/app/assets/styles/setup/04.elements/forms/00.element-defaults.css +0 -7
  30. package/app/assets/styles/setup/04.elements/forms/06.button-geometry.css +1 -1
  31. package/app/assets/styles/setup/index.css +1 -1
  32. package/app/components/01.atoms/display-dialog/DisplayDialog.vue +74 -24
  33. package/app/components/01.atoms/display-dialog/tests/DisplayDialog.spec.ts +148 -14
  34. package/app/components/01.atoms/display-dialog/tests/__snapshots__/DisplayDialog.spec.ts.snap +3 -3
  35. package/app/components/01.atoms/prompt/DisplayPrompt.vue +113 -0
  36. package/app/components/01.atoms/prompt/stories/DisplayPrompt.stories.ts +112 -0
  37. package/app/components/01.atoms/prompt/tests/DisplayPrompt.spec.ts +205 -0
  38. package/app/components/01.atoms/toast/DisplayToast.vue +327 -0
  39. package/app/components/01.atoms/toast/DisplayToastProvider.vue +362 -0
  40. package/app/components/01.atoms/toast/stories/DisplayToast.stories.ts +195 -0
  41. package/app/components/01.atoms/toast/stories/DisplayToastProvider.stories.ts +142 -0
  42. package/app/components/01.atoms/toast/tests/DisplayToast.spec.ts +266 -0
  43. package/app/components/01.atoms/toast/tests/DisplayToastProvider.spec.ts +256 -0
  44. package/app/components/02.molecules/action-menu/ActionMenu.vue +8 -1
  45. package/app/components/02.molecules/action-menu/ActionMenuItemCore.vue +11 -3
  46. package/app/components/02.molecules/alert-content/AlertContent.vue +67 -0
  47. package/app/components/02.molecules/alert-content/AlertContentInner.vue +153 -0
  48. package/app/components/02.molecules/alert-content/stories/AlertContent.stories.ts +131 -0
  49. package/app/components/02.molecules/alert-content/tests/AlertContent.spec.ts +135 -0
  50. package/app/components/02.molecules/alert-content/tests/AlertContentInner.spec.ts +135 -0
  51. package/app/components/02.molecules/alert-masked-content/AlertMaskedContent.vue +78 -0
  52. package/app/components/02.molecules/alert-masked-content/stories/AlertMaskedContent.stories.ts +132 -0
  53. package/app/components/02.molecules/alert-masked-content/tests/AlertMaskedContent.spec.ts +149 -0
  54. package/app/components/05.forms/input-button/InputButtonCore.vue +35 -39
  55. package/app/components/05.forms/input-checkbox-radio/InputCheckboxRadioButton.vue +8 -8
  56. package/app/components/05.forms/input-checkbox-radio/InputCheckboxRadioCore.vue +5 -5
  57. package/app/components/05.forms/input-copy/InputCopyCore.vue +7 -7
  58. package/app/components/05.forms/input-number/InputNumberCore.vue +5 -5
  59. package/app/components/05.forms/input-select/InputSelectCore.vue +6 -6
  60. package/app/components/05.forms/input-text/InputTextCore.vue +6 -6
  61. package/app/components/05.forms/input-text/variants/InputTextAsNumberWithLabel.vue +2 -2
  62. package/app/components/05.forms/input-textarea/InputTextareaCore.vue +5 -5
  63. package/app/components/05.forms/pending-effect/PendingEffect.vue +60 -60
  64. package/app/components/05.forms/toggle-switch/ToggleSwitchCore.vue +10 -10
  65. package/app/components/05.forms/triple-toggle-switch/TripleToggleSwitchCore.vue +4 -4
  66. package/app/components/display-theme-switch/DisplayThemeSwitch.vue +4 -4
  67. package/app/components/display-tooltip/DisplayTooltip.vue +4 -4
  68. package/app/composables/useBodyLock.ts +21 -0
  69. package/app/composables/useDialogControls.ts +11 -11
  70. package/app/composables/useToastQueue.ts +39 -0
  71. package/app/layouts/default.vue +1 -1
  72. package/app/pages/ui/display-dialog.vue +275 -127
  73. package/app/pages/ui/display-prompt.vue +255 -52
  74. package/app/pages/ui/display-toast.vue +278 -299
  75. package/app/pages/ui/mask-element.vue +25 -3
  76. package/app/pages/ui/settings.vue +9 -35
  77. package/app/types/app-config.d.ts +41 -0
  78. package/app/types/components/display-prompt.d.ts +11 -0
  79. package/app/types/components/display-toast.d.ts +11 -9
  80. package/app/types/components/index.ts +2 -0
  81. package/app/types/components/semantic-theme.d.ts +1 -0
  82. package/nuxt.config.ts +16 -0
  83. package/package.json +6 -4
  84. package/app/assets/styles/setup/03.theming/default/_dark.css +0 -156
  85. package/app/assets/styles/setup/03.theming/default/_light.css +0 -166
  86. package/app/assets/styles/setup/03.theming/default/index.css +0 -2
  87. package/app/assets/styles/setup/03.theming/error/_dark.css +0 -56
  88. package/app/assets/styles/setup/03.theming/error/_light.css +0 -74
  89. package/app/assets/styles/setup/03.theming/error/index.css +0 -2
  90. package/app/assets/styles/setup/03.theming/success/_dark.css +0 -50
  91. package/app/assets/styles/setup/03.theming/success/_light.css +0 -65
  92. package/app/assets/styles/setup/03.theming/success/index.css +0 -2
  93. package/app/assets/styles/setup/03.theming/warning/_dark.css +0 -50
  94. package/app/assets/styles/setup/03.theming/warning/_light.css +0 -64
  95. package/app/assets/styles/setup/03.theming/warning/index.css +0 -2
  96. package/app/components/display-prompt/DisplayPromptCore.vue +0 -228
  97. package/app/components/display-prompt/variants/DisplayPromptError.vue +0 -53
  98. package/app/components/display-toast/DisplayToast.vue +0 -447
  99. package/app/components/display-toast/molecules/DefaultToastContent.vue +0 -163
  100. package/app/components/display-toast/stories/DisplayToast.stories.ts +0 -380
@@ -1,74 +0,0 @@
1
- :where([data-invalid]),
2
- :where([data-theme="error"]) {
3
- /* ===========================================
4
- COLOR SCALE VARIABLES
5
- Base color tokens for the error theme
6
- =========================================== */
7
- --colour-theme-1: var(--red-01);
8
- --colour-theme-2: var(--red-02);
9
- --colour-theme-3: var(--red-03);
10
- --colour-theme-4: var(--red-04);
11
- --colour-theme-5: var(--red-05);
12
- --colour-theme-6: var(--red-06);
13
- --colour-theme-7: var(--red-07);
14
- --colour-theme-8: var(--red-08);
15
- --colour-theme-9: var(--red-09);
16
- --colour-theme-10: var(--red-10);
17
- --colour-theme-11: var(--red-10);
18
- --colour-theme-12: var(--red-10);
19
-
20
- /* ===========================================
21
- FORM ERROR DISPLAY
22
- =========================================== */
23
- --input-error-color: white;
24
- --theme-error-surface: var(--red-06);
25
- --theme-error-border: var(--red-06);
26
- --theme-error-outline: var(--red-01);
27
-
28
- /* ===========================================
29
- FORM INPUT VARIABLES
30
- Styling for form inputs and controls
31
- =========================================== */
32
- --theme-input-border: var(--red-06);
33
- --theme-input-border-focus: var(--red-04);
34
- --theme-input-border-hover: var(--red-04);
35
-
36
- /* Input outlines and focus */
37
- --theme-input-outline: var(--red-01);
38
- --theme-input-outline-focus: var(--red-04);
39
- --theme-input-visible-outline: var(--red-04);
40
- --theme-focus-visible-shadow: 0 0 0 2px var(--red-02);
41
-
42
- /* ===========================================
43
- FORM BUTTON VARIABLES
44
- Styling for form buttons and controls
45
- =========================================== */
46
-
47
- /* Variant Primary */
48
- --theme-button-primary-surface: var(--red-09);
49
- --theme-button-primary-surface-hover: var(--red-08);
50
- --theme-button-primary-surface-active: var(--red-07);
51
- --theme-button-primary-border: var(--red-09);
52
- --theme-button-primary-border-active: var(--red-09);
53
- --theme-button-primary-outline: var(--red-01);
54
- --theme-button-primary-outline-active: var(--red-07);
55
- --theme-button-primary-text: var(--red-00);
56
- --theme-button-primary-text-hover: var(--red-00);
57
-
58
- /* Variant Secondary */
59
- --theme-button-secondary-surface: transparent;
60
- --theme-button-secondary-surface-hover: var(--red-01);
61
- --theme-button-secondary-surface-active: var(--red-01);
62
- --theme-button-secondary-border: var(--red-09);
63
- --theme-button-secondary-border-active: var(--red-09);
64
- --theme-button-secondary-outline: var(--red-09);
65
- --theme-button-secondary-outline-active: var(--red-09);
66
- --theme-button-secondary-text: var(--red-09);
67
- --theme-button-secondary-text-hover: var(--red-09);
68
-
69
- /* Variant Tertiary */
70
- --theme-button-tertiary-surface: var(--slate-01);
71
- --theme-button-tertiary-text: var(--red-09);
72
- --theme-button-tertiary-border-active: var(--red-09);
73
- --theme-button-tertiary-outline-active: var(--red-09);
74
- }
@@ -1,2 +0,0 @@
1
- @import "./_light";
2
- @import "./_dark";
@@ -1,50 +0,0 @@
1
- :where(html.dark [data-theme="success"]) {
2
- /* ===========================================
3
- COLOR SCALE VARIABLES
4
- Base color tokens for the success theme
5
- =========================================== */
6
- --colour-theme-1: var(--green-01);
7
- --colour-theme-2: var(--green-02);
8
- --colour-theme-3: var(--green-03);
9
- --colour-theme-4: var(--green-04);
10
- --colour-theme-5: var(--green-05);
11
- --colour-theme-6: var(--green-06);
12
- --colour-theme-7: var(--green-07);
13
- --colour-theme-8: var(--green-08);
14
- --colour-theme-9: var(--green-09);
15
- --colour-theme-10: var(--green-10);
16
- --colour-theme-11: var(--green-10);
17
- --colour-theme-12: var(--green-10);
18
-
19
- /* ===========================================
20
- FORM INPUT VARIABLES
21
- Styling for form inputs and controls
22
- =========================================== */
23
- --theme-input-border: var(--green-05);
24
- --theme-input-border-focus: var(--green-04);
25
-
26
- /* Input outlines and focus */
27
- --theme-input-outline: var(--green-05);
28
-
29
- /* ===========================================
30
- FORM BUTTON VARIABLES
31
- Styling for form buttons and controls
32
- =========================================== */
33
-
34
- /* Variant Primary */
35
- --theme-button-primary-border: var(--green-07);
36
- --theme-button-primary-border-active: var(--green-07);
37
- --theme-button-primary-text: var(--green-00);
38
- --theme-button-primary-text-hover: var(--green-00);
39
-
40
- /* Variant Secondary */
41
- --theme-button-secondary-surface: var(--green-01);
42
- --theme-button-secondary-border-active: var(--green-01);
43
- --theme-button-secondary-text: var(--green-09);
44
-
45
- /* Variant Tertiary */
46
- --theme-button-tertiary-surface: transparent;
47
- --theme-button-tertiary-text: var(--green-01);
48
- --theme-button-tertiary-border-active: var(--green-01);
49
- --theme-button-tertiary-outline-active: var(--green-09);
50
- }
@@ -1,65 +0,0 @@
1
- :where([data-theme="success"]) {
2
- /* ===========================================
3
- COLOR SCALE VARIABLES
4
- Base color tokens for the success theme
5
- =========================================== */
6
- --colour-theme-1: var(--green-01);
7
- --colour-theme-2: var(--green-02);
8
- --colour-theme-3: var(--green-03);
9
- --colour-theme-4: var(--green-04);
10
- --colour-theme-5: var(--green-05);
11
- --colour-theme-6: var(--green-06);
12
- --colour-theme-7: var(--green-07);
13
- --colour-theme-8: var(--green-08);
14
- --colour-theme-9: var(--green-09);
15
- --colour-theme-10: var(--green-10);
16
- --colour-theme-11: var(--green-10);
17
- --colour-theme-12: var(--green-10);
18
-
19
- /* ===========================================
20
- FORM INPUT VARIABLES
21
- Styling for form inputs and controls
22
- =========================================== */
23
- --theme-input-border: var(--green-06);
24
- --theme-input-border-focus: var(--green-04);
25
- --theme-input-border-hover: var(--green-04);
26
-
27
- /* Input outlines and focus */
28
- --theme-input-outline: var(--green-01);
29
- --theme-input-outline-focus: var(--green-04);
30
- --theme-input-visible-outline: var(--green-04);
31
- --theme-focus-visible-shadow: 0 0 0 2px var(--green-02);
32
-
33
- /* ===========================================
34
- FORM BUTTON VARIABLES
35
- Styling for form buttons and controls
36
- =========================================== */
37
-
38
- /* Variant Primary */
39
- --theme-button-primary-surface: var(--green-09);
40
- --theme-button-primary-surface-hover: var(--green-08);
41
- --theme-button-primary-surface-active: var(--green-07);
42
- --theme-button-primary-border: var(--green-09);
43
- --theme-button-primary-border-active: var(--green-09);
44
- --theme-button-primary-outline: var(--green-01);
45
- --theme-button-primary-outline-active: var(--green-07);
46
- --theme-button-primary-text: var(--green-00);
47
- --theme-button-primary-text-hover: var(--green-00);
48
-
49
- /* Variant Secondary */
50
- --theme-button-secondary-surface: transparent;
51
- --theme-button-secondary-surface-hover: var(--green-01);
52
- --theme-button-secondary-surface-active: var(--green-01);
53
- --theme-button-secondary-border: var(--green-09);
54
- --theme-button-secondary-border-active: var(--green-09);
55
- --theme-button-secondary-outline: var(--green-09);
56
- --theme-button-secondary-outline-active: var(--green-09);
57
- --theme-button-secondary-text: var(--green-09);
58
- --theme-button-secondary-text-hover: var(--green-09);
59
-
60
- /* Variant Tertiary */
61
- --theme-button-tertiary-surface: var(--slate-01);
62
- --theme-button-tertiary-text: var(--green-09);
63
- --theme-button-tertiary-border-active: var(--green-09);
64
- --theme-button-tertiary-outline-active: var(--green-09);
65
- }
@@ -1,2 +0,0 @@
1
- @import "./_light";
2
- @import "./_dark";
@@ -1,50 +0,0 @@
1
- :where(html.dark [data-theme="warning"]) {
2
- /* ===========================================
3
- COLOR SCALE VARIABLES
4
- Base color tokens for the warning theme
5
- =========================================== */
6
- --colour-theme-1: var(--orange-01);
7
- --colour-theme-2: var(--orange-02);
8
- --colour-theme-3: var(--orange-03);
9
- --colour-theme-4: var(--orange-04);
10
- --colour-theme-5: var(--orange-05);
11
- --colour-theme-6: var(--orange-06);
12
- --colour-theme-7: var(--orange-07);
13
- --colour-theme-8: var(--orange-08);
14
- --colour-theme-9: var(--orange-09);
15
- --colour-theme-10: var(--orange-10);
16
- --colour-theme-11: var(--orange-10);
17
- --colour-theme-12: var(--orange-10);
18
-
19
- /* ===========================================
20
- FORM INPUT VARIABLES
21
- Styling for form inputs and controls
22
- =========================================== */
23
- --theme-input-border: var(--orange-05);
24
- --theme-input-border-focus: var(--orange-04);
25
-
26
- /* Input outlines and focus */
27
- --theme-input-outline: var(--orange-05);
28
-
29
- /* ===========================================
30
- FORM BUTTON VARIABLES
31
- Styling for form buttons and controls
32
- =========================================== */
33
-
34
- /* Variant Primary */
35
- --theme-button-primary-border: var(--sunset-07);
36
- --theme-button-primary-border-active: var(--sunset-07);
37
- --theme-button-primary-text: white;
38
- --theme-button-primary-text-hover: var(--sunset-00);
39
-
40
- /* Variant Secondary */
41
- /* --theme-button-secondary-surface: var(--sunset-01); */
42
- /* --theme-button-secondary-border-active: var(--sunset-01); */
43
- --theme-button-secondary-text: var(--sunset-05);
44
-
45
- /* Variant Tertiary */
46
- --theme-button-tertiary-surface: transparent;
47
- --theme-button-tertiary-text: var(--sunset-05);
48
- --theme-button-tertiary-border-active: var(--sunset-05);
49
- --theme-button-tertiary-outline-active: var(--sunset-05);
50
- }
@@ -1,64 +0,0 @@
1
- :where([data-theme="warning"]) {
2
- /* ===========================================
3
- COLOR SCALE VARIABLES
4
- Base color tokens for the warning theme
5
- =========================================== */
6
- --colour-theme-1: var(--orange-01);
7
- --colour-theme-2: var(--orange-02);
8
- --colour-theme-3: var(--orange-03);
9
- --colour-theme-4: var(--orange-04);
10
- --colour-theme-5: var(--orange-05);
11
- --colour-theme-6: var(--orange-06);
12
- --colour-theme-7: var(--orange-07);
13
- --colour-theme-8: var(--orange-08);
14
- --colour-theme-9: var(--orange-09);
15
- --colour-theme-10: var(--orange-10);
16
- --colour-theme-11: var(--orange-10);
17
- --colour-theme-12: var(--orange-10);
18
-
19
- /* ===========================================
20
- FORM INPUT VARIABLES
21
- Styling for form inputs and controls
22
- =========================================== */
23
- --theme-input-border: var(--orange-06);
24
- --theme-input-border-focus: var(--orange-04);
25
- --theme-input-border-hover: var(--orange-04);
26
-
27
- /* Input outlines and focus */
28
- --theme-input-outline: var(--orange-01);
29
- --theme-input-outline-focus: var(--orange-04);
30
- --theme-input-visible-outline: var(--orange-04);
31
- --theme-focus-visible-shadow: 0 0 0 2px var(--orange-02);
32
-
33
- /* ===========================================
34
- FORM BUTTON VARIABLES
35
- Styling for form buttons and controls
36
- =========================================== */
37
-
38
- /* Variant Primary */
39
- --theme-button-primary-surface: var(--sunset-05);
40
- --theme-button-primary-surface-hover: var(--sunset-08);
41
- --theme-button-primary-surface-active: var(--sunset-07);
42
- --theme-button-primary-border: var(--sunset-05);
43
- --theme-button-primary-border-active: var(--sunset-05);
44
- --theme-button-primary-outline: var(--sunset-01);
45
- --theme-button-primary-text: white;
46
- --theme-button-primary-text-hover: var(--sunset-01);
47
- --theme-button-primary-outline-active: var(--sunset-05);
48
-
49
- /* Variant Secondary */
50
- --theme-button-secondary-surface: transparent;
51
- --theme-button-secondary-surface-hover: var(--sunset-02);
52
- --theme-button-secondary-surface-active: var(--sunset-03);
53
- --theme-button-secondary-border: var(--sunset-05);
54
- --theme-button-secondary-border-active: var(--sunset-05);
55
- --theme-button-secondary-outline: var(--sunset-05);
56
- --theme-button-secondary-text: var(--sunset-05);
57
- --theme-button-secondary-text-hover: var(--sunset-05);
58
- --theme-button-secondary-outline-active: var(--sunset-05);
59
-
60
- /* Variant Tertiary */
61
- --theme-button-tertiary-text: var(--sunset-05);
62
- --theme-button-tertiary-border-active: var(--sunset-07);
63
- --theme-button-tertiary-outline-active: var(--sunset-04);
64
- }
@@ -1,2 +0,0 @@
1
- @import "./_light";
2
- @import "./_dark";
@@ -1,228 +0,0 @@
1
- <template>
2
- <div
3
- ref="promptElementRef"
4
- class="display-prompt-core"
5
- :class="[{ closed: !compopnentOpen }]"
6
- :data-test-id="`display-prompt-core-${theme}`"
7
- tabindex="0"
8
- >
9
- <div class="display-prompt-wrapper" :data-theme="theme" :class="[elementClasses]" data-test-id="display-prompt">
10
- <div class="display-prompt-inner">
11
- <div class="display-prompt-icon" data-test-id="prompt-icon" aria-hidden="true">
12
- <slot name="customDecoratorIcon">
13
- <Icon :name="displayPromptIcons[theme] ?? 'akar-icons:circle-alert'" class="icon" :color="iconColor" />
14
- </slot>
15
- </div>
16
- <div class="display-prompt-content" :aria-live="useAutoFocus ? 'polite' : undefined">
17
- <p class="title" data-test-id="display-prompt-title">
18
- <slot name="title"></slot>
19
- </p>
20
- <p v-if="slots.content" class="text" data-test-id="display-prompt-content">
21
- <slot name="content"></slot>
22
- </p>
23
- </div>
24
- <button
25
- v-if="dismissible"
26
- data-test-id="display-prompt-action"
27
- class="display-prompt-action"
28
- @click.prevent="updateComponentState()"
29
- >
30
- <slot name="customCloseIcon">
31
- <Icon name="bitcoin-icons:cross-filled" class="icon" />
32
- </slot>
33
- <span class="sr-only">
34
- <slot name="customTitle">Close this prompt</slot>
35
- </span>
36
- </button>
37
- </div>
38
- </div>
39
- </div>
40
- </template>
41
-
42
- <script setup lang="ts">
43
- const props = defineProps({
44
- dismissible: {
45
- type: Boolean,
46
- default: false,
47
- },
48
- theme: {
49
- type: String,
50
- default: "error",
51
- },
52
- styleClassPassthrough: {
53
- type: [String, Array] as PropType<string | string[]>,
54
- default: () => [],
55
- },
56
- iconColor: {
57
- type: String as PropType<string>,
58
- default: "dark-grey",
59
- },
60
- displayPromptIcons: {
61
- type: Object as PropType<Record<string, string>>,
62
- default: () => ({
63
- error: "akar-icons:circle-alert",
64
- info: "akar-icons:info",
65
- success: "akar-icons:check",
66
- warning: "akar-icons:circle-alert",
67
- secondary: "akar-icons:info",
68
- }),
69
- },
70
- useAutoFocus: {
71
- type: Boolean,
72
- default: false,
73
- },
74
- });
75
-
76
- const slots = useSlots();
77
- const promptElementRef = useTemplateRef<HTMLElement>("promptElementRef");
78
- const parentComponentState = defineModel<boolean>({ default: false });
79
- const compopnentOpen = ref(true);
80
- const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
81
-
82
- const updateComponentState = () => {
83
- if (parentComponentState.value) {
84
- parentComponentState.value = false;
85
- return;
86
- }
87
-
88
- compopnentOpen.value = false;
89
- };
90
-
91
- onMounted(async () => {
92
- if (props.useAutoFocus && promptElementRef.value) {
93
- promptElementRef.value.focus();
94
- }
95
- });
96
- </script>
97
-
98
- <style lang="css">
99
- @layer components {
100
- .display-prompt-core {
101
- display: grid;
102
- grid-template-rows: 1fr;
103
- opacity: 1;
104
- transition: all 200ms ease-in-out;
105
-
106
- &.closed {
107
- grid-template-rows: 0fr;
108
- opacity: 0;
109
- pointer-events: none;
110
- }
111
-
112
- .display-prompt-wrapper {
113
- background-color: var(--colour-theme-8);
114
- border: 0px solid transparent;
115
- border-radius: 4px;
116
- border-start-start-radius: 8px;
117
- border-end-start-radius: 8px;
118
- padding-inline-start: 8px;
119
-
120
- overflow: hidden;
121
-
122
- &:not(.dark) {
123
- &.outlined {
124
- border: 1px solid var(--colour-theme-8);
125
- }
126
- }
127
-
128
- &.dark {
129
- border-width: 0;
130
-
131
- .display-prompt-inner {
132
- background-color: var(--slate-01);
133
- }
134
-
135
- &.outlined {
136
- border: 1px solid var(--colour-theme-8);
137
- }
138
- }
139
-
140
- .display-prompt-inner {
141
- align-items: center;
142
- display: flex;
143
- gap: 12px;
144
- justify-content: space-between;
145
- padding-block: 1rem;
146
- padding-inline: 1.5rem;
147
-
148
- border-start-start-radius: 8px;
149
- border-end-start-radius: 8px;
150
- background-color: var(--colour-theme-10);
151
-
152
- .display-prompt-icon {
153
- display: inline-flex;
154
- .icon {
155
- color: var(--colour-theme-8);
156
- display: inline-block;
157
- font-size: 3rem;
158
- font-style: normal;
159
- font-weight: normal;
160
- overflow: hidden;
161
- }
162
- }
163
-
164
- .display-prompt-content {
165
- display: block flex;
166
- flex-direction: column;
167
- flex-grow: 1;
168
- gap: 1rem;
169
- margin: 0;
170
- padding: 0.2rem;
171
-
172
- .title {
173
- font-size: var(--step-5);
174
- font-weight: bold;
175
- line-height: 1.3;
176
- color: var(--colour-theme-8);
177
- margin: 0;
178
- padding: 0;
179
- }
180
-
181
- .text {
182
- font-size: var(--step-4);
183
- font-weight: normal;
184
- line-height: 1.3;
185
- color: var(--colour-theme-8);
186
- margin: 0;
187
- padding: 0;
188
- }
189
- }
190
- .display-prompt-action {
191
- background-color: transparent;
192
- display: block flex;
193
- align-items: center;
194
- justify-content: center;
195
- margin: 1rem;
196
- padding: 0.5rem;
197
- border: 0.1rem solid var(--colour-theme-8);
198
- border-radius: 50%;
199
- outline: 1px solid var(--colour-theme-3);
200
-
201
- transition:
202
- border 200ms ease-in-out,
203
- outline 200ms ease-in-out;
204
-
205
- &:hover {
206
- cursor: pointer;
207
- border: 0.1rem solid var(--colour-theme-12);
208
- outline: 2px solid var(--colour-theme-6);
209
- }
210
-
211
- &:focus-visible {
212
- box-shadow: var(--focus-box-shadow-colour-on);
213
- border: 0.1rem solid var(--colour-theme-12);
214
- outline: 2px solid var(--colour-theme-6);
215
- }
216
-
217
- .icon {
218
- color: var(--colour-theme-8);
219
- display: block;
220
- font-size: var(--step-5);
221
- padding: 1rem;
222
- }
223
- }
224
- }
225
- }
226
- }
227
- }
228
- </style>
@@ -1,53 +0,0 @@
1
- <template>
2
- <DisplayPromptCore variant="error" :dismissible icon-color="white" :style-class-passthrough>
3
- <template #icon>
4
- <Icon name="akar-icons:circle-alert" class="icon" />
5
- </template>
6
- <template #title>
7
- <slot name="title"></slot>
8
- </template>
9
- <template v-if="slots.content" #content>
10
- <slot name="content"></slot>
11
- </template>
12
- </DisplayPromptCore>
13
- </template>
14
-
15
- <script setup lang="ts">
16
- const props = defineProps({
17
- dismissible: {
18
- type: Boolean,
19
- default: false,
20
- },
21
- styleClassPassthrough: {
22
- type: [String, Array] as PropType<string | string[]>,
23
- default: () => [],
24
- },
25
- });
26
-
27
- const slots = useSlots();
28
- </script>
29
-
30
- <style lang="css">
31
- @layer components {
32
- .display-prompt.error {
33
- --bg-color: var(--red-02);
34
- --text-color: var(--slate-00);
35
- }
36
-
37
- .display-prompt {
38
- &.error {
39
- background-color: var(--bg-color);
40
- }
41
-
42
- &-icon {
43
- .icon {
44
- color: var(--text-color);
45
- }
46
- }
47
-
48
- &-content {
49
- color: var(--text-color);
50
- }
51
- }
52
- }
53
- </style>