@besaitech/ng-design-system 0.0.11 → 0.0.16
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/README.md +8 -11
- package/fesm2022/besaitech-ng-design-system.mjs +46 -4
- package/fesm2022/besaitech-ng-design-system.mjs.map +1 -1
- package/index.d.ts +23 -7
- package/package.json +1 -4
- package/themes/base.css +66 -0
- package/themes/saitech.css +1 -1
- package/preflight.css +0 -113
package/index.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ declare const SDS_ICONS: {
|
|
|
57
57
|
readonly filter: "<polygon points=\"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3\"/>";
|
|
58
58
|
readonly table: "<path d=\"M12 3v18\"/><rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\"/><path d=\"M3 9h18\"/><path d=\"M3 15h18\"/>";
|
|
59
59
|
readonly eye: "<path d=\"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/>";
|
|
60
|
+
readonly 'eye-off': "<path d=\"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68\"/><path d=\"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61\"/><path d=\"m2 2 20 20\"/><path d=\"M14.12 14.12a3 3 0 1 1-4.24-4.24\"/>";
|
|
60
61
|
readonly user: "<path d=\"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2\"/><circle cx=\"12\" cy=\"7\" r=\"4\"/>";
|
|
61
62
|
readonly 'check-circle': "<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"m9 12 2 2 4-4\"/>";
|
|
62
63
|
readonly 'arrows-clockwise': "<path d=\"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8\"/><path d=\"M21 3v5h-5\"/><path d=\"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16\"/><path d=\"M3 21v-5h5\"/>";
|
|
@@ -82,7 +83,7 @@ type SdsIconSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
|
82
83
|
declare class SdsIcon {
|
|
83
84
|
private readonly sanitizer;
|
|
84
85
|
/** Icon identifier from the registry. */
|
|
85
|
-
readonly name: _angular_core.InputSignal<"home" | "user-plus" | "hand" | "users" | "building-2" | "package" | "package-plus" | "package-open" | "rotate-ccw" | "bar-chart-3" | "search" | "log-out" | "panel-left-close" | "panel-left-open" | "panel-left" | "calendar" | "chevron-right" | "chevron-left" | "chevron-down" | "chevrons-left" | "chevrons-right" | "x" | "check" | "alert-circle" | "info" | "copy" | "type" | "tag" | "square" | "circle-user" | "layout-grid" | "panels-top-left" | "panel-top" | "rows-3" | "book-open" | "palette" | "bell" | "phone" | "settings" | "align-left" | "toggle-left" | "arrow-up" | "arrow-down" | "chevrons-up-down" | "filter" | "table" | "eye" | "user" | "check-circle" | "arrows-clockwise" | "menu" | "file-text" | "hash" | "map-pin" | "inbox" | "arrow-right" | "refresh-cw" | "loader-circle">;
|
|
86
|
+
readonly name: _angular_core.InputSignal<"home" | "user-plus" | "hand" | "users" | "building-2" | "package" | "package-plus" | "package-open" | "rotate-ccw" | "bar-chart-3" | "search" | "log-out" | "panel-left-close" | "panel-left-open" | "panel-left" | "calendar" | "chevron-right" | "chevron-left" | "chevron-down" | "chevrons-left" | "chevrons-right" | "x" | "check" | "alert-circle" | "info" | "copy" | "type" | "tag" | "square" | "circle-user" | "layout-grid" | "panels-top-left" | "panel-top" | "rows-3" | "book-open" | "palette" | "bell" | "phone" | "settings" | "align-left" | "toggle-left" | "arrow-up" | "arrow-down" | "chevrons-up-down" | "filter" | "table" | "eye" | "eye-off" | "user" | "check-circle" | "arrows-clockwise" | "menu" | "file-text" | "hash" | "map-pin" | "inbox" | "arrow-right" | "refresh-cw" | "loader-circle">;
|
|
86
87
|
/** Square size: a pixel number, a numeric string, or a keyword (sm·md·lg·xl). */
|
|
87
88
|
readonly size: _angular_core.InputSignalWithTransform<number, string | number>;
|
|
88
89
|
/** Stroke width of the line icon. */
|
|
@@ -143,8 +144,23 @@ declare class SdsInput implements ControlValueAccessor {
|
|
|
143
144
|
readonly appearance: _angular_core.InputSignal<SdsInputAppearance>;
|
|
144
145
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
145
146
|
readonly clearable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
146
|
-
readonly leadingIcon: _angular_core.InputSignal<"home" | "user-plus" | "hand" | "users" | "building-2" | "package" | "package-plus" | "package-open" | "rotate-ccw" | "bar-chart-3" | "search" | "log-out" | "panel-left-close" | "panel-left-open" | "panel-left" | "calendar" | "chevron-right" | "chevron-left" | "chevron-down" | "chevrons-left" | "chevrons-right" | "x" | "check" | "alert-circle" | "info" | "copy" | "type" | "tag" | "square" | "circle-user" | "layout-grid" | "panels-top-left" | "panel-top" | "rows-3" | "book-open" | "palette" | "bell" | "phone" | "settings" | "align-left" | "toggle-left" | "arrow-up" | "arrow-down" | "chevrons-up-down" | "filter" | "table" | "eye" | "user" | "check-circle" | "arrows-clockwise" | "menu" | "file-text" | "hash" | "map-pin" | "inbox" | "arrow-right" | "refresh-cw" | "loader-circle" | null>;
|
|
147
|
-
readonly trailingIcon: _angular_core.InputSignal<"home" | "user-plus" | "hand" | "users" | "building-2" | "package" | "package-plus" | "package-open" | "rotate-ccw" | "bar-chart-3" | "search" | "log-out" | "panel-left-close" | "panel-left-open" | "panel-left" | "calendar" | "chevron-right" | "chevron-left" | "chevron-down" | "chevrons-left" | "chevrons-right" | "x" | "check" | "alert-circle" | "info" | "copy" | "type" | "tag" | "square" | "circle-user" | "layout-grid" | "panels-top-left" | "panel-top" | "rows-3" | "book-open" | "palette" | "bell" | "phone" | "settings" | "align-left" | "toggle-left" | "arrow-up" | "arrow-down" | "chevrons-up-down" | "filter" | "table" | "eye" | "user" | "check-circle" | "arrows-clockwise" | "menu" | "file-text" | "hash" | "map-pin" | "inbox" | "arrow-right" | "refresh-cw" | "loader-circle" | null>;
|
|
147
|
+
readonly leadingIcon: _angular_core.InputSignal<"home" | "user-plus" | "hand" | "users" | "building-2" | "package" | "package-plus" | "package-open" | "rotate-ccw" | "bar-chart-3" | "search" | "log-out" | "panel-left-close" | "panel-left-open" | "panel-left" | "calendar" | "chevron-right" | "chevron-left" | "chevron-down" | "chevrons-left" | "chevrons-right" | "x" | "check" | "alert-circle" | "info" | "copy" | "type" | "tag" | "square" | "circle-user" | "layout-grid" | "panels-top-left" | "panel-top" | "rows-3" | "book-open" | "palette" | "bell" | "phone" | "settings" | "align-left" | "toggle-left" | "arrow-up" | "arrow-down" | "chevrons-up-down" | "filter" | "table" | "eye" | "eye-off" | "user" | "check-circle" | "arrows-clockwise" | "menu" | "file-text" | "hash" | "map-pin" | "inbox" | "arrow-right" | "refresh-cw" | "loader-circle" | null>;
|
|
148
|
+
readonly trailingIcon: _angular_core.InputSignal<"home" | "user-plus" | "hand" | "users" | "building-2" | "package" | "package-plus" | "package-open" | "rotate-ccw" | "bar-chart-3" | "search" | "log-out" | "panel-left-close" | "panel-left-open" | "panel-left" | "calendar" | "chevron-right" | "chevron-left" | "chevron-down" | "chevrons-left" | "chevrons-right" | "x" | "check" | "alert-circle" | "info" | "copy" | "type" | "tag" | "square" | "circle-user" | "layout-grid" | "panels-top-left" | "panel-top" | "rows-3" | "book-open" | "palette" | "bell" | "phone" | "settings" | "align-left" | "toggle-left" | "arrow-up" | "arrow-down" | "chevrons-up-down" | "filter" | "table" | "eye" | "eye-off" | "user" | "check-circle" | "arrows-clockwise" | "menu" | "file-text" | "hash" | "map-pin" | "inbox" | "arrow-right" | "refresh-cw" | "loader-circle" | null>;
|
|
149
|
+
/**
|
|
150
|
+
* A CLICKABLE trailing icon, for the affordances that belong to the field itself — password reveal
|
|
151
|
+
* above all. Distinct from {@link trailingIcon}, which is decorative and explicitly
|
|
152
|
+
* `pointer-events-none`; a consumer who needed a working control previously had to abandon
|
|
153
|
+
* `sds-input` and rebuild the whole field, losing the label/error/aria wiring with it.
|
|
154
|
+
*
|
|
155
|
+
* Always pair it with {@link trailingActionLabel} — an icon-only button with no accessible name is
|
|
156
|
+
* unusable by a screen reader. For a toggle, also bind {@link trailingActionPressed}.
|
|
157
|
+
*/
|
|
158
|
+
readonly trailingAction: _angular_core.InputSignal<"home" | "user-plus" | "hand" | "users" | "building-2" | "package" | "package-plus" | "package-open" | "rotate-ccw" | "bar-chart-3" | "search" | "log-out" | "panel-left-close" | "panel-left-open" | "panel-left" | "calendar" | "chevron-right" | "chevron-left" | "chevron-down" | "chevrons-left" | "chevrons-right" | "x" | "check" | "alert-circle" | "info" | "copy" | "type" | "tag" | "square" | "circle-user" | "layout-grid" | "panels-top-left" | "panel-top" | "rows-3" | "book-open" | "palette" | "bell" | "phone" | "settings" | "align-left" | "toggle-left" | "arrow-up" | "arrow-down" | "chevrons-up-down" | "filter" | "table" | "eye" | "eye-off" | "user" | "check-circle" | "arrows-clockwise" | "menu" | "file-text" | "hash" | "map-pin" | "inbox" | "arrow-right" | "refresh-cw" | "loader-circle" | null>;
|
|
159
|
+
/** Accessible name for {@link trailingAction}. Translate it in the consuming app. */
|
|
160
|
+
readonly trailingActionLabel: _angular_core.InputSignal<string>;
|
|
161
|
+
/** `aria-pressed` for a toggling action (e.g. show/hide password). Null renders no attribute. */
|
|
162
|
+
readonly trailingActionPressed: _angular_core.InputSignal<boolean | null>;
|
|
163
|
+
readonly trailingActionClick: _angular_core.OutputEmitterRef<void>;
|
|
148
164
|
/** Current value (driven by CVA + user input). */
|
|
149
165
|
protected readonly value: _angular_core.WritableSignal<string>;
|
|
150
166
|
private readonly cvaDisabled;
|
|
@@ -162,7 +178,7 @@ declare class SdsInput implements ControlValueAccessor {
|
|
|
162
178
|
protected onInput(event: Event): void;
|
|
163
179
|
protected clear(): void;
|
|
164
180
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdsInput, never>;
|
|
165
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdsInput, "sds-input", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "leadingIcon": { "alias": "leadingIcon"; "required": false; "isSignal": true; }; "trailingIcon": { "alias": "trailingIcon"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
181
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdsInput, "sds-input", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "leadingIcon": { "alias": "leadingIcon"; "required": false; "isSignal": true; }; "trailingIcon": { "alias": "trailingIcon"; "required": false; "isSignal": true; }; "trailingAction": { "alias": "trailingAction"; "required": false; "isSignal": true; }; "trailingActionLabel": { "alias": "trailingActionLabel"; "required": false; "isSignal": true; }; "trailingActionPressed": { "alias": "trailingActionPressed"; "required": false; "isSignal": true; }; }, { "trailingActionClick": "trailingActionClick"; }, never, never, true, never>;
|
|
166
182
|
}
|
|
167
183
|
|
|
168
184
|
type SdsTextareaSize = 'sm' | 'md' | 'lg';
|
|
@@ -247,9 +263,9 @@ declare class SdsToggleSwitch implements ControlValueAccessor {
|
|
|
247
263
|
/** Value emitted/stored when the switch is off. */
|
|
248
264
|
readonly falseValue: _angular_core.InputSignal<unknown>;
|
|
249
265
|
/** Icon shown on the knob when checked. */
|
|
250
|
-
readonly onIcon: _angular_core.InputSignal<"home" | "user-plus" | "hand" | "users" | "building-2" | "package" | "package-plus" | "package-open" | "rotate-ccw" | "bar-chart-3" | "search" | "log-out" | "panel-left-close" | "panel-left-open" | "panel-left" | "calendar" | "chevron-right" | "chevron-left" | "chevron-down" | "chevrons-left" | "chevrons-right" | "x" | "check" | "alert-circle" | "info" | "copy" | "type" | "tag" | "square" | "circle-user" | "layout-grid" | "panels-top-left" | "panel-top" | "rows-3" | "book-open" | "palette" | "bell" | "phone" | "settings" | "align-left" | "toggle-left" | "arrow-up" | "arrow-down" | "chevrons-up-down" | "filter" | "table" | "eye" | "user" | "check-circle" | "arrows-clockwise" | "menu" | "file-text" | "hash" | "map-pin" | "inbox" | "arrow-right" | "refresh-cw" | "loader-circle" | null>;
|
|
266
|
+
readonly onIcon: _angular_core.InputSignal<"home" | "user-plus" | "hand" | "users" | "building-2" | "package" | "package-plus" | "package-open" | "rotate-ccw" | "bar-chart-3" | "search" | "log-out" | "panel-left-close" | "panel-left-open" | "panel-left" | "calendar" | "chevron-right" | "chevron-left" | "chevron-down" | "chevrons-left" | "chevrons-right" | "x" | "check" | "alert-circle" | "info" | "copy" | "type" | "tag" | "square" | "circle-user" | "layout-grid" | "panels-top-left" | "panel-top" | "rows-3" | "book-open" | "palette" | "bell" | "phone" | "settings" | "align-left" | "toggle-left" | "arrow-up" | "arrow-down" | "chevrons-up-down" | "filter" | "table" | "eye" | "eye-off" | "user" | "check-circle" | "arrows-clockwise" | "menu" | "file-text" | "hash" | "map-pin" | "inbox" | "arrow-right" | "refresh-cw" | "loader-circle" | null>;
|
|
251
267
|
/** Icon shown on the knob when unchecked. */
|
|
252
|
-
readonly offIcon: _angular_core.InputSignal<"home" | "user-plus" | "hand" | "users" | "building-2" | "package" | "package-plus" | "package-open" | "rotate-ccw" | "bar-chart-3" | "search" | "log-out" | "panel-left-close" | "panel-left-open" | "panel-left" | "calendar" | "chevron-right" | "chevron-left" | "chevron-down" | "chevrons-left" | "chevrons-right" | "x" | "check" | "alert-circle" | "info" | "copy" | "type" | "tag" | "square" | "circle-user" | "layout-grid" | "panels-top-left" | "panel-top" | "rows-3" | "book-open" | "palette" | "bell" | "phone" | "settings" | "align-left" | "toggle-left" | "arrow-up" | "arrow-down" | "chevrons-up-down" | "filter" | "table" | "eye" | "user" | "check-circle" | "arrows-clockwise" | "menu" | "file-text" | "hash" | "map-pin" | "inbox" | "arrow-right" | "refresh-cw" | "loader-circle" | null>;
|
|
268
|
+
readonly offIcon: _angular_core.InputSignal<"home" | "user-plus" | "hand" | "users" | "building-2" | "package" | "package-plus" | "package-open" | "rotate-ccw" | "bar-chart-3" | "search" | "log-out" | "panel-left-close" | "panel-left-open" | "panel-left" | "calendar" | "chevron-right" | "chevron-left" | "chevron-down" | "chevrons-left" | "chevrons-right" | "x" | "check" | "alert-circle" | "info" | "copy" | "type" | "tag" | "square" | "circle-user" | "layout-grid" | "panels-top-left" | "panel-top" | "rows-3" | "book-open" | "palette" | "bell" | "phone" | "settings" | "align-left" | "toggle-left" | "arrow-up" | "arrow-down" | "chevrons-up-down" | "filter" | "table" | "eye" | "eye-off" | "user" | "check-circle" | "arrows-clockwise" | "menu" | "file-text" | "hash" | "map-pin" | "inbox" | "arrow-right" | "refresh-cw" | "loader-circle" | null>;
|
|
253
269
|
readonly hint: _angular_core.InputSignal<string>;
|
|
254
270
|
readonly error: _angular_core.InputSignal<string>;
|
|
255
271
|
/**
|
|
@@ -1531,7 +1547,7 @@ declare class SdsNavGroup {
|
|
|
1531
1547
|
*/
|
|
1532
1548
|
declare class SdsNavItem {
|
|
1533
1549
|
protected readonly store: SidebarStore;
|
|
1534
|
-
readonly icon: _angular_core.InputSignal<"home" | "user-plus" | "hand" | "users" | "building-2" | "package" | "package-plus" | "package-open" | "rotate-ccw" | "bar-chart-3" | "search" | "log-out" | "panel-left-close" | "panel-left-open" | "panel-left" | "calendar" | "chevron-right" | "chevron-left" | "chevron-down" | "chevrons-left" | "chevrons-right" | "x" | "check" | "alert-circle" | "info" | "copy" | "type" | "tag" | "square" | "circle-user" | "layout-grid" | "panels-top-left" | "panel-top" | "rows-3" | "book-open" | "palette" | "bell" | "phone" | "settings" | "align-left" | "toggle-left" | "arrow-up" | "arrow-down" | "chevrons-up-down" | "filter" | "table" | "eye" | "user" | "check-circle" | "arrows-clockwise" | "menu" | "file-text" | "hash" | "map-pin" | "inbox" | "arrow-right" | "refresh-cw" | "loader-circle" | null>;
|
|
1550
|
+
readonly icon: _angular_core.InputSignal<"home" | "user-plus" | "hand" | "users" | "building-2" | "package" | "package-plus" | "package-open" | "rotate-ccw" | "bar-chart-3" | "search" | "log-out" | "panel-left-close" | "panel-left-open" | "panel-left" | "calendar" | "chevron-right" | "chevron-left" | "chevron-down" | "chevrons-left" | "chevrons-right" | "x" | "check" | "alert-circle" | "info" | "copy" | "type" | "tag" | "square" | "circle-user" | "layout-grid" | "panels-top-left" | "panel-top" | "rows-3" | "book-open" | "palette" | "bell" | "phone" | "settings" | "align-left" | "toggle-left" | "arrow-up" | "arrow-down" | "chevrons-up-down" | "filter" | "table" | "eye" | "eye-off" | "user" | "check-circle" | "arrows-clockwise" | "menu" | "file-text" | "hash" | "map-pin" | "inbox" | "arrow-right" | "refresh-cw" | "loader-circle" | null>;
|
|
1535
1551
|
readonly label: _angular_core.InputSignal<string>;
|
|
1536
1552
|
/** Router link target; when null, the item behaves as a button. */
|
|
1537
1553
|
readonly link: _angular_core.InputSignal<string | unknown[] | null>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@besaitech/ng-design-system",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.16",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -17,9 +17,6 @@
|
|
|
17
17
|
},
|
|
18
18
|
"sideEffects": false,
|
|
19
19
|
"exports": {
|
|
20
|
-
"./preflight.css": {
|
|
21
|
-
"default": "./preflight.css"
|
|
22
|
-
},
|
|
23
20
|
"./themes/*": {
|
|
24
21
|
"default": "./themes/*"
|
|
25
22
|
},
|
package/themes/base.css
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Base tokens — everything a component needs that is NOT the brand ramp.
|
|
3
|
+
*
|
|
4
|
+
* WHY THIS FILE EXISTS: the brand preset is only 11 of the library's 26 tokens. The other 15 are
|
|
5
|
+
* surfaces, ink, accents, status and radius, and the components reference them constantly
|
|
6
|
+
* (sds-card is "bg-surface border-border rounded-card", sds-button secondary is
|
|
7
|
+
* "bg-white text-ink border-border hover:bg-muted"). Before this file, every consuming app was told
|
|
8
|
+
* by the README to paste that block by hand — and an app that imported only a brand preset got a
|
|
9
|
+
* page where the brand-coloured things rendered and everything else silently emitted no CSS at all.
|
|
10
|
+
* That failure is invisible in a build log: Tailwind does not warn about a utility whose token is
|
|
11
|
+
* undefined, it just produces nothing.
|
|
12
|
+
*
|
|
13
|
+
* Import it BEFORE the brand preset, and both after `@import "tailwindcss"`:
|
|
14
|
+
*
|
|
15
|
+
* @import "tailwindcss";
|
|
16
|
+
* @source "../node_modules/@besaitech/ng-design-system";
|
|
17
|
+
* @import "@besaitech/ng-design-system/themes/base.css";
|
|
18
|
+
* @import "@besaitech/ng-design-system/themes/belvigo.css";
|
|
19
|
+
*
|
|
20
|
+
* Every value here is a default an app may override in its own `@theme` afterwards — the typeface
|
|
21
|
+
* especially, which is the one token most apps do change.
|
|
22
|
+
*/
|
|
23
|
+
@theme {
|
|
24
|
+
/* Neutrals / surfaces */
|
|
25
|
+
--color-canvas: #f5f6f8;
|
|
26
|
+
--color-surface: #ffffff;
|
|
27
|
+
--color-muted: #f8f9fb;
|
|
28
|
+
--color-border: #e6e9f0;
|
|
29
|
+
--color-ink: #1b2440;
|
|
30
|
+
--color-ink-soft: #5b6577;
|
|
31
|
+
--color-ink-faint: #8a93a6;
|
|
32
|
+
|
|
33
|
+
/* Accent icon-tiles (foreground + soft background) */
|
|
34
|
+
--color-accent-blue: #2f6bd4;
|
|
35
|
+
--color-accent-blue-soft: #e8effb;
|
|
36
|
+
--color-accent-green: #1f9d57;
|
|
37
|
+
--color-accent-green-soft: #e6f5ec;
|
|
38
|
+
--color-accent-amber: #e0902a;
|
|
39
|
+
--color-accent-amber-soft: #fdf0dd;
|
|
40
|
+
--color-accent-red: #df4f6b;
|
|
41
|
+
--color-accent-red-soft: #fde7ec;
|
|
42
|
+
--color-accent-indigo: #6c5ce7;
|
|
43
|
+
--color-accent-indigo-soft: #ece9fb;
|
|
44
|
+
|
|
45
|
+
/* Status */
|
|
46
|
+
--color-success: #27c06b;
|
|
47
|
+
--color-warning: #f3b73c;
|
|
48
|
+
--color-danger: #df4f6b;
|
|
49
|
+
|
|
50
|
+
/* Radius */
|
|
51
|
+
--radius-control: 0.5rem;
|
|
52
|
+
--radius-card: 0.75rem;
|
|
53
|
+
|
|
54
|
+
/* Typography — override in your app's own @theme if your brand uses a different face. */
|
|
55
|
+
--font-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@layer base {
|
|
59
|
+
:root {
|
|
60
|
+
/* Layout dimensions consumed by sds-shell / sds-sidebar. Plain CSS vars, not @theme tokens —
|
|
61
|
+
they are lengths the layout reads, never Tailwind utilities. */
|
|
62
|
+
--sds-topbar-h: 64px;
|
|
63
|
+
--sds-sidebar-w: 256px;
|
|
64
|
+
--sds-sidebar-w-collapsed: 76px;
|
|
65
|
+
}
|
|
66
|
+
}
|
package/themes/saitech.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Saitech theme — the library's original brand blues
|
|
2
|
+
* Saitech theme — the library's original brand blues, and its default.
|
|
3
3
|
*
|
|
4
4
|
* This file is the DEFAULT look every consumer got before themes existed, extracted verbatim so that
|
|
5
5
|
* adding a second brand could not change the first one. If you are looking for the values that used to
|
package/preflight.css
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
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
|
-
}
|