@nexus-cross/design-system 1.0.10 → 1.0.12

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 (39) hide show
  1. package/cursor-rules/nexus-ui-api.mdc +27 -5
  2. package/dist/chunks/{chunk-CV4GMFWP.js → chunk-2WM23PO6.js} +5 -3
  3. package/dist/chunks/chunk-5J63FUAS.mjs +256 -0
  4. package/dist/chunks/{chunk-BMYFRG3M.mjs → chunk-BQ6GJJB6.mjs} +1 -1
  5. package/dist/chunks/{chunk-P73MEU7N.mjs → chunk-HI5XZ4PB.mjs} +5 -3
  6. package/dist/chunks/chunk-LAGQ7J5A.js +279 -0
  7. package/dist/chunks/{chunk-6MT6Y6OF.js → chunk-WXMMOQXZ.js} +1 -1
  8. package/dist/components/ImageUpload.d.ts +23 -0
  9. package/dist/components/ImageUpload.d.ts.map +1 -0
  10. package/dist/components/ToggleGroup.d.ts +2 -0
  11. package/dist/components/ToggleGroup.d.ts.map +1 -1
  12. package/dist/image-upload.js +16 -0
  13. package/dist/image-upload.mjs +3 -0
  14. package/dist/index.d.ts +2 -0
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +25 -16
  17. package/dist/index.mjs +3 -2
  18. package/dist/schemas/_all.json +87 -0
  19. package/dist/schemas/image-upload.d.ts +45 -0
  20. package/dist/schemas/image-upload.d.ts.map +1 -0
  21. package/dist/schemas/imageUpload.json +83 -0
  22. package/dist/schemas/index.d.ts +1 -0
  23. package/dist/schemas/index.d.ts.map +1 -1
  24. package/dist/schemas/toggle-group.d.ts +3 -0
  25. package/dist/schemas/toggle-group.d.ts.map +1 -1
  26. package/dist/schemas/toggleGroup.json +4 -0
  27. package/dist/schemas.js +19 -0
  28. package/dist/schemas.mjs +19 -1
  29. package/dist/styles/.generated/built.d.ts +1 -1
  30. package/dist/styles/.generated/built.d.ts.map +1 -1
  31. package/dist/styles/layer.js +2 -2
  32. package/dist/styles/layer.mjs +1 -1
  33. package/dist/styles.css +269 -15
  34. package/dist/styles.js +2 -2
  35. package/dist/styles.layered.css +269 -15
  36. package/dist/styles.mjs +1 -1
  37. package/dist/toggle-group.js +3 -3
  38. package/dist/toggle-group.mjs +1 -1
  39. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"built.d.ts","sourceRoot":"","sources":["../../../src/styles/.generated/built.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,GAAG,s17HAAwoxG,CAAC;AAClpxG,eAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"built.d.ts","sourceRoot":"","sources":["../../../src/styles/.generated/built.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,GAAG,69nIAAqr9G,CAAC;AAC/r9G,eAAe,GAAG,CAAC"}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk6MT6Y6OF_js = require('../chunks/chunk-6MT6Y6OF.js');
3
+ var chunkWXMMOQXZ_js = require('../chunks/chunk-WXMMOQXZ.js');
4
4
  require('../chunks/chunk-JNMCYWGY.js');
5
5
 
6
6
  // src/styles/inject-layer.ts
@@ -9,7 +9,7 @@ var __nexus_styles_injected__ = typeof document !== "undefined" && !document.get
9
9
  const style = document.createElement("style");
10
10
  style.id = STYLE_ID;
11
11
  style.textContent = `@layer nexus {
12
- ${chunk6MT6Y6OF_js.built_default}
12
+ ${chunkWXMMOQXZ_js.built_default}
13
13
  }`;
14
14
  document.head.appendChild(style);
15
15
  return true;
@@ -1,4 +1,4 @@
1
- import { built_default } from '../chunks/chunk-BMYFRG3M.mjs';
1
+ import { built_default } from '../chunks/chunk-BQ6GJJB6.mjs';
2
2
  import '../chunks/chunk-CVYXRSXT.mjs';
3
3
 
4
4
  // src/styles/inject-layer.ts
package/dist/styles.css CHANGED
@@ -3917,14 +3917,17 @@
3917
3917
  align-items: center;
3918
3918
  gap: var(--spacing-gap-sm, 0.5rem);
3919
3919
  padding: var(--spacing-padding-xs, 0.5rem) var(--spacing-padding-sm, 0.75rem);
3920
- border: var(--border-width-stroke-default, 1px) solid var(--color-border-default);
3920
+ border: var(--border-width-stroke-default, 1px) solid
3921
+ var(--color-border-default);
3921
3922
  border-radius: var(--radius-corner-md, 0.5rem);
3922
3923
  background: var(--color-surface-default);
3923
3924
  font: inherit;
3924
3925
  font-size: var(--text-text-sm, 0.875rem);
3925
3926
  color: var(--color-text-primary);
3926
3927
  cursor: pointer;
3927
- transition: border-color 150ms, box-shadow 150ms;
3928
+ transition:
3929
+ border-color 150ms,
3930
+ box-shadow 150ms;
3928
3931
  min-width: 10rem;
3929
3932
  }
3930
3933
  .nexus-datepicker__trigger:hover {
@@ -3959,10 +3962,12 @@
3959
3962
  .nexus-datepicker__popover {
3960
3963
  z-index: var(--z-index-layer-popover, 30);
3961
3964
  background: var(--color-surface-default);
3962
- border: var(--border-width-stroke-default, 1px) solid var(--color-border-default);
3965
+ border: var(--border-width-stroke-default, 1px) solid
3966
+ var(--color-border-default);
3963
3967
  border-radius: var(--radius-corner-lg, 0.75rem);
3964
3968
  box-shadow: var(--shadow-xl, 0 4px 15px -3px rgb(0 0 0 / 0.12));
3965
- padding: var(--spacing-padding-sm, 0.75rem) var(--spacing-padding-md, 1rem) var(--spacing-padding-md, 1rem);
3969
+ padding: var(--spacing-padding-sm, 0.75rem) var(--spacing-padding-md, 1rem)
3970
+ var(--spacing-padding-md, 1rem);
3966
3971
  animation: nexus-datepicker-enter-bottom 200ms cubic-bezier(0, 0, 0.2, 1);
3967
3972
  }
3968
3973
 
@@ -4008,7 +4013,9 @@
4008
4013
  border-radius: var(--radius-corner-full, 9999px);
4009
4014
  cursor: pointer;
4010
4015
  color: var(--color-icon-tertiary);
4011
- transition: background 150ms, color 150ms;
4016
+ transition:
4017
+ background 150ms,
4018
+ color 150ms;
4012
4019
  }
4013
4020
  .nexus-calendar__nav-btn svg {
4014
4021
  width: 1.125rem;
@@ -4063,7 +4070,11 @@
4063
4070
  font-size: var(--text-text-sm, 0.875rem);
4064
4071
  color: var(--color-text-primary);
4065
4072
  position: relative;
4066
- transition: background 150ms, color 150ms, border-color 150ms, box-shadow 150ms;
4073
+ transition:
4074
+ background 150ms,
4075
+ color 150ms,
4076
+ border-color 150ms,
4077
+ box-shadow 150ms;
4067
4078
  }
4068
4079
  .nexus-calendar__day:hover {
4069
4080
  background: color-mix(in srgb, var(--color-accent-primary) 10%, transparent);
@@ -4116,12 +4127,24 @@
4116
4127
  }
4117
4128
 
4118
4129
  @keyframes nexus-datepicker-enter-bottom {
4119
- from { opacity: 0; transform: translateY(-6px) scale(0.98); }
4120
- to { opacity: 1; transform: translateY(0) scale(1); }
4130
+ from {
4131
+ opacity: 0;
4132
+ transform: translateY(-6px) scale(0.98);
4133
+ }
4134
+ to {
4135
+ opacity: 1;
4136
+ transform: translateY(0) scale(1);
4137
+ }
4121
4138
  }
4122
4139
  @keyframes nexus-datepicker-enter-top {
4123
- from { opacity: 0; transform: translateY(6px) scale(0.98); }
4124
- to { opacity: 1; transform: translateY(0) scale(1); }
4140
+ from {
4141
+ opacity: 0;
4142
+ transform: translateY(6px) scale(0.98);
4143
+ }
4144
+ to {
4145
+ opacity: 1;
4146
+ transform: translateY(0) scale(1);
4147
+ }
4125
4148
  }
4126
4149
  .nexus-datepicker__popover[data-side='bottom'] {
4127
4150
  animation-name: nexus-datepicker-enter-bottom;
@@ -4130,11 +4153,21 @@
4130
4153
  animation-name: nexus-datepicker-enter-top;
4131
4154
  }
4132
4155
  @media (prefers-reduced-motion: reduce) {
4133
- .nexus-datepicker__popover { animation: none; }
4134
- .nexus-calendar__day { transition: none; }
4135
- .nexus-datepicker__trigger { transition: none; }
4136
- .nexus-calendar__nav-btn { transition: none; }
4137
- .nexus-datepicker__icon { transition: none; }
4156
+ .nexus-datepicker__popover {
4157
+ animation: none;
4158
+ }
4159
+ .nexus-calendar__day {
4160
+ transition: none;
4161
+ }
4162
+ .nexus-datepicker__trigger {
4163
+ transition: none;
4164
+ }
4165
+ .nexus-calendar__nav-btn {
4166
+ transition: none;
4167
+ }
4168
+ .nexus-datepicker__icon {
4169
+ transition: none;
4170
+ }
4138
4171
  }
4139
4172
 
4140
4173
  @keyframes nexus-fade-in {
@@ -4147,3 +4180,224 @@
4147
4180
  transform: translateY(0);
4148
4181
  }
4149
4182
  }
4183
+
4184
+ /* ─── ImageUpload ─── */
4185
+ .nexus-image-upload__container {
4186
+ width: 100%;
4187
+ background: var(--color-bg-subtle);
4188
+ border-radius: var(--radius-corner-md, 8px);
4189
+ overflow: hidden;
4190
+ }
4191
+ .nexus-image-upload {
4192
+ position: relative;
4193
+ display: flex;
4194
+ flex-direction: column;
4195
+ align-items: center;
4196
+ justify-content: center;
4197
+ gap: var(--spacing-gap-sm, 0.5rem);
4198
+ width: 100%;
4199
+ border: 1px dashed var(--color-border-medium);
4200
+ border-radius: var(--radius-corner-md, 8px);
4201
+ background: transparent;
4202
+ cursor: pointer;
4203
+ overflow: hidden;
4204
+ transition:
4205
+ border-color 150ms ease,
4206
+ background-color 150ms ease,
4207
+ box-shadow 150ms ease;
4208
+ outline: none;
4209
+ }
4210
+ .nexus-image-upload:hover {
4211
+ border-color: var(--color-border-default-hover);
4212
+ box-shadow: 0 0 0 0.5px var(--color-border-default-hover);
4213
+ }
4214
+ .nexus-image-upload:focus-visible {
4215
+ outline: none;
4216
+ border-color: var(--color-accent-primary);
4217
+ box-shadow: 0 0 0 0.5px var(--color-accent-primary);
4218
+ }
4219
+ .nexus-image-upload--dragging {
4220
+ border-color: var(--color-accent-primary);
4221
+ border-style: solid;
4222
+ background: color-mix(
4223
+ in srgb,
4224
+ var(--color-accent-primary) 6%,
4225
+ var(--color-surface-default)
4226
+ );
4227
+ }
4228
+ .nexus-image-upload--disabled {
4229
+ opacity: var(--opacity-disabled-element, 0.4);
4230
+ cursor: not-allowed;
4231
+ pointer-events: none;
4232
+ }
4233
+
4234
+ .nexus-image-upload--sm {
4235
+ padding: var(--spacing-padding-xs, 0.5rem) var(--spacing-padding-sm, 0.75rem);
4236
+ min-height: 80px;
4237
+ }
4238
+ .nexus-image-upload--md {
4239
+ padding: var(--spacing-padding-md, 1rem) var(--spacing-padding-sm, 0.75rem);
4240
+ min-height: 120px;
4241
+ }
4242
+ .nexus-image-upload--lg {
4243
+ padding: var(--spacing-padding-xl, 2rem) var(--spacing-padding-md, 1rem);
4244
+ min-height: 180px;
4245
+ }
4246
+
4247
+ .nexus-image-upload__icon {
4248
+ width: var(--size-icon-xl, 32px);
4249
+ height: var(--size-icon-xl, 32px);
4250
+ color: var(--color-icon-muted);
4251
+ flex-shrink: 0;
4252
+ }
4253
+ .nexus-image-upload--sm .nexus-image-upload__icon {
4254
+ width: var(--size-icon-lg, 24px);
4255
+ height: var(--size-icon-lg, 24px);
4256
+ }
4257
+
4258
+ .nexus-image-upload__text-group {
4259
+ display: flex;
4260
+ flex-direction: column;
4261
+ align-items: center;
4262
+ gap: var(--spacing-gap-xs, 0.25rem);
4263
+ }
4264
+ .nexus-image-upload__text {
4265
+ font-size: var(--text-text-medium-xs);
4266
+ font-weight: var(--font-weight-text-medium-xs, 500);
4267
+ line-height: 1.5;
4268
+ letter-spacing: var(--letter-spacing-text-medium-xs, -0.01em);
4269
+ color: var(--color-text-tertiary);
4270
+ white-space: nowrap;
4271
+ }
4272
+ .nexus-image-upload__format {
4273
+ font-size: var(--text-text-xs);
4274
+ font-weight: var(--font-weight-text-xs, 400);
4275
+ line-height: 1.5;
4276
+ letter-spacing: var(--letter-spacing-text-xs, -0.01em);
4277
+ color: var(--color-text-tertiary);
4278
+ word-break: keep-all;
4279
+ overflow-wrap: break-word;
4280
+ }
4281
+ .nexus-image-upload__input {
4282
+ position: absolute;
4283
+ width: 1px;
4284
+ height: 1px;
4285
+ padding: 0;
4286
+ margin: -1px;
4287
+ overflow: hidden;
4288
+ clip: rect(0, 0, 0, 0);
4289
+ white-space: nowrap;
4290
+ border-width: 0;
4291
+ }
4292
+
4293
+ /* ─── ImageUpload: Preview State ─── */
4294
+ .nexus-image-upload--has-preview {
4295
+ display: flex;
4296
+ flex-direction: row;
4297
+ align-items: flex-start;
4298
+ gap: var(--spacing-gap-md, 1rem);
4299
+ padding: 6px 6px 0 0;
4300
+ overflow: visible;
4301
+ }
4302
+ .nexus-image-upload__preview-area {
4303
+ position: relative;
4304
+ flex-shrink: 0;
4305
+ }
4306
+ .nexus-image-upload__preview-wrapper {
4307
+ width: 116px;
4308
+ height: 116px;
4309
+ border-radius: var(--radius-corner-md, 8px);
4310
+ border: 1px solid var(--color-border-default);
4311
+ overflow: hidden;
4312
+ }
4313
+ .nexus-image-upload--sm .nexus-image-upload__preview-wrapper {
4314
+ width: 80px;
4315
+ height: 80px;
4316
+ }
4317
+ .nexus-image-upload--lg .nexus-image-upload__preview-wrapper {
4318
+ width: 160px;
4319
+ height: 160px;
4320
+ }
4321
+ .nexus-image-upload__preview {
4322
+ width: 100%;
4323
+ height: 100%;
4324
+ object-fit: contain;
4325
+ pointer-events: none;
4326
+ border-radius: var(--radius-corner-md, 8px);
4327
+ }
4328
+ .nexus-image-upload__remove {
4329
+ position: absolute;
4330
+ top: -6px;
4331
+ right: -6px;
4332
+ display: flex;
4333
+ align-items: center;
4334
+ justify-content: center;
4335
+ width: 20px;
4336
+ height: 20px;
4337
+ border: none;
4338
+ border-radius: var(--radius-corner-full, 9999px);
4339
+ background: var(--color-surface-inverted);
4340
+ color: var(--color-icon-inverted);
4341
+ cursor: pointer;
4342
+ transition: opacity 150ms ease;
4343
+ z-index: 1;
4344
+ }
4345
+ .nexus-image-upload__remove:hover {
4346
+ opacity: 0.8;
4347
+ }
4348
+ .nexus-image-upload__remove-icon {
4349
+ width: 16px;
4350
+ height: 16px;
4351
+ }
4352
+
4353
+ .nexus-image-upload__info {
4354
+ display: flex;
4355
+ flex-direction: column;
4356
+ align-items: flex-start;
4357
+ gap: var(--spacing-gap-sm, 0.5rem);
4358
+ padding-top: 2px;
4359
+ }
4360
+ .nexus-image-upload__change-btn {
4361
+ display: inline-flex;
4362
+ align-items: center;
4363
+ justify-content: center;
4364
+ height: var(--size-control-xs, 24px);
4365
+ padding: var(--spacing-padding-2xs, 0.25rem) var(--spacing-padding-xs, 0.5rem);
4366
+ border: 1px solid var(--color-border-default);
4367
+ border-radius: var(--radius-corner-sm, 4px);
4368
+ background: var(--color-surface-default);
4369
+ font-size: var(--text-label-sm);
4370
+ font-weight: var(--font-weight-label-sm, 500);
4371
+ color: var(--color-text-primary);
4372
+ cursor: pointer;
4373
+ white-space: nowrap;
4374
+ transition:
4375
+ border-color 150ms ease,
4376
+ background-color 150ms ease;
4377
+ }
4378
+ .nexus-image-upload__change-btn:hover {
4379
+ border-color: var(--color-border-default-hover);
4380
+ background: var(--color-surface-default-hover);
4381
+ }
4382
+
4383
+ /* ─── ImageUpload: Field wrapper (label + description) ─── */
4384
+ .nexus-image-upload-field {
4385
+ display: flex;
4386
+ flex-direction: column;
4387
+ gap: var(--spacing-gap-xs, 0.25rem);
4388
+ }
4389
+ .nexus-image-upload-field__label {
4390
+ font-size: var(--text-label-semibold-md);
4391
+ font-weight: var(--font-weight-label-semibold-md, 600);
4392
+ line-height: 1;
4393
+ letter-spacing: var(--letter-spacing-label-semibold-md, 0);
4394
+ color: var(--color-text-tertiary);
4395
+ }
4396
+ .nexus-image-upload-field__description {
4397
+ font-size: var(--text-text-xs);
4398
+ font-weight: var(--font-weight-text-xs, 400);
4399
+ line-height: 1.5;
4400
+ letter-spacing: var(--letter-spacing-text-xs, -0.01em);
4401
+ color: var(--color-text-tertiary);
4402
+ margin: 0;
4403
+ }
package/dist/styles.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk6MT6Y6OF_js = require('./chunks/chunk-6MT6Y6OF.js');
3
+ var chunkWXMMOQXZ_js = require('./chunks/chunk-WXMMOQXZ.js');
4
4
  require('./chunks/chunk-JNMCYWGY.js');
5
5
 
6
6
  // src/styles/inject.ts
@@ -8,7 +8,7 @@ var STYLE_ID = "__nexus-ds__";
8
8
  var __nexus_styles_injected__ = typeof document !== "undefined" && !document.getElementById(STYLE_ID) ? (() => {
9
9
  const style = document.createElement("style");
10
10
  style.id = STYLE_ID;
11
- style.textContent = chunk6MT6Y6OF_js.built_default;
11
+ style.textContent = chunkWXMMOQXZ_js.built_default;
12
12
  document.head.appendChild(style);
13
13
  return true;
14
14
  })() : false;