@dxos/ui-theme 0.8.4-main.9be5663bfe → 0.8.4-main.bc2380dfbc

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 (86) hide show
  1. package/LICENSE +102 -5
  2. package/README.md +1 -1
  3. package/dist/lib/browser/index.mjs +88 -84
  4. package/dist/lib/browser/index.mjs.map +4 -4
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/node-esm/index.mjs +88 -84
  7. package/dist/lib/node-esm/index.mjs.map +4 -4
  8. package/dist/lib/node-esm/meta.json +1 -1
  9. package/dist/plugin/node-cjs/main.css +147 -106
  10. package/dist/plugin/node-cjs/main.css.map +2 -2
  11. package/dist/plugin/node-cjs/meta.json +1 -1
  12. package/dist/plugin/node-esm/main.css +147 -106
  13. package/dist/plugin/node-esm/main.css.map +2 -2
  14. package/dist/plugin/node-esm/meta.json +1 -1
  15. package/dist/plugin/node-esm/plugins/ThemePlugin.mjs.map +2 -2
  16. package/dist/types/src/Theme.stories.d.ts.map +1 -1
  17. package/dist/types/src/defs.d.ts +1 -1
  18. package/dist/types/src/defs.d.ts.map +1 -1
  19. package/dist/types/src/fragments/density.d.ts +1 -4
  20. package/dist/types/src/fragments/density.d.ts.map +1 -1
  21. package/dist/types/src/fragments/hover.d.ts +0 -1
  22. package/dist/types/src/fragments/hover.d.ts.map +1 -1
  23. package/dist/types/src/fragments/text.d.ts +0 -1
  24. package/dist/types/src/fragments/text.d.ts.map +1 -1
  25. package/dist/types/src/plugins/ThemePlugin.d.ts +1 -1
  26. package/dist/types/src/plugins/ThemePlugin.d.ts.map +1 -1
  27. package/dist/types/src/theme/components/button.d.ts +2 -2
  28. package/dist/types/src/theme/components/button.d.ts.map +1 -1
  29. package/dist/types/src/theme/components/card.d.ts.map +1 -1
  30. package/dist/types/src/theme/components/dialog.d.ts.map +1 -1
  31. package/dist/types/src/theme/components/icon-button.d.ts +1 -0
  32. package/dist/types/src/theme/components/icon-button.d.ts.map +1 -1
  33. package/dist/types/src/theme/components/input.d.ts +8 -8
  34. package/dist/types/src/theme/components/input.d.ts.map +1 -1
  35. package/dist/types/src/theme/components/main.d.ts.map +1 -1
  36. package/dist/types/src/theme/components/scroll-area.d.ts.map +1 -1
  37. package/dist/types/src/theme/primitives/column.d.ts +22 -5
  38. package/dist/types/src/theme/primitives/column.d.ts.map +1 -1
  39. package/dist/types/src/theme/primitives/panel.d.ts.map +1 -1
  40. package/dist/types/src/theme/theme.d.ts.map +1 -1
  41. package/dist/types/src/util/hash-styles.d.ts +1 -1
  42. package/dist/types/src/util/hash-styles.d.ts.map +1 -1
  43. package/dist/types/src/util/mx.d.ts +21 -1
  44. package/dist/types/src/util/mx.d.ts.map +1 -1
  45. package/dist/types/src/util/size.d.ts.map +1 -1
  46. package/dist/types/src/util/valence.d.ts +2 -2
  47. package/dist/types/src/util/valence.d.ts.map +1 -1
  48. package/dist/types/tsconfig.tsbuildinfo +1 -1
  49. package/package.json +11 -19
  50. package/src/Theme.stories.tsx +5 -5
  51. package/src/css/DESIGN_SYSTEM.md +159 -0
  52. package/src/css/base/base.css +2 -2
  53. package/src/css/components/button.css +3 -3
  54. package/src/css/components/checkbox.css +1 -1
  55. package/src/css/components/focus.css +12 -12
  56. package/src/css/components/panel.css +45 -45
  57. package/src/css/components/selected.css +61 -15
  58. package/src/css/components/selected.md +101 -0
  59. package/src/css/components/surface.css +4 -4
  60. package/src/css/components/tag.css +25 -23
  61. package/src/css/layout/size.css +16 -3
  62. package/src/css/theme/animation.css +31 -0
  63. package/src/css/theme/semantic.css +36 -40
  64. package/src/css/theme/spacing.css +7 -8
  65. package/src/css/theme/styles.css +22 -22
  66. package/src/css/utilities.css +48 -6
  67. package/src/defs.ts +1 -1
  68. package/src/fragments/AUDIT.md +0 -3
  69. package/src/fragments/density.ts +8 -5
  70. package/src/fragments/hover.ts +0 -2
  71. package/src/fragments/text.ts +1 -1
  72. package/src/main.css +38 -4
  73. package/src/theme/components/button.ts +2 -2
  74. package/src/theme/components/card.ts +4 -0
  75. package/src/theme/components/dialog.ts +5 -3
  76. package/src/theme/components/focus.ts +2 -2
  77. package/src/theme/components/icon-button.ts +6 -3
  78. package/src/theme/components/input.ts +9 -9
  79. package/src/theme/components/message.ts +5 -5
  80. package/src/theme/components/popover.ts +1 -1
  81. package/src/theme/components/scroll-area.ts +10 -5
  82. package/src/theme/components/select.ts +1 -1
  83. package/src/theme/components/tooltip.ts +1 -1
  84. package/src/theme/primitives/column.ts +44 -20
  85. package/src/util/hash-styles.ts +19 -19
  86. package/src/util/mx.ts +3 -3
package/LICENSE CHANGED
@@ -1,8 +1,105 @@
1
- MIT License
2
- Copyright (c) 2022 DXOS
1
+ # Functional Source License, Version 1.1, ALv2 Future License
3
2
 
4
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3
+ ## Abbreviation
5
4
 
6
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
5
+ FSL-1.1-Apache-2.0
7
6
 
8
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7
+ ## Notice
8
+
9
+ Copyright 2026 DXOS
10
+
11
+ ## Terms and Conditions
12
+
13
+ ### Licensor ("We")
14
+
15
+ The party offering the Software under these Terms and Conditions.
16
+
17
+ ### The Software
18
+
19
+ The "Software" is each version of the software that we make available under
20
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
21
+ Conditions with the Software.
22
+
23
+ ### License Grant
24
+
25
+ Subject to your compliance with this License Grant and the Patents,
26
+ Redistribution and Trademark clauses below, we hereby grant you the right to
27
+ use, copy, modify, create derivative works, publicly perform, publicly display
28
+ and redistribute the Software for any Permitted Purpose identified below.
29
+
30
+ ### Permitted Purpose
31
+
32
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
+ means making the Software available to others in a commercial product or
34
+ service that:
35
+
36
+ 1. substitutes for the Software;
37
+
38
+ 2. substitutes for any other product or service we offer using the Software
39
+ that exists as of the date we make the Software available; or
40
+
41
+ 3. offers the same or substantially similar functionality as the Software.
42
+
43
+ Permitted Purposes specifically include using the Software:
44
+
45
+ 1. for your internal use and access;
46
+
47
+ 2. for non-commercial education;
48
+
49
+ 3. for non-commercial research; and
50
+
51
+ 4. in connection with professional services that you provide to a licensee
52
+ using the Software in accordance with these Terms and Conditions.
53
+
54
+ ### Patents
55
+
56
+ To the extent your use for a Permitted Purpose would necessarily infringe our
57
+ patents, the license grant above includes a license under our patents. If you
58
+ make a claim against any party that the Software infringes or contributes to
59
+ the infringement of any patent, then your patent license to the Software ends
60
+ immediately.
61
+
62
+ ### Redistribution
63
+
64
+ The Terms and Conditions apply to all copies, modifications and derivatives of
65
+ the Software.
66
+
67
+ If you redistribute any copies, modifications or derivatives of the Software,
68
+ you must include a copy of or a link to these Terms and Conditions and not
69
+ remove any copyright notices provided in or with the Software.
70
+
71
+ ### Disclaimer
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
+
77
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
+
81
+ ### Trademarks
82
+
83
+ Except for displaying the License Details and identifying us as the origin of
84
+ the Software, you have no right under these Terms and Conditions to use our
85
+ trademarks, trade names, service marks or product names.
86
+
87
+ ## Grant of Future License
88
+
89
+ We hereby irrevocably grant you an additional license to use the Software under
90
+ the Apache License, Version 2.0 that is effective on the second anniversary of
91
+ the date we make the Software available. On or after that date, you may use the
92
+ Software under the Apache License, Version 2.0, in which case the following
93
+ will apply:
94
+
95
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
96
+ this file except in compliance with the License.
97
+
98
+ You may obtain a copy of the License at
99
+
100
+ http://www.apache.org/licenses/LICENSE-2.0
101
+
102
+ Unless required by applicable law or agreed to in writing, software distributed
103
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
+ specific language governing permissions and limitations under the License.
package/README.md CHANGED
@@ -22,4 +22,4 @@ pnpm i @dxos/ui-theme
22
22
 
23
23
  Your ideas, issues, and code are most welcome. Please take a look at our [community code of conduct](https://github.com/dxos/dxos/blob/main/CODE_OF_CONDUCT.md), the [issue guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-issues), and the [PR contribution guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-prs).
24
24
 
25
- License: [MIT](./LICENSE) Copyright 2022 © DXOS
25
+ License: [FSL-1.1-Apache-2.0](./LICENSE) Copyright 2022 © DXOS
@@ -35,7 +35,7 @@ var hueShades = [
35
35
  var roles = [
36
36
  "fill",
37
37
  "surface",
38
- "surface-text",
38
+ "foreground",
39
39
  "text",
40
40
  "border"
41
41
  ];
@@ -46,18 +46,18 @@ var cardMinBlockSize = 18;
46
46
  var cardMaxBlockSize = 30;
47
47
 
48
48
  // src/fragments/density.ts
49
- var coarseBlockSize = "min-h-[2.5rem]";
50
- var coarseDimensions = `${coarseBlockSize} px-3`;
51
49
  var fineBlockSize = "min-h-[2.5rem] pointer-fine:min-h-[2rem]";
50
+ var coarseBlockSize = "min-h-[2.5rem]";
52
51
  var fineDimensions = `${fineBlockSize} px-2`;
53
- var densityBlockSize = (density = "coarse") => density === "fine" ? fineBlockSize : coarseBlockSize;
52
+ var coarseDimensions = `${coarseBlockSize} px-3`;
53
+ var densityDimensions = (density = "fine") => density === "fine" ? fineDimensions : coarseDimensions;
54
+ var densityBlockSize = (density = "fine") => density === "fine" ? fineBlockSize : coarseBlockSize;
54
55
 
55
56
  // src/fragments/disabled.ts
56
57
  var staticDisabled = "opacity-40 cursor-not-allowed shadow-none";
57
58
  var dataDisabled = "data-[disabled]:opacity-40 data-[disabled]:cursor-not-allowed";
58
59
 
59
60
  // src/fragments/hover.ts
60
- var subtleHover = "hover:bg-hover-overlay";
61
61
  var ghostHover = "hover:bg-hover-surface";
62
62
  var ghostFocusWithin = "focus-within:bg-hover-surface";
63
63
  var hoverableControls = "[--controls-opacity:1] hover-hover:[--controls-opacity:0] hover-hover:hover:[--controls-opacity:1]";
@@ -68,7 +68,6 @@ var hoverableOpenControlItem = "hover-hover:aria-[expanded=true]:[--controls-opa
68
68
  var hoverableControlItem = "opacity-(--controls-opacity)";
69
69
 
70
70
  // src/fragments/text.ts
71
- var descriptionTextPrimary = "text-sm font-normal text-base-surface-text";
72
71
  var descriptionMessage = "text-description border border-dashed border-separator rounded-sm p-4";
73
72
 
74
73
  // src/util/elevation.ts
@@ -109,7 +108,7 @@ var neutral = {
109
108
  hue: "neutral",
110
109
  fill: "bg-neutral-fill",
111
110
  surface: "bg-neutral-surface",
112
- surfaceText: "text-neutral-surface-text",
111
+ foreground: "text-neutral-foreground",
113
112
  text: "text-neutral-text",
114
113
  border: "border-neutral-border"
115
114
  };
@@ -118,7 +117,7 @@ var styles = [
118
117
  hue: "red",
119
118
  fill: "bg-red-fill",
120
119
  surface: "bg-red-surface",
121
- surfaceText: "text-red-surface-text",
120
+ foreground: "text-red-foreground",
122
121
  text: "text-red-text",
123
122
  border: "border-red-border"
124
123
  },
@@ -126,7 +125,7 @@ var styles = [
126
125
  hue: "orange",
127
126
  fill: "bg-orange-fill",
128
127
  surface: "bg-orange-surface",
129
- surfaceText: "text-orange-surface-text",
128
+ foreground: "text-orange-foreground",
130
129
  text: "text-orange-text",
131
130
  border: "border-orange-border"
132
131
  },
@@ -134,7 +133,7 @@ var styles = [
134
133
  hue: "amber",
135
134
  fill: "bg-amber-fill",
136
135
  surface: "bg-amber-surface",
137
- surfaceText: "text-amber-surface-text",
136
+ foreground: "text-amber-foreground",
138
137
  text: "text-amber-text",
139
138
  border: "border-amber-border"
140
139
  },
@@ -142,7 +141,7 @@ var styles = [
142
141
  hue: "yellow",
143
142
  fill: "bg-yellow-fill",
144
143
  surface: "bg-yellow-surface",
145
- surfaceText: "text-yellow-surface-text",
144
+ foreground: "text-yellow-foreground",
146
145
  text: "text-yellow-text",
147
146
  border: "border-yellow-border"
148
147
  },
@@ -150,7 +149,7 @@ var styles = [
150
149
  hue: "lime",
151
150
  fill: "bg-lime-fill",
152
151
  surface: "bg-lime-surface",
153
- surfaceText: "text-lime-surface-text",
152
+ foreground: "text-lime-foreground",
154
153
  text: "text-lime-text",
155
154
  border: "border-lime-border"
156
155
  },
@@ -158,7 +157,7 @@ var styles = [
158
157
  hue: "green",
159
158
  fill: "bg-green-fill",
160
159
  surface: "bg-green-surface",
161
- surfaceText: "text-green-surface-text",
160
+ foreground: "text-green-foreground",
162
161
  text: "text-green-text",
163
162
  border: "border-green-border"
164
163
  },
@@ -166,7 +165,7 @@ var styles = [
166
165
  hue: "emerald",
167
166
  fill: "bg-emerald-fill",
168
167
  surface: "bg-emerald-surface",
169
- surfaceText: "text-emerald-surface-text",
168
+ foreground: "text-emerald-foreground",
170
169
  text: "text-emerald-text",
171
170
  border: "border-emerald-border"
172
171
  },
@@ -174,7 +173,7 @@ var styles = [
174
173
  hue: "teal",
175
174
  fill: "bg-teal-fill",
176
175
  surface: "bg-teal-surface",
177
- surfaceText: "text-teal-surface-text",
176
+ foreground: "text-teal-foreground",
178
177
  text: "text-teal-text",
179
178
  border: "border-teal-border"
180
179
  },
@@ -182,7 +181,7 @@ var styles = [
182
181
  hue: "cyan",
183
182
  fill: "bg-cyan-fill",
184
183
  surface: "bg-cyan-surface",
185
- surfaceText: "text-cyan-surface-text",
184
+ foreground: "text-cyan-foreground",
186
185
  text: "text-cyan-text",
187
186
  border: "border-cyan-border"
188
187
  },
@@ -190,7 +189,7 @@ var styles = [
190
189
  hue: "sky",
191
190
  fill: "bg-sky-fill",
192
191
  surface: "bg-sky-surface",
193
- surfaceText: "text-sky-surface-text",
192
+ foreground: "text-sky-foreground",
194
193
  text: "text-sky-text",
195
194
  border: "border-sky-border"
196
195
  },
@@ -198,7 +197,7 @@ var styles = [
198
197
  hue: "blue",
199
198
  fill: "bg-blue-fill",
200
199
  surface: "bg-blue-surface",
201
- surfaceText: "text-blue-surface-text",
200
+ foreground: "text-blue-foreground",
202
201
  text: "text-blue-text",
203
202
  border: "border-blue-border"
204
203
  },
@@ -206,7 +205,7 @@ var styles = [
206
205
  hue: "indigo",
207
206
  fill: "bg-indigo-fill",
208
207
  surface: "bg-indigo-surface",
209
- surfaceText: "text-indigo-surface-text",
208
+ foreground: "text-indigo-foreground",
210
209
  text: "text-indigo-text",
211
210
  border: "border-indigo-border"
212
211
  },
@@ -214,7 +213,7 @@ var styles = [
214
213
  hue: "violet",
215
214
  fill: "bg-violet-fill",
216
215
  surface: "bg-violet-surface",
217
- surfaceText: "text-violet-surface-text",
216
+ foreground: "text-violet-foreground",
218
217
  text: "text-violet-text",
219
218
  border: "border-violet-border"
220
219
  },
@@ -222,7 +221,7 @@ var styles = [
222
221
  hue: "purple",
223
222
  fill: "bg-purple-fill",
224
223
  surface: "bg-purple-surface",
225
- surfaceText: "text-purple-surface-text",
224
+ foreground: "text-purple-foreground",
226
225
  text: "text-purple-text",
227
226
  border: "border-purple-border"
228
227
  },
@@ -230,7 +229,7 @@ var styles = [
230
229
  hue: "fuchsia",
231
230
  fill: "bg-fuchsia-fill",
232
231
  surface: "bg-fuchsia-surface",
233
- surfaceText: "text-fuchsia-surface-text",
232
+ foreground: "text-fuchsia-foreground",
234
233
  text: "text-fuchsia-text",
235
234
  border: "border-fuchsia-border"
236
235
  },
@@ -238,7 +237,7 @@ var styles = [
238
237
  hue: "pink",
239
238
  fill: "bg-pink-fill",
240
239
  surface: "bg-pink-surface",
241
- surfaceText: "text-pink-surface-text",
240
+ foreground: "text-pink-foreground",
242
241
  text: "text-pink-text",
243
242
  border: "border-pink-border"
244
243
  },
@@ -246,7 +245,7 @@ var styles = [
246
245
  hue: "rose",
247
246
  fill: "bg-rose-fill",
248
247
  surface: "bg-rose-surface",
249
- surfaceText: "text-rose-surface-text",
248
+ foreground: "text-rose-foreground",
250
249
  text: "text-rose-text",
251
250
  border: "border-rose-border"
252
251
  }
@@ -341,12 +340,7 @@ function slottable(render) {
341
340
  warn = true;
342
341
  log.warn("slot child is not composable; create it with composable() or slottable()", {
343
342
  child: child.type.displayName ?? child.type.name
344
- }, {
345
- F: __dxlog_file,
346
- L: 125,
347
- S: this,
348
- C: (f, a) => f(...a)
349
- });
343
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 100, S: this });
350
344
  }
351
345
  } catch {
352
346
  }
@@ -628,12 +622,14 @@ var cardAction = (_props, ...etc) => mx("dx-card__acztion col-span-3 !grid grid-
628
622
  var cardActionLabel = (_props, ...etc) => mx("dx-card__action-label min-w-0 flex-1 truncate", ...etc);
629
623
  var cardLink = (_props, ...etc) => mx("dx-card__link col-span-3 !grid grid-cols-subgrid group p-0! dx-button dx-focus-ring min-h-1!", ...etc);
630
624
  var cardLinkLabel = (_props, ...etc) => mx("dx-card__link-label min-w-0 flex-1 truncate", ...etc);
625
+ var cardRow = (_, ...etc) => mx("dx-card__row col-span-3 grid grid-cols-subgrid", ...etc);
631
626
  var cardIconBlock = ({ padding }, ...etc) => mx("dx-card__icon-block grid h-[var(--dx-rail-item)] w-[var(--dx-rail-item)] place-items-center", padding && "[&>*]:p-1", ...etc);
632
627
  var cardTheme = {
633
628
  root: cardRoot,
634
629
  toolbar: cardToolbar,
635
630
  title: cardTitle,
636
631
  content: cardContent,
632
+ row: cardRow,
637
633
  heading: cardHeading,
638
634
  text: cardText,
639
635
  "text-span": cardTextSpan,
@@ -647,8 +643,8 @@ var cardTheme = {
647
643
  };
648
644
 
649
645
  // src/theme/components/button.ts
650
- var primaryButtonColors = "text-accent-surface-text bg-accent-surface hover:bg-accent-surface-hover aria-pressed:bg-primary-500 dark:aria-pressed:bg-primary-500 data-[state=open]:bg-primary-500 dark:data-[state=open]:bg-primary-500 aria-checked:bg-primary-500 dark:aria-checked:bg-primary-500 aria-checked:text-primary-100";
651
- var staticDefaultButtonColors = "bg-input-surface text-input-surface-text";
646
+ var primaryButtonColors = "text-accent-foreground bg-accent-surface hover:bg-accent-surface-hover aria-pressed:bg-primary-500 dark:aria-pressed:bg-primary-500 data-[state=open]:bg-primary-500 dark:data-[state=open]:bg-primary-500 aria-checked:bg-primary-500 dark:aria-checked:bg-primary-500 aria-checked:text-primary-100";
647
+ var staticDefaultButtonColors = "bg-input-surface text-input-foreground";
652
648
  var defaultButtonColors = mx(staticDefaultButtonColors, "data-[state=open]:bg-input-surface aria-pressed:text-accent-text aria-pressed:bg-base-surface aria-checked:text-accent-text aria-checked:bg-base-surface");
653
649
  var ghostButtonColors = mx(ghostHover, "hover:text-inherit data-[state=open]:bg-input-surface aria-pressed:text-accent-text aria-pressed:bg-base-surface aria-checked:text-accent-text aria-checked:bg-base-surface");
654
650
  var buttonRoot = (_props, ...etc) => {
@@ -662,6 +658,35 @@ var buttonTheme = {
662
658
  group: buttonGroup
663
659
  };
664
660
 
661
+ // src/theme/primitives/column.ts
662
+ var withColumn = {
663
+ /** Centers element in the Column grid via --dx-col. No-op outside Column or inside ScrollArea. */
664
+ center: () => "[grid-column:var(--dx-col,auto)]",
665
+ /** Propagates the Column grid to children via subgrid. No-op outside Column.
666
+ * Direct children default to center column unless they are a dx-container (ScrollArea). */
667
+ propagate: () => "[.dx-column-root_&]:col-span-full [.dx-column-root_&]:grid [.dx-column-root_&]:grid-cols-subgrid [.dx-column-root_&]:[&>*:not(.dx-container)]:[grid-column:var(--dx-col,auto)]",
668
+ /** Resets --dx-col after consuming --gutter. Applied by ScrollArea.Viewport. */
669
+ consumed: () => "[--dx-col:auto]"
670
+ };
671
+ var columnRoot = (_, ...etc) => {
672
+ return mx("dx-column-root grid", ...etc);
673
+ };
674
+ var columnRow = (_, ...etc) => {
675
+ return mx("col-span-3 grid grid-cols-subgrid", ...etc);
676
+ };
677
+ var columnBleed = (_, ...etc) => {
678
+ return mx("col-span-full grid grid-cols-subgrid min-h-0", ...etc);
679
+ };
680
+ var columnCenter = (_, ...etc) => {
681
+ return mx(withColumn.center(), "min-h-0", ...etc);
682
+ };
683
+ var columnTheme = {
684
+ root: columnRoot,
685
+ row: columnRow,
686
+ bleed: columnBleed,
687
+ center: columnCenter
688
+ };
689
+
665
690
  // src/theme/components/dialog.ts
666
691
  var sizeMap2 = {
667
692
  sm: "md:max-w-[24rem]",
@@ -673,9 +698,9 @@ var dialogOverlay = (_props, ...etc) => mx("dx-dialog__overlay", ...etc);
673
698
  var dialogContent = ({ inOverlayLayout, size = "md" }, ...etc) => {
674
699
  return mx("@container", "dx-dialog__content dx-focus-ring dx-modal-surface dx-density-coarse py-4", !inOverlayLayout && "fixed z-50 top-[50%] left-[50%] -translate-x-[50%] -translate-y-[50%]", sizeMap2[size], ...etc);
675
700
  };
676
- var dialogHeader = (_props, ...etc) => mx("dx-dialog__header flex pb-4 items-center justify-between", ...etc);
677
- var dialogBody = (_props, ...etc) => mx("dx-dialog__body", ...etc);
678
- var dialogActionBar = (_props, ...etc) => mx("dx-dialog__actionbar flex items-center pt-4 gap-2 dx-density-coarse", ...etc);
701
+ var dialogHeader = (_props, ...etc) => mx("dx-dialog__header flex pb-4 items-center justify-between", withColumn.center(), ...etc);
702
+ var dialogBody = (_props, ...etc) => mx("dx-dialog__body dx-expander", withColumn.propagate(), ...etc);
703
+ var dialogActionBar = (_props, ...etc) => mx("dx-dialog__actionbar flex items-center pt-4 gap-2 dx-density-coarse", withColumn.center(), ...etc);
679
704
  var dialogTitle = ({ srOnly }, ...etc) => mx("dx-dialog__title", srOnly && "sr-only", ...etc);
680
705
  var dialogDescription = ({ srOnly }, ...etc) => mx("dx-dialog__description", "text-description", srOnly && "sr-only", ...etc);
681
706
  var dialogTheme = {
@@ -689,7 +714,7 @@ var dialogTheme = {
689
714
  };
690
715
 
691
716
  // src/theme/components/focus.ts
692
- var focusRing = ({ border }, ...etc) => mx("dx-ring-pseudo outline-hidden", "focus:after:ring-neutral-focus-indicator", "data-[focus-state=active]:after:ring-neutral-focus-indicator", "data-[focus-state=error]:after:ring-rose-500", border && "border border-separator", ...etc);
717
+ var focusRing = ({ border }, ...etc) => mx("dx-ring-pseudo outline-hidden", "focus:after:ring-focus-ring-subtle", "data-[focus-state=active]:after:ring-focus-ring-subtle", "data-[focus-state=error]:after:ring-rose-500", border && "border border-separator", ...etc);
693
718
  var focusTheme = {
694
719
  group: focusRing,
695
720
  item: focusRing
@@ -704,8 +729,8 @@ var iconTheme = {
704
729
  };
705
730
 
706
731
  // src/theme/components/icon-button.ts
707
- var iconButtonRoot = ({ iconOnly }, ...etc) => {
708
- return mx("px-1.5", !iconOnly && "gap-2", ...etc);
732
+ var iconButtonRoot = ({ iconOnly, square }, ...etc) => {
733
+ return mx("px-1.5", !iconOnly && "gap-1.5", square && "aspect-square", ...etc);
709
734
  };
710
735
  var iconButtonTheme = {
711
736
  root: iconButtonRoot
@@ -730,22 +755,22 @@ var inputValence = (valence) => {
730
755
  }
731
756
  };
732
757
  var sharedSubduedInputStyles = (props) => [
733
- "py-0 w-full bg-transparent text-current placeholder-placeholder",
734
758
  '[[data-drag-autoscroll="active"]_&]:pointer-events-none',
735
- props.density === "fine" ? fineBlockSize : coarseBlockSize,
759
+ "py-0 w-full bg-transparent text-current placeholder-placeholder",
736
760
  "dx-focus-subdued",
761
+ densityDimensions(props.density),
737
762
  props.disabled && staticDisabled
738
763
  ];
739
764
  var sharedDefaultInputStyles = (props) => [
740
- "py-0 w-full text-base-surface-text rounded-xs placeholder-placeholder",
741
765
  '[[data-drag-autoscroll="active"]_&]:pointer-events-none',
766
+ "py-0 w-full text-base-foreground rounded-xs placeholder-placeholder",
742
767
  textInputSurfaceFocus,
743
- props.density === "fine" ? fineDimensions : coarseDimensions,
768
+ densityDimensions(props.density),
744
769
  props.disabled ? staticDisabled : textInputSurfaceHover
745
770
  ];
746
771
  var sharedStaticInputStyles = (props) => [
747
- "py-0 w-full text-base-surface-text rounded-xs placeholder-placeholder",
748
772
  '[[data-drag-autoscroll="active"]_&]:pointer-events-none',
773
+ "py-0 w-full text-base-foreground rounded-xs placeholder-placeholder",
749
774
  textInputSurfaceFocus,
750
775
  textInputSurfaceHover,
751
776
  props.focused && "bg-attention-surface",
@@ -769,7 +794,7 @@ var inputSwitch = ({ size = 5, disabled }, ...etc) => mx(
769
794
  );
770
795
  var inputSwitchThumb = ({ size = 5 }, ...etc) => mx(getSize(size === "px" ? "px" : size - 2), "block bg-white rounded-full transition-transform duration-100 will-change-transform data-[state=checked]:translate-x-[100%]", ...etc);
771
796
  var inputWithSegmentsInput = (props, ...etc) => mx("font-mono selection:bg-transparent mx-auto", props.density === "fine" ? "text-base pointer-fine:text-sm" : "text-lg", props.disabled && "cursor-not-allowed", ...etc);
772
- var inputSegment = (props, ...etc) => mx("flex items-center justify-center font-mono", props.density === "fine" ? "size-10 pointer-fine:size-8 rounded-xs" : "size-12 rounded-xs", "bg-input-surface text-base-surface-text transition-colors border border-separator", "data-[focused]:bg-attention-surface data-[focused]:border-neutral-focus-indicator", "data-[focused]:ring-2 data-[focused]:ring-offset-0 data-[focused]:ring-neutral-focus-indicator", inputValence(props.validationValence), props.disabled && staticDisabled, ...etc);
797
+ var inputSegment = (props, ...etc) => mx("flex items-center justify-center font-mono", props.density === "fine" ? "size-10 pointer-fine:size-8 rounded-xs" : "size-12 rounded-xs", "bg-input-surface text-base-foreground transition-colors border border-separator", "data-[focused]:bg-attention-surface data-[focused]:border-focus-ring-subtle", "data-[focused]:ring-2 data-[focused]:ring-offset-0 data-[focused]:ring-focus-ring-subtle", inputValence(props.validationValence), props.disabled && staticDisabled, ...etc);
773
798
  var inputLabel = (props, ...etc) => mx("block", inputTextLabel, props.srOnly && "sr-only", ...etc);
774
799
  var inputDescription = (props, ...etc) => mx("text-description", props.srOnly && "sr-only", ...etc);
775
800
  var inputDescriptionAndValidation = (props, ...etc) => mx("leading-none my-1.5", props.srOnly && "sr-only", ...etc);
@@ -855,19 +880,19 @@ var menuTheme = {
855
880
 
856
881
  // src/theme/components/message.ts
857
882
  var messageRoot = ({ valence }, etc) => {
858
- return mx("grid grid-cols-[min-content_1fr] gap-x-2 p-trim-sm rounded-sm", messageValence(valence), etc);
883
+ return mx("grid grid-cols-[2rem_1fr_2rem] p-1 rounded-sm", messageValence(valence), etc);
859
884
  };
860
885
  var messageHeader = (_, etc) => {
861
- return mx("col-span-2 grid grid-cols-subgrid items-center", etc);
886
+ return mx("col-span-full grid grid-cols-subgrid items-center", etc);
862
887
  };
863
888
  var messageTitle = (_, etc) => {
864
- return mx("col-start-2 gap-trim-sm [&>svg]:inline-block", etc);
889
+ return mx("col-start-2 truncate", etc);
865
890
  };
866
891
  var messageIcon = (_, etc) => {
867
- return mx("col-start-1", etc);
892
+ return mx("col-start-1 grid place-items-center", etc);
868
893
  };
869
894
  var messageContent = (_, etc) => {
870
- return mx("grid grid-cols-subgrid col-start-2 first:font-medium", etc);
895
+ return mx("col-start-2 grid grid-cols-subgrid inline first:font-medium", etc);
871
896
  };
872
897
  var messageTheme = {
873
898
  root: messageRoot,
@@ -884,7 +909,7 @@ var popoverContent = ({ elevation }, ...etc) => mx("dx-modal-surface border bord
884
909
  elevation,
885
910
  level: "menu"
886
911
  }), "dx-focus-ring", ...etc);
887
- var popoverViewport = ({ constrainBlock, constrainInline }, ...etc) => mx("flex flex-col min-h-0 min-w-popover-min-width", (constrainBlock || constrainInline) && "overflow-hidden", constrainBlock && "max-h-(--radix-popover-content-available-height)", constrainBlock && "max-h-[min(var(--radix-popover-content-available-height),calc(100dvh-var(--spacing-screen-border)*2))]", constrainInline && "max-w-(--radix-popover-content-available-width)", ...etc);
912
+ var popoverViewport = ({ constrainBlock, constrainInline }, ...etc) => mx("grid grid-rows-[1fr] min-h-0 min-w-popover-min-width", (constrainBlock || constrainInline) && "overflow-hidden", constrainBlock && "max-h-(--radix-popover-content-available-height)", constrainBlock && "max-h-[min(var(--radix-popover-content-available-height),calc(100dvh-var(--spacing-screen-border)*2))]", constrainInline && "max-w-(--radix-popover-content-available-width)", ...etc);
888
913
  var popoverArrow = (_props, ...etc) => mx("fill-separator", ...etc);
889
914
  var popoverTheme = {
890
915
  content: popoverContent,
@@ -909,14 +934,17 @@ var scrollAreaRoot = ({ orientation }, ...etc) => mx(
909
934
  orientation === "vertical" && "group/scroll-v flex flex-col",
910
935
  orientation === "horizontal" && "group/scroll-h flex",
911
936
  orientation === "all" && "group/scroll-all",
912
- // Apply col-span-full only when inside a Column.Root grid (detected via dx-column marker).
913
- "[.dx-column_&]:col-span-full",
937
+ // Apply col-span-full only when inside a Column.Root grid (detected via dx-column-root marker).
938
+ "[.dx-column-root_&]:col-span-full",
914
939
  ...etc
915
940
  );
916
- var scrollAreaViewport = ({ orientation, centered, padding, snap, thin, autoHide }, ...etc) => {
941
+ var scrollAreaViewport = ({ orientation, centered, padding, snap, autoHide }, ...etc) => {
917
942
  return mx(
918
- "h-full w-full",
919
- orientation === "vertical" && "flex flex-col overflow-y-scroll",
943
+ "flex-1 min-h-0 w-full",
944
+ // Reset --dx-col so nested components don't try to grid-position themselves.
945
+ // ScrollArea has already consumed --gutter for padding.
946
+ withColumn.consumed(),
947
+ orientation === "vertical" && "overflow-y-scroll",
920
948
  orientation === "horizontal" && "flex overflow-x-scroll overscroll-x-contain",
921
949
  orientation === "all" && "overflow-scroll",
922
950
  "[&::-webkit-scrollbar-corner]:bg-transparent",
@@ -965,7 +993,7 @@ var selectContent = ({ elevation }, ...etc) => {
965
993
  }), ...etc);
966
994
  };
967
995
  var selectViewport = (_props, ...etc) => mx(...etc);
968
- var selectItem = (_props, ...etc) => mx("flex items-center min-h-[2rem] px-3 py-1 gap-2", "text-base-surface-text leading-none select-none outline-hidden", "[&>svg]:invisible [&[data-state=checked]>svg]:visible", "dx-highlighted", ...etc);
996
+ var selectItem = (_props, ...etc) => mx("flex items-center min-h-[2rem] px-3 py-1 gap-2", "text-base-foreground leading-none select-none outline-hidden", "[&>svg]:invisible [&[data-state=checked]>svg]:visible", "dx-highlighted", ...etc);
969
997
  var selectItemIndicator = (_props, ...etc) => mx("items-center", ...etc);
970
998
  var selectArrow = (_props, ...etc) => mx("fill-separator", ...etc);
971
999
  var selectSeparator = (_props, ...etc) => mx("self-stretch border-b my-1 border-separator", ...etc);
@@ -1051,7 +1079,7 @@ var toolbarTheme = {
1051
1079
  };
1052
1080
 
1053
1081
  // src/theme/components/tooltip.ts
1054
- var tooltipContent = ({ elevation }, ...etc) => mx("inline-flex items-center p-1 max-w-64 text-sm bg-inverse-surface text-inverse-surface-text rounded-sm", surfaceShadow({
1082
+ var tooltipContent = ({ elevation }, ...etc) => mx("inline-flex items-center p-1 max-w-64 text-sm bg-inverse-surface text-inverse-foreground rounded-sm", surfaceShadow({
1055
1083
  elevation: "positioned"
1056
1084
  }), surfaceZIndex({
1057
1085
  elevation,
@@ -1107,26 +1135,6 @@ var treegridTheme = {
1107
1135
  cell: treegridCell
1108
1136
  };
1109
1137
 
1110
- // src/theme/primitives/column.ts
1111
- var columnRoot = (_, ...etc) => {
1112
- return mx("dx-column grid", ...etc);
1113
- };
1114
- var columnContent = (_, ...etc) => {
1115
- return mx("col-span-full grid grid-cols-subgrid min-h-0 [&>:not(.dx-container)]:col-start-2", ...etc);
1116
- };
1117
- var columnViewport = (_, ...etc) => {
1118
- return mx(...etc);
1119
- };
1120
- var columnRow = ({ fullWidth, center }, ...etc) => {
1121
- return mx("col-span-3 grid grid-cols-subgrid", fullWidth ? "col-span-3" : center && "col-start-2 col-span-1", ...etc);
1122
- };
1123
- var columnTheme = {
1124
- root: columnRoot,
1125
- content: columnContent,
1126
- viewport: columnViewport,
1127
- row: columnRow
1128
- };
1129
-
1130
1138
  // src/theme/primitives/panel.ts
1131
1139
  var sizes = {
1132
1140
  lg: "h-(--dx-topbar-size)",
@@ -1223,8 +1231,6 @@ export {
1223
1231
  cardMinBlockSize,
1224
1232
  cardMinInlineSize,
1225
1233
  cardTheme,
1226
- coarseBlockSize,
1227
- coarseDimensions,
1228
1234
  columnTheme,
1229
1235
  composable,
1230
1236
  composableProps,
@@ -1233,8 +1239,8 @@ export {
1233
1239
  defaultTheme,
1234
1240
  defaultTx,
1235
1241
  densityBlockSize,
1242
+ densityDimensions,
1236
1243
  descriptionMessage,
1237
- descriptionTextPrimary,
1238
1244
  dialogActionBar,
1239
1245
  dialogBody,
1240
1246
  dialogContent,
@@ -1243,8 +1249,6 @@ export {
1243
1249
  dialogOverlay,
1244
1250
  dialogTheme,
1245
1251
  dialogTitle,
1246
- fineBlockSize,
1247
- fineDimensions,
1248
1252
  focusTheme,
1249
1253
  getHashHue,
1250
1254
  getHashStyles,
@@ -1337,7 +1341,6 @@ export {
1337
1341
  statusBar,
1338
1342
  statusRoot,
1339
1343
  statusTheme,
1340
- subtleHover,
1341
1344
  surfaceShadow,
1342
1345
  surfaceZIndex,
1343
1346
  tagRoot,
@@ -1361,6 +1364,7 @@ export {
1361
1364
  treegridCell,
1362
1365
  treegridRoot,
1363
1366
  treegridRow,
1364
- treegridTheme
1367
+ treegridTheme,
1368
+ withColumn
1365
1369
  };
1366
1370
  //# sourceMappingURL=index.mjs.map