@forsakringskassan/docs-live-example 1.4.6 → 1.5.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/LiveExample.vue.d.ts +74 -5
- package/dist/LiveExampleSourcecode.vue.d.ts +3 -3
- package/dist/cjs/index.js +51 -56
- package/dist/esm/index.js +52 -57
- package/dist/live-vue-code.d.ts +3 -3
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type PropType } from "vue";
|
|
2
|
-
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
3
|
/**
|
|
4
4
|
* Explicitly render example in given language.
|
|
5
5
|
*
|
|
@@ -38,7 +38,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
38
38
|
required: false;
|
|
39
39
|
default: () => {};
|
|
40
40
|
};
|
|
41
|
-
}
|
|
41
|
+
}>, {}, {
|
|
42
42
|
/** Language declared by parent element via `data-language`, if any */
|
|
43
43
|
parentLanguage: string;
|
|
44
44
|
exampleElement: HTMLElement | undefined;
|
|
@@ -83,10 +83,79 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
83
83
|
required: false;
|
|
84
84
|
default: () => {};
|
|
85
85
|
};
|
|
86
|
-
}
|
|
86
|
+
}>> & Readonly<{}>, {
|
|
87
|
+
language: "html" | "vue" | "auto";
|
|
87
88
|
components: Record<string, any>;
|
|
88
|
-
language: "html" | "auto" | "vue";
|
|
89
89
|
livedata: Record<string, any>;
|
|
90
90
|
livemethods: Record<string, any>;
|
|
91
|
-
}, {}
|
|
91
|
+
}, {}, {
|
|
92
|
+
LiveExampleSourcecode: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
93
|
+
element: {
|
|
94
|
+
type: {
|
|
95
|
+
new (): HTMLElement;
|
|
96
|
+
prototype: HTMLElement;
|
|
97
|
+
};
|
|
98
|
+
required: true;
|
|
99
|
+
};
|
|
100
|
+
template: {
|
|
101
|
+
type: StringConstructor;
|
|
102
|
+
required: true;
|
|
103
|
+
};
|
|
104
|
+
templateLanguage: {
|
|
105
|
+
type: PropType<"vue" | "html">;
|
|
106
|
+
required: true;
|
|
107
|
+
};
|
|
108
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
109
|
+
element: {
|
|
110
|
+
type: {
|
|
111
|
+
new (): HTMLElement;
|
|
112
|
+
prototype: HTMLElement;
|
|
113
|
+
};
|
|
114
|
+
required: true;
|
|
115
|
+
};
|
|
116
|
+
template: {
|
|
117
|
+
type: StringConstructor;
|
|
118
|
+
required: true;
|
|
119
|
+
};
|
|
120
|
+
templateLanguage: {
|
|
121
|
+
type: PropType<"vue" | "html">;
|
|
122
|
+
required: true;
|
|
123
|
+
};
|
|
124
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
125
|
+
LiveVueCode: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
126
|
+
template: {
|
|
127
|
+
type: StringConstructor;
|
|
128
|
+
required: true;
|
|
129
|
+
};
|
|
130
|
+
components: {
|
|
131
|
+
type: ObjectConstructor;
|
|
132
|
+
required: true;
|
|
133
|
+
};
|
|
134
|
+
livedata: {
|
|
135
|
+
type: ObjectConstructor;
|
|
136
|
+
required: true;
|
|
137
|
+
};
|
|
138
|
+
livemethods: {
|
|
139
|
+
type: ObjectConstructor;
|
|
140
|
+
required: true;
|
|
141
|
+
};
|
|
142
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
143
|
+
template: {
|
|
144
|
+
type: StringConstructor;
|
|
145
|
+
required: true;
|
|
146
|
+
};
|
|
147
|
+
components: {
|
|
148
|
+
type: ObjectConstructor;
|
|
149
|
+
required: true;
|
|
150
|
+
};
|
|
151
|
+
livedata: {
|
|
152
|
+
type: ObjectConstructor;
|
|
153
|
+
required: true;
|
|
154
|
+
};
|
|
155
|
+
livemethods: {
|
|
156
|
+
type: ObjectConstructor;
|
|
157
|
+
required: true;
|
|
158
|
+
};
|
|
159
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
160
|
+
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
92
161
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type PropType } from "vue";
|
|
2
|
-
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
3
|
element: {
|
|
4
4
|
type: {
|
|
5
5
|
new (): HTMLElement;
|
|
@@ -15,7 +15,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
15
15
|
type: PropType<"vue" | "html">;
|
|
16
16
|
required: true;
|
|
17
17
|
};
|
|
18
|
-
}
|
|
18
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
19
|
element: {
|
|
20
20
|
type: {
|
|
21
21
|
new (): HTMLElement;
|
|
@@ -31,5 +31,5 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
31
31
|
type: PropType<"vue" | "html">;
|
|
32
32
|
required: true;
|
|
33
33
|
};
|
|
34
|
-
}
|
|
34
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
35
35
|
export default _default;
|
package/dist/cjs/index.js
CHANGED
|
@@ -2069,43 +2069,28 @@ var LiveExampleSourcecode_default = /* @__PURE__ */ (0, import_vue.defineCompone
|
|
|
2069
2069
|
|
|
2070
2070
|
// sfc-template:/home/runner/work/docs-live-example/docs-live-example/src/LiveExampleSourcecode.vue?type=template
|
|
2071
2071
|
var import_vue3 = require("vue");
|
|
2072
|
-
var _withScopeId = (n) => ((0, import_vue3.pushScopeId)("data-v-7a98eb26"), n = n(), (0, import_vue3.popScopeId)(), n);
|
|
2073
2072
|
var _hoisted_1 = { class: "live-example__code-toggle" };
|
|
2074
2073
|
var _hoisted_2 = ["aria-controls", "aria-expanded"];
|
|
2075
|
-
var _hoisted_3 =
|
|
2076
|
-
|
|
2077
|
-
{ class: "icon icon--code" },
|
|
2078
|
-
null,
|
|
2079
|
-
-1
|
|
2080
|
-
/* HOISTED */
|
|
2081
|
-
));
|
|
2082
|
-
var _hoisted_4 = ["id"];
|
|
2083
|
-
var _hoisted_5 = {
|
|
2074
|
+
var _hoisted_3 = ["id"];
|
|
2075
|
+
var _hoisted_4 = {
|
|
2084
2076
|
class: "live-example__code-languages",
|
|
2085
2077
|
onsubmit: "event.preventDefault()"
|
|
2086
2078
|
};
|
|
2087
|
-
var
|
|
2079
|
+
var _hoisted_5 = {
|
|
2088
2080
|
key: 0,
|
|
2089
2081
|
class: "fieldset radio-button-group radio-button-group--horizontal"
|
|
2090
2082
|
};
|
|
2091
|
-
var
|
|
2092
|
-
|
|
2093
|
-
{ class: "label fieldset__label" },
|
|
2094
|
-
"Kodspr\xE5k",
|
|
2095
|
-
-1
|
|
2096
|
-
/* HOISTED */
|
|
2097
|
-
));
|
|
2098
|
-
var _hoisted_8 = { class: "fieldset__content radio-button-group__content" };
|
|
2099
|
-
var _hoisted_9 = {
|
|
2083
|
+
var _hoisted_6 = { class: "fieldset__content radio-button-group__content" };
|
|
2084
|
+
var _hoisted_7 = {
|
|
2100
2085
|
key: 0,
|
|
2101
2086
|
class: "radio-button"
|
|
2102
2087
|
};
|
|
2103
|
-
var
|
|
2104
|
-
var
|
|
2105
|
-
var
|
|
2106
|
-
var
|
|
2107
|
-
var
|
|
2108
|
-
var
|
|
2088
|
+
var _hoisted_8 = ["id"];
|
|
2089
|
+
var _hoisted_9 = ["for"];
|
|
2090
|
+
var _hoisted_10 = { class: "radio-button" };
|
|
2091
|
+
var _hoisted_11 = ["id"];
|
|
2092
|
+
var _hoisted_12 = ["for"];
|
|
2093
|
+
var _hoisted_13 = ["innerHTML"];
|
|
2109
2094
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2110
2095
|
return (0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)(
|
|
2111
2096
|
import_vue3.Fragment,
|
|
@@ -2119,7 +2104,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2119
2104
|
"aria-expanded": $setup.animation.isOpen ? "true" : "false",
|
|
2120
2105
|
onClick: $setup.onToggleCode
|
|
2121
2106
|
}, [
|
|
2122
|
-
|
|
2107
|
+
_cache[2] || (_cache[2] = (0, import_vue3.createElementVNode)(
|
|
2108
|
+
"i",
|
|
2109
|
+
{ class: "icon icon--code" },
|
|
2110
|
+
null,
|
|
2111
|
+
-1
|
|
2112
|
+
/* HOISTED */
|
|
2113
|
+
)),
|
|
2123
2114
|
(0, import_vue3.createTextVNode)(
|
|
2124
2115
|
" " + (0, import_vue3.toDisplayString)($setup.codeToggleText),
|
|
2125
2116
|
1
|
|
@@ -2133,11 +2124,17 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2133
2124
|
class: "collapsed"
|
|
2134
2125
|
}, [
|
|
2135
2126
|
(0, import_vue3.createCommentVNode)(" [html-validate-disable-next wcag/h32 -- this form is not meant to be submitted] "),
|
|
2136
|
-
(0, import_vue3.createElementVNode)("form",
|
|
2137
|
-
$setup.sourcecode ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("fieldset",
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2127
|
+
(0, import_vue3.createElementVNode)("form", _hoisted_4, [
|
|
2128
|
+
$setup.sourcecode ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("fieldset", _hoisted_5, [
|
|
2129
|
+
_cache[3] || (_cache[3] = (0, import_vue3.createElementVNode)(
|
|
2130
|
+
"legend",
|
|
2131
|
+
{ class: "label fieldset__label" },
|
|
2132
|
+
"Kodspr\xE5k",
|
|
2133
|
+
-1
|
|
2134
|
+
/* HOISTED */
|
|
2135
|
+
)),
|
|
2136
|
+
(0, import_vue3.createElementVNode)("div", _hoisted_6, [
|
|
2137
|
+
$props.templateLanguage === "vue" ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("div", _hoisted_7, [
|
|
2141
2138
|
(0, import_vue3.withDirectives)((0, import_vue3.createElementVNode)("input", {
|
|
2142
2139
|
id: $setup.id("lang-original"),
|
|
2143
2140
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.selectedLanguage = $event),
|
|
@@ -2146,15 +2143,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2146
2143
|
name: "selected-language",
|
|
2147
2144
|
value: "original",
|
|
2148
2145
|
onChange: $setup.updateSourcecode
|
|
2149
|
-
}, null, 40,
|
|
2146
|
+
}, null, 40, _hoisted_8), [
|
|
2150
2147
|
[import_vue3.vModelRadio, $setup.selectedLanguage]
|
|
2151
2148
|
]),
|
|
2152
2149
|
(0, import_vue3.createElementVNode)("label", {
|
|
2153
2150
|
for: $setup.id("lang-original"),
|
|
2154
2151
|
class: "radio-button__label"
|
|
2155
|
-
}, " Vue ", 8,
|
|
2152
|
+
}, " Vue ", 8, _hoisted_9)
|
|
2156
2153
|
])) : (0, import_vue3.createCommentVNode)("v-if", true),
|
|
2157
|
-
(0, import_vue3.createElementVNode)("div",
|
|
2154
|
+
(0, import_vue3.createElementVNode)("div", _hoisted_10, [
|
|
2158
2155
|
(0, import_vue3.withDirectives)((0, import_vue3.createElementVNode)("input", {
|
|
2159
2156
|
id: $setup.id("lang-rendered"),
|
|
2160
2157
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.selectedLanguage = $event),
|
|
@@ -2163,20 +2160,20 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2163
2160
|
name: "selected-language",
|
|
2164
2161
|
value: "rendered",
|
|
2165
2162
|
onChange: $setup.updateSourcecode
|
|
2166
|
-
}, null, 40,
|
|
2163
|
+
}, null, 40, _hoisted_11), [
|
|
2167
2164
|
[import_vue3.vModelRadio, $setup.selectedLanguage]
|
|
2168
2165
|
]),
|
|
2169
2166
|
(0, import_vue3.createElementVNode)("label", {
|
|
2170
2167
|
for: $setup.id("lang-rendered"),
|
|
2171
2168
|
class: "radio-button__label"
|
|
2172
|
-
}, " HTML ", 8,
|
|
2169
|
+
}, " HTML ", 8, _hoisted_12)
|
|
2173
2170
|
])
|
|
2174
2171
|
])
|
|
2175
2172
|
])) : (0, import_vue3.createCommentVNode)("v-if", true)
|
|
2176
2173
|
]),
|
|
2177
2174
|
(0, import_vue3.createCommentVNode)(" eslint-disable-next-line vue/no-v-html -- expected to show highlighted markup "),
|
|
2178
|
-
(0, import_vue3.createElementVNode)("pre", { innerHTML: $setup.sourcecode }, null, 8,
|
|
2179
|
-
], 8,
|
|
2175
|
+
(0, import_vue3.createElementVNode)("pre", { innerHTML: $setup.sourcecode }, null, 8, _hoisted_13)
|
|
2176
|
+
], 8, _hoisted_3)
|
|
2180
2177
|
],
|
|
2181
2178
|
64
|
|
2182
2179
|
/* STABLE_FRAGMENT */
|
|
@@ -2324,7 +2321,7 @@ var LiveExample_default = (0, import_vue5.defineComponent)({
|
|
|
2324
2321
|
|
|
2325
2322
|
// sfc-template:/home/runner/work/docs-live-example/docs-live-example/src/LiveExample.vue?type=template
|
|
2326
2323
|
var import_vue6 = require("vue");
|
|
2327
|
-
var
|
|
2324
|
+
var _hoisted_14 = { class: "live-example__container" };
|
|
2328
2325
|
var _hoisted_22 = {
|
|
2329
2326
|
ref: "example",
|
|
2330
2327
|
class: "live-example__example"
|
|
@@ -2332,25 +2329,15 @@ var _hoisted_22 = {
|
|
|
2332
2329
|
var _hoisted_32 = { key: 0 };
|
|
2333
2330
|
var _hoisted_42 = ["innerHTML"];
|
|
2334
2331
|
var _hoisted_52 = { key: 2 };
|
|
2335
|
-
var _hoisted_62 =
|
|
2336
|
-
|
|
2337
|
-
null,
|
|
2338
|
-
"Unknown language, cannot render example",
|
|
2339
|
-
-1
|
|
2340
|
-
/* HOISTED */
|
|
2341
|
-
);
|
|
2342
|
-
var _hoisted_72 = [
|
|
2343
|
-
_hoisted_62
|
|
2344
|
-
];
|
|
2345
|
-
var _hoisted_82 = { class: "live-example__controls" };
|
|
2346
|
-
var _hoisted_92 = {
|
|
2332
|
+
var _hoisted_62 = { class: "live-example__controls" };
|
|
2333
|
+
var _hoisted_72 = {
|
|
2347
2334
|
key: 0,
|
|
2348
2335
|
class: "live-example__code"
|
|
2349
2336
|
};
|
|
2350
2337
|
function render2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2351
2338
|
const _component_live_vue_code = (0, import_vue6.resolveComponent)("live-vue-code");
|
|
2352
2339
|
const _component_live_example_sourcecode = (0, import_vue6.resolveComponent)("live-example-sourcecode");
|
|
2353
|
-
return (0, import_vue6.openBlock)(), (0, import_vue6.createElementBlock)("div",
|
|
2340
|
+
return (0, import_vue6.openBlock)(), (0, import_vue6.createElementBlock)("div", _hoisted_14, [
|
|
2354
2341
|
(0, import_vue6.createElementVNode)(
|
|
2355
2342
|
"div",
|
|
2356
2343
|
_hoisted_22,
|
|
@@ -2371,15 +2358,23 @@ function render2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2371
2358
|
],
|
|
2372
2359
|
2112
|
|
2373
2360
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
2374
|
-
)) : ((0, import_vue6.openBlock)(), (0, import_vue6.createElementBlock)("div", _hoisted_52, [
|
|
2361
|
+
)) : ((0, import_vue6.openBlock)(), (0, import_vue6.createElementBlock)("div", _hoisted_52, _cache[0] || (_cache[0] = [
|
|
2362
|
+
(0, import_vue6.createElementVNode)(
|
|
2363
|
+
"pre",
|
|
2364
|
+
null,
|
|
2365
|
+
"Unknown language, cannot render example",
|
|
2366
|
+
-1
|
|
2367
|
+
/* HOISTED */
|
|
2368
|
+
)
|
|
2369
|
+
])))
|
|
2375
2370
|
],
|
|
2376
2371
|
512
|
|
2377
2372
|
/* NEED_PATCH */
|
|
2378
2373
|
),
|
|
2379
|
-
(0, import_vue6.createElementVNode)("div",
|
|
2374
|
+
(0, import_vue6.createElementVNode)("div", _hoisted_62, [
|
|
2380
2375
|
(0, import_vue6.renderSlot)(_ctx.$slots, "default")
|
|
2381
2376
|
]),
|
|
2382
|
-
_ctx.exampleElement ? ((0, import_vue6.openBlock)(), (0, import_vue6.createElementBlock)("div",
|
|
2377
|
+
_ctx.exampleElement ? ((0, import_vue6.openBlock)(), (0, import_vue6.createElementBlock)("div", _hoisted_72, [
|
|
2383
2378
|
(0, import_vue6.createVNode)(_component_live_example_sourcecode, {
|
|
2384
2379
|
element: _ctx.exampleElement,
|
|
2385
2380
|
template: _ctx.template,
|
package/dist/esm/index.js
CHANGED
|
@@ -2054,44 +2054,29 @@ var LiveExampleSourcecode_default = /* @__PURE__ */ _defineComponent({
|
|
|
2054
2054
|
});
|
|
2055
2055
|
|
|
2056
2056
|
// sfc-template:/home/runner/work/docs-live-example/docs-live-example/src/LiveExampleSourcecode.vue?type=template
|
|
2057
|
-
import { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createCommentVNode as _createCommentVNode, vModelRadio as _vModelRadio, withDirectives as _withDirectives, openBlock as _openBlock, createElementBlock as _createElementBlock, Fragment as _Fragment
|
|
2058
|
-
var _withScopeId = (n) => (_pushScopeId("data-v-7a98eb26"), n = n(), _popScopeId(), n);
|
|
2057
|
+
import { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createCommentVNode as _createCommentVNode, vModelRadio as _vModelRadio, withDirectives as _withDirectives, openBlock as _openBlock, createElementBlock as _createElementBlock, Fragment as _Fragment } from "vue";
|
|
2059
2058
|
var _hoisted_1 = { class: "live-example__code-toggle" };
|
|
2060
2059
|
var _hoisted_2 = ["aria-controls", "aria-expanded"];
|
|
2061
|
-
var _hoisted_3 =
|
|
2062
|
-
|
|
2063
|
-
{ class: "icon icon--code" },
|
|
2064
|
-
null,
|
|
2065
|
-
-1
|
|
2066
|
-
/* HOISTED */
|
|
2067
|
-
));
|
|
2068
|
-
var _hoisted_4 = ["id"];
|
|
2069
|
-
var _hoisted_5 = {
|
|
2060
|
+
var _hoisted_3 = ["id"];
|
|
2061
|
+
var _hoisted_4 = {
|
|
2070
2062
|
class: "live-example__code-languages",
|
|
2071
2063
|
onsubmit: "event.preventDefault()"
|
|
2072
2064
|
};
|
|
2073
|
-
var
|
|
2065
|
+
var _hoisted_5 = {
|
|
2074
2066
|
key: 0,
|
|
2075
2067
|
class: "fieldset radio-button-group radio-button-group--horizontal"
|
|
2076
2068
|
};
|
|
2077
|
-
var
|
|
2078
|
-
|
|
2079
|
-
{ class: "label fieldset__label" },
|
|
2080
|
-
"Kodspr\xE5k",
|
|
2081
|
-
-1
|
|
2082
|
-
/* HOISTED */
|
|
2083
|
-
));
|
|
2084
|
-
var _hoisted_8 = { class: "fieldset__content radio-button-group__content" };
|
|
2085
|
-
var _hoisted_9 = {
|
|
2069
|
+
var _hoisted_6 = { class: "fieldset__content radio-button-group__content" };
|
|
2070
|
+
var _hoisted_7 = {
|
|
2086
2071
|
key: 0,
|
|
2087
2072
|
class: "radio-button"
|
|
2088
2073
|
};
|
|
2089
|
-
var
|
|
2090
|
-
var
|
|
2091
|
-
var
|
|
2092
|
-
var
|
|
2093
|
-
var
|
|
2094
|
-
var
|
|
2074
|
+
var _hoisted_8 = ["id"];
|
|
2075
|
+
var _hoisted_9 = ["for"];
|
|
2076
|
+
var _hoisted_10 = { class: "radio-button" };
|
|
2077
|
+
var _hoisted_11 = ["id"];
|
|
2078
|
+
var _hoisted_12 = ["for"];
|
|
2079
|
+
var _hoisted_13 = ["innerHTML"];
|
|
2095
2080
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2096
2081
|
return _openBlock(), _createElementBlock(
|
|
2097
2082
|
_Fragment,
|
|
@@ -2105,7 +2090,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2105
2090
|
"aria-expanded": $setup.animation.isOpen ? "true" : "false",
|
|
2106
2091
|
onClick: $setup.onToggleCode
|
|
2107
2092
|
}, [
|
|
2108
|
-
|
|
2093
|
+
_cache[2] || (_cache[2] = _createElementVNode(
|
|
2094
|
+
"i",
|
|
2095
|
+
{ class: "icon icon--code" },
|
|
2096
|
+
null,
|
|
2097
|
+
-1
|
|
2098
|
+
/* HOISTED */
|
|
2099
|
+
)),
|
|
2109
2100
|
_createTextVNode(
|
|
2110
2101
|
" " + _toDisplayString($setup.codeToggleText),
|
|
2111
2102
|
1
|
|
@@ -2119,11 +2110,17 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2119
2110
|
class: "collapsed"
|
|
2120
2111
|
}, [
|
|
2121
2112
|
_createCommentVNode(" [html-validate-disable-next wcag/h32 -- this form is not meant to be submitted] "),
|
|
2122
|
-
_createElementVNode("form",
|
|
2123
|
-
$setup.sourcecode ? (_openBlock(), _createElementBlock("fieldset",
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2113
|
+
_createElementVNode("form", _hoisted_4, [
|
|
2114
|
+
$setup.sourcecode ? (_openBlock(), _createElementBlock("fieldset", _hoisted_5, [
|
|
2115
|
+
_cache[3] || (_cache[3] = _createElementVNode(
|
|
2116
|
+
"legend",
|
|
2117
|
+
{ class: "label fieldset__label" },
|
|
2118
|
+
"Kodspr\xE5k",
|
|
2119
|
+
-1
|
|
2120
|
+
/* HOISTED */
|
|
2121
|
+
)),
|
|
2122
|
+
_createElementVNode("div", _hoisted_6, [
|
|
2123
|
+
$props.templateLanguage === "vue" ? (_openBlock(), _createElementBlock("div", _hoisted_7, [
|
|
2127
2124
|
_withDirectives(_createElementVNode("input", {
|
|
2128
2125
|
id: $setup.id("lang-original"),
|
|
2129
2126
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.selectedLanguage = $event),
|
|
@@ -2132,15 +2129,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2132
2129
|
name: "selected-language",
|
|
2133
2130
|
value: "original",
|
|
2134
2131
|
onChange: $setup.updateSourcecode
|
|
2135
|
-
}, null, 40,
|
|
2132
|
+
}, null, 40, _hoisted_8), [
|
|
2136
2133
|
[_vModelRadio, $setup.selectedLanguage]
|
|
2137
2134
|
]),
|
|
2138
2135
|
_createElementVNode("label", {
|
|
2139
2136
|
for: $setup.id("lang-original"),
|
|
2140
2137
|
class: "radio-button__label"
|
|
2141
|
-
}, " Vue ", 8,
|
|
2138
|
+
}, " Vue ", 8, _hoisted_9)
|
|
2142
2139
|
])) : _createCommentVNode("v-if", true),
|
|
2143
|
-
_createElementVNode("div",
|
|
2140
|
+
_createElementVNode("div", _hoisted_10, [
|
|
2144
2141
|
_withDirectives(_createElementVNode("input", {
|
|
2145
2142
|
id: $setup.id("lang-rendered"),
|
|
2146
2143
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.selectedLanguage = $event),
|
|
@@ -2149,20 +2146,20 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2149
2146
|
name: "selected-language",
|
|
2150
2147
|
value: "rendered",
|
|
2151
2148
|
onChange: $setup.updateSourcecode
|
|
2152
|
-
}, null, 40,
|
|
2149
|
+
}, null, 40, _hoisted_11), [
|
|
2153
2150
|
[_vModelRadio, $setup.selectedLanguage]
|
|
2154
2151
|
]),
|
|
2155
2152
|
_createElementVNode("label", {
|
|
2156
2153
|
for: $setup.id("lang-rendered"),
|
|
2157
2154
|
class: "radio-button__label"
|
|
2158
|
-
}, " HTML ", 8,
|
|
2155
|
+
}, " HTML ", 8, _hoisted_12)
|
|
2159
2156
|
])
|
|
2160
2157
|
])
|
|
2161
2158
|
])) : _createCommentVNode("v-if", true)
|
|
2162
2159
|
]),
|
|
2163
2160
|
_createCommentVNode(" eslint-disable-next-line vue/no-v-html -- expected to show highlighted markup "),
|
|
2164
|
-
_createElementVNode("pre", { innerHTML: $setup.sourcecode }, null, 8,
|
|
2165
|
-
], 8,
|
|
2161
|
+
_createElementVNode("pre", { innerHTML: $setup.sourcecode }, null, 8, _hoisted_13)
|
|
2162
|
+
], 8, _hoisted_3)
|
|
2166
2163
|
],
|
|
2167
2164
|
64
|
|
2168
2165
|
/* STABLE_FRAGMENT */
|
|
@@ -2310,7 +2307,7 @@ var LiveExample_default = defineComponent2({
|
|
|
2310
2307
|
|
|
2311
2308
|
// sfc-template:/home/runner/work/docs-live-example/docs-live-example/src/LiveExample.vue?type=template
|
|
2312
2309
|
import { resolveComponent as _resolveComponent, createVNode as _createVNode, openBlock as _openBlock2, createElementBlock as _createElementBlock2, createCommentVNode as _createCommentVNode2, createElementVNode as _createElementVNode2, Fragment as _Fragment2, renderSlot as _renderSlot } from "vue";
|
|
2313
|
-
var
|
|
2310
|
+
var _hoisted_14 = { class: "live-example__container" };
|
|
2314
2311
|
var _hoisted_22 = {
|
|
2315
2312
|
ref: "example",
|
|
2316
2313
|
class: "live-example__example"
|
|
@@ -2318,25 +2315,15 @@ var _hoisted_22 = {
|
|
|
2318
2315
|
var _hoisted_32 = { key: 0 };
|
|
2319
2316
|
var _hoisted_42 = ["innerHTML"];
|
|
2320
2317
|
var _hoisted_52 = { key: 2 };
|
|
2321
|
-
var _hoisted_62 =
|
|
2322
|
-
|
|
2323
|
-
null,
|
|
2324
|
-
"Unknown language, cannot render example",
|
|
2325
|
-
-1
|
|
2326
|
-
/* HOISTED */
|
|
2327
|
-
);
|
|
2328
|
-
var _hoisted_72 = [
|
|
2329
|
-
_hoisted_62
|
|
2330
|
-
];
|
|
2331
|
-
var _hoisted_82 = { class: "live-example__controls" };
|
|
2332
|
-
var _hoisted_92 = {
|
|
2318
|
+
var _hoisted_62 = { class: "live-example__controls" };
|
|
2319
|
+
var _hoisted_72 = {
|
|
2333
2320
|
key: 0,
|
|
2334
2321
|
class: "live-example__code"
|
|
2335
2322
|
};
|
|
2336
2323
|
function render2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2337
2324
|
const _component_live_vue_code = _resolveComponent("live-vue-code");
|
|
2338
2325
|
const _component_live_example_sourcecode = _resolveComponent("live-example-sourcecode");
|
|
2339
|
-
return _openBlock2(), _createElementBlock2("div",
|
|
2326
|
+
return _openBlock2(), _createElementBlock2("div", _hoisted_14, [
|
|
2340
2327
|
_createElementVNode2(
|
|
2341
2328
|
"div",
|
|
2342
2329
|
_hoisted_22,
|
|
@@ -2357,15 +2344,23 @@ function render2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2357
2344
|
],
|
|
2358
2345
|
2112
|
|
2359
2346
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
2360
|
-
)) : (_openBlock2(), _createElementBlock2("div", _hoisted_52, [
|
|
2347
|
+
)) : (_openBlock2(), _createElementBlock2("div", _hoisted_52, _cache[0] || (_cache[0] = [
|
|
2348
|
+
_createElementVNode2(
|
|
2349
|
+
"pre",
|
|
2350
|
+
null,
|
|
2351
|
+
"Unknown language, cannot render example",
|
|
2352
|
+
-1
|
|
2353
|
+
/* HOISTED */
|
|
2354
|
+
)
|
|
2355
|
+
])))
|
|
2361
2356
|
],
|
|
2362
2357
|
512
|
|
2363
2358
|
/* NEED_PATCH */
|
|
2364
2359
|
),
|
|
2365
|
-
_createElementVNode2("div",
|
|
2360
|
+
_createElementVNode2("div", _hoisted_62, [
|
|
2366
2361
|
_renderSlot(_ctx.$slots, "default")
|
|
2367
2362
|
]),
|
|
2368
|
-
_ctx.exampleElement ? (_openBlock2(), _createElementBlock2("div",
|
|
2363
|
+
_ctx.exampleElement ? (_openBlock2(), _createElementBlock2("div", _hoisted_72, [
|
|
2369
2364
|
_createVNode(_component_live_example_sourcecode, {
|
|
2370
2365
|
element: _ctx.exampleElement,
|
|
2371
2366
|
template: _ctx.template,
|
package/dist/live-vue-code.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
2
|
template: {
|
|
3
3
|
type: StringConstructor;
|
|
4
4
|
required: true;
|
|
@@ -15,7 +15,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
15
15
|
type: ObjectConstructor;
|
|
16
16
|
required: true;
|
|
17
17
|
};
|
|
18
|
-
}
|
|
18
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
19
|
template: {
|
|
20
20
|
type: StringConstructor;
|
|
21
21
|
required: true;
|
|
@@ -32,5 +32,5 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
32
32
|
type: ObjectConstructor;
|
|
33
33
|
required: true;
|
|
34
34
|
};
|
|
35
|
-
}
|
|
35
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
36
36
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forsakringskassan/docs-live-example",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Components used for live examples",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"documentation"
|
|
@@ -44,6 +44,6 @@
|
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
47
|
-
"node": ">=
|
|
47
|
+
"node": ">= 20"
|
|
48
48
|
}
|
|
49
49
|
}
|