@sanity/ui 5.0.0-alpha.1 → 5.0.0-alpha.2

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": "@sanity/ui",
3
- "version": "5.0.0-alpha.1",
3
+ "version": "5.0.0-alpha.2",
4
4
  "description": "Sanity UI Library",
5
5
  "keywords": [
6
6
  "components",
@@ -41,7 +41,7 @@ export function Eyebrow<T extends ElementType = 'span'>({
41
41
 
42
42
  return (
43
43
  <Component
44
- className={clsx(eyebrowClassName, 'sui-overflow-hidden', className)}
44
+ className={clsx(eyebrowClassName, props.truncate && 'sui-overflow-hidden', className)}
45
45
  style={style}
46
46
  data-ui="Eyebrow"
47
47
  {...rest}
@@ -41,7 +41,7 @@ export function Heading<T extends ElementType = 'h2'>({
41
41
 
42
42
  return (
43
43
  <Component
44
- className={clsx(headingClassName, 'sui-overflow-hidden', className)}
44
+ className={clsx(headingClassName, props.truncate && 'sui-overflow-hidden', className)}
45
45
  style={style}
46
46
  data-ui="Heading"
47
47
  {...rest}
@@ -40,7 +40,7 @@ export function Text<T extends ElementType = 'span'>({
40
40
 
41
41
  return (
42
42
  <Component
43
- className={clsx(textClassName, 'sui-overflow-hidden', className)}
43
+ className={clsx(textClassName, props.truncate && 'sui-overflow-hidden', className)}
44
44
  style={style}
45
45
  data-ui="Text"
46
46
  {...rest}
@@ -17,46 +17,48 @@
17
17
  }
18
18
 
19
19
  /* Prevent adjustments of font size after orientation changes in iOS. */
20
- html {
20
+ :where(html) {
21
21
  -webkit-text-size-adjust: 100%;
22
22
  }
23
23
 
24
- body {
24
+ :where(body) {
25
25
  background: light-dark(var(--white), var(--black));
26
26
  font-family: var(--sans);
27
27
  -webkit-font-smoothing: antialiased;
28
28
  }
29
29
 
30
30
  /* Display multimedia as block by default */
31
- audio,
32
- canvas,
33
- embed,
34
- iframe,
35
- img,
36
- object,
37
- picture,
38
- video {
31
+ :where(
32
+ audio,
33
+ canvas,
34
+ embed,
35
+ iframe,
36
+ img,
37
+ object,
38
+ picture,
39
+ video
40
+ ){
39
41
  display: block;
40
42
  max-width: 100%;
41
43
  }
42
- img,
43
- picture,
44
- video {
44
+ :where(img, picture, video) {
45
45
  block-size: auto;
46
46
  }
47
47
 
48
48
  /* Inherit typography in form controls */
49
- button,
50
- input,
51
- select,
52
- textarea {
49
+ :where(
50
+ button,
51
+ input,
52
+ select,
53
+ textarea
54
+ ) {
53
55
  font: inherit;
54
56
  line-height: inherit;
55
57
  color: inherit;
56
58
  }
57
59
 
58
60
  /* Remove excess space for table borders */
59
- table {
61
+ :where(table) {
60
62
  border-collapse: collapse;
61
63
  border-spacing: 0;
62
64
  }
package/src/version.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  // This file is generated by scripts/write-version.js. Do not edit.
2
- export const VERSION = '500alpha1'
3
- export const HASH = '162541'
2
+ export const VERSION = '500alpha2'
3
+ export const HASH = 'eaf84d'