Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
interkit-project-templates
Tabs multi
Commits
30005855
Commit
30005855
authored
1 year ago
by
Sebastian Quack
Browse files
Options
Download
Email Patches
Plain Diff
update
parent
e8366459
master
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/App.svelte
+21
-36
src/App.svelte
src/blocklyState.json
+13
-211
src/blocklyState.json
with
34 additions
and
247 deletions
+34
-247
src/App.svelte
+
21
-
36
View file @
30005855
<script>
import initActions from "./actions.js";
initActions();
import initActions from "./actions.js";
import { t, translations, lang } from 'interkit/i18n.js';
$: $translations, translations, t, $lang, lang, console.log('AppBase i18n $', { t, $translations, translations, $lang, lang });
console.log('AppBase i18n', { t, $translations, translations, $lang, lang });
import AppBase from "interkit/components/AppBase.svelte";
import Button from "interkit/components/Button.svelte";
import IfUIKey from "interkit/components/IfUIKey.svelte";
import Spacing from "interkit/components/Spacing.svelte";
import StaticText from "interkit/components/StaticText.svelte";
import Tab from "interkit/components/Tab.svelte";
import TabBar from "interkit/components/TabBar.svelte";
import styleTokens from "./styleTokens.json";
globalThis.styleTokens = styleTokens;
console.log('AppBase styleTokens', styleTokens);
initActions();
$: $translations, translations, t, $lang, lang, console.log('AppBase i18n $', { t, $translations, translations, $lang, lang });
console.log('AppBase i18n', { t, $translations, translations, $lang, lang });
</script>
<AppBase
...
...
@@ -27,33 +30,22 @@ import TabBar from "interkit/components/TabBar.svelte";
</Spacing>
<TabBar
>
<
Button
<
Tab
text="Tab One"
type="nav-tab"
size="medium"
flex="normal"
effect={{"effectType":"setUIKey","value":"1","key":"tab1"}}
execOnMount={true}
>
</
Button
>
<
Button
</
Tab
>
<
Tab
text="Tab Two"
type="nav-tab"
size="medium"
flex="normal"
effect={{"effectType":"setUIKey","value":"2","key":"tab1"}}
execOnMount={false}
>
</Button>
<Button
>
</Tab>
<Tab
text="Tab Three"
type="nav-tab"
size="medium"
flex="normal"
effect={{"effectType":"setUIKey","value":"3","key":"tab1"}}
execOnMount={false}
>
</Button>
>
</Tab>
</TabBar>
<Spacing
top="s"
...
...
@@ -106,24 +98,17 @@ import TabBar from "interkit/components/TabBar.svelte";
</Spacing>
<TabBar
>
<
Button
<
Tab
text="Tab One"
type="nav-tab"
size="medium"
flex="normal"
effect={{"effectType":"setUIKey","value":"1","key":"tab2"}}
execOnMount={true}
>
</
Button
>
<
Button
</
Tab
>
<
Tab
text="Tab Two"
type="nav-tab"
size="medium"
flex="normal"
effect={{"effectType":"setUIKey","value":"2","key":"tab2"}}
execOnMount={false}
>
</Button>
>
</Tab>
</TabBar>
<Spacing
top="s"
...
...
This diff is collapsed.
Click to expand it.
src/blocklyState.json
+
13
-
211
View file @
30005855
...
...
@@ -321,52 +321,13 @@
"inputs"
:
{
"default"
:
{
"block"
:
{
"type"
:
"
Button
"
,
"id"
:
"
Rdk2%#c5lM7jH2*@?sm`
"
,
"type"
:
"
Tab
"
,
"id"
:
"
v:Z?+-Oiw=cW?4t8](/0
"
,
"data"
:
"{
\"
origin
\"
:
\"
interkit
\"
}"
,
"fields"
:
{
"text"
:
"Tab One"
,
"extraProps"
:
{
"props"
:
[
{
"id"
:
"type"
,
"name"
:
"type"
,
"type"
:
"options"
,
"options"
:
[
"primary"
,
"secondary"
,
"ghost"
,
"link"
,
"spacer"
,
"list-item"
,
"nav-tab"
],
"help"
:
"Appearance of the button."
,
"value"
:
"nav-tab"
},
{
"id"
:
"size"
,
"type"
:
"options"
,
"name"
:
"size"
,
"options"
:
[
"medium"
,
"small"
,
"large"
],
"defaultValue"
:
"medium"
,
"help"
:
"Large, medium or small."
},
{
"id"
:
"flex"
,
"type"
:
"options"
,
"name"
:
"flex"
,
"options"
:
[
"normal"
,
"fill"
],
"defaultValue"
:
"normal"
,
"help"
:
"If used in the slot of a flex-supported parent component, determines how the available space is used."
},
{
"id"
:
"effect"
,
"type"
:
"effect"
,
...
...
@@ -390,52 +351,13 @@
},
"next"
:
{
"block"
:
{
"type"
:
"
Button
"
,
"id"
:
"
zj]Z_ZNL,I*F2fs:4H]O
"
,
"type"
:
"
Tab
"
,
"id"
:
"
Plr@G:+0:3eSWT4!vjF3
"
,
"data"
:
"{
\"
origin
\"
:
\"
interkit
\"
}"
,
"fields"
:
{
"text"
:
"Tab Two"
,
"extraProps"
:
{
"props"
:
[
{
"id"
:
"type"
,
"name"
:
"type"
,
"type"
:
"options"
,
"options"
:
[
"primary"
,
"secondary"
,
"ghost"
,
"link"
,
"spacer"
,
"list-item"
,
"nav-tab"
],
"help"
:
"Appearance of the button."
,
"value"
:
"nav-tab"
},
{
"id"
:
"size"
,
"type"
:
"options"
,
"name"
:
"size"
,
"options"
:
[
"medium"
,
"small"
,
"large"
],
"defaultValue"
:
"medium"
,
"help"
:
"Large, medium or small."
},
{
"id"
:
"flex"
,
"type"
:
"options"
,
"name"
:
"flex"
,
"options"
:
[
"normal"
,
"fill"
],
"defaultValue"
:
"normal"
,
"help"
:
"If used in the slot of a flex-supported parent component, determines how the available space is used."
},
{
"id"
:
"effect"
,
"type"
:
"effect"
,
...
...
@@ -451,60 +373,20 @@
"id"
:
"execOnMount"
,
"type"
:
"checkbox"
,
"name"
:
"execOnMount"
,
"help"
:
"Runs the effect once when the button is rendered (for example to set a default value)"
,
"value"
:
false
"help"
:
"Runs the effect once when the button is rendered (for example to set a default value)"
}
]
}
},
"next"
:
{
"block"
:
{
"type"
:
"
Button
"
,
"id"
:
"
jnG)5!GJffLZt+P#f;(D
"
,
"type"
:
"
Tab
"
,
"id"
:
"
(Cyg$=Jt*.)e:|Ph5o?H
"
,
"data"
:
"{
\"
origin
\"
:
\"
interkit
\"
}"
,
"fields"
:
{
"text"
:
"Tab Three"
,
"extraProps"
:
{
"props"
:
[
{
"id"
:
"type"
,
"name"
:
"type"
,
"type"
:
"options"
,
"options"
:
[
"primary"
,
"secondary"
,
"ghost"
,
"link"
,
"spacer"
,
"list-item"
,
"nav-tab"
],
"help"
:
"Appearance of the button."
,
"value"
:
"nav-tab"
},
{
"id"
:
"size"
,
"type"
:
"options"
,
"name"
:
"size"
,
"options"
:
[
"medium"
,
"small"
,
"large"
],
"defaultValue"
:
"medium"
,
"help"
:
"Large, medium or small."
},
{
"id"
:
"flex"
,
"type"
:
"options"
,
"name"
:
"flex"
,
"options"
:
[
"normal"
,
"fill"
],
"defaultValue"
:
"normal"
,
"help"
:
"If used in the slot of a flex-supported parent component, determines how the available space is used."
},
{
"id"
:
"effect"
,
"type"
:
"effect"
,
...
...
@@ -520,8 +402,7 @@
"id"
:
"execOnMount"
,
"type"
:
"checkbox"
,
"name"
:
"execOnMount"
,
"help"
:
"Runs the effect once when the button is rendered (for example to set a default value)"
,
"value"
:
false
"help"
:
"Runs the effect once when the button is rendered (for example to set a default value)"
}
]
}
...
...
@@ -656,52 +537,13 @@
"inputs"
:
{
"default"
:
{
"block"
:
{
"type"
:
"
Button
"
,
"id"
:
"
4Oqm-eiNGoI*%K02y*#
N"
,
"type"
:
"
Tab
"
,
"id"
:
"
IL1Wr9jNTS=c=eRWWI5
N"
,
"data"
:
"{
\"
origin
\"
:
\"
interkit
\"
}"
,
"fields"
:
{
"text"
:
"Tab One"
,
"extraProps"
:
{
"props"
:
[
{
"id"
:
"type"
,
"name"
:
"type"
,
"type"
:
"options"
,
"options"
:
[
"primary"
,
"secondary"
,
"ghost"
,
"link"
,
"spacer"
,
"list-item"
,
"nav-tab"
],
"help"
:
"Appearance of the button."
,
"value"
:
"nav-tab"
},
{
"id"
:
"size"
,
"type"
:
"options"
,
"name"
:
"size"
,
"options"
:
[
"medium"
,
"small"
,
"large"
],
"defaultValue"
:
"medium"
,
"help"
:
"Large, medium or small."
},
{
"id"
:
"flex"
,
"type"
:
"options"
,
"name"
:
"flex"
,
"options"
:
[
"normal"
,
"fill"
],
"defaultValue"
:
"normal"
,
"help"
:
"If used in the slot of a flex-supported parent component, determines how the available space is used."
},
{
"id"
:
"effect"
,
"type"
:
"effect"
,
...
...
@@ -725,52 +567,13 @@
},
"next"
:
{
"block"
:
{
"type"
:
"
Button
"
,
"id"
:
"
gTK(#Si.jn=Rj`hyBQ0i
"
,
"type"
:
"
Tab
"
,
"id"
:
"
ecD3*?{:]B@tAg.ShG(x
"
,
"data"
:
"{
\"
origin
\"
:
\"
interkit
\"
}"
,
"fields"
:
{
"text"
:
"Tab Two"
,
"extraProps"
:
{
"props"
:
[
{
"id"
:
"type"
,
"name"
:
"type"
,
"type"
:
"options"
,
"options"
:
[
"primary"
,
"secondary"
,
"ghost"
,
"link"
,
"spacer"
,
"list-item"
,
"nav-tab"
],
"help"
:
"Appearance of the button."
,
"value"
:
"nav-tab"
},
{
"id"
:
"size"
,
"type"
:
"options"
,
"name"
:
"size"
,
"options"
:
[
"medium"
,
"small"
,
"large"
],
"defaultValue"
:
"medium"
,
"help"
:
"Large, medium or small."
},
{
"id"
:
"flex"
,
"type"
:
"options"
,
"name"
:
"flex"
,
"options"
:
[
"normal"
,
"fill"
],
"defaultValue"
:
"normal"
,
"help"
:
"If used in the slot of a flex-supported parent component, determines how the available space is used."
},
{
"id"
:
"effect"
,
"type"
:
"effect"
,
...
...
@@ -786,8 +589,7 @@
"id"
:
"execOnMount"
,
"type"
:
"checkbox"
,
"name"
:
"execOnMount"
,
"help"
:
"Runs the effect once when the button is rendered (for example to set a default value)"
,
"value"
:
false
"help"
:
"Runs the effect once when the button is rendered (for example to set a default value)"
}
]
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help