@nearform/quantum 1.7.2 → 1.7.3

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/dist/index.d.mts CHANGED
@@ -198,6 +198,10 @@ declare const _default: {
198
198
  DEFAULT: string;
199
199
  dark: string;
200
200
  };
201
+ surface: {
202
+ DEFAULT: string;
203
+ dark: string;
204
+ };
201
205
  inverse: {
202
206
  DEFAULT: string;
203
207
  dark: string;
package/dist/index.d.ts CHANGED
@@ -198,6 +198,10 @@ declare const _default: {
198
198
  DEFAULT: string;
199
199
  dark: string;
200
200
  };
201
+ surface: {
202
+ DEFAULT: string;
203
+ dark: string;
204
+ };
201
205
  inverse: {
202
206
  DEFAULT: string;
203
207
  dark: string;
package/dist/index.js CHANGED
@@ -364,6 +364,26 @@ var background = {
364
364
  DEFAULT: colors.grey["50"],
365
365
  dark: colors.grey["800"]
366
366
  },
367
+ /**
368
+ * The resting fill of a container that sits on the page: a card, a popover,
369
+ * a table body, a dialog panel.
370
+ *
371
+ * It exists because `background` cannot play that role in both modes. In
372
+ * light the page is `background-alt` and `background` is a step off it, so a
373
+ * surface painted `background` reads as raised (1.10:1). In dark the page is
374
+ * `background` itself, so the same class paints the surface the colour of
375
+ * the page it sits on - 1.00:1, a container that is only a container because
376
+ * of its border.
377
+ *
378
+ * So the light value is `background`'s, unchanged, and the dark value is one
379
+ * step up from the page. That keeps the step `subtle` adds for a header or a
380
+ * zebra stripe (1.21:1 above this, against light's 1.05:1) and leaves `alt`
381
+ * free for the selected row, which would otherwise collide with the stripes.
382
+ */
383
+ surface: {
384
+ DEFAULT: "#FFF",
385
+ dark: colors.grey["900"]
386
+ },
367
387
  inverse: {
368
388
  DEFAULT: colors.grey["900"],
369
389
  dark: "#FFF"
@@ -1794,9 +1814,9 @@ var cardVariants = (0, import_class_variance_authority11.cva)(
1794
1814
  variants: {
1795
1815
  variant: {
1796
1816
  outline: [
1797
- "bg-background",
1817
+ "bg-background-surface",
1798
1818
  "border-border",
1799
- "dark:bg-grey-900",
1819
+ "dark:bg-background-surface-dark",
1800
1820
  "dark:border-grey-700"
1801
1821
  ],
1802
1822
  filled: [
@@ -3448,7 +3468,7 @@ var ModalContent = React23.forwardRef((_a, ref) => {
3448
3468
  __spreadProps(__spreadValues({
3449
3469
  ref,
3450
3470
  className: cn(
3451
- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-6 shadow-lg bg-background dark:bg-foreground duration-200 sm:rounded-lg",
3471
+ "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-6 shadow-lg bg-background-surface dark:bg-background-surface-dark duration-200 sm:rounded-lg",
3452
3472
  className
3453
3473
  )
3454
3474
  }, props), {
@@ -3585,7 +3605,7 @@ var PageHeaderContext = React24.createContext("md");
3585
3605
  var pageHeaderVariants = (0, import_class_variance_authority20.cva)(
3586
3606
  [
3587
3607
  "flex flex-wrap items-center justify-between gap-x-6 gap-y-2",
3588
- "rounded-lg bg-background dark:bg-background-dark",
3608
+ "rounded-lg bg-background-surface dark:bg-background-surface-dark",
3589
3609
  "text-foreground dark:text-foreground-dark"
3590
3610
  ],
3591
3611
  {
@@ -3981,7 +4001,7 @@ var popoverVariants = (0, import_class_variance_authority23.cva)([
3981
4001
  "z-50",
3982
4002
  "border border-2 border-border-subtle dark:border-border-dark",
3983
4003
  "rounded-lg",
3984
- "bg-background dark:bg-background-dark",
4004
+ "bg-background-surface dark:bg-background-surface-dark",
3985
4005
  "text-foreground text-sm font-normal dark:text-white",
3986
4006
  "shadow",
3987
4007
  "outline-hidden",
@@ -4316,7 +4336,7 @@ var contentVariants = (0, import_class_variance_authority25.cva)([
4316
4336
  "relative",
4317
4337
  "z-50",
4318
4338
  "min-w-[8rem]",
4319
- "bg-background",
4339
+ "bg-background-surface",
4320
4340
  "rounded-lg",
4321
4341
  "border border-[2px]",
4322
4342
  "border-border-subtle",
@@ -4326,7 +4346,7 @@ var contentVariants = (0, import_class_variance_authority25.cva)([
4326
4346
  "data-[side=left]:slide-in-from-right-2",
4327
4347
  "data-[side=right]:slide-in-from-left-2",
4328
4348
  "data-[side=top]:slide-in-from-bottom-2",
4329
- "dark:bg-background-dark",
4349
+ "dark:bg-background-surface-dark",
4330
4350
  "dark:border-border-subtle-dark",
4331
4351
  "dark:text-foreground-dark"
4332
4352
  ]);
@@ -4446,7 +4466,7 @@ var SortAndShow = React31.forwardRef((_a, ref) => {
4446
4466
  ref,
4447
4467
  className: cn(
4448
4468
  "flex flex-wrap items-center gap-x-6 gap-y-2 px-4 py-3",
4449
- "rounded-lg bg-background dark:bg-background-dark",
4469
+ "rounded-lg bg-background-surface dark:bg-background-surface-dark",
4450
4470
  className
4451
4471
  )
4452
4472
  }, props)
@@ -4637,13 +4657,13 @@ var splitButtonMenuVariants = (0, import_class_variance_authority26.cva)([
4637
4657
  "rounded-lg",
4638
4658
  "border-2",
4639
4659
  "border-border-subtle",
4640
- "bg-background",
4660
+ "bg-background-surface",
4641
4661
  "text-sm",
4642
4662
  "text-foreground",
4643
4663
  "shadow",
4644
4664
  "outline-hidden",
4645
4665
  "dark:border-border-dark",
4646
- "dark:bg-background-dark",
4666
+ "dark:bg-background-surface-dark",
4647
4667
  "dark:text-foreground-dark"
4648
4668
  ]);
4649
4669
  var splitButtonItemVariants = (0, import_class_variance_authority26.cva)([
@@ -5147,7 +5167,7 @@ var Subnav = React36.forwardRef(
5147
5167
  "aria-labelledby": ariaLabelledBy != null ? ariaLabelledBy : ariaLabel ? void 0 : headingId,
5148
5168
  className: cn(
5149
5169
  "flex flex-col gap-4",
5150
- "bg-background dark:bg-background-dark",
5170
+ "bg-background-surface dark:bg-background-surface-dark",
5151
5171
  "text-foreground dark:text-foreground-dark",
5152
5172
  className
5153
5173
  )
@@ -5234,16 +5254,19 @@ SubnavLink.displayName = "SubnavLink";
5234
5254
  var React37 = __toESM(require("react"));
5235
5255
  var import_class_variance_authority30 = require("class-variance-authority");
5236
5256
  var import_jsx_runtime40 = require("react/jsx-runtime");
5237
- var tableBodyVariants = (0, import_class_variance_authority30.cva)("bg-background dark:bg-background-dark", {
5238
- variants: {
5239
- variant: {
5240
- zebra: [
5241
- "[:where(&>*:nth-child(even))]:bg-background-subtle",
5242
- "dark:[:where(&>*:nth-child(even))]:bg-background-subtle-dark"
5243
- ]
5257
+ var tableBodyVariants = (0, import_class_variance_authority30.cva)(
5258
+ "bg-background-surface dark:bg-background-surface-dark",
5259
+ {
5260
+ variants: {
5261
+ variant: {
5262
+ zebra: [
5263
+ "[:where(&>*:nth-child(even))]:bg-background-subtle",
5264
+ "dark:[:where(&>*:nth-child(even))]:bg-background-subtle-dark"
5265
+ ]
5266
+ }
5244
5267
  }
5245
5268
  }
5246
- });
5269
+ );
5247
5270
  var alignVariants2 = (0, import_class_variance_authority30.cva)("", {
5248
5271
  variants: {
5249
5272
  align: {