@besaitech/ng-design-system 0.0.11

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/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@besaitech/ng-design-system",
3
+ "version": "0.0.11",
4
+ "publishConfig": {
5
+ "registry": "https://registry.npmjs.org/",
6
+ "access": "public"
7
+ },
8
+ "peerDependencies": {
9
+ "@angular/common": "^20.3.0 || ^21.0.0 || ^22.0.0",
10
+ "@angular/core": "^20.3.0 || ^21.0.0 || ^22.0.0",
11
+ "@angular/forms": "^20.3.0 || ^21.0.0 || ^22.0.0",
12
+ "@angular/platform-browser": "^20.3.0 || ^21.0.0 || ^22.0.0",
13
+ "@angular/router": "^20.3.0 || ^21.0.0 || ^22.0.0"
14
+ },
15
+ "dependencies": {
16
+ "tslib": "^2.3.0"
17
+ },
18
+ "sideEffects": false,
19
+ "exports": {
20
+ "./preflight.css": {
21
+ "default": "./preflight.css"
22
+ },
23
+ "./themes/*": {
24
+ "default": "./themes/*"
25
+ },
26
+ "./package.json": {
27
+ "default": "./package.json"
28
+ },
29
+ ".": {
30
+ "types": "./index.d.ts",
31
+ "default": "./fesm2022/besaitech-ng-design-system.mjs"
32
+ }
33
+ },
34
+ "module": "fesm2022/besaitech-ng-design-system.mjs",
35
+ "typings": "index.d.ts"
36
+ }
package/preflight.css ADDED
@@ -0,0 +1,113 @@
1
+ /*
2
+ * @besaitech/ng-design-system — scoped Preflight
3
+ * ------------------------------------------------------------------
4
+ * The library's components are authored against Tailwind's Preflight
5
+ * (its base reset). Apps that don't load Preflight — e.g. because they
6
+ * also use another global design system (@stlucdesign/saint-luc-design-system)
7
+ * and only import `tailwindcss/utilities` — leave the components exposed to
8
+ * that other system's bare-element rules (button fonts, `ul{list-style}`,
9
+ * `li{margin}`, heading styles, …).
10
+ *
11
+ * Import this file into a cascade layer that sits ABOVE the legacy design
12
+ * system but BELOW Tailwind's `utilities` layer, e.g.:
13
+ *
14
+ * @layer legacy, ng-design-system-base, theme, utilities;
15
+ * @import '@stlucdesign/saint-luc-design-system/style.css' layer(legacy);
16
+ * @import '@besaitech/ng-design-system/preflight.css' layer(ng-design-system-base);
17
+ * @import 'tailwindcss/theme' layer(theme);
18
+ * @import 'tailwindcss/utilities' layer(utilities);
19
+ *
20
+ * Every rule is scoped to the `sds-*` component subtree, so it never touches
21
+ * the host app's own elements. Because it lives below `utilities`, the
22
+ * components' own utility classes always win — this only neutralises styles
23
+ * the components don't set themselves.
24
+ */
25
+
26
+ :where(
27
+ sds-icon, sds-button, sds-input, sds-textarea, sds-toggle-switch, sds-avatar,
28
+ sds-badge, sds-card, sds-calendar, sds-date-picker, sds-select, sds-multi-select,
29
+ sds-phone-input, sds-paginator, sds-tabs, sds-tab-list, sds-tab, sds-tab-panels,
30
+ sds-tab-panel, sds-accordion, sds-accordion-panel, sds-accordion-header,
31
+ sds-accordion-content, sds-table, sds-table-cell, sds-table-row-expansion,
32
+ sds-topbar, sds-shell, sds-sidebar, sds-nav-group, sds-nav-item,
33
+ /*
34
+ * Overlay panels (dropdown lists, country picker) are relocated to
35
+ * <body> while open, so they're no longer inside an sds-* element. Scope
36
+ * them by their markers so the reset still reaches their <ul>/<li>/buttons.
37
+ * The date-picker overlay wraps <sds-calendar> (already covered above).
38
+ */
39
+ [data-sds-select-panel], [data-sds-phone-panel]
40
+ ) {
41
+ /* Box model + typography baseline for everything inside a component.
42
+ `border: 0 solid` mirrors Tailwind Preflight: components add borders via
43
+ utilities, so this strips the legacy `input{border:…}` from native controls. */
44
+ & :where(*, *::before, *::after) {
45
+ box-sizing: border-box;
46
+ border: 0 solid;
47
+ font-family: var(--font-sans, ui-sans-serif, system-ui, -apple-system, sans-serif);
48
+ }
49
+
50
+ /* Headings: neutralise size/weight/spacing so component utilities define them. */
51
+ & :where(h1, h2, h3, h4, h5, h6) {
52
+ font-size: inherit;
53
+ font-weight: inherit;
54
+ line-height: inherit;
55
+ margin: 0;
56
+ }
57
+
58
+ /* Block text. */
59
+ & :where(p, figure, blockquote, dl, dd) {
60
+ margin: 0;
61
+ }
62
+
63
+ /* Lists: strip bullets and default spacing (counters ul{list-style:disc}, li{margin}). */
64
+ & :where(ul, ol) {
65
+ list-style: none;
66
+ margin: 0;
67
+ padding: 0;
68
+ }
69
+ & :where(li) {
70
+ margin: 0;
71
+ }
72
+
73
+ /* Form controls: inherit typography instead of the host's button/input rules. */
74
+ & :where(button, input, optgroup, select, textarea) {
75
+ font: inherit;
76
+ color: inherit;
77
+ letter-spacing: inherit;
78
+ }
79
+ & :where(button) {
80
+ background: none;
81
+ border: 0;
82
+ margin: 0;
83
+ padding: 0;
84
+ cursor: pointer;
85
+ }
86
+
87
+ /* Links. */
88
+ & :where(a) {
89
+ color: inherit;
90
+ text-decoration: inherit;
91
+ }
92
+
93
+ /* Media. */
94
+ & :where(img, svg, video, canvas) {
95
+ display: block;
96
+ vertical-align: middle;
97
+ }
98
+ }
99
+
100
+ /*
101
+ * sds-icon renders line icons as inline SVG with `fill="none"` and
102
+ * `stroke="currentColor"` set as *attributes*. A host `svg { fill: currentColor }`
103
+ * rule (e.g. from @stlucdesign/saint-luc-design-system) overrides those attributes
104
+ * and flood-fills every icon. Re-assert them here. Anchored on `sds-icon` so it also
105
+ * covers icons inside body-relocated overlay panels. Inner shapes that opt into a
106
+ * fill via their own `fill="currentColor"` attribute (e.g. dots) are unaffected.
107
+ */
108
+ :where(sds-icon) svg {
109
+ width: 100%;
110
+ height: 100%;
111
+ fill: none;
112
+ stroke: currentColor;
113
+ }
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Belvigo theme — a black brand ramp.
3
+ *
4
+ * Same token contract as `saitech.css`; only the eleven brand steps differ, so every `sds-*` component
5
+ * re-brands without a single component change. That is the whole point of the ramp being tokens: the
6
+ * library never names a colour, it names a ROLE, and the role is filled here.
7
+ *
8
+ * The steps are not a generic grey scale — each one is pinned to the job the library gives it:
9
+ *
10
+ * 500 active nav highlight — must read as "selected" against a white sidebar, so mid-grey, not black
11
+ * 600 primary button — near-black, the CTA
12
+ * 700 top bar base
13
+ * 900 sidebar background
14
+ *
15
+ * 950 is true #000. Reserve it for deliberate full-black surfaces; using it for text or a CTA leaves no
16
+ * darker step for hover, which is why 600 rather than 950 is the button.
17
+ *
18
+ * Import AFTER `@import "tailwindcss"`:
19
+ *
20
+ * @import "tailwindcss";
21
+ * @source "../node_modules/@besaitech/ng-design-system";
22
+ * @import "@besaitech/ng-design-system/themes/belvigo.css";
23
+ */
24
+ @theme {
25
+ /* Brand blacks */
26
+ --color-brand-50: #fafafa;
27
+ --color-brand-100: #f4f4f5;
28
+ --color-brand-200: #e4e4e7;
29
+ --color-brand-300: #d4d4d8;
30
+ --color-brand-400: #a1a1aa;
31
+ --color-brand-500: #52525b; /* active nav highlight */
32
+ --color-brand-600: #27272a; /* primary button */
33
+ --color-brand-700: #18181b; /* top bar base */
34
+ --color-brand-800: #131316;
35
+ --color-brand-900: #0a0a0b; /* sidebar background */
36
+ --color-brand-950: #000000;
37
+ }
@@ -0,0 +1,28 @@
1
+ /*
2
+ * Saitech theme — the library's original brand blues (StaffKit / Cliniques universitaires Saint-Luc).
3
+ *
4
+ * This file is the DEFAULT look every consumer got before themes existed, extracted verbatim so that
5
+ * adding a second brand could not change the first one. If you are looking for the values that used to
6
+ * live in the showcase's own `styles.css`, they are here.
7
+ *
8
+ * Import AFTER `@import "tailwindcss"` — Tailwind v4 processes `@theme` in imported files, and later
9
+ * declarations win:
10
+ *
11
+ * @import "tailwindcss";
12
+ * @source "../node_modules/@besaitech/ng-design-system";
13
+ * @import "@besaitech/ng-design-system/themes/saitech.css";
14
+ */
15
+ @theme {
16
+ /* Brand blues */
17
+ --color-brand-50: #eef3fb;
18
+ --color-brand-100: #d7e3f6;
19
+ --color-brand-200: #aec6ee;
20
+ --color-brand-300: #7ba3e2;
21
+ --color-brand-400: #4f81d6;
22
+ --color-brand-500: #2f6bd4; /* active nav highlight */
23
+ --color-brand-600: #2456a6; /* primary button */
24
+ --color-brand-700: #1b4498; /* top bar base */
25
+ --color-brand-800: #14387f;
26
+ --color-brand-900: #0f2452; /* sidebar background */
27
+ --color-brand-950: #0a1a3d;
28
+ }