tera-system-ui 0.0.20 → 0.0.21

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 (52) hide show
  1. package/dist/components/brand-logo/BrandLogo.svelte +31 -31
  2. package/dist/components/button/Button.svelte +49 -49
  3. package/dist/components/combobox/Combobox.svelte +8 -8
  4. package/dist/components/command/command.scss +72 -72
  5. package/dist/components/command/components/Command.svelte +120 -120
  6. package/dist/components/command/components/CommandEmpty.svelte +30 -30
  7. package/dist/components/command/components/CommandGroup.svelte +110 -110
  8. package/dist/components/command/components/CommandInput.svelte +92 -92
  9. package/dist/components/command/components/CommandItem.svelte +110 -110
  10. package/dist/components/command/components/CommandList.svelte +56 -56
  11. package/dist/components/command/components/CommandLoading.svelte +28 -28
  12. package/dist/components/command/components/CommandSeparator.svelte +21 -21
  13. package/dist/components/dialog/Dialog.astro +63 -63
  14. package/dist/components/dialog/Dialog.svelte +109 -109
  15. package/dist/components/dialog/dialog.scss +115 -115
  16. package/dist/components/header/Header.svelte +36 -36
  17. package/dist/components/header/header.scss +19 -19
  18. package/dist/components/icons/IconArrowBigRightFilled.svelte +10 -10
  19. package/dist/components/icons/IconBook.svelte +10 -10
  20. package/dist/components/icons/IconBookmarkPlus.svelte +10 -10
  21. package/dist/components/icons/IconCalculator.svelte +10 -10
  22. package/dist/components/icons/IconCheck.svelte +10 -10
  23. package/dist/components/icons/IconChevronDown.svelte +10 -10
  24. package/dist/components/icons/IconCopy.svelte +10 -10
  25. package/dist/components/icons/IconCopyCheckFilled.svelte +10 -10
  26. package/dist/components/icons/IconHamburger.svelte +10 -10
  27. package/dist/components/icons/IconLanguage.svelte +10 -10
  28. package/dist/components/icons/IconLoader2.svelte +10 -10
  29. package/dist/components/icons/IconMoon.svelte +10 -10
  30. package/dist/components/icons/IconPointFilled.svelte +10 -10
  31. package/dist/components/icons/IconSearch.svelte +10 -10
  32. package/dist/components/icons/IconSun.svelte +10 -10
  33. package/dist/components/icons/IconSwitchHorizontal.svelte +10 -10
  34. package/dist/components/icons/IconSwitchVertical.svelte +10 -10
  35. package/dist/components/icons/IconTransform.svelte +10 -10
  36. package/dist/components/icons/IconX.svelte +10 -10
  37. package/dist/components/input/Input.svelte +24 -24
  38. package/dist/components/language-picker-button/LanguagePickerButton.svelte +109 -109
  39. package/dist/components/light-dark-toggle/LightDarkToggle.svelte +36 -36
  40. package/dist/components/popover/Popover.svelte +136 -136
  41. package/dist/components/popover-responsive/PopoverResponsive.svelte +87 -87
  42. package/dist/components/side-navigation/SideNavigation.svelte +114 -114
  43. package/dist/components/side-navigation/SideNavigationItem.svelte +17 -17
  44. package/dist/components/side-navigation/SideNavigationLayout.svelte +19 -19
  45. package/dist/components/side-navigation/sidenav.scss +149 -149
  46. package/dist/components/tera-ui-context/TeraUiContext.svelte +28 -28
  47. package/dist/themes/scrollbar.scss +37 -37
  48. package/dist/themes/tera-ui-base.css +210 -210
  49. package/dist/themes/tw-preset.cjs +153 -153
  50. package/package.json +97 -96
  51. package/scripts/add-component-template.js +121 -121
  52. package/scripts/generate-ts-index.js +136 -136
@@ -1,18 +1,18 @@
1
- <script lang="ts">
2
- const {class: className, href, children, icon} = $props()
3
- </script>
4
-
5
- <li class="{className + ' side-nav_item'}">
6
- <a href="{href || '#'}" class="">
7
- <div class="min-w-icon-sm z-10">
8
- {@render icon?.()}
9
- </div>
10
- <div class="sm-hidden z-10 truncate">
11
- {@render children?.()}
12
- </div>
13
- </a>
14
- </li>
15
-
16
- <style>
17
-
1
+ <script lang="ts">
2
+ const {class: className, href, children, icon} = $props()
3
+ </script>
4
+
5
+ <li class="{className + ' side-nav_item'}">
6
+ <a href="{href || '#'}" class="">
7
+ <div class="min-w-icon-sm z-10">
8
+ {@render icon?.()}
9
+ </div>
10
+ <div class="sm-hidden z-10 truncate">
11
+ {@render children?.()}
12
+ </div>
13
+ </a>
14
+ </li>
15
+
16
+ <style>
17
+
18
18
  </style>
@@ -1,19 +1,19 @@
1
- <script lang="ts">
2
- import {SideNavigation} from "./";
3
- import './sidenav.scss'
4
-
5
- let {children} = $props()
6
- </script>
7
-
8
- <main
9
- id="side-nav_main-layout"
10
- class="side-nav_main-layout relative"
11
- data-side-nav-state="compact"
12
- >
13
- <SideNavigation/>
14
-
15
- <section class="side-nav_main-content">
16
- {@render children?.()}
17
- </section>
18
- </main>
19
-
1
+ <script lang="ts">
2
+ import {SideNavigation} from "./";
3
+ import './sidenav.scss'
4
+
5
+ let {children} = $props()
6
+ </script>
7
+
8
+ <main
9
+ id="side-nav_main-layout"
10
+ class="side-nav_main-layout relative"
11
+ data-side-nav-state="compact"
12
+ >
13
+ <SideNavigation/>
14
+
15
+ <section class="side-nav_main-content">
16
+ {@render children?.()}
17
+ </section>
18
+ </main>
19
+
@@ -1,149 +1,149 @@
1
- :root {
2
- --sidebar-width: 0;
3
- --sidebar-transition-duration: 0.2s;
4
- --sidebar-main-margin-left: 0;
5
- --sidebar-border-width: 0;
6
- }
7
-
8
- .side-nav_main-layout {
9
- transition: padding-left var(--sidebar-transition-duration);
10
- }
11
-
12
- .side-nav_main-side-bar {
13
- container-type: inline-size;
14
- z-index: 50;
15
- width: var(--sidebar-width);
16
- overflow-x: hidden;
17
- border-right: var(--sidebar-border-width) solid theme('colors.neutral.token.5');
18
- height: 100dvh;
19
- position: fixed;
20
- top: 0;
21
- left: 0;
22
- bottom: 0;
23
-
24
- transition: width var(--sidebar-transition-duration);
25
- background: theme('colors.neutral.token.1');
26
-
27
- ul {
28
- width: var(--sidebar-width);
29
- transition: width var(--sidebar-transition-duration);
30
- }
31
-
32
- }
33
-
34
-
35
- .sm-hidden {
36
- opacity: 0;
37
- transition: opacity var(--sidebar-transition-duration);
38
- }
39
-
40
- @container (min-width: 3rem) {
41
- .sm-hidden {
42
- opacity: 1;
43
- }
44
- }
45
-
46
- .side-nav_main-content {
47
- margin-left: var(--sidebar-main-margin-left);
48
- transition: margin-left var(--sidebar-transition-duration);
49
- }
50
-
51
-
52
- .side-nav_main-layout {
53
- &[data-side-nav-state="expand"], &[data-side-nav-temporary-expand="true"] {
54
- --sidebar-width: 16.5rem;
55
- --sidebar-border-width: 1px;
56
- .header-brand-logo {
57
- display: none;
58
- }
59
- }
60
- }
61
-
62
- @media (min-width: theme('screens.md')) {
63
- :root {
64
- --sidebar-main-margin-left: 3rem;
65
- --sidebar-border-width: 1px;
66
- --sidebar-width: 3rem;
67
- }
68
- }
69
-
70
- @media (min-width: theme('screens.xl')) {
71
- :root {
72
- --sidebar-main-margin-left: var(--sidebar-width);
73
- --sidebar-width: 16.5rem;
74
- }
75
- .header-brand-logo {
76
- display: none;
77
- }
78
- .side-nav_main-layout {
79
- &[data-side-nav-state="compact"] {
80
- --sidebar-main-margin-left: 3rem;
81
- --sidebar-width: 3rem;
82
- .header-brand-logo {
83
- display: block;
84
- }
85
- }
86
-
87
- &[data-side-nav-temporary-expand="true"] {
88
- --sidebar-width: 16.5rem;
89
-
90
- }
91
- }
92
- }
93
-
94
-
95
- .side-nav_item {
96
- color: theme('colors.neutral.token.13');
97
-
98
- a {
99
- display: flex;
100
- gap: 0.5rem;
101
- align-items: center;
102
- width: 100%;
103
- position: relative;
104
- white-space: nowrap;
105
- @apply px-3 py-3 font-semibold;
106
- }
107
-
108
- svg {
109
- &.icon {
110
- min-width: 24px;
111
- }
112
- }
113
-
114
- &.selected a {
115
- //background-color: theme('colors.neutral.token.11');
116
- color: theme('colors.neutral.token.1');
117
- //@apply rounded-full;
118
- }
119
-
120
- &.selected {
121
- a::after {
122
- content: '';
123
- position: absolute;
124
- inset-inline: 0.25rem;
125
- inset-block: 0.2rem;
126
- background: theme('colors.neutral.token.11');
127
- border-radius: theme('borderRadius.DEFAULT');
128
- z-index: 0;
129
- }
130
- }
131
-
132
- //&.selected {
133
- // a::after {
134
- // content: '';
135
- // position: absolute;
136
- // left: 0;
137
- // top: 0;
138
- // bottom: 0;
139
- // width: 4px;
140
- // height: 100%;
141
- // background: theme('colors.primary.token.4');
142
- // border-radius: 4px 0 0 4px;
143
- // }
144
- //}
145
-
146
- &:hover {
147
- background-color: theme('colors.neutral.token.3');
148
- }
149
- }
1
+ :root {
2
+ --sidebar-width: 0;
3
+ --sidebar-transition-duration: 0.2s;
4
+ --sidebar-main-margin-left: 0;
5
+ --sidebar-border-width: 0;
6
+ }
7
+
8
+ .side-nav_main-layout {
9
+ transition: padding-left var(--sidebar-transition-duration);
10
+ }
11
+
12
+ .side-nav_main-side-bar {
13
+ container-type: inline-size;
14
+ z-index: 50;
15
+ width: var(--sidebar-width);
16
+ overflow-x: hidden;
17
+ border-right: var(--sidebar-border-width) solid theme('colors.neutral.token.5');
18
+ height: 100dvh;
19
+ position: fixed;
20
+ top: 0;
21
+ left: 0;
22
+ bottom: 0;
23
+
24
+ transition: width var(--sidebar-transition-duration);
25
+ background: theme('colors.neutral.token.1');
26
+
27
+ ul {
28
+ width: var(--sidebar-width);
29
+ transition: width var(--sidebar-transition-duration);
30
+ }
31
+
32
+ }
33
+
34
+
35
+ .sm-hidden {
36
+ opacity: 0;
37
+ transition: opacity var(--sidebar-transition-duration);
38
+ }
39
+
40
+ @container (min-width: 3rem) {
41
+ .sm-hidden {
42
+ opacity: 1;
43
+ }
44
+ }
45
+
46
+ .side-nav_main-content {
47
+ margin-left: var(--sidebar-main-margin-left);
48
+ transition: margin-left var(--sidebar-transition-duration);
49
+ }
50
+
51
+
52
+ .side-nav_main-layout {
53
+ &[data-side-nav-state="expand"], &[data-side-nav-temporary-expand="true"] {
54
+ --sidebar-width: 16.5rem;
55
+ --sidebar-border-width: 1px;
56
+ .header-brand-logo {
57
+ display: none;
58
+ }
59
+ }
60
+ }
61
+
62
+ @media (min-width: theme('screens.md')) {
63
+ :root {
64
+ --sidebar-main-margin-left: 3rem;
65
+ --sidebar-border-width: 1px;
66
+ --sidebar-width: 3rem;
67
+ }
68
+ }
69
+
70
+ @media (min-width: theme('screens.xl')) {
71
+ :root {
72
+ --sidebar-main-margin-left: var(--sidebar-width);
73
+ --sidebar-width: 16.5rem;
74
+ }
75
+ .header-brand-logo {
76
+ display: none;
77
+ }
78
+ .side-nav_main-layout {
79
+ &[data-side-nav-state="compact"] {
80
+ --sidebar-main-margin-left: 3rem;
81
+ --sidebar-width: 3rem;
82
+ .header-brand-logo {
83
+ display: block;
84
+ }
85
+ }
86
+
87
+ &[data-side-nav-temporary-expand="true"] {
88
+ --sidebar-width: 16.5rem;
89
+
90
+ }
91
+ }
92
+ }
93
+
94
+
95
+ .side-nav_item {
96
+ color: theme('colors.neutral.token.13');
97
+
98
+ a {
99
+ display: flex;
100
+ gap: 0.5rem;
101
+ align-items: center;
102
+ width: 100%;
103
+ position: relative;
104
+ white-space: nowrap;
105
+ @apply px-3 py-3 font-semibold;
106
+ }
107
+
108
+ svg {
109
+ &.icon {
110
+ min-width: 24px;
111
+ }
112
+ }
113
+
114
+ &.selected a {
115
+ //background-color: theme('colors.neutral.token.11');
116
+ color: theme('colors.neutral.token.1');
117
+ //@apply rounded-full;
118
+ }
119
+
120
+ &.selected {
121
+ a::after {
122
+ content: '';
123
+ position: absolute;
124
+ inset-inline: 0.25rem;
125
+ inset-block: 0.2rem;
126
+ background: theme('colors.neutral.token.11');
127
+ border-radius: theme('borderRadius.DEFAULT');
128
+ z-index: 0;
129
+ }
130
+ }
131
+
132
+ //&.selected {
133
+ // a::after {
134
+ // content: '';
135
+ // position: absolute;
136
+ // left: 0;
137
+ // top: 0;
138
+ // bottom: 0;
139
+ // width: 4px;
140
+ // height: 100%;
141
+ // background: theme('colors.primary.token.4');
142
+ // border-radius: 4px 0 0 4px;
143
+ // }
144
+ //}
145
+
146
+ &:hover {
147
+ background-color: theme('colors.neutral.token.3');
148
+ }
149
+ }
@@ -1,28 +1,28 @@
1
- <script lang="ts">
2
- import {type TeraUiContextProps} from "./TeraUiContext";
3
- import {setGlobalContext} from "./global-context";
4
- import {setLanguageTag} from "../../paraglide/runtime";
5
- import * as m from '../../paraglide/messages.js'
6
-
7
-
8
- let {
9
- children,
10
- supportLanguages = ['en'],
11
- language = 'en',
12
- ...props
13
- }: TeraUiContextProps = $props();
14
-
15
-
16
- setGlobalContext({
17
- supportLanguages,
18
- language,
19
- ...props
20
- })
21
-
22
- setLanguageTag(language)
23
- console.log('setLanguageTag', language)
24
- console.log('test translate', m.text_select_language())
25
-
26
- </script>
27
-
28
- {@render children()}
1
+ <script lang="ts">
2
+ import {type TeraUiContextProps} from "./TeraUiContext";
3
+ import {setGlobalContext} from "./global-context";
4
+ import {setLanguageTag} from "../../paraglide/runtime";
5
+ import * as m from '../../paraglide/messages.js'
6
+
7
+
8
+ let {
9
+ children,
10
+ supportLanguages = ['en'],
11
+ language = 'en',
12
+ ...props
13
+ }: TeraUiContextProps = $props();
14
+
15
+
16
+ setGlobalContext({
17
+ supportLanguages,
18
+ language,
19
+ ...props
20
+ })
21
+
22
+ setLanguageTag(language)
23
+ console.log('setLanguageTag', language)
24
+ console.log('test translate', m.text_select_language())
25
+
26
+ </script>
27
+
28
+ {@render children()}
@@ -1,37 +1,37 @@
1
- /* Light mode scrollbar styles */
2
- ::-webkit-scrollbar {
3
- width: 8px;
4
- height: 8px;
5
- }
6
-
7
- ::-webkit-scrollbar-track {
8
- background: transparent; /* Transparent track */
9
- }
10
-
11
- ::-webkit-scrollbar-thumb {
12
- background-color: rgba(0, 0, 0, 0.2); /* Light mode: dark thumb */
13
- border-radius: 10px;
14
- }
15
-
16
- ::-webkit-scrollbar-thumb:hover {
17
- background-color: rgba(0, 0, 0, 0.4); /* Darker thumb on hover */
18
- }
19
-
20
- /* Dark mode scrollbar styles */
21
- .dark ::-webkit-scrollbar-thumb {
22
- background-color: rgba(255, 255, 255, 0.2); /* Dark mode: light thumb */
23
- }
24
-
25
- .dark ::-webkit-scrollbar-thumb:hover {
26
- background-color: rgba(255, 255, 255, 0.4); /* Lighter thumb on hover */
27
- }
28
-
29
- /* Firefox scrollbar styling */
30
- * {
31
- scrollbar-width: thin;
32
- scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
33
- }
34
-
35
- html.dark, .dark * {
36
- scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
37
- }
1
+ /* Light mode scrollbar styles */
2
+ ::-webkit-scrollbar {
3
+ width: 8px;
4
+ height: 8px;
5
+ }
6
+
7
+ ::-webkit-scrollbar-track {
8
+ background: transparent; /* Transparent track */
9
+ }
10
+
11
+ ::-webkit-scrollbar-thumb {
12
+ background-color: rgba(0, 0, 0, 0.2); /* Light mode: dark thumb */
13
+ border-radius: 10px;
14
+ }
15
+
16
+ ::-webkit-scrollbar-thumb:hover {
17
+ background-color: rgba(0, 0, 0, 0.4); /* Darker thumb on hover */
18
+ }
19
+
20
+ /* Dark mode scrollbar styles */
21
+ .dark ::-webkit-scrollbar-thumb {
22
+ background-color: rgba(255, 255, 255, 0.2); /* Dark mode: light thumb */
23
+ }
24
+
25
+ .dark ::-webkit-scrollbar-thumb:hover {
26
+ background-color: rgba(255, 255, 255, 0.4); /* Lighter thumb on hover */
27
+ }
28
+
29
+ /* Firefox scrollbar styling */
30
+ * {
31
+ scrollbar-width: thin;
32
+ scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
33
+ }
34
+
35
+ html.dark, .dark * {
36
+ scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
37
+ }