@foxeltech/angular-ui 0.2.0 → 0.3.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.
Files changed (38) hide show
  1. package/components.css +2 -17
  2. package/fesm2022/foxeltech-angular-ui.mjs +343 -77
  3. package/fesm2022/foxeltech-angular-ui.mjs.map +1 -1
  4. package/index.d.ts +123 -34
  5. package/package.json +4 -5
  6. package/src/lib/styles/components.css +2 -17
  7. package/src/lib/styles/tailwind.css +11 -8
  8. package/src/lib/styles/tokens.css +131 -0
  9. package/src/lib/styles/utilities.css +24 -0
  10. package/src/lib/ui/components/button/button.component.html +4 -1
  11. package/src/lib/ui/components/checkbox/checkbox.component.html +3 -2
  12. package/src/lib/ui/components/datetime-picker/datetime-picker.component.html +3 -2
  13. package/src/lib/ui/components/datetime-picker/datetime-picker.component.scss +3 -0
  14. package/src/lib/ui/components/drawer/drawer.component.html +3 -0
  15. package/src/lib/ui/components/drawer/drawer.component.scss +3 -0
  16. package/src/lib/ui/components/input/input.component.html +15 -3
  17. package/src/lib/ui/components/kanban-board/kanban-board.component.scss +3 -0
  18. package/src/lib/ui/components/master-detail/master-detail.component.css +11 -0
  19. package/src/lib/ui/components/master-detail/master-detail.component.html +70 -0
  20. package/src/lib/ui/components/meter/meter.component.html +8 -1
  21. package/src/lib/ui/components/radio-button/radio-button.component.html +10 -4
  22. package/src/lib/ui/components/radio-button-toggle/radio-button-toggle.component.html +8 -3
  23. package/src/lib/ui/components/rich-text-area/rich-text-area.component.scss +3 -0
  24. package/src/lib/ui/components/select/select.component.html +9 -4
  25. package/src/lib/ui/components/severity-badges/severity-badges.component.html +5 -4
  26. package/src/lib/ui/components/skeleton-list/skeleton-list.component.html +2 -2
  27. package/src/lib/ui/components/slider/slider.component.html +3 -0
  28. package/src/lib/ui/components/switch/switch.component.html +11 -6
  29. package/src/lib/ui/components/tab-group/tab-group.component.html +15 -1
  30. package/src/lib/ui/components/tab-group/tab-group.component.scss +3 -0
  31. package/src/lib/ui/components/tag/tag.component.html +6 -1
  32. package/src/lib/ui/components/toast/toast.component.html +2 -1
  33. package/src/lib/ui/dialogs/confirmation/confirmation.component.html +1 -1
  34. package/tailwind.css +11 -8
  35. package/tokens.css +131 -0
  36. package/utilities.css +24 -0
  37. package/tailwind-config.d.ts +0 -4
  38. package/tailwind.config.js +0 -113
package/tokens.css ADDED
@@ -0,0 +1,131 @@
1
+ /*
2
+ * Tailwind v4 CSS-first theme for @foxeltech/angular-ui.
3
+ * Replaces the old JS preset (tailwind.config.js / lodash.merge sharing).
4
+ *
5
+ * Colour tokens point at the runtime RGB-triplet variables from theme.css
6
+ * (dark default on :root, light via .light_theme) so theme switching keeps
7
+ * working; opacity modifiers like bg-critical/10 are handled by v4's
8
+ * color-mix() and need no <alpha-value> plumbing.
9
+ */
10
+ /* `inline` is load-bearing: without it the rgb(var(--x)) values are baked
11
+ into :root once, so .light_theme's runtime triplet overrides never reach
12
+ the utilities. inline makes every utility carry rgb(var(--x)) itself and
13
+ resolve at the element that uses it — same behavior as v3. */
14
+ @theme inline {
15
+ /* Colours (names match the v3 preset so every existing class keeps working) */
16
+ --color-gradient-primary-start: rgb(var(--gradient-primary-start));
17
+ --color-gradient-primary-end: rgb(var(--gradient-primary-end));
18
+ --color-gradient-success-start: rgb(var(--gradient-success-start));
19
+ --color-gradient-success-end: rgb(var(--gradient-success-end));
20
+ --color-primary: rgb(var(--primary));
21
+ --color-success: rgb(var(--success));
22
+ --color-danger: rgb(var(--danger));
23
+ --color-warning: rgb(var(--warning));
24
+ --color-critical: rgb(var(--critical));
25
+ --color-discovery: rgb(var(--discovery));
26
+ --color-information: rgb(var(--information));
27
+ --color-bg-primary: rgb(var(--bg-primary));
28
+ --color-bg-canvas: rgb(var(--bg-canvas));
29
+ --color-bg-hover: rgb(var(--bg-primary-hover));
30
+ --color-bg-error: rgb(var(--bg-error-bold));
31
+ --color-bg-hover2: rgb(var(--bg-secondary-hover));
32
+ --color-text-primary: rgb(var(--text-primary));
33
+ --color-text-secondary: rgb(var(--text-secondary));
34
+ --color-text-placeholder: rgb(var(--text-placeholder));
35
+ --color-text-selected: rgb(var(--text-selected-primary));
36
+ --color-text-focus: rgb(var(--text-focus));
37
+ --color-text-inverse: rgb(var(--text-inverse));
38
+ --color-text-error: rgb(var(--text-error));
39
+ --color-text-link: rgb(var(--text-link-primary));
40
+ --color-border-default: rgb(var(--border-default));
41
+ --color-border-interactive: rgb(var(--border-interactive));
42
+ --color-border-selected: rgb(var(--border-selected));
43
+ --color-border-strong: rgb(var(--border-strong));
44
+ --color-border-hover2: rgb(var(--border-secondary-hover));
45
+ --color-button-default: rgb(var(--button-default));
46
+ --color-button-primary: rgb(var(--button-primary));
47
+
48
+ /* Breakpoints (v3 custom screens) */
49
+ --breakpoint-sm: 480px;
50
+ --breakpoint-md: 720px;
51
+ --breakpoint-lg: 1080px;
52
+ --breakpoint-xl: 1920px;
53
+
54
+ /* Shadows — same scale as the v3 preset, incl. the DEFAULT key so the bare
55
+ `shadow` utility keeps its v3 meaning (no shadow→shadow-sm rename sweep). */
56
+ --shadow-sm: 0 1px 2px 0 rgb(var(--shadow-color) / 0.05);
57
+ --shadow: 0 1px 3px 0 rgb(var(--shadow-color) / 0.1), 0 1px 2px -1px rgb(var(--shadow-color) / 0.1);
58
+ --shadow-md: 0 4px 6px -1px rgb(var(--shadow-color) / 0.1), 0 2px 4px -2px rgb(var(--shadow-color) / 0.1);
59
+ --shadow-lg: 0 10px 15px -3px rgb(var(--shadow-color) / 0.1), 0 4px 6px -4px rgb(var(--shadow-color) / 0.1);
60
+ --shadow-xl: 0 20px 25px -5px rgb(var(--shadow-color) / 0.1), 0 10px 10px -5px rgb(var(--shadow-color) / 0.1);
61
+ --shadow-2xl: 0 25px 50px -12px rgb(var(--shadow-color) / 0.25);
62
+ --inset-shadow-sm: inset 0 2px 4px 0 rgb(var(--shadow-color) / 0.05);
63
+
64
+ /* v3 default border radii, incl. DEFAULT so bare `rounded` keeps working */
65
+ --radius-sm: 0.125rem;
66
+ --radius: 0.25rem;
67
+ --radius-md: 0.375rem;
68
+ --radius-lg: 0.5rem;
69
+ --radius-xl: 0.75rem;
70
+ --radius-2xl: 1rem;
71
+ --radius-3xl: 1.5rem;
72
+
73
+ /* Named spacing scale (gap-small, p-semi, mb-large, …) */
74
+ --spacing-xs: 0.125rem;
75
+ --spacing-small: 0.25rem;
76
+ --spacing-normal: 0.5rem;
77
+ --spacing-semi: 0.75rem;
78
+ --spacing-large: 1rem;
79
+ --spacing-xl: 1.25rem;
80
+ --spacing-2xl: 1.5rem;
81
+
82
+ /* Font families */
83
+ --font-spmono: 'SpaceMonoRegular', monospace;
84
+ --font-dmsans: 'DMSans', sans-serif;
85
+ --font-orbitron: 'Orbitron', sans-serif;
86
+ --font-bevn: 'BeVietnamPro', sans-serif;
87
+ --font-roboto: 'Roboto', sans-serif;
88
+
89
+ /* Font-size overrides (v3 preset values) */
90
+ --text-xs: 0.75rem;
91
+ --text-sm: 0.875rem;
92
+ --text-base: 1rem;
93
+ --text-xl: 1.25rem;
94
+ --text-2xl: 1.625rem;
95
+ --text-3xl: 2rem;
96
+ --text-4xl: 2.25rem;
97
+ --text-5xl: 3rem;
98
+ }
99
+
100
+ /* v3 backgroundImage entries — v4 has no background-image theme namespace */
101
+ @utility bg-gradient-primary {
102
+ background-image: linear-gradient(
103
+ 135deg,
104
+ rgb(var(--gradient-primary-start)) 0%,
105
+ rgb(var(--gradient-primary-end)) 100%
106
+ );
107
+ }
108
+ @utility bg-gradient-success {
109
+ background-image: linear-gradient(
110
+ 135deg,
111
+ rgb(var(--gradient-success-start)) 0%,
112
+ rgb(var(--gradient-success-end)) 100%
113
+ );
114
+ }
115
+
116
+ /* v3 behavior compat (per the official upgrade guide) */
117
+ @layer base {
118
+ /* v4 defaults borders to currentColor; restore the theme default */
119
+ *,
120
+ ::after,
121
+ ::before,
122
+ ::backdrop,
123
+ ::file-selector-button {
124
+ border-color: rgb(var(--border-default));
125
+ }
126
+ /* v4 preflight switched buttons to cursor: default */
127
+ button:not(:disabled),
128
+ [role='button']:not(:disabled) {
129
+ cursor: pointer;
130
+ }
131
+ }
package/utilities.css ADDED
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Shared composable utilities (v4 @utility) — kept OUT of components.css
3
+ * because that file is imported inside layer(components) and @utility must
4
+ * be top-level/unlayered. Usable both in markup and via @apply.
5
+ */
6
+ @utility txt-tag-common {
7
+ @apply font-semibold text-xs;
8
+ }
9
+
10
+ @utility btn-common {
11
+ @apply flex text-sm h-10 font-semibold px-xl py-normal items-center justify-center rounded-lg shadow-sm transition-all duration-200 disabled:opacity-50 disabled:pointer-events-none disabled:cursor-not-allowed;
12
+ }
13
+
14
+ @utility btn-menu-common {
15
+ @apply flex flex-row items-center px-semi;
16
+ }
17
+
18
+ @utility card-common {
19
+ @apply text-left px-xl py-large border border-border-default rounded-lg shadow-sm transition-colors duration-500 ease-in-out;
20
+ }
21
+
22
+ @utility tag-common {
23
+ @apply flex min-w-7 px-[10px] py-[2px] leading-5 hover:opacity-70 items-center justify-center;
24
+ }
@@ -1,4 +0,0 @@
1
- declare module '@fx/ui/tailwind.config' {
2
- const config: any;
3
- export default config;
4
- }
@@ -1,113 +0,0 @@
1
- module.exports = {
2
- // Tone utilities are built dynamically (`text-${tone}`) by value-tone.util
3
- // and fx-ui components, so content scanning can't see them — safelist keeps
4
- // them generated in every host app.
5
- safelist: [
6
- { pattern: /^(text|bg)-(critical|danger|warning|success|information)$/ },
7
- ...['critical', 'danger', 'warning', 'success', 'information'].map((t) => `bg-${t}/10`),
8
- // Classes emitted from fx-ui component TypeScript (not scannable content):
9
- 'text-text-secondary',
10
- 'text-text-primary',
11
- 'text-text-focus',
12
- 'bg-bg-hover',
13
- 'bg-text-primary',
14
- 'hover:bg-gradient-primary-start/10',
15
- 'hover:text-gradient-primary-start',
16
- 'hover:opacity-50',
17
- 'font-mono',
18
- 'break-all',
19
- ],
20
- theme: {
21
- extend: {
22
- colors: {
23
- 'gradient-primary-start': 'rgb(var(--gradient-primary-start) / <alpha-value>)',
24
- 'gradient-primary-end': 'rgb(var(--gradient-primary-end) / <alpha-value>)',
25
- 'gradient-success-start': 'rgb(var(--gradient-success-start) / <alpha-value>)',
26
- 'gradient-success-end': 'rgb(var(--gradient-success-end) / <alpha-value>)',
27
- primary: 'rgb(var(--primary) / <alpha-value>)',
28
- success: 'rgb(var(--success) / <alpha-value>)',
29
- danger: 'rgb(var(--danger) / <alpha-value>)',
30
- warning: 'rgb(var(--warning) / <alpha-value>)',
31
- critical: 'rgb(var(--critical) / <alpha-value>)',
32
- discovery: 'rgb(var(--discovery) / <alpha-value>)',
33
- information: 'rgb(var(--information) / <alpha-value>)',
34
- bg: {
35
- primary: 'rgb(var(--bg-primary) / <alpha-value>)',
36
- canvas: 'rgb(var(--bg-canvas) / <alpha-value>)',
37
- hover: 'rgb(var(--bg-primary-hover) / <alpha-value>)',
38
- error: 'rgb(var(--bg-error-bold) / <alpha-value>)',
39
- hover2: 'rgb(var(--bg-secondary-hover) / <alpha-value>)',
40
- },
41
- text: {
42
- primary: 'rgb(var(--text-primary) / <alpha-value>)',
43
- secondary: 'rgb(var(--text-secondary) / <alpha-value>)',
44
- placeholder: 'rgb(var(--text-placeholder) / <alpha-value>)',
45
- selected: 'rgb(var(--text-selected-primary) / <alpha-value>)',
46
- focus: 'rgb(var(--text-focus) / <alpha-value>)',
47
- inverse: 'rgb(var(--text-inverse) / <alpha-value>)',
48
- error: 'rgb(var(--text-error) / <alpha-value>)',
49
- link: 'rgb(var(--text-link-primary) / <alpha-value>)',
50
- },
51
- border: {
52
- default: 'rgb(var(--border-default) / <alpha-value>)',
53
- interactive: 'rgb(var(--border-interactive) / <alpha-value>)',
54
- selected: 'rgb(var(--border-selected) / <alpha-value>)',
55
- strong: 'rgb(var(--border-strong) / <alpha-value>)',
56
- hover2: 'rgb(var(--border-secondary-hover) / <alpha-value>)'
57
- },
58
- button: {
59
- default: 'rgb(var(--button-default) / <alpha-value>)',
60
- primary: 'rgb(var(--button-primary) / <alpha-value>)',
61
- },
62
- },
63
- backgroundImage: {
64
- 'gradient-primary':
65
- 'linear-gradient(135deg, rgb(var(--gradient-primary-start)) 0%, rgb(var(--gradient-primary-end)) 100%)',
66
- 'gradient-success':
67
- 'linear-gradient(135deg, rgb(var(--gradient-success-start)) 0%, rgb(var(--gradient-success-end)) 100%)',
68
- },
69
- screens: {
70
- sm: '480px',
71
- md: '720px',
72
- lg: '1080px',
73
- xl: '1920px'
74
- },
75
- boxShadow: {
76
- sm: '0 1px 2px 0 rgb(var(--shadow-color) / 0.05)',
77
- DEFAULT: '0 1px 3px 0 rgb(var(--shadow-color) / 0.1), 0 1px 2px -1px rgb(var(--shadow-color) / 0.1)',
78
- md: '0 4px 6px -1px rgb(var(--shadow-color) / 0.1), 0 2px 4px -2px rgb(var(--shadow-color) / 0.1)',
79
- lg: '0 10px 15px -3px rgb(var(--shadow-color) / 0.1), 0 4px 6px -4px rgb(var(--shadow-color) / 0.1)',
80
- xl: '0 20px 25px -5px rgb(var(--shadow-color) / 0.1), 0 10px 10px -5px rgb(var(--shadow-color) / 0.1)',
81
- '2xl': '0 25px 50px -12px rgb(var(--shadow-color) / 0.25)',
82
- inner: 'inset 0 2px 4px 0 rgb(var(--shadow-color) / 0.05)',
83
- },
84
- spacing: {
85
- xs: '0.125rem',
86
- small: '0.25rem',
87
- normal: '0.5rem',
88
- semi: '0.75rem',
89
- large: '1rem',
90
- xl: '1.25rem',
91
- '2xl': '1.5rem',
92
- },
93
- fontFamily:{
94
- spmono: ['SpaceMonoRegular', 'monospace'],
95
- dmsans: ['DMSans', 'sans-serif'],
96
- orbitron: ['Orbitron', 'sans-serif'],
97
- bevn: ['BeVietnamPro', 'sans-serif'],
98
- roboto: ['Roboto', 'sans-serif'],
99
- },
100
- fontSize: {
101
- xs: '0.75rem',
102
- sm: '0.875rem',
103
- base: '1rem',
104
- xl: '1.25rem',
105
- '2xl': '1.625rem',
106
- '3xl': '2rem',
107
- '4xl': '2.25rem',
108
- '5xl': '3rem',
109
- }
110
- },
111
- },
112
- plugins: [],
113
- };