gbs-add-block 2.0.4 → 2.3.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.
Files changed (129) hide show
  1. package/.gbs/skills/gbs-components/SKILL.md +190 -134
  2. package/.gbs/skills/gbs-components/references/install.md +25 -3
  3. package/.gbs/skills/gbs-components/references/styling.md +246 -201
  4. package/CHANGELOG.md +74 -0
  5. package/README.md +157 -11
  6. package/index.cjs +212 -3
  7. package/package.json +41 -10
  8. package/schema/passport-v1.schema.json +204 -0
  9. package/source/beta-components/accordion/passport.json +259 -0
  10. package/source/beta-components/accordion/styles.css +207 -208
  11. package/source/beta-components/alert/passport.json +250 -0
  12. package/source/beta-components/alert/styles.css +154 -155
  13. package/source/beta-components/avatar/passport.json +294 -0
  14. package/source/beta-components/avatar/styles.css +201 -203
  15. package/source/beta-components/badge/passport.json +332 -0
  16. package/source/beta-components/badge/styles.css +203 -204
  17. package/source/beta-components/breadcrumb/passport.json +243 -0
  18. package/source/beta-components/breadcrumb/styles.css +138 -139
  19. package/source/beta-components/button/passport.json +402 -0
  20. package/source/beta-components/button/passport.manual.json +31 -0
  21. package/source/beta-components/button/styles.css +232 -233
  22. package/source/beta-components/card/passport.json +337 -0
  23. package/source/beta-components/card/styles.css +230 -231
  24. package/source/beta-components/checkbox/passport.json +456 -0
  25. package/source/beta-components/checkbox/styles.css +211 -212
  26. package/source/beta-components/combobox/passport.json +456 -0
  27. package/source/beta-components/combobox/styles.css +419 -417
  28. package/source/beta-components/data-grid/agent/coerce.ts +368 -0
  29. package/source/beta-components/data-grid/agent/contract.ts +410 -0
  30. package/source/beta-components/data-grid/agent/dataset.ts +92 -0
  31. package/source/beta-components/data-grid/agent/engine.ts +470 -0
  32. package/source/beta-components/data-grid/agent/executors.ts +155 -0
  33. package/source/beta-components/data-grid/agent/index.ts +79 -0
  34. package/source/beta-components/data-grid/agent/intent.ts +324 -0
  35. package/source/beta-components/data-grid/agent/operations.ts +335 -0
  36. package/source/beta-components/data-grid/agent/validate.ts +630 -0
  37. package/source/beta-components/data-grid/agent/webmcp.ts +107 -0
  38. package/source/beta-components/data-grid/index.ts +14 -7
  39. package/source/beta-components/data-grid/passport.json +1051 -0
  40. package/source/beta-components/data-grid/passport.manual.json +255 -0
  41. package/source/beta-components/data-grid/react/AskGrid.tsx +164 -0
  42. package/source/beta-components/data-grid/react/DataGrid.tsx +39 -0
  43. package/source/beta-components/data-grid/styles.css +874 -717
  44. package/source/beta-components/date-picker/passport.json +407 -0
  45. package/source/beta-components/date-picker/styles.css +445 -446
  46. package/source/beta-components/dialog/passport.json +344 -0
  47. package/source/beta-components/dialog/styles.css +280 -278
  48. package/source/beta-components/file-uploader/passport.json +518 -0
  49. package/source/beta-components/file-uploader/styles.css +394 -395
  50. package/source/beta-components/input/passport.json +536 -0
  51. package/source/beta-components/input/styles.css +295 -296
  52. package/source/beta-components/menu/passport.json +322 -0
  53. package/source/beta-components/menu/styles.css +224 -222
  54. package/source/beta-components/modal/passport.json +289 -0
  55. package/source/beta-components/modal/styles.css +241 -239
  56. package/source/beta-components/number-input/passport.json +541 -0
  57. package/source/beta-components/number-input/styles.css +230 -231
  58. package/source/beta-components/popover/passport.json +238 -0
  59. package/source/beta-components/popover/styles.css +148 -146
  60. package/source/beta-components/progress/passport.json +270 -0
  61. package/source/beta-components/progress/styles.css +200 -202
  62. package/source/beta-components/radio-group/passport.json +477 -0
  63. package/source/beta-components/radio-group/styles.css +241 -242
  64. package/source/beta-components/shared/core/agent/adapter.ts +65 -0
  65. package/source/beta-components/shared/core/agent/history.ts +120 -0
  66. package/source/beta-components/shared/core/agent/index.ts +46 -0
  67. package/source/beta-components/shared/core/agent/numbers.ts +217 -0
  68. package/source/beta-components/shared/core/agent/schema.ts +180 -0
  69. package/source/beta-components/shared/core/agent/types.ts +169 -0
  70. package/source/beta-components/shared/core/agent/webmcp.ts +328 -0
  71. package/source/beta-components/shared/index.ts +9 -0
  72. package/source/beta-components/shared/react/GramproAIProvider.tsx +50 -0
  73. package/source/beta-components/shared/react/useAskAgent.ts +217 -0
  74. package/source/beta-components/shared/styles.css +79 -0
  75. package/source/beta-components/shared/version.json +4 -4
  76. package/source/beta-components/shared/version.ts +6 -6
  77. package/source/beta-components/skeleton/passport.json +251 -0
  78. package/source/beta-components/skeleton/styles.css +185 -186
  79. package/source/beta-components/spinner/passport.json +245 -0
  80. package/source/beta-components/spinner/styles.css +145 -146
  81. package/source/beta-components/switch/passport.json +421 -0
  82. package/source/beta-components/switch/styles.css +194 -196
  83. package/source/beta-components/tabs/passport.json +315 -0
  84. package/source/beta-components/tabs/styles.css +234 -235
  85. package/source/beta-components/textarea/passport.json +382 -0
  86. package/source/beta-components/textarea/styles.css +158 -159
  87. package/source/beta-components/toaster/passport.json +221 -0
  88. package/source/beta-components/toaster/styles.css +282 -283
  89. package/source/beta-components/tooltip/passport.json +170 -0
  90. package/source/beta-components/tooltip/styles.css +71 -72
  91. package/tools/env.cjs +61 -0
  92. package/tools/passport/cli.cjs +79 -0
  93. package/tools/passport/extract.cjs +493 -0
  94. package/tools/passport/index.cjs +185 -0
  95. package/tools/passport/merge.cjs +131 -0
  96. package/tools/passport/policy.cjs +65 -0
  97. package/tools/passport/validate.cjs +277 -0
  98. package/tools/ts-require.cjs +79 -0
  99. package/source/beta-components/accordion/__tests__/core.test.ts +0 -58
  100. package/source/beta-components/alert/__tests__/core.test.ts +0 -17
  101. package/source/beta-components/avatar/__tests__/core.test.ts +0 -88
  102. package/source/beta-components/badge/__tests__/core.test.ts +0 -46
  103. package/source/beta-components/breadcrumb/__tests__/core.test.ts +0 -58
  104. package/source/beta-components/button/__tests__/core.test.ts +0 -31
  105. package/source/beta-components/card/__tests__/core.test.ts +0 -57
  106. package/source/beta-components/checkbox/__tests__/core.test.ts +0 -40
  107. package/source/beta-components/combobox/__tests__/core.test.ts +0 -134
  108. package/source/beta-components/data-grid/__tests__/core.test.ts +0 -356
  109. package/source/beta-components/data-grid/__tests__/export.test.ts +0 -70
  110. package/source/beta-components/data-grid/__tests__/pdf.test.ts +0 -209
  111. package/source/beta-components/date-picker/__tests__/core.test.ts +0 -273
  112. package/source/beta-components/dialog/__tests__/core.test.ts +0 -86
  113. package/source/beta-components/file-uploader/__tests__/core.test.ts +0 -395
  114. package/source/beta-components/input/__tests__/core.test.ts +0 -75
  115. package/source/beta-components/menu/__tests__/core.test.ts +0 -120
  116. package/source/beta-components/modal/__tests__/core.test.ts +0 -55
  117. package/source/beta-components/number-input/__tests__/core.test.ts +0 -151
  118. package/source/beta-components/progress/__tests__/core.test.ts +0 -56
  119. package/source/beta-components/radio-group/__tests__/core.test.ts +0 -64
  120. package/source/beta-components/shared/__tests__/boundaries.test.ts +0 -95
  121. package/source/beta-components/shared/__tests__/core.test.ts +0 -55
  122. package/source/beta-components/shared/__tests__/position.test.ts +0 -143
  123. package/source/beta-components/skeleton/__tests__/core.test.ts +0 -41
  124. package/source/beta-components/spinner/__tests__/core.test.ts +0 -48
  125. package/source/beta-components/switch/__tests__/core.test.ts +0 -64
  126. package/source/beta-components/tabs/__tests__/core.test.ts +0 -51
  127. package/source/beta-components/textarea/__tests__/core.test.ts +0 -38
  128. package/source/beta-components/toaster/__tests__/core.test.ts +0 -256
  129. package/source/beta-components/tooltip/__tests__/core.test.ts +0 -42
@@ -5,225 +5,223 @@
5
5
  * `appearance: none`, drawn as a track and a thumb, so it keeps native
6
6
  * behavior and posts with forms. Tokens read the shared --gbs-* variables when
7
7
  * they are set on an ancestor (set them on :root to theme every component at
8
- * once). Rules live in the `components` layer, so utility classes passed
9
- * through `className` / `classNames` override them.
8
+ * once). Rules are unlayered: they beat a framework reset on specificity, and
9
+ * lose to anything you pass through `className`. With Tailwind v4, import this
10
+ * file after the framework and inside its components layer - see the README.
10
11
  */
11
- @layer theme, base, components, utilities;
12
12
 
13
- @layer components {
14
- .sw-root {
15
- --sw-fg: var(--gbs-fg, var(--dg-fg, light-dark(#18181b, #f4f4f5)));
16
- --sw-muted: var(--gbs-muted, var(--dg-muted, light-dark(#71717a, #a1a1aa)));
17
- --sw-track: var(--gbs-subtle, light-dark(#d4d4d8, #3f3f46));
18
- --sw-thumb: var(--gbs-bg, var(--dg-bg, light-dark(#ffffff, #f4f4f5)));
19
- --sw-accent: var(--gbs-accent, var(--dg-accent, light-dark(#2563eb, #60a5fa)));
20
- --sw-focus: var(--gbs-focus, var(--dg-focus, light-dark(#2563eb, #60a5fa)));
21
- --sw-danger: var(--gbs-danger, var(--dg-danger, light-dark(#dc2626, #f87171)));
22
- --sw-font-size: var(--gbs-font-size, var(--dg-font-size, 13px));
23
- --sw-height: 20px;
24
- --sw-width: 36px;
25
- --sw-gap: 3px;
26
- --sw-duration: 160ms;
27
-
28
- color-scheme: inherit;
29
- display: flex;
30
- align-items: flex-start;
31
- gap: 8px;
32
- min-width: 0;
33
- font-size: var(--sw-font-size);
34
- line-height: 1.4;
35
- color: var(--sw-fg);
36
- }
13
+ .sw-root {
14
+ --sw-fg: var(--gbs-fg, var(--dg-fg, light-dark(#18181b, #f4f4f5)));
15
+ --sw-muted: var(--gbs-muted, var(--dg-muted, light-dark(#71717a, #a1a1aa)));
16
+ --sw-track: var(--gbs-subtle, light-dark(#d4d4d8, #3f3f46));
17
+ --sw-thumb: var(--gbs-bg, var(--dg-bg, light-dark(#ffffff, #f4f4f5)));
18
+ --sw-accent: var(--gbs-accent, var(--dg-accent, light-dark(#2563eb, #60a5fa)));
19
+ --sw-focus: var(--gbs-focus, var(--dg-focus, light-dark(#2563eb, #60a5fa)));
20
+ --sw-danger: var(--gbs-danger, var(--dg-danger, light-dark(#dc2626, #f87171)));
21
+ --sw-font-size: var(--gbs-font-size, var(--dg-font-size, 13px));
22
+ --sw-height: 20px;
23
+ --sw-width: 36px;
24
+ --sw-gap: 3px;
25
+ --sw-duration: 160ms;
26
+
27
+ color-scheme: inherit;
28
+ display: flex;
29
+ align-items: flex-start;
30
+ gap: 8px;
31
+ min-width: 0;
32
+ font-size: var(--sw-font-size);
33
+ line-height: 1.4;
34
+ color: var(--sw-fg);
35
+ }
37
36
 
38
- :where(.dark, [data-theme="dark"]) .sw-root {
39
- color-scheme: dark;
40
- }
41
- :where(.light, [data-theme="light"]) .sw-root {
42
- color-scheme: light;
43
- }
37
+ :where(.dark, [data-theme="dark"]) .sw-root {
38
+ color-scheme: dark;
39
+ }
40
+ :where(.light, [data-theme="light"]) .sw-root {
41
+ color-scheme: light;
42
+ }
44
43
 
45
- :where(.sw-root) *,
46
- :where(.sw-root) *::before,
47
- :where(.sw-root) *::after {
48
- box-sizing: border-box;
49
- }
44
+ :where(.sw-root) *,
45
+ :where(.sw-root) *::before,
46
+ :where(.sw-root) *::after {
47
+ box-sizing: border-box;
48
+ }
50
49
 
51
- .sw-root[data-size="sm"] {
52
- --sw-height: 16px;
53
- --sw-width: 28px;
54
- --sw-gap: 2px;
55
- --sw-font-size: 12px;
56
- }
57
- .sw-root[data-size="lg"] {
58
- --sw-height: 24px;
59
- --sw-width: 44px;
60
- --sw-font-size: 14px;
61
- }
50
+ .sw-root[data-size="sm"] {
51
+ --sw-height: 16px;
52
+ --sw-width: 28px;
53
+ --sw-gap: 2px;
54
+ --sw-font-size: 12px;
55
+ }
56
+ .sw-root[data-size="lg"] {
57
+ --sw-height: 24px;
58
+ --sw-width: 44px;
59
+ --sw-font-size: 14px;
60
+ }
62
61
 
63
- /* The label first, the track pushed to the far edge: a settings row. */
64
- .sw-root[data-label-position="start"] {
65
- flex-direction: row-reverse;
66
- justify-content: space-between;
67
- }
62
+ /* The label first, the track pushed to the far edge: a settings row. */
63
+ .sw-root[data-label-position="start"] {
64
+ flex-direction: row-reverse;
65
+ justify-content: space-between;
66
+ }
68
67
 
69
- /* -------------------------------------------------------------- control */
68
+ /* -------------------------------------------------------------- control */
70
69
 
71
- .sw-control {
72
- position: relative;
73
- display: inline-flex;
74
- flex: none;
75
- /* Line the track up with the first line of the label. */
76
- align-items: center;
77
- height: calc(var(--sw-font-size) * 1.4);
78
- }
70
+ .sw-control {
71
+ position: relative;
72
+ display: inline-flex;
73
+ flex: none;
74
+ /* Line the track up with the first line of the label. */
75
+ align-items: center;
76
+ height: calc(var(--sw-font-size) * 1.4);
77
+ }
79
78
 
80
- .sw-input {
81
- position: absolute;
82
- inset: 0;
83
- width: 100%;
84
- height: 100%;
85
- margin: 0;
86
- padding: 0;
87
- border: 0;
88
- appearance: none;
89
- background: none;
90
- cursor: pointer;
91
- }
92
- .sw-input:disabled {
93
- cursor: not-allowed;
94
- }
95
- .sw-root[data-readonly] .sw-input {
96
- cursor: default;
97
- }
79
+ .sw-input {
80
+ position: absolute;
81
+ inset: 0;
82
+ width: 100%;
83
+ height: 100%;
84
+ margin: 0;
85
+ padding: 0;
86
+ border: 0;
87
+ appearance: none;
88
+ background: none;
89
+ cursor: pointer;
90
+ }
91
+ .sw-input:disabled {
92
+ cursor: not-allowed;
93
+ }
94
+ .sw-root[data-readonly] .sw-input {
95
+ cursor: default;
96
+ }
98
97
 
99
- .sw-track {
100
- display: inline-flex;
101
- align-items: center;
102
- width: var(--sw-width);
103
- height: var(--sw-height);
104
- padding: var(--sw-gap);
105
- border-radius: 999px;
106
- background: var(--sw-track);
107
- transition: background-color var(--sw-duration) ease;
108
- }
98
+ .sw-track {
99
+ display: inline-flex;
100
+ align-items: center;
101
+ width: var(--sw-width);
102
+ height: var(--sw-height);
103
+ padding: var(--sw-gap);
104
+ border-radius: 999px;
105
+ background: var(--sw-track);
106
+ transition: background-color var(--sw-duration) ease;
107
+ }
109
108
 
110
- .sw-thumb {
111
- width: calc(var(--sw-height) - var(--sw-gap) * 2);
112
- height: calc(var(--sw-height) - var(--sw-gap) * 2);
113
- border-radius: 50%;
114
- background: var(--sw-thumb);
115
- box-shadow: 0 1px 2px light-dark(rgb(0 0 0 / 0.25), rgb(0 0 0 / 0.5));
116
- /* `translate` rather than `margin-inline-start`, so it animates on the
117
- compositor and mirrors itself in right-to-left layouts. */
118
- translate: 0;
119
- transition: translate var(--sw-duration) ease;
120
- }
109
+ .sw-thumb {
110
+ width: calc(var(--sw-height) - var(--sw-gap) * 2);
111
+ height: calc(var(--sw-height) - var(--sw-gap) * 2);
112
+ border-radius: 50%;
113
+ background: var(--sw-thumb);
114
+ box-shadow: 0 1px 2px light-dark(rgb(0 0 0 / 0.25), rgb(0 0 0 / 0.5));
115
+ /* `translate` rather than `margin-inline-start`, so it animates on the
116
+ compositor and mirrors itself in right-to-left layouts. */
117
+ translate: 0;
118
+ transition: translate var(--sw-duration) ease;
119
+ }
121
120
 
122
- .sw-input:checked + .sw-track {
123
- background: var(--sw-accent);
124
- }
125
- .sw-input:checked + .sw-track .sw-thumb {
126
- translate: calc(var(--sw-width) - var(--sw-height)) 0;
127
- }
128
- .sw-control:dir(rtl) .sw-input:checked + .sw-track .sw-thumb {
129
- translate: calc((var(--sw-width) - var(--sw-height)) * -1) 0;
130
- }
121
+ .sw-input:checked + .sw-track {
122
+ background: var(--sw-accent);
123
+ }
124
+ .sw-input:checked + .sw-track .sw-thumb {
125
+ translate: calc(var(--sw-width) - var(--sw-height)) 0;
126
+ }
127
+ .sw-control:dir(rtl) .sw-input:checked + .sw-track .sw-thumb {
128
+ translate: calc((var(--sw-width) - var(--sw-height)) * -1) 0;
129
+ }
131
130
 
132
- .sw-input:focus-visible + .sw-track {
133
- outline: 2px solid var(--sw-focus);
134
- outline-offset: 2px;
135
- }
136
- .sw-input:hover:not(:disabled) + .sw-track {
137
- background: color-mix(in oklab, var(--sw-track) 88%, var(--sw-fg));
138
- }
139
- .sw-input:checked:hover:not(:disabled) + .sw-track {
140
- background: color-mix(in oklab, var(--sw-accent) 88%, black);
141
- }
131
+ .sw-input:focus-visible + .sw-track {
132
+ outline: 2px solid var(--sw-focus);
133
+ outline-offset: 2px;
134
+ }
135
+ .sw-input:hover:not(:disabled) + .sw-track {
136
+ background: color-mix(in oklab, var(--sw-track) 88%, var(--sw-fg));
137
+ }
138
+ .sw-input:checked:hover:not(:disabled) + .sw-track {
139
+ background: color-mix(in oklab, var(--sw-accent) 88%, black);
140
+ }
142
141
 
143
- .sw-root[data-invalid] .sw-track {
144
- outline: 1px solid var(--sw-danger);
145
- outline-offset: 1px;
146
- }
147
- /* Only the track dims; the label keeps its contrast, as the Checkbox's does. */
148
- .sw-input:disabled + .sw-track {
149
- opacity: 0.5;
150
- }
142
+ .sw-root[data-invalid] .sw-track {
143
+ outline: 1px solid var(--sw-danger);
144
+ outline-offset: 1px;
145
+ }
146
+ /* Only the track dims; the label keeps its contrast, as the Checkbox's does. */
147
+ .sw-input:disabled + .sw-track {
148
+ opacity: 0.5;
149
+ }
151
150
 
152
- /* The thumb keeps turning while the change is being saved. */
153
- .sw-root[data-saving] .sw-thumb {
154
- border: 2px solid transparent;
155
- border-top-color: var(--sw-accent);
156
- animation: sw-spin 700ms linear infinite;
157
- }
158
- .sw-root[data-saving] .sw-input {
159
- cursor: progress;
160
- }
151
+ /* The thumb keeps turning while the change is being saved. */
152
+ .sw-root[data-saving] .sw-thumb {
153
+ border: 2px solid transparent;
154
+ border-top-color: var(--sw-accent);
155
+ animation: sw-spin 700ms linear infinite;
156
+ }
157
+ .sw-root[data-saving] .sw-input {
158
+ cursor: progress;
159
+ }
161
160
 
162
- @keyframes sw-spin {
163
- to {
164
- rotate: 1turn;
165
- }
161
+ @keyframes sw-spin {
162
+ to {
163
+ rotate: 1turn;
166
164
  }
165
+ }
167
166
 
168
- /* ----------------------------------------------------------------- text */
167
+ /* ----------------------------------------------------------------- text */
169
168
 
170
- .sw-text {
171
- display: flex;
172
- flex-direction: column;
173
- gap: 2px;
174
- min-width: 0;
175
- }
176
- .sw-label {
177
- font-weight: 500;
178
- cursor: pointer;
179
- }
180
- .sw-root[data-disabled] .sw-label {
181
- color: var(--sw-muted);
182
- cursor: not-allowed;
183
- }
184
- .sw-label[data-required]::after {
185
- content: " *";
186
- color: var(--sw-danger);
187
- }
188
- .sw-description {
189
- color: var(--sw-muted);
190
- text-wrap: pretty;
169
+ .sw-text {
170
+ display: flex;
171
+ flex-direction: column;
172
+ gap: 2px;
173
+ min-width: 0;
174
+ }
175
+ .sw-label {
176
+ font-weight: 500;
177
+ cursor: pointer;
178
+ }
179
+ .sw-root[data-disabled] .sw-label {
180
+ color: var(--sw-muted);
181
+ cursor: not-allowed;
182
+ }
183
+ .sw-label[data-required]::after {
184
+ content: " *";
185
+ color: var(--sw-danger);
186
+ }
187
+ .sw-description {
188
+ color: var(--sw-muted);
189
+ text-wrap: pretty;
190
+ }
191
+ .sw-error {
192
+ color: var(--sw-danger);
193
+ text-wrap: pretty;
194
+ }
195
+
196
+ .sw-sr-only {
197
+ position: absolute;
198
+ width: 1px;
199
+ height: 1px;
200
+ margin: -1px;
201
+ padding: 0;
202
+ border: 0;
203
+ overflow: hidden;
204
+ clip-path: inset(50%);
205
+ white-space: nowrap;
206
+ }
207
+
208
+ @media (prefers-reduced-motion: reduce) {
209
+ .sw-root {
210
+ --sw-duration: 0s;
191
211
  }
192
- .sw-error {
193
- color: var(--sw-danger);
194
- text-wrap: pretty;
212
+ .sw-root[data-saving] .sw-thumb {
213
+ animation-duration: 2s;
195
214
  }
215
+ }
196
216
 
197
- .sw-sr-only {
198
- position: absolute;
199
- width: 1px;
200
- height: 1px;
201
- margin: -1px;
202
- padding: 0;
203
- border: 0;
204
- overflow: hidden;
205
- clip-path: inset(50%);
206
- white-space: nowrap;
217
+ @media (forced-colors: active) {
218
+ .sw-track {
219
+ border: 1px solid CanvasText;
207
220
  }
208
-
209
- @media (prefers-reduced-motion: reduce) {
210
- .sw-root {
211
- --sw-duration: 0s;
212
- }
213
- .sw-root[data-saving] .sw-thumb {
214
- animation-duration: 2s;
215
- }
221
+ .sw-input:checked + .sw-track {
222
+ background: Highlight;
216
223
  }
217
-
218
- @media (forced-colors: active) {
219
- .sw-track {
220
- border: 1px solid CanvasText;
221
- }
222
- .sw-input:checked + .sw-track {
223
- background: Highlight;
224
- }
225
- .sw-thumb {
226
- background: CanvasText;
227
- }
224
+ .sw-thumb {
225
+ background: CanvasText;
228
226
  }
229
227
  }