@zambon-dev/ui 0.0.0-stage → 0.0.1-bootstrap.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/CHANGELOG.md +2325 -0
- package/README.md +81 -3
- package/fesm2022/zambon-dev-ui-framework.mjs +3997 -0
- package/fesm2022/zambon-dev-ui-framework.mjs.map +1 -0
- package/fesm2022/zambon-dev-ui-library.mjs +4280 -0
- package/fesm2022/zambon-dev-ui-library.mjs.map +1 -0
- package/fesm2022/zambon-dev-ui-shared.mjs +1802 -0
- package/fesm2022/zambon-dev-ui-shared.mjs.map +1 -0
- package/fesm2022/zambon-dev-ui-testing.mjs +80 -0
- package/fesm2022/zambon-dev-ui-testing.mjs.map +1 -0
- package/fesm2022/zambon-dev-ui.mjs +8 -0
- package/fesm2022/zambon-dev-ui.mjs.map +1 -0
- package/i18n/framework/en.json +63 -0
- package/i18n/framework/pt.json +63 -0
- package/i18n/shared/external-content/en.json +12 -0
- package/i18n/shared/external-content/pt.json +12 -0
- package/i18n/shared/language-selector/en.json +5 -0
- package/i18n/shared/language-selector/pt.json +5 -0
- package/i18n/shared/login/en.json +14 -0
- package/i18n/shared/login/pt.json +14 -0
- package/i18n/shared/operations-history/en.json +5 -0
- package/i18n/shared/operations-history/pt.json +5 -0
- package/i18n/shared/services-history/en.json +14 -0
- package/i18n/shared/services-history/pt.json +14 -0
- package/i18n/shared/top-bar/en.json +7 -0
- package/i18n/shared/top-bar/pt.json +7 -0
- package/package.json +106 -4
- package/styles/common.scss +10 -0
- package/styles/components/button.scss +101 -0
- package/styles/components/card.scss +13 -0
- package/styles/components/dropdown-static.scss +35 -0
- package/styles/components/input-group.scss +44 -0
- package/styles/components/input.scss +99 -0
- package/styles/components/label.scss +3 -0
- package/styles/components/row.scss +48 -0
- package/styles/mixins/background.scss +31 -0
- package/styles/theme.css +75 -0
- package/styles/variables.scss +60 -0
- package/types/zambon-dev-ui-framework.d.ts +1066 -0
- package/types/zambon-dev-ui-library.d.ts +1233 -0
- package/types/zambon-dev-ui-shared.d.ts +655 -0
- package/types/zambon-dev-ui-testing.d.ts +56 -0
- package/types/zambon-dev-ui.d.ts +3 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@mixin fixed-background($image, $color) {
|
|
2
|
+
@apply fixed -z-50 w-full h-screen;
|
|
3
|
+
|
|
4
|
+
@include background($image, $color);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@mixin background($image, $color) {
|
|
8
|
+
@apply overflow-hidden;
|
|
9
|
+
|
|
10
|
+
&,
|
|
11
|
+
&:before {
|
|
12
|
+
@apply bg-[url(#{$image})] bg-fixed bg-cover;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&:before,
|
|
16
|
+
&:after {
|
|
17
|
+
@apply content-[''] absolute inset-0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&:before {
|
|
21
|
+
@apply blur-sm;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&:after {
|
|
25
|
+
@apply #{$color};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
* {
|
|
29
|
+
@apply z-10;
|
|
30
|
+
}
|
|
31
|
+
}
|
package/styles/theme.css
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The Tailwind entry point and the design tokens built on top of it.
|
|
3
|
+
*
|
|
4
|
+
* Tailwind 4 has no JavaScript config: the theme is CSS custom properties declared in `@theme`,
|
|
5
|
+
* and every one of them doubles as a utility. `--color-primary-600` both defines the token and
|
|
6
|
+
* creates `bg-primary-600`, `text-primary-600` and the rest, which is why the palette that used to
|
|
7
|
+
* live in `tailwind.config.js` lives here now.
|
|
8
|
+
*
|
|
9
|
+
* Two kinds of file consume this:
|
|
10
|
+
*
|
|
11
|
+
* An application's global stylesheet imports it, and gets the framework plus the theme:
|
|
12
|
+
* @import '@zambon-dev/shared/styles/theme.css';
|
|
13
|
+
*
|
|
14
|
+
* A stylesheet that only uses `@apply` references it, and gets the theme without emitting the
|
|
15
|
+
* framework a second time:
|
|
16
|
+
* @reference '@zambon-dev/shared/styles/theme.css';
|
|
17
|
+
*
|
|
18
|
+
* That split is new in 4. In 3 the PostCSS plugin carried the config to every file it processed,
|
|
19
|
+
* so `@apply` worked anywhere; in 4 a file is on its own unless it says where its theme comes from.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/*
|
|
23
|
+
* `theme(static)` emits every theme variable, not only the ones this file is seen to use.
|
|
24
|
+
* Tailwind 4 prunes unused ones, and the design tokens in variables.scss reference the palette
|
|
25
|
+
* through `var(--color-gray-100)` from a different file -- which the pruner cannot see. Without
|
|
26
|
+
* this, those variables resolve to nothing: the sidebar text lost its colour and --app-backdrop's
|
|
27
|
+
* gradient became invalid and disappeared.
|
|
28
|
+
*/
|
|
29
|
+
@import 'tailwindcss' theme(static);
|
|
30
|
+
|
|
31
|
+
@plugin '@tailwindcss/forms';
|
|
32
|
+
|
|
33
|
+
/*
|
|
34
|
+
* Tailwind 4 changed the default border colour from `gray-200` to `currentColor`, so every element
|
|
35
|
+
* with a border and no colour of its own inherits the text colour. Across the Storybooks that was
|
|
36
|
+
* 615 elements going from a light grey hairline to solid black -- a change nothing in the build
|
|
37
|
+
* reports, which is the case tools/style-snapshot exists to catch.
|
|
38
|
+
*
|
|
39
|
+
* This restores the 3.x default. Removing it is a deliberate visual decision, not a cleanup: it
|
|
40
|
+
* means auditing every bordered element for one that was relying on the old default.
|
|
41
|
+
*/
|
|
42
|
+
@layer base {
|
|
43
|
+
*,
|
|
44
|
+
::after,
|
|
45
|
+
::before,
|
|
46
|
+
::backdrop,
|
|
47
|
+
::file-selector-button {
|
|
48
|
+
border-color: var(--color-gray-200, currentColor);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/*
|
|
53
|
+
* Tailwind 4 dropped the preflight rule that gave buttons a pointer cursor; the base reset now
|
|
54
|
+
* leaves them on the browser default. Restored, because every button in these libraries relied on
|
|
55
|
+
* it -- 41 elements across the Storybooks lost their pointer.
|
|
56
|
+
*/
|
|
57
|
+
@layer base {
|
|
58
|
+
button:not(:disabled),
|
|
59
|
+
[role='button']:not(:disabled) {
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@theme {
|
|
65
|
+
--color-primary-50: #e6f4ff;
|
|
66
|
+
--color-primary-100: #9acaed;
|
|
67
|
+
--color-primary-200: #59a5db;
|
|
68
|
+
--color-primary-300: #2585c8;
|
|
69
|
+
--color-primary-400: #006bb6;
|
|
70
|
+
--color-primary-500: #005794;
|
|
71
|
+
--color-primary-600: #004372;
|
|
72
|
+
--color-primary-700: #002f50;
|
|
73
|
+
--color-primary-800: #001b2f;
|
|
74
|
+
--color-primary-900: #00070d;
|
|
75
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
/* Dimensions */
|
|
3
|
+
--sidebar-animation-duration: 600ms;
|
|
4
|
+
--sidebar-collapsed-width: 70px;
|
|
5
|
+
--sidebar-expanded-width: 220px;
|
|
6
|
+
--sidebar-icon-collapsed-margin: 10px;
|
|
7
|
+
--sidebar-item-height: 2.75rem;
|
|
8
|
+
--sidebar-logo-height: 50px;
|
|
9
|
+
--sidebar-picture-size: 50px;
|
|
10
|
+
|
|
11
|
+
/* Surfaces & colors — translucent "glass" (brand-tinted) */
|
|
12
|
+
--sidebar-bg: color-mix(in srgb, var(--color-primary-600) 82%, transparent);
|
|
13
|
+
--sidebar-nav-bg: color-mix(in srgb, white 5%, transparent);
|
|
14
|
+
--sidebar-text: var(--color-gray-100);
|
|
15
|
+
--sidebar-text-muted: color-mix(in srgb, var(--color-gray-100) 60%, transparent);
|
|
16
|
+
--sidebar-item-hover-bg: color-mix(in srgb, white 12%, transparent);
|
|
17
|
+
--sidebar-item-selected-bg: color-mix(in srgb, white 22%, transparent);
|
|
18
|
+
--sidebar-item-selected-text: var(--color-white);
|
|
19
|
+
--sidebar-accent: var(--color-gray-100);
|
|
20
|
+
--sidebar-tree-line: color-mix(in srgb, white 80%, var(--color-primary-600));
|
|
21
|
+
|
|
22
|
+
/* Glass */
|
|
23
|
+
--sidebar-blur: 16px;
|
|
24
|
+
--sidebar-shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.45);
|
|
25
|
+
/* App background the glass sidebar floats over (tune to taste). */
|
|
26
|
+
--app-backdrop: linear-gradient(160deg, var(--color-gray-100) 0%, var(--color-gray-300) 100%);
|
|
27
|
+
|
|
28
|
+
/* Radii (rounded restyle) */
|
|
29
|
+
--sidebar-radius: 1.25rem;
|
|
30
|
+
--sidebar-item-radius: 10px;
|
|
31
|
+
|
|
32
|
+
/* Tabs — a light glass card the views live in. The sidebar's glass is brand-tinted
|
|
33
|
+
and dark; this one is white-tinted, because the panel holds forms and grids that
|
|
34
|
+
need dark-on-light contrast. Same language (blur, radius, shadow), different hue. */
|
|
35
|
+
--tabs-item-bg: color-mix(in srgb, white 45%, transparent);
|
|
36
|
+
--tabs-item-hover-bg: color-mix(in srgb, white 70%, transparent);
|
|
37
|
+
--tabs-item-active-bg: color-mix(in srgb, white 88%, transparent);
|
|
38
|
+
--tabs-item-text: var(--color-gray-600);
|
|
39
|
+
--tabs-item-active-text: var(--color-gray-900);
|
|
40
|
+
--tabs-content-bg: color-mix(in srgb, white 88%, transparent);
|
|
41
|
+
--tabs-border: color-mix(in srgb, white 60%, transparent);
|
|
42
|
+
--tabs-close: var(--color-gray-400);
|
|
43
|
+
--tabs-close-hover-bg: color-mix(in srgb, var(--color-gray-900) 10%, transparent);
|
|
44
|
+
--tabs-close-hover: var(--color-gray-700);
|
|
45
|
+
|
|
46
|
+
/* Glass — softer than the sidebar's, which floats over the backdrop rather than content. */
|
|
47
|
+
--tabs-blur: 16px;
|
|
48
|
+
--tabs-shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.25);
|
|
49
|
+
|
|
50
|
+
/* Radii & dimensions */
|
|
51
|
+
--tabs-radius: 1.25rem;
|
|
52
|
+
--tabs-item-radius: 10px;
|
|
53
|
+
--tabs-height: 2.75rem;
|
|
54
|
+
--tabs-item-max-width: 14rem;
|
|
55
|
+
/* Tabs compress to this before the strip starts scrolling -- still wide enough for a few
|
|
56
|
+
characters plus the close button, so a compressed tab is identifiable rather than a stub. */
|
|
57
|
+
--tabs-item-min-width: 7rem;
|
|
58
|
+
--tabs-scroll-width: 1.75rem;
|
|
59
|
+
--tabs-fade-width: 1.5rem;
|
|
60
|
+
}
|