@ziky/ui 0.1.1 → 0.1.3

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/index.d.ts +19 -19
  2. package/dist/layout/AppConfig.d.ts +1 -1
  3. package/dist/layout/AppConfig.d.ts.map +1 -1
  4. package/dist/layout/AppConfig.js +6 -6
  5. package/dist/layout/AppConfig.js.map +1 -1
  6. package/dist/layout/AppFooter.d.ts.map +1 -1
  7. package/dist/layout/AppFooter.js +1 -1
  8. package/dist/layout/AppFooter.js.map +1 -1
  9. package/dist/layout/AppMenu.d.ts +1 -1
  10. package/dist/layout/AppMenuitem.d.ts +1 -1
  11. package/dist/layout/AppMenuitem.d.ts.map +1 -1
  12. package/dist/layout/AppMenuitem.js +7 -9
  13. package/dist/layout/AppMenuitem.js.map +1 -1
  14. package/dist/layout/AppSidebar.d.ts +1 -1
  15. package/dist/layout/AppTopbar.d.ts +2 -2
  16. package/dist/layout/AppTopbar.d.ts.map +1 -1
  17. package/dist/layout/AppTopbar.js +17 -17
  18. package/dist/layout/AppTopbar.js.map +1 -1
  19. package/dist/layout/RidinAdminLayout.d.ts +1 -1
  20. package/dist/layout/RidinAdminLayoutContext.d.ts +2 -2
  21. package/dist/layout/SakaiLayout.d.ts +1 -1
  22. package/dist/layout/context/layoutcontext.d.ts +2 -2
  23. package/dist/layout/context/layoutcontext.d.ts.map +1 -1
  24. package/dist/layout/context/layoutcontext.js +6 -6
  25. package/dist/layout/context/layoutcontext.js.map +1 -1
  26. package/dist/layout/context/menucontext.d.ts +2 -2
  27. package/dist/layout/context/menucontext.js +1 -1
  28. package/dist/layout/layout.d.ts +1 -1
  29. package/dist/layout/layout.d.ts.map +1 -1
  30. package/dist/layout/layout.js +15 -16
  31. package/dist/layout/layout.js.map +1 -1
  32. package/dist/menu/adminMenu.d.ts.map +1 -1
  33. package/dist/menu/adminMenu.js +56 -32
  34. package/dist/menu/adminMenu.js.map +1 -1
  35. package/dist/providers/RidinProviders.d.ts +1 -1
  36. package/dist/providers/RidinProviders.js +1 -1
  37. package/dist/styles/index.d.ts +5 -5
  38. package/dist/styles/index.ts +5 -5
  39. package/dist/styles/layout/_config.scss +55 -54
  40. package/dist/styles/layout/_content.scss +17 -17
  41. package/dist/styles/layout/_footer.scss +10 -10
  42. package/dist/styles/layout/_main.scss +27 -27
  43. package/dist/styles/layout/_menu.scss +166 -159
  44. package/dist/styles/layout/_mixins.scss +13 -13
  45. package/dist/styles/layout/_responsive.scss +102 -101
  46. package/dist/styles/layout/_topbar.scss +158 -152
  47. package/dist/styles/layout/_typography.scss +70 -65
  48. package/dist/styles/layout/_utils.scss +40 -40
  49. package/dist/styles/layout/_variables.scss +3 -3
  50. package/dist/styles/layout/layout.scss +11 -11
  51. package/dist/types.d.ts +2 -2
  52. package/package.json +12 -2
@@ -1,152 +1,158 @@
1
- @use './_variables' as vars;
2
- @use './_mixins' as mixins;
3
-
4
- .layout-topbar {
5
- position: fixed;
6
- height: 5rem;
7
- z-index: 997;
8
- left: 0;
9
- top: 0;
10
- width: 100%;
11
- padding: 0 2rem;
12
- background-color: var(--surface-card);
13
- transition: left vars.$transitionDuration;
14
- display: flex;
15
- align-items: center;
16
- box-shadow: 0px 3px 5px rgba(0,0,0,.02), 0px 0px 2px rgba(0,0,0,.05), 0px 1px 4px rgba(0,0,0,.08);
17
-
18
- .layout-topbar-logo {
19
- display: flex;
20
- align-items: center;
21
- color: var(--surface-900);
22
- font-size: 1.5rem;
23
- font-weight: 500;
24
- width: 300px;
25
- border-radius: 12px;
26
-
27
- img {
28
- height: 2.5rem;
29
- margin-right: .5rem;
30
- }
31
-
32
- &:focus {
33
- @include mixins.focused();
34
- }
35
- }
36
-
37
- .layout-topbar-button {
38
- display: inline-flex;
39
- justify-content: center;
40
- align-items: center;
41
- position: relative;
42
- color: var(--text-color-secondary);
43
- border-radius: 50%;
44
- width: 3rem;
45
- height: 3rem;
46
- cursor: pointer;
47
- transition: background-color vars.$transitionDuration;
48
-
49
- &:hover {
50
- color: var(--text-color);
51
- background-color: var(--surface-hover);
52
- }
53
-
54
- &:focus {
55
- @include mixins.focused();
56
- }
57
-
58
- i {
59
- font-size: 1.5rem;
60
- }
61
-
62
- span {
63
- font-size: 1rem;
64
- display: none;
65
- }
66
- }
67
-
68
- .layout-menu-button {
69
- margin-left: 2rem;
70
- }
71
-
72
- .layout-topbar-menu-button {
73
- display: none;
74
-
75
- i {
76
- font-size: 1.25rem;
77
- }
78
- }
79
-
80
- .layout-topbar-menu {
81
- margin: 0 0 0 auto;
82
- padding: 0;
83
- list-style: none;
84
- display: flex;
85
-
86
- .layout-topbar-button {
87
- margin-left: 1rem;
88
- }
89
- }
90
- }
91
-
92
- @media (max-width: 991px) {
93
- .layout-topbar {
94
- justify-content: space-between;
95
-
96
- .layout-topbar-logo {
97
- width: auto;
98
- order: 2;
99
- }
100
-
101
- .layout-menu-button {
102
- margin-left: 0;
103
- order: 1;
104
- }
105
-
106
- .layout-topbar-menu-button {
107
- display: inline-flex;
108
- margin-left: 0;
109
- order: 3;
110
- }
111
-
112
- .layout-topbar-menu {
113
- margin-left: 0;
114
- position: absolute;
115
- flex-direction: column;
116
- background-color: var(--surface-overlay);
117
- box-shadow: 0px 3px 5px rgba(0,0,0,.02), 0px 0px 2px rgba(0,0,0,.05), 0px 1px 4px rgba(0,0,0,.08);
118
- border-radius: 12px;
119
- padding: 1rem;
120
- right: 2rem;
121
- top: 5rem;
122
- min-width: 15rem;
123
- display: none;
124
- -webkit-animation: scalein 0.15s linear;
125
- animation: scalein 0.15s linear;
126
-
127
- &.layout-topbar-menu-mobile-active {
128
- display: block
129
- }
130
-
131
- .layout-topbar-button {
132
- margin-left: 0;
133
- display: flex;
134
- width: 100%;
135
- height: auto;
136
- justify-content: flex-start;
137
- border-radius: 12px;
138
- padding: 1rem;
139
-
140
- i {
141
- font-size: 1rem;
142
- margin-right: .5rem;
143
- }
144
-
145
- span {
146
- font-weight: medium;
147
- display: block;
148
- }
149
- }
150
- }
151
- }
152
- }
1
+ @use './_variables' as vars;
2
+ @use './_mixins' as mixins;
3
+
4
+ .layout-topbar {
5
+ position: fixed;
6
+ height: 5rem;
7
+ z-index: 997;
8
+ left: 0;
9
+ top: 0;
10
+ width: 100%;
11
+ padding: 0 2rem;
12
+ background-color: var(--surface-card);
13
+ transition: left vars.$transitionDuration;
14
+ display: flex;
15
+ align-items: center;
16
+ box-shadow:
17
+ 0px 3px 5px rgba(0, 0, 0, 0.02),
18
+ 0px 0px 2px rgba(0, 0, 0, 0.05),
19
+ 0px 1px 4px rgba(0, 0, 0, 0.08);
20
+
21
+ .layout-topbar-logo {
22
+ display: flex;
23
+ align-items: center;
24
+ color: var(--surface-900);
25
+ font-size: 1.5rem;
26
+ font-weight: 500;
27
+ width: 300px;
28
+ border-radius: 12px;
29
+
30
+ img {
31
+ height: 2.5rem;
32
+ margin-right: 0.5rem;
33
+ }
34
+
35
+ &:focus {
36
+ @include mixins.focused();
37
+ }
38
+ }
39
+
40
+ .layout-topbar-button {
41
+ display: inline-flex;
42
+ justify-content: center;
43
+ align-items: center;
44
+ position: relative;
45
+ color: var(--text-color-secondary);
46
+ border-radius: 50%;
47
+ width: 3rem;
48
+ height: 3rem;
49
+ cursor: pointer;
50
+ transition: background-color vars.$transitionDuration;
51
+
52
+ &:hover {
53
+ color: var(--text-color);
54
+ background-color: var(--surface-hover);
55
+ }
56
+
57
+ &:focus {
58
+ @include mixins.focused();
59
+ }
60
+
61
+ i {
62
+ font-size: 1.5rem;
63
+ }
64
+
65
+ span {
66
+ font-size: 1rem;
67
+ display: none;
68
+ }
69
+ }
70
+
71
+ .layout-menu-button {
72
+ margin-left: 2rem;
73
+ }
74
+
75
+ .layout-topbar-menu-button {
76
+ display: none;
77
+
78
+ i {
79
+ font-size: 1.25rem;
80
+ }
81
+ }
82
+
83
+ .layout-topbar-menu {
84
+ margin: 0 0 0 auto;
85
+ padding: 0;
86
+ list-style: none;
87
+ display: flex;
88
+
89
+ .layout-topbar-button {
90
+ margin-left: 1rem;
91
+ }
92
+ }
93
+ }
94
+
95
+ @media (max-width: 991px) {
96
+ .layout-topbar {
97
+ justify-content: space-between;
98
+
99
+ .layout-topbar-logo {
100
+ width: auto;
101
+ order: 2;
102
+ }
103
+
104
+ .layout-menu-button {
105
+ margin-left: 0;
106
+ order: 1;
107
+ }
108
+
109
+ .layout-topbar-menu-button {
110
+ display: inline-flex;
111
+ margin-left: 0;
112
+ order: 3;
113
+ }
114
+
115
+ .layout-topbar-menu {
116
+ margin-left: 0;
117
+ position: absolute;
118
+ flex-direction: column;
119
+ background-color: var(--surface-overlay);
120
+ box-shadow:
121
+ 0px 3px 5px rgba(0, 0, 0, 0.02),
122
+ 0px 0px 2px rgba(0, 0, 0, 0.05),
123
+ 0px 1px 4px rgba(0, 0, 0, 0.08);
124
+ border-radius: 12px;
125
+ padding: 1rem;
126
+ right: 2rem;
127
+ top: 5rem;
128
+ min-width: 15rem;
129
+ display: none;
130
+ -webkit-animation: scalein 0.15s linear;
131
+ animation: scalein 0.15s linear;
132
+
133
+ &.layout-topbar-menu-mobile-active {
134
+ display: block;
135
+ }
136
+
137
+ .layout-topbar-button {
138
+ margin-left: 0;
139
+ display: flex;
140
+ width: 100%;
141
+ height: auto;
142
+ justify-content: flex-start;
143
+ border-radius: 12px;
144
+ padding: 1rem;
145
+
146
+ i {
147
+ font-size: 1rem;
148
+ margin-right: 0.5rem;
149
+ }
150
+
151
+ span {
152
+ font-weight: medium;
153
+ display: block;
154
+ }
155
+ }
156
+ }
157
+ }
158
+ }
@@ -1,65 +1,70 @@
1
- @use './_variables' as vars;
2
-
3
- h1, h2, h3, h4, h5, h6 {
4
- margin: 1.5rem 0 1rem 0;
5
- font-family: inherit;
6
- font-weight: 500;
7
- line-height: 1.2;
8
- color: var(--surface-900);
9
-
10
- &:first-child {
11
- margin-top: 0;
12
- }
13
- }
14
-
15
- h1 {
16
- font-size: 2.5rem;
17
- }
18
-
19
- h2 {
20
- font-size: 2rem;
21
- }
22
-
23
- h3 {
24
- font-size: 1.75rem;
25
- }
26
-
27
- h4 {
28
- font-size: 1.5rem;
29
- }
30
-
31
- h5 {
32
- font-size: 1.25rem;
33
- }
34
-
35
- h6 {
36
- font-size: 1rem;
37
- }
38
-
39
- mark {
40
- background: #FFF8E1;
41
- padding: .25rem .4rem;
42
- border-radius: vars.$borderRadius;
43
- font-family: monospace;
44
- }
45
-
46
- blockquote {
47
- margin: 1rem 0;
48
- padding: 0 2rem;
49
- border-left: 4px solid #90A4AE;
50
- }
51
-
52
- hr {
53
- border-top: solid var(--surface-border);
54
- border-width: 1px 0 0 0;
55
- margin: 1rem 0;
56
- }
57
-
58
- p {
59
- margin: 0 0 1rem 0;
60
- line-height: 1.5;
61
-
62
- &:last-child {
63
- margin-bottom: 0;
64
- }
65
- }
1
+ @use './_variables' as vars;
2
+
3
+ h1,
4
+ h2,
5
+ h3,
6
+ h4,
7
+ h5,
8
+ h6 {
9
+ margin: 1.5rem 0 1rem 0;
10
+ font-family: inherit;
11
+ font-weight: 500;
12
+ line-height: 1.2;
13
+ color: var(--surface-900);
14
+
15
+ &:first-child {
16
+ margin-top: 0;
17
+ }
18
+ }
19
+
20
+ h1 {
21
+ font-size: 2.5rem;
22
+ }
23
+
24
+ h2 {
25
+ font-size: 2rem;
26
+ }
27
+
28
+ h3 {
29
+ font-size: 1.75rem;
30
+ }
31
+
32
+ h4 {
33
+ font-size: 1.5rem;
34
+ }
35
+
36
+ h5 {
37
+ font-size: 1.25rem;
38
+ }
39
+
40
+ h6 {
41
+ font-size: 1rem;
42
+ }
43
+
44
+ mark {
45
+ background: #fff8e1;
46
+ padding: 0.25rem 0.4rem;
47
+ border-radius: vars.$borderRadius;
48
+ font-family: monospace;
49
+ }
50
+
51
+ blockquote {
52
+ margin: 1rem 0;
53
+ padding: 0 2rem;
54
+ border-left: 4px solid #90a4ae;
55
+ }
56
+
57
+ hr {
58
+ border-top: solid var(--surface-border);
59
+ border-width: 1px 0 0 0;
60
+ margin: 1rem 0;
61
+ }
62
+
63
+ p {
64
+ margin: 0 0 1rem 0;
65
+ line-height: 1.5;
66
+
67
+ &:last-child {
68
+ margin-bottom: 0;
69
+ }
70
+ }
@@ -1,40 +1,40 @@
1
- @use './_variables' as vars;
2
-
3
- /* Utils */
4
- .clearfix:after {
5
- content: " ";
6
- display: block;
7
- clear: both;
8
- }
9
-
10
- .card {
11
- background: var(--surface-card);
12
- border: 1px solid var(--surface-border);
13
- padding: 2rem;
14
- margin-bottom: 2rem;
15
- box-shadow: var(--card-shadow);
16
- border-radius: vars.$borderRadius;
17
-
18
- &:last-child {
19
- margin-bottom: 0;
20
- }
21
- }
22
-
23
- .p-toast {
24
- &.p-toast-top-right,
25
- &.p-toast-top-left,
26
- &.p-toast-top-center {
27
- top: 100px;
28
- }
29
- }
30
-
31
- .global-loading-overlay {
32
- position: fixed;
33
- inset: 0;
34
- display: flex;
35
- align-items: center;
36
- justify-content: center;
37
- background: rgba(255, 255, 255, 0.6);
38
- backdrop-filter: blur(1px);
39
- z-index: 9999;
40
- }
1
+ @use './_variables' as vars;
2
+
3
+ /* Utils */
4
+ .clearfix:after {
5
+ content: ' ';
6
+ display: block;
7
+ clear: both;
8
+ }
9
+
10
+ .card {
11
+ background: var(--surface-card);
12
+ border: 1px solid var(--surface-border);
13
+ padding: 2rem;
14
+ margin-bottom: 2rem;
15
+ box-shadow: var(--card-shadow);
16
+ border-radius: vars.$borderRadius;
17
+
18
+ &:last-child {
19
+ margin-bottom: 0;
20
+ }
21
+ }
22
+
23
+ .p-toast {
24
+ &.p-toast-top-right,
25
+ &.p-toast-top-left,
26
+ &.p-toast-top-center {
27
+ top: 100px;
28
+ }
29
+ }
30
+
31
+ .global-loading-overlay {
32
+ position: fixed;
33
+ inset: 0;
34
+ display: flex;
35
+ align-items: center;
36
+ justify-content: center;
37
+ background: rgba(255, 255, 255, 0.6);
38
+ backdrop-filter: blur(1px);
39
+ z-index: 9999;
40
+ }
@@ -1,3 +1,3 @@
1
- /* General */
2
- $borderRadius:12px; /* border radius of layout element e.g. card, sidebar */
3
- $transitionDuration:.2s; /* transition duration of layout elements e.g. sidebar, overlay menus */
1
+ /* General */
2
+ $borderRadius: 12px; /* border radius of layout element e.g. card, sidebar */
3
+ $transitionDuration: 0.2s; /* transition duration of layout elements e.g. sidebar, overlay menus */
@@ -1,11 +1,11 @@
1
- @use './_variables' as *;
2
- @use "./_mixins" as *;
3
- @use "./_main" as *;
4
- @use "./_topbar" as *;
5
- @use "./_menu" as *;
6
- @use "./_config" as *;
7
- @use "./_content" as *;
8
- @use "./_footer" as *;
9
- @use "./_responsive" as *;
10
- @use "./_utils" as *;
11
- @use "./_typography" as *;
1
+ @use './_variables' as *;
2
+ @use './_mixins' as *;
3
+ @use './_main' as *;
4
+ @use './_topbar' as *;
5
+ @use './_menu' as *;
6
+ @use './_config' as *;
7
+ @use './_content' as *;
8
+ @use './_footer' as *;
9
+ @use './_responsive' as *;
10
+ @use './_utils' as *;
11
+ @use './_typography' as *;
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Dispatch, SetStateAction, HTMLAttributeAnchorTarget, MutableRefObject, ReactNode } from "react";
1
+ import type { Dispatch, SetStateAction, HTMLAttributeAnchorTarget, MutableRefObject, ReactNode } from 'react';
2
2
  export type ChildContainerProps = {
3
3
  children: ReactNode;
4
4
  };
@@ -51,7 +51,7 @@ export interface AppMenuItem {
51
51
  url?: string;
52
52
  target?: HTMLAttributeAnchorTarget;
53
53
  seperator?: boolean;
54
- badge?: "UPDATED" | "NEW";
54
+ badge?: 'UPDATED' | 'NEW';
55
55
  badgeClass?: string;
56
56
  class?: string;
57
57
  preventExact?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ziky/ui",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Shared UI components/layout for RIDIN MFEs",
5
5
  "license": "UNLICENSED",
6
6
  "sideEffects": ["**/*.css", "**/*.scss", "**/*.sass"],
@@ -21,6 +21,8 @@
21
21
  "build-storybook": "storybook build -o storybook-static",
22
22
  "prepublishOnly": "npm run build:lib",
23
23
  "publish": "npm publish --access public",
24
+ "lint": "eslint \"src/**/*.{ts,tsx,js,jsx}\"",
25
+ "format": "prettier \"src/**/*.{ts,tsx,js,jsx,json,css,scss,md,mdx}\" --write",
24
26
  "deploy": "vercel --prod"
25
27
  },
26
28
  "peerDependencies": {
@@ -51,7 +53,15 @@
51
53
  "@types/react-transition-group": "^4.4.12",
52
54
  "sass": "^1.83.4",
53
55
  "typescript": "~5.9.3",
54
- "vite": "^6.0.0"
56
+ "vite": "^6.0.0",
57
+ "@typescript-eslint/eslint-plugin": "^8.18.2",
58
+ "@typescript-eslint/parser": "^8.18.2",
59
+ "eslint": "^8.57.0",
60
+ "eslint-config-prettier": "^9.1.0",
61
+ "eslint-plugin-prettier": "^5.2.1",
62
+ "eslint-plugin-react": "^7.37.2",
63
+ "eslint-plugin-react-hooks": "^5.0.0",
64
+ "prettier": "^3.4.1"
55
65
  }
56
66
  }
57
67