@poveste/app 0.15.0 → 0.16.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.
- package/dist/app/style/main.pcss +18 -44
- package/dist/bundled/App.vue_vue_type_script_setup_true_lang.js +9 -7
- package/dist/bundled/app.css +80 -17
- package/dist/bundled/components/app/AppActions.vue_vue_type_script_setup_true_lang.js +44 -27
- package/dist/bundled/components/app/ShortcutTooltip.js +5 -0
- package/dist/bundled/components/app/ShortcutTooltip.vue_vue_type_script_setup_true_lang.js +27 -0
- package/dist/bundled/components/base/BaseDropdown.js +6 -0
- package/dist/bundled/components/base/BaseDropdown.vue_vue_type_script_setup_true_lang.js +68 -0
- package/dist/bundled/components/base/BaseOverflowMenu.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/bundled/components/base/BaseSelect.js +1 -0
- package/dist/bundled/components/base/BaseSelect.vue_vue_type_script_setup_true_lang.js +80 -51
- package/dist/bundled/components/base/BaseSplitPane.js +1 -1
- package/dist/bundled/components/base/BaseSplitPane.vue_vue_type_script_setup_true_lang.js +65 -4
- package/dist/bundled/components/panel/ControlsComponentPropItem.vue_vue_type_script_setup_true_lang.js +15 -13
- package/dist/bundled/components/panel/ControlsComponentProps.vue_vue_type_script_setup_true_lang.js +9 -6
- package/dist/bundled/components/panel/ControlsComponentState.vue_vue_type_script_setup_true_lang.js +9 -6
- package/dist/bundled/components/panel/StatePresets.vue_vue_type_script_setup_true_lang.js +69 -54
- package/dist/bundled/components/panel/StoryEvent.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/bundled/components/panel/StorySidePanel.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/bundled/components/panel/StorySourceCode.js +1 -1
- package/dist/bundled/components/panel/StorySourceCode.vue_vue_type_script_setup_true_lang.js +21 -16
- package/dist/bundled/components/story/StoryResponsivePreview.js +1 -1
- package/dist/bundled/components/story/StoryResponsivePreview.vue_vue_type_script_setup_true_lang.js +46 -43
- package/dist/bundled/components/story/StoryVariantGridItem.js +1 -1
- package/dist/bundled/components/story/StoryVariantGridItem.vue_vue_type_script_setup_true_lang.js +21 -19
- package/dist/bundled/components/story/StoryVariantSingle.js +1 -1
- package/dist/bundled/components/story/StoryVariantSingle.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/bundled/components/story/StoryView.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/bundled/components/toolbar/DevOnlyToolbarOpenInEditor.vue_vue_type_script_setup_true_lang.js +15 -12
- package/dist/bundled/components/toolbar/ToolbarBackground.vue_vue_type_script_setup_true_lang.js +20 -16
- package/dist/bundled/components/toolbar/ToolbarNewTab.vue_vue_type_script_setup_true_lang.js +16 -13
- package/dist/bundled/components/toolbar/ToolbarResponsiveSize.vue_vue_type_script_setup_true_lang.js +35 -24
- package/dist/bundled/components/toolbar/ToolbarTextDirection.vue_vue_type_script_setup_true_lang.js +15 -12
- package/dist/bundled/index.js +0 -13
- package/dist/bundled/sandbox.js +2 -1
- package/dist/bundled/util/icons.generated.js +4 -2
- package/dist/bundled/util/scroll.js +26 -5
- package/dist/bundled/util/state.js +105 -5
- package/dist/style.css +731 -357
- package/package.json +19 -15
- package/src/__tests__/base-select.spec.ts +25 -0
- package/src/__tests__/reset.spec.ts +53 -0
- package/src/__tests__/state-clone.spec.ts +55 -1
- package/src/__tests__/state-types.spec.ts +175 -0
- package/src/app/App.vue +43 -34
- package/src/app/components/app/AppActions.vue +42 -30
- package/src/app/components/app/ShortcutTooltip.vue +29 -0
- package/src/app/components/base/BaseDropdown.vue +142 -0
- package/src/app/components/base/BaseOverflowMenu.vue +10 -5
- package/src/app/components/base/BaseSelect.vue +133 -60
- package/src/app/components/base/BaseSplitPane.vue +73 -2
- package/src/app/components/panel/ControlsComponentPropItem.vue +18 -17
- package/src/app/components/panel/ControlsComponentProps.vue +7 -5
- package/src/app/components/panel/ControlsComponentState.vue +7 -5
- package/src/app/components/panel/StatePresets.vue +82 -76
- package/src/app/components/panel/StoryEvent.vue +10 -9
- package/src/app/components/panel/StorySidePanel.vue +1 -0
- package/src/app/components/panel/StorySourceCode.vue +47 -41
- package/src/app/components/story/StoryResponsivePreview.vue +55 -27
- package/src/app/components/story/StoryVariantGridItem.vue +19 -18
- package/src/app/components/story/StoryVariantSingle.vue +1 -0
- package/src/app/components/story/StoryView.vue +1 -0
- package/src/app/components/toolbar/DevOnlyToolbarOpenInEditor.vue +14 -12
- package/src/app/components/toolbar/ToolbarBackground.vue +22 -23
- package/src/app/components/toolbar/ToolbarNewTab.vue +14 -12
- package/src/app/components/toolbar/ToolbarResponsiveSize.vue +31 -25
- package/src/app/components/toolbar/ToolbarTextDirection.vue +14 -10
- package/src/app/index.ts +0 -17
- package/src/app/sandbox.ts +8 -1
- package/src/app/style/main.pcss +18 -44
- package/src/app/util/icons.generated.ts +2 -2
- package/src/app/util/scroll.ts +47 -9
- package/src/app/util/state.ts +139 -6
- package/dist/app/style/floating.pcss +0 -40
- package/dist/bundled/util/tooltip.js +0 -14
- package/src/app/style/floating.pcss +0 -40
- package/src/app/util/tooltip.ts +0 -13
package/dist/app/style/main.pcss
CHANGED
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
this file is compiled by the postcss CLI into dist/style.css, which rebases
|
|
3
3
|
font URLs relative to the *source* and ships a path into node_modules. Vite
|
|
4
4
|
processes the entries and hashes the files into the book (#219). */
|
|
5
|
-
@import 'floating-vue/dist/style.css';
|
|
6
5
|
@import '@poveste/controls/dist/index.es.css';
|
|
7
6
|
|
|
8
|
-
@import './floating.pcss';
|
|
9
7
|
@import './transitions.pcss';
|
|
10
8
|
|
|
11
9
|
/*
|
|
@@ -17,6 +15,11 @@
|
|
|
17
15
|
@import 'tailwindcss/theme.css' layer(theme);
|
|
18
16
|
@import 'tailwindcss/utilities.css' layer(utilities);
|
|
19
17
|
|
|
18
|
+
/* The chrome's tokens, shared with `@poveste/controls` — see the file for why
|
|
19
|
+
both packages read them rather than each declaring its own. The relative path
|
|
20
|
+
is the one `@source` below already uses. */
|
|
21
|
+
@import '../../../../poveste-controls/src/style/tokens.css';
|
|
22
|
+
|
|
20
23
|
/* v4 auto-detection only scans this package; the app renders controls, so their
|
|
21
24
|
utility classes must be generated here too (was a content glob in v3). */
|
|
22
25
|
@source "../../../../poveste-controls/src";
|
|
@@ -32,47 +35,6 @@
|
|
|
32
35
|
in v3 the `ptw-` prefix applied to the dark class and kept them separate. */
|
|
33
36
|
@custom-variant dark (&:where(.ptw-dark, .ptw-dark *));
|
|
34
37
|
|
|
35
|
-
@theme {
|
|
36
|
-
/*
|
|
37
|
-
* primary + gray are themable at runtime: resolved-theme.ts injects
|
|
38
|
-
* --_poveste-color-<name>-<key> as space-separated RGB channels, and v4's
|
|
39
|
-
* native color-mix handles opacity (replacing the v3 withOpacityValue shim).
|
|
40
|
-
*/
|
|
41
|
-
--color-primary-50: rgb(var(--_poveste-color-primary-50));
|
|
42
|
-
--color-primary-100: rgb(var(--_poveste-color-primary-100));
|
|
43
|
-
--color-primary-200: rgb(var(--_poveste-color-primary-200));
|
|
44
|
-
--color-primary-300: rgb(var(--_poveste-color-primary-300));
|
|
45
|
-
--color-primary-400: rgb(var(--_poveste-color-primary-400));
|
|
46
|
-
--color-primary-500: rgb(var(--_poveste-color-primary-500));
|
|
47
|
-
--color-primary-600: rgb(var(--_poveste-color-primary-600));
|
|
48
|
-
--color-primary-700: rgb(var(--_poveste-color-primary-700));
|
|
49
|
-
--color-primary-800: rgb(var(--_poveste-color-primary-800));
|
|
50
|
-
--color-primary-900: rgb(var(--_poveste-color-primary-900));
|
|
51
|
-
|
|
52
|
-
--color-gray-50: rgb(var(--_poveste-color-gray-50));
|
|
53
|
-
--color-gray-100: rgb(var(--_poveste-color-gray-100));
|
|
54
|
-
--color-gray-200: rgb(var(--_poveste-color-gray-200));
|
|
55
|
-
--color-gray-300: rgb(var(--_poveste-color-gray-300));
|
|
56
|
-
--color-gray-400: rgb(var(--_poveste-color-gray-400));
|
|
57
|
-
--color-gray-500: rgb(var(--_poveste-color-gray-500));
|
|
58
|
-
--color-gray-600: rgb(var(--_poveste-color-gray-600));
|
|
59
|
-
--color-gray-700: rgb(var(--_poveste-color-gray-700));
|
|
60
|
-
--color-gray-750: rgb(var(--_poveste-color-gray-750));
|
|
61
|
-
--color-gray-800: rgb(var(--_poveste-color-gray-800));
|
|
62
|
-
--color-gray-850: rgb(var(--_poveste-color-gray-850));
|
|
63
|
-
--color-gray-900: rgb(var(--_poveste-color-gray-900));
|
|
64
|
-
--color-gray-950: rgb(var(--_poveste-color-gray-950));
|
|
65
|
-
|
|
66
|
-
/* border radius (ported from the root v3 config) */
|
|
67
|
-
--radius-sm: 0.25rem;
|
|
68
|
-
--radius: 0.375rem;
|
|
69
|
-
--radius-md: 0.5rem;
|
|
70
|
-
--radius-lg: 0.75rem;
|
|
71
|
-
--radius-xl: 1rem;
|
|
72
|
-
--radius-2xl: 1.5rem;
|
|
73
|
-
--radius-3xl: 2rem;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
38
|
/*
|
|
77
39
|
* Manual reset — replaces Preflight, which is intentionally disabled.
|
|
78
40
|
*
|
|
@@ -108,6 +70,18 @@
|
|
|
108
70
|
font-family: inherit;
|
|
109
71
|
}
|
|
110
72
|
|
|
73
|
+
/* Preflight resets these and the replacement above left them out, so a button
|
|
74
|
+
carrying no background utility painted the UA `ButtonFace`: grey, near enough
|
|
75
|
+
to light chrome to pass, a white panel against dark. */
|
|
76
|
+
button,
|
|
77
|
+
[type='button'],
|
|
78
|
+
[type='reset'],
|
|
79
|
+
[type='submit'] {
|
|
80
|
+
appearance: button;
|
|
81
|
+
background-color: transparent;
|
|
82
|
+
background-image: none;
|
|
83
|
+
}
|
|
84
|
+
|
|
111
85
|
a,
|
|
112
86
|
button {
|
|
113
87
|
user-select: none;
|
|
@@ -170,7 +144,7 @@
|
|
|
170
144
|
background-repeat: no-repeat;
|
|
171
145
|
background-position: right;
|
|
172
146
|
|
|
173
|
-
/* Subject-side, not `.ptw-dark &` — see the note in
|
|
147
|
+
/* Subject-side, not `.ptw-dark &` — see the note in BaseDropdown.vue. */
|
|
174
148
|
&:where(.ptw-dark, .ptw-dark *) {
|
|
175
149
|
background-image: linear-gradient(to left, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0));
|
|
176
150
|
}
|
|
@@ -31,12 +31,13 @@ var _hoisted_4 = {
|
|
|
31
31
|
key: 1,
|
|
32
32
|
class: "sr-only"
|
|
33
33
|
};
|
|
34
|
-
var _hoisted_5 = { class: "flex
|
|
35
|
-
var _hoisted_6 = {
|
|
34
|
+
var _hoisted_5 = { class: "flex-1 min-h-0 flex flex-col" };
|
|
35
|
+
var _hoisted_6 = { class: "flex flex-col h-full bg-gray-100 dark:bg-gray-750 __poveste-pane-shadow-from-right" };
|
|
36
|
+
var _hoisted_7 = {
|
|
36
37
|
"aria-label": "Stories",
|
|
37
38
|
class: "flex-1 flex flex-col min-h-0"
|
|
38
39
|
};
|
|
39
|
-
var
|
|
40
|
+
var _hoisted_8 = { class: "flex flex-col h-full" };
|
|
40
41
|
var App_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
41
42
|
name: "PovesteApp",
|
|
42
43
|
setup(__props) {
|
|
@@ -116,26 +117,27 @@ var App_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompon
|
|
|
116
117
|
})]), createVNode(Breadcrumb_default, {
|
|
117
118
|
tree: tree$1.value,
|
|
118
119
|
stories: stories.value
|
|
119
|
-
}, null, 8, ["tree", "stories"])], 64)) : !storyListVisible.value ? (openBlock(), createElementBlock("header", _hoisted_4, [createElementVNode("h1", null, toDisplayString(unref(povesteConfig).theme?.title ?? "Poveste"), 1)])) : createCommentVNode("", true), createVNode(BaseSplitPane_default, {
|
|
120
|
+
}, null, 8, ["tree", "stories"])], 64)) : !storyListVisible.value ? (openBlock(), createElementBlock("header", _hoisted_4, [createElementVNode("h1", null, toDisplayString(unref(povesteConfig).theme?.title ?? "Poveste"), 1)])) : createCommentVNode("", true), createElementVNode("main", _hoisted_5, [createVNode(BaseSplitPane_default, {
|
|
120
121
|
"save-id": "main-horiz",
|
|
122
|
+
label: "Resize the story list",
|
|
121
123
|
min: 5,
|
|
122
124
|
max: 50,
|
|
123
125
|
"default-split": 15,
|
|
124
126
|
"show-first": !unref(isMobile) && storyListVisible.value,
|
|
125
127
|
class: "flex-1 min-h-0"
|
|
126
128
|
}, {
|
|
127
|
-
first: withCtx(() => [createElementVNode("div",
|
|
129
|
+
first: withCtx(() => [createElementVNode("div", _hoisted_6, [createVNode(AppHeader_default, { class: "flex-none" }), createElementVNode("nav", _hoisted_7, [createVNode(StoryList_default, {
|
|
128
130
|
tree: tree$1.value,
|
|
129
131
|
stories: stories.value,
|
|
130
132
|
class: "flex-1"
|
|
131
133
|
}, null, 8, ["tree", "stories"])])])]),
|
|
132
|
-
last: withCtx(() => [createElementVNode("
|
|
134
|
+
last: withCtx(() => [createElementVNode("div", _hoisted_8, [!unref(isMobile) ? (openBlock(), createBlock(TopBar_default, {
|
|
133
135
|
key: 0,
|
|
134
136
|
onLayout: _cache[2] || (_cache[2] = ($event) => isLayoutOpen.value = true),
|
|
135
137
|
onSearch: _cache[3] || (_cache[3] = ($event) => isSearchOpen.value = true)
|
|
136
138
|
})) : createCommentVNode("", true), createVNode(_component_RouterView, { class: "flex-1 min-h-0" })])]),
|
|
137
139
|
_: 1
|
|
138
|
-
}, 8, ["show-first"])], 2),
|
|
140
|
+
}, 8, ["show-first"])])], 2),
|
|
139
141
|
!unref(isMobile) ? (openBlock(), createBlock(LayoutModal_default, {
|
|
140
142
|
key: 0,
|
|
141
143
|
shown: isLayoutOpen.value,
|
package/dist/bundled/app.css
CHANGED
|
@@ -17,33 +17,79 @@
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
@scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
|
|
20
|
+
/* floating-vue put the same zero on its own wrapper, and the triggers that
|
|
21
|
+
wanted text to sit normally say `leading-normal` because of it. */
|
|
22
|
+
.poveste-dropdown-trigger {
|
|
23
|
+
line-height: 0;
|
|
24
|
+
}
|
|
25
|
+
.poveste-dropdown {
|
|
26
|
+
background: #fff;
|
|
27
|
+
color: #000;
|
|
28
|
+
border: 1px solid #ddd;
|
|
29
|
+
border-radius: 6px;
|
|
30
|
+
box-shadow: 0 6px 30px rgb(0 0 0 / .1);
|
|
31
|
+
/* A row that paints to the panel's edge has to stop at the rounded corner,
|
|
32
|
+
which the `overflow-y: auto` on floating-vue's inner element did. */
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
z-index: 100;
|
|
35
|
+
|
|
36
|
+
/*
|
|
37
|
+
* What Tailwind's `dark:` compiles to, spelled out because `@apply` in a
|
|
38
|
+
* single-file component needs a `@reference` and no component here has one.
|
|
39
|
+
* Not `.ptw-dark &`: the chrome CSS is wrapped in `@scope` and `.ptw-dark`
|
|
40
|
+
* sits on `<html>`, above the scope root, so a descendant rule keyed on it
|
|
41
|
+
* never matches and the panel falls back to the light colours (#101). This
|
|
42
|
+
* puts the condition on the subject instead, and adds no specificity — so it
|
|
43
|
+
* has to come after the light values to win.
|
|
44
|
+
*/
|
|
45
|
+
&:where(.ptw-dark, .ptw-dark *) {
|
|
46
|
+
background: var(--color-gray-700);
|
|
47
|
+
border-color: var(--color-gray-850);
|
|
48
|
+
color: var(--color-gray-100);
|
|
49
|
+
}
|
|
50
|
+
&:focus-visible {
|
|
51
|
+
outline: none;
|
|
52
|
+
}
|
|
53
|
+
&[data-state='open'] {
|
|
54
|
+
transform-origin: var(--reka-popover-content-transform-origin);
|
|
55
|
+
animation: poveste-dropdown-open .15s cubic-bezier(0, 1, .5, 1);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
@keyframes poveste-dropdown-open {
|
|
59
|
+
from {
|
|
60
|
+
opacity: 0;
|
|
61
|
+
transform: scale(.75);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
@scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
|
|
20
66
|
.bind-icon-color[data-v-30c06406] {
|
|
21
67
|
color: var(--v5947d534);
|
|
22
68
|
}
|
|
23
69
|
}
|
|
24
70
|
@scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
|
|
25
|
-
.landscape > div > .dragger[data-v-
|
|
71
|
+
.landscape > div > .dragger[data-v-c01bd041] {
|
|
26
72
|
width: .625rem;
|
|
27
73
|
}
|
|
28
|
-
.portrait > div > .dragger[data-v-
|
|
74
|
+
.portrait > div > .dragger[data-v-c01bd041] {
|
|
29
75
|
height: .625rem;
|
|
30
76
|
}
|
|
31
|
-
.landscape > div > .dragger.dragger-offset-before[data-v-
|
|
77
|
+
.landscape > div > .dragger.dragger-offset-before[data-v-c01bd041] {
|
|
32
78
|
right: 0;
|
|
33
79
|
}
|
|
34
|
-
.portrait > div > .dragger.dragger-offset-before[data-v-
|
|
80
|
+
.portrait > div > .dragger.dragger-offset-before[data-v-c01bd041] {
|
|
35
81
|
bottom: 0;
|
|
36
82
|
}
|
|
37
|
-
.landscape > div > .dragger.dragger-offset-center[data-v-
|
|
83
|
+
.landscape > div > .dragger.dragger-offset-center[data-v-c01bd041] {
|
|
38
84
|
right: -.3125rem;
|
|
39
85
|
}
|
|
40
|
-
.portrait > div > .dragger.dragger-offset-center[data-v-
|
|
86
|
+
.portrait > div > .dragger.dragger-offset-center[data-v-c01bd041] {
|
|
41
87
|
bottom: -.3125rem;
|
|
42
88
|
}
|
|
43
|
-
.landscape > div > .dragger.dragger-offset-after[data-v-
|
|
89
|
+
.landscape > div > .dragger.dragger-offset-after[data-v-c01bd041] {
|
|
44
90
|
right: -.625rem;
|
|
45
91
|
}
|
|
46
|
-
.portrait > div > .dragger.dragger-offset-after[data-v-
|
|
92
|
+
.portrait > div > .dragger.dragger-offset-after[data-v-c01bd041] {
|
|
47
93
|
bottom: -.625rem;
|
|
48
94
|
}
|
|
49
95
|
}
|
|
@@ -87,7 +133,24 @@
|
|
|
87
133
|
}
|
|
88
134
|
}
|
|
89
135
|
@scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
|
|
90
|
-
.
|
|
136
|
+
.poveste-base-select-popper {
|
|
137
|
+
/* The trigger's own width, which is what floating-vue's `auto-size` gave. */
|
|
138
|
+
min-width: var(--reka-popper-anchor-width);
|
|
139
|
+
z-index: 100;
|
|
140
|
+
&:focus-visible {
|
|
141
|
+
outline: none;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
.poveste-base-select-options {
|
|
145
|
+
/* The room Reka measured between the trigger and the viewport edge, which is
|
|
146
|
+
what `auto-boundary-max-size` gave: a story with more presets than fit below
|
|
147
|
+
its picker otherwise drew them off the screen, reachable by nothing. */
|
|
148
|
+
max-height: var(--reka-popover-content-available-height);
|
|
149
|
+
overflow-y: auto;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
@scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
|
|
153
|
+
.__poveste-code-placeholder[data-v-e112aa54] {
|
|
91
154
|
color: inherit;
|
|
92
155
|
font-size: inherit;
|
|
93
156
|
}
|
|
@@ -102,16 +165,16 @@
|
|
|
102
165
|
}
|
|
103
166
|
}
|
|
104
167
|
@scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
|
|
105
|
-
.bind-preview-bg[data-v-
|
|
106
|
-
background-color: var(--
|
|
168
|
+
.bind-preview-bg[data-v-a99edb14] {
|
|
169
|
+
background-color: var(--v4ce71e65);
|
|
107
170
|
}
|
|
108
171
|
}
|
|
109
172
|
@scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
|
|
110
|
-
.bind-icon-color[data-v-
|
|
111
|
-
color: var(--
|
|
173
|
+
.bind-icon-color[data-v-bfa057e9] {
|
|
174
|
+
color: var(--v1061c03c);
|
|
112
175
|
}
|
|
113
|
-
.bind-preview-bg[data-v-
|
|
114
|
-
background-color: var(--
|
|
176
|
+
.bind-preview-bg[data-v-bfa057e9] {
|
|
177
|
+
background-color: var(--v2d8b4c49);
|
|
115
178
|
}
|
|
116
179
|
}
|
|
117
180
|
@scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
|
|
@@ -128,8 +191,8 @@
|
|
|
128
191
|
}
|
|
129
192
|
}
|
|
130
193
|
@scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
|
|
131
|
-
.bind-icon-color[data-v-
|
|
132
|
-
color: var(--
|
|
194
|
+
.bind-icon-color[data-v-6ba33e62] {
|
|
195
|
+
color: var(--v3bcafcf8);
|
|
133
196
|
}
|
|
134
197
|
}
|
|
135
198
|
@scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { povesteConfig } from "../../util/config.js";
|
|
2
2
|
import { isDark, toggleDark } from "../../util/dark.js";
|
|
3
3
|
import { isMobile } from "../../util/responsive.js";
|
|
4
|
-
import
|
|
4
|
+
import ShortcutTooltip_default from "./ShortcutTooltip.js";
|
|
5
5
|
import TopBarChip_default from "./TopBarChip.js";
|
|
6
6
|
import TopBarChipItem_default from "./TopBarChipItem.js";
|
|
7
|
-
import { computed, createBlock, createCommentVNode, createVNode, defineComponent, openBlock,
|
|
7
|
+
import { computed, createBlock, createCommentVNode, createVNode, defineComponent, openBlock, unref, withCtx } from "@poveste/vendors/vue";
|
|
8
8
|
import { Icon } from "@poveste/vendors/iconify";
|
|
9
9
|
//#region src/app/components/app/AppActions.vue?vue&type=script&setup=true&lang.ts
|
|
10
10
|
var AppActions_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
@@ -18,43 +18,60 @@ var AppActions_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
18
18
|
return isDark.value ? "carbon:moon" : "carbon:sun";
|
|
19
19
|
});
|
|
20
20
|
return (_ctx, _cache) => {
|
|
21
|
-
const _directive_tooltip = resolveDirective("tooltip");
|
|
22
21
|
return openBlock(), createBlock(TopBarChip_default, null, {
|
|
23
22
|
default: withCtx(() => [
|
|
24
|
-
!unref(isMobile) ?
|
|
23
|
+
!unref(isMobile) ? (openBlock(), createBlock(ShortcutTooltip_default, {
|
|
25
24
|
key: 0,
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("layout"))
|
|
25
|
+
description: "Layout",
|
|
26
|
+
shortcut: ({ isMac }) => isMac ? "meta+shift+l" : "ctrl+shift+l"
|
|
29
27
|
}, {
|
|
30
|
-
default: withCtx(() => [createVNode(
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
default: withCtx(() => [createVNode(TopBarChipItem_default, {
|
|
29
|
+
"aria-label": "Open layout customization",
|
|
30
|
+
"data-testid": "layout-btn",
|
|
31
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("layout"))
|
|
32
|
+
}, {
|
|
33
|
+
default: withCtx(() => [createVNode(unref(Icon), {
|
|
34
|
+
icon: "carbon:panel-expansion",
|
|
35
|
+
class: "w-4 h-4"
|
|
36
|
+
})]),
|
|
37
|
+
_: 1
|
|
33
38
|
})]),
|
|
34
39
|
_: 1
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("search"))
|
|
40
|
+
}, 8, ["shortcut"])) : createCommentVNode("", true),
|
|
41
|
+
createVNode(ShortcutTooltip_default, {
|
|
42
|
+
description: "Search",
|
|
43
|
+
shortcut: ({ isMac }) => isMac ? "meta+k" : "ctrl+k"
|
|
40
44
|
}, {
|
|
41
|
-
default: withCtx(() => [createVNode(
|
|
42
|
-
|
|
43
|
-
|
|
45
|
+
default: withCtx(() => [createVNode(TopBarChipItem_default, {
|
|
46
|
+
"aria-label": "Search stories",
|
|
47
|
+
"data-testid": "search-btn",
|
|
48
|
+
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("search"))
|
|
49
|
+
}, {
|
|
50
|
+
default: withCtx(() => [createVNode(unref(Icon), {
|
|
51
|
+
icon: "carbon:search",
|
|
52
|
+
class: "w-4 h-4"
|
|
53
|
+
})]),
|
|
54
|
+
_: 1
|
|
44
55
|
})]),
|
|
45
56
|
_: 1
|
|
46
|
-
}
|
|
47
|
-
!unref(povesteConfig).theme.hideColorSchemeSwitch ?
|
|
57
|
+
}, 8, ["shortcut"]),
|
|
58
|
+
!unref(povesteConfig).theme.hideColorSchemeSwitch ? (openBlock(), createBlock(ShortcutTooltip_default, {
|
|
48
59
|
key: 1,
|
|
49
|
-
|
|
50
|
-
|
|
60
|
+
description: "Toggle dark mode",
|
|
61
|
+
shortcut: ({ isMac }) => isMac ? "meta+shift+d" : "ctrl+shift+d"
|
|
51
62
|
}, {
|
|
52
|
-
default: withCtx(() => [createVNode(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
},
|
|
63
|
+
default: withCtx(() => [createVNode(TopBarChipItem_default, {
|
|
64
|
+
"aria-label": "Toggle dark mode",
|
|
65
|
+
onClick: _cache[2] || (_cache[2] = ($event) => unref(toggleDark)())
|
|
66
|
+
}, {
|
|
67
|
+
default: withCtx(() => [createVNode(unref(Icon), {
|
|
68
|
+
icon: themeIcon.value,
|
|
69
|
+
class: "w-4 h-4"
|
|
70
|
+
}, null, 8, ["icon"])]),
|
|
71
|
+
_: 1
|
|
72
|
+
})]),
|
|
56
73
|
_: 1
|
|
57
|
-
}
|
|
74
|
+
}, 8, ["shortcut"])) : createCommentVNode("", true)
|
|
58
75
|
]),
|
|
59
76
|
_: 1
|
|
60
77
|
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import ShortcutTooltip_vue_vue_type_script_setup_true_lang_default from "./ShortcutTooltip.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
+
//#region src/app/components/app/ShortcutTooltip.vue
|
|
3
|
+
var ShortcutTooltip_default = ShortcutTooltip_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { ShortcutTooltip_default as default };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { isMac } from "../../util/env.js";
|
|
2
|
+
import { formatKey } from "../../util/keyboard.js";
|
|
3
|
+
import { computed, createBlock, createElementVNode, defineComponent, openBlock, renderSlot, toDisplayString, unref, withCtx } from "@poveste/vendors/vue";
|
|
4
|
+
import { HstTooltip } from "@poveste/controls";
|
|
5
|
+
//#region src/app/components/app/ShortcutTooltip.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var _hoisted_1 = { class: "flex items-center gap-1 mt-2 text-sm" };
|
|
7
|
+
var _hoisted_2 = { class: "border border-gray-600 px-1 rounded-sm text-gray-400" };
|
|
8
|
+
var ShortcutTooltip_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
9
|
+
__name: "ShortcutTooltip",
|
|
10
|
+
props: {
|
|
11
|
+
description: {},
|
|
12
|
+
shortcut: { type: Function }
|
|
13
|
+
},
|
|
14
|
+
setup(__props) {
|
|
15
|
+
const props = __props;
|
|
16
|
+
const keys = computed(() => props.shortcut({ isMac }).split("+").map((key) => formatKey(key.trim())).join(" "));
|
|
17
|
+
return (_ctx, _cache) => {
|
|
18
|
+
return openBlock(), createBlock(unref(HstTooltip), null, {
|
|
19
|
+
content: withCtx(() => [createElementVNode("div", null, toDisplayString(__props.description), 1), createElementVNode("div", _hoisted_1, [createElementVNode("span", _hoisted_2, toDisplayString(keys.value), 1)])]),
|
|
20
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
21
|
+
_: 3
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
//#endregion
|
|
27
|
+
export { ShortcutTooltip_vue_vue_type_script_setup_true_lang_default as default };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import BaseDropdown_vue_vue_type_script_setup_true_lang_default from "./BaseDropdown.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
//#region src/app/components/base/BaseDropdown.vue
|
|
4
|
+
var BaseDropdown_default = BaseDropdown_vue_vue_type_script_setup_true_lang_default;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { BaseDropdown_default as default };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { createBlock, createCommentVNode, createElementVNode, createVNode, defineComponent, mergeProps, onMounted, openBlock, ref, renderSlot, shallowRef, unref, withCtx } from "@poveste/vendors/vue";
|
|
2
|
+
import { HstTooltip, PopoverAnchor, PopoverContent, PopoverPortal, PopoverRoot, PopoverTrigger, portalTarget } from "@poveste/controls";
|
|
3
|
+
//#region src/app/components/base/BaseDropdown.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var BaseDropdown_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
5
|
+
inheritAttrs: false,
|
|
6
|
+
__name: "BaseDropdown",
|
|
7
|
+
props: {
|
|
8
|
+
side: { default: "bottom" },
|
|
9
|
+
align: { default: "center" },
|
|
10
|
+
alignOffset: { default: 0 },
|
|
11
|
+
disabled: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: false
|
|
14
|
+
},
|
|
15
|
+
tooltip: { default: void 0 }
|
|
16
|
+
},
|
|
17
|
+
setup(__props) {
|
|
18
|
+
const props = __props;
|
|
19
|
+
const open = ref(false);
|
|
20
|
+
function setOpen(value) {
|
|
21
|
+
open.value = value && !props.disabled;
|
|
22
|
+
}
|
|
23
|
+
const target = shallowRef();
|
|
24
|
+
onMounted(() => {
|
|
25
|
+
target.value = portalTarget();
|
|
26
|
+
});
|
|
27
|
+
return (_ctx, _cache) => {
|
|
28
|
+
return openBlock(), createBlock(unref(PopoverRoot), {
|
|
29
|
+
open: open.value,
|
|
30
|
+
"onUpdate:open": setOpen
|
|
31
|
+
}, {
|
|
32
|
+
default: withCtx(() => [createVNode(unref(PopoverAnchor), { "as-child": "" }, {
|
|
33
|
+
default: withCtx(() => [createElementVNode("div", mergeProps(_ctx.$attrs, { class: "poveste-dropdown-trigger" }), [createVNode(unref(HstTooltip), { content: open.value ? null : __props.tooltip }, {
|
|
34
|
+
default: withCtx(() => [createVNode(unref(PopoverTrigger), { "as-child": "" }, {
|
|
35
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default", { open: open.value })]),
|
|
36
|
+
_: 3
|
|
37
|
+
})]),
|
|
38
|
+
_: 3
|
|
39
|
+
}, 8, ["content"])], 16)]),
|
|
40
|
+
_: 3
|
|
41
|
+
}), target.value ? (openBlock(), createBlock(unref(PopoverPortal), {
|
|
42
|
+
key: 0,
|
|
43
|
+
to: target.value
|
|
44
|
+
}, {
|
|
45
|
+
default: withCtx(() => [createVNode(unref(PopoverContent), {
|
|
46
|
+
class: "poveste-dropdown",
|
|
47
|
+
side: __props.side,
|
|
48
|
+
align: __props.align,
|
|
49
|
+
"side-offset": 8,
|
|
50
|
+
"align-offset": __props.alignOffset,
|
|
51
|
+
"collision-padding": 4
|
|
52
|
+
}, {
|
|
53
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "popper", { close: () => setOpen(false) })]),
|
|
54
|
+
_: 3
|
|
55
|
+
}, 8, [
|
|
56
|
+
"side",
|
|
57
|
+
"align",
|
|
58
|
+
"align-offset"
|
|
59
|
+
])]),
|
|
60
|
+
_: 3
|
|
61
|
+
}, 8, ["to"])) : createCommentVNode("", true)]),
|
|
62
|
+
_: 3
|
|
63
|
+
}, 8, ["open"]);
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
//#endregion
|
|
68
|
+
export { BaseDropdown_vue_vue_type_script_setup_true_lang_default as default };
|
package/dist/bundled/components/base/BaseOverflowMenu.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import BaseDropdown_default from "./BaseDropdown.js";
|
|
1
2
|
import { useResizeObserver } from "@poveste/vendors/vue-use";
|
|
2
|
-
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, h, onBeforeUnmount, openBlock, reactive, ref, renderSlot,
|
|
3
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, h, onBeforeUnmount, openBlock, reactive, ref, renderSlot, unref, withCtx } from "@poveste/vendors/vue";
|
|
3
4
|
import { Icon } from "@poveste/vendors/iconify";
|
|
4
5
|
//#region src/app/components/base/BaseOverflowMenu.vue?vue&type=script&setup=true&lang.ts
|
|
5
6
|
var _hoisted_1 = {
|
|
6
|
-
|
|
7
|
+
"aria-label": "More",
|
|
7
8
|
class: "cursor-pointer hover:bg-primary-50 dark:hover:bg-primary-900 w-8 h-full flex items-center justify-center absolute top-0 right-0"
|
|
8
9
|
};
|
|
9
10
|
var _hoisted_2 = { class: "flex flex-col items-stretch" };
|
|
@@ -72,7 +73,6 @@ var BaseOverflowMenu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
72
73
|
return Array.isArray(children) ? children.slice(props.start, props.end) : [];
|
|
73
74
|
}
|
|
74
75
|
return (_ctx, _cache) => {
|
|
75
|
-
const _component_VDropdown = resolveComponent("VDropdown");
|
|
76
76
|
return openBlock(), createElementBlock("div", {
|
|
77
77
|
ref_key: "el",
|
|
78
78
|
ref: el,
|
|
@@ -80,12 +80,12 @@ var BaseOverflowMenu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
80
80
|
}, [createVNode(ChildrenRender, null, {
|
|
81
81
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
82
82
|
_: 3
|
|
83
|
-
}), visibleChildrenCount.value < children.value.size ? (openBlock(), createBlock(
|
|
83
|
+
}), visibleChildrenCount.value < children.value.size ? (openBlock(), createBlock(BaseDropdown_default, { key: 0 }, {
|
|
84
84
|
popper: withCtx(() => [createElementVNode("div", _hoisted_2, [createVNode(ChildrenSlice, { start: visibleChildrenCount.value }, {
|
|
85
85
|
default: withCtx(() => [renderSlot(_ctx.$slots, "overflow")]),
|
|
86
86
|
_: 3
|
|
87
87
|
}, 8, ["start"])])]),
|
|
88
|
-
default: withCtx(() => [createElementVNode("
|
|
88
|
+
default: withCtx(() => [createElementVNode("button", _hoisted_1, [createVNode(unref(Icon), {
|
|
89
89
|
icon: "carbon:caret-down",
|
|
90
90
|
class: "w-4 h-4 opacity-50 group-hover:opacity-100"
|
|
91
91
|
})])]),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import BaseSelect_vue_vue_type_script_setup_true_lang_default from "./BaseSelect.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
+
/* empty css */
|
|
2
3
|
//#region src/app/components/base/BaseSelect.vue
|
|
3
4
|
var BaseSelect_default = BaseSelect_vue_vue_type_script_setup_true_lang_default;
|
|
4
5
|
//#endregion
|