@camtomlabs/malix-design-system 0.3.0 → 0.4.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camtomlabs/malix-design-system",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "Malix Design System combined package with components, tokens, and bundled styles.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -9,13 +9,15 @@
9
9
  "sideEffects": [
10
10
  "./src/styles.css",
11
11
  "./src/tokens.css",
12
- "./src/reset.css"
12
+ "./src/reset.css",
13
+ "./src/compat-bootstrap.css"
13
14
  ],
14
15
  "files": [
15
16
  "dist",
16
17
  "src/styles.css",
17
18
  "src/tokens.css",
18
19
  "src/reset.css",
20
+ "src/compat-bootstrap.css",
19
21
  "src/tokens.registry.json",
20
22
  "tailwind.preset.js",
21
23
  "stylelint.config.cjs",
@@ -48,6 +50,7 @@
48
50
  "./styles.css": "./src/styles.css",
49
51
  "./tokens.css": "./src/tokens.css",
50
52
  "./reset.css": "./src/reset.css",
53
+ "./compat-bootstrap.css": "./src/compat-bootstrap.css",
51
54
  "./tokens.registry.json": "./src/tokens.registry.json",
52
55
  "./tailwind.preset": "./tailwind.preset.js",
53
56
  "./stylelint.config": "./stylelint.config.cjs",
@@ -0,0 +1,51 @@
1
+ /**
2
+ * @camtomlabs/malix-design-system/compat-bootstrap.css
3
+ *
4
+ * Opt-in overrides for projects that use Bootstrap alongside Malix.
5
+ *
6
+ * Problem: Bootstrap does not use CSS @layer, so its unlayered styles
7
+ * always win over Malix's layered styles (per CSS cascade spec).
8
+ * This file provides unlayered overrides for the critical properties
9
+ * that Bootstrap sets globally and that conflict with Malix tokens.
10
+ *
11
+ * Usage — import AFTER Bootstrap and AFTER Malix styles:
12
+ *
13
+ * import 'bootstrap/dist/css/bootstrap.min.css';
14
+ * import '@camtomlabs/malix-design-system/reset.css'; // optional
15
+ * import '@camtomlabs/malix-design-system/styles.css';
16
+ * import '@camtomlabs/malix-design-system/compat-bootstrap.css';
17
+ *
18
+ * This file intentionally lives OUTSIDE any @layer so it wins over
19
+ * Bootstrap's unlayered declarations. It only targets properties where
20
+ * Bootstrap and Malix conflict; it does not reset anything else.
21
+ *
22
+ * When you remove Bootstrap from your project, remove this import too.
23
+ */
24
+
25
+ /* ── Typography ────────────────────────────────── */
26
+ body {
27
+ font-family: var(--malix-font-body);
28
+ color: var(--malix-foreground);
29
+ line-height: 1.5;
30
+ }
31
+
32
+ /* ── Links ─────────────────────────────────────── */
33
+ a {
34
+ color: var(--malix-primary);
35
+ text-decoration: none;
36
+ }
37
+
38
+ a:hover {
39
+ color: var(--malix-primary-hover);
40
+ }
41
+
42
+ /* ── Headings ──────────────────────────────────── */
43
+ h1, h2, h3, h4, h5, h6 {
44
+ font-family: var(--malix-font-body);
45
+ color: var(--malix-foreground);
46
+ }
47
+
48
+ /* ── Form elements ─────────────────────────────── */
49
+ button, input, select, textarea {
50
+ font-family: var(--malix-font-body);
51
+ }
package/src/styles.css CHANGED
@@ -941,6 +941,133 @@
941
941
  opacity: 0.9;
942
942
  }
943
943
 
944
+ /* ═══════════════════════════════════════════════
945
+ DIALOG — canonical composable modal
946
+ Slot-based: <Dialog.Header>, <Dialog.Body>, <Dialog.Footer>
947
+ Variants: default | danger | warning | info
948
+ Sizes: sm (400px) | md (560px) | lg (720px)
949
+ ═══════════════════════════════════════════════ */
950
+
951
+ .malix-dialog {
952
+ display: flex;
953
+ flex-direction: column;
954
+ width: 100%;
955
+ max-height: min(85vh, 720px);
956
+ background: var(--malix-surface-elevated);
957
+ border: 1px solid var(--malix-border);
958
+ border-radius: var(--malix-radius-lg);
959
+ box-shadow: var(--malix-shadow-card-l3);
960
+ z-index: var(--malix-z-modal);
961
+ overflow: hidden;
962
+ }
963
+
964
+ .malix-dialog:focus {
965
+ outline: none;
966
+ }
967
+
968
+ .malix-dialog[data-size="sm"] {
969
+ max-width: 400px;
970
+ }
971
+
972
+ .malix-dialog[data-size="md"] {
973
+ max-width: 560px;
974
+ }
975
+
976
+ .malix-dialog[data-size="lg"] {
977
+ max-width: 720px;
978
+ }
979
+
980
+ .malix-dialog__header {
981
+ display: flex;
982
+ align-items: flex-start;
983
+ justify-content: space-between;
984
+ gap: 16px;
985
+ padding: 20px 24px;
986
+ border-bottom: 1px solid var(--malix-border);
987
+ }
988
+
989
+ .malix-dialog[data-variant="danger"] .malix-dialog__header {
990
+ border-bottom-color: var(--malix-error-light);
991
+ }
992
+
993
+ .malix-dialog[data-variant="warning"] .malix-dialog__header {
994
+ border-bottom-color: var(--malix-warning-light);
995
+ }
996
+
997
+ .malix-dialog[data-variant="info"] .malix-dialog__header {
998
+ border-bottom-color: var(--malix-info-light);
999
+ }
1000
+
1001
+ .malix-dialog__title {
1002
+ margin: 0;
1003
+ font-family: var(--malix-font-body);
1004
+ font-size: var(--malix-text-lg);
1005
+ font-weight: var(--malix-weight-semibold);
1006
+ color: var(--malix-foreground);
1007
+ line-height: 1.4;
1008
+ }
1009
+
1010
+ .malix-dialog__close {
1011
+ display: inline-flex;
1012
+ align-items: center;
1013
+ justify-content: center;
1014
+ flex-shrink: 0;
1015
+ width: 32px;
1016
+ height: 32px;
1017
+ margin: -6px -6px -6px 0;
1018
+ border: none;
1019
+ background: transparent;
1020
+ border-radius: var(--malix-radius-sm);
1021
+ cursor: pointer;
1022
+ color: var(--malix-foreground-secondary);
1023
+ transition: background-color 120ms ease, color 120ms ease;
1024
+ }
1025
+
1026
+ .malix-dialog__close:hover {
1027
+ background: var(--malix-surface-hover);
1028
+ color: var(--malix-foreground);
1029
+ }
1030
+
1031
+ .malix-dialog__close:focus-visible {
1032
+ outline: 2px solid var(--malix-primary);
1033
+ outline-offset: 2px;
1034
+ }
1035
+
1036
+ .malix-dialog__body {
1037
+ flex: 1 1 auto;
1038
+ overflow-y: auto;
1039
+ padding: 20px 24px;
1040
+ font-family: var(--malix-font-body);
1041
+ font-size: var(--malix-text-base);
1042
+ color: var(--malix-foreground-secondary);
1043
+ line-height: 1.6;
1044
+ }
1045
+
1046
+ .malix-dialog__footer {
1047
+ display: flex;
1048
+ align-items: center;
1049
+ gap: 12px;
1050
+ padding: 16px 24px;
1051
+ border-top: 1px solid var(--malix-border);
1052
+ background: var(--malix-surface-secondary);
1053
+ }
1054
+
1055
+ .malix-dialog__footer[data-align="end"] {
1056
+ justify-content: flex-end;
1057
+ }
1058
+
1059
+ .malix-dialog__footer[data-align="start"] {
1060
+ justify-content: flex-start;
1061
+ }
1062
+
1063
+ .malix-dialog__footer[data-align="center"] {
1064
+ justify-content: center;
1065
+ }
1066
+
1067
+ .malix-dialog__footer[data-align="between"] {
1068
+ justify-content: space-between;
1069
+ }
1070
+
944
1071
  /* ═══════════════════════════════════════════════
945
1072
  GLASS POPOVER — Pencil: bgJHS
946
1073
  w: 300, radius-xl, glass bg