@sanity/ui 3.0.0-static.13 → 3.0.0-static.15

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 (31) hide show
  1. package/dist/_chunks-cjs/_visual-editing.js +101 -106
  2. package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
  3. package/dist/_chunks-es/_visual-editing.mjs +101 -106
  4. package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/css.js.map +1 -1
  7. package/dist/css.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/src/css/aspects/margin/margin.style.ts +0 -3
  10. package/src/ui/primitives/popover/popover.tsx +7 -6
  11. package/src/ui/primitives/popover/{popoverCard.tsx → popoverLayer.tsx} +14 -28
  12. package/src/ui/primitives/tooltip/tooltip.tsx +21 -24
  13. package/src/ui/primitives/tooltip/{tooltipCard.tsx → tooltipLayer.tsx} +14 -27
  14. package/src/css/aspects/height/rules.ts +0 -7
  15. package/src/css/aspects/width/rules.ts +0 -8
  16. package/src/css/components/menu/rules.ts +0 -15
  17. package/src/css/primitives/avatar/rules.ts +0 -176
  18. package/src/css/primitives/button/rules.ts +0 -302
  19. package/src/css/primitives/checkbox/rules.ts +0 -152
  20. package/src/css/primitives/code/rules.ts +0 -96
  21. package/src/css/primitives/container/rules.ts +0 -8
  22. package/src/css/primitives/heading/rules.ts +0 -155
  23. package/src/css/primitives/kbd/rules.ts +0 -20
  24. package/src/css/primitives/label/rules.ts +0 -137
  25. package/src/css/primitives/radio/rules.ts +0 -121
  26. package/src/css/primitives/select/rules.ts +0 -22
  27. package/src/css/primitives/switch/rules.ts +0 -340
  28. package/src/css/primitives/text/rules.ts +0 -164
  29. package/src/css/primitives/textArea/rules.ts +0 -7
  30. package/src/css/primitives/textInput/rules.ts +0 -224
  31. package/src/css/primitives/tooltip/rules.ts +0 -19
@@ -1,224 +0,0 @@
1
- import {Rules} from '../../types'
2
- import {vars} from '../../vars'
3
-
4
- export const textInputRules: Rules = {
5
- 'text-input': {
6
- '--font-family': vars.font.text.family,
7
-
8
- '@nest': {
9
- '& > span': {
10
- borderRadius: 'inherit',
11
- },
12
- },
13
- },
14
-
15
- 'text-input-prefix': {
16
- 'borderTop': '1px solid var(--color-border)',
17
- 'borderLeft': '1px solid var(--color-border)',
18
- 'borderBottom': '1px solid var(--color-border)',
19
- 'borderTopRightRadius': '0 !important',
20
- 'borderBottomRightRadius': '0 !important',
21
-
22
- '@nest': {
23
- '& > span': {
24
- display: 'block',
25
- margin: '-1px',
26
- },
27
- },
28
- },
29
-
30
- 'text-input-suffix': {
31
- 'borderTop': '1px solid var(--color-border)',
32
- 'borderRight': '1px solid var(--color-border)',
33
- 'borderBottom': '1px solid var(--color-border)',
34
- 'borderTopLeftRadius': '0 !important',
35
- 'borderBottomLeftRadius': '0 !important',
36
-
37
- '@nest': {
38
- '& > span': {
39
- display: 'block',
40
- margin: '-1px',
41
- },
42
- },
43
- },
44
-
45
- 'text-input-presentation': {
46
- // position: 'absolute',
47
- // top: 0,
48
- // left: 0,
49
- // right: 0,
50
- // bottom: 0,
51
- // display: 'block',
52
- // pointerEvents: 'none',
53
- // zIndex: 0,
54
- // backgroundColor: 'var(--input-bg-color)',
55
- // 'boxShadow': 'var(--input-box-shadow)',
56
- // '--input-border-color': 'var(--color-input-default-enabled-border)',
57
- // '--input-border-color': 'var(--color-tinted-default-border-1)',
58
- // '--input-box-shadow': 'inset 0 0 0 1px var(--input-border-color)',
59
- // border-top-left-radius: ${$hasPrefix ? 0 : undefined};
60
- // border-bottom-left-radius: ${$hasPrefix ? 0 : undefined};
61
- // border-top-right-radius: ${$hasSuffix ? 0 : undefined};
62
- // border-bottom-right-radius: ${$hasSuffix ? 0 : undefined};
63
- // '@nest': {
64
- // 'input:hover + &': {
65
- // '--input-border-color': 'var(--color-tinted-default-border-2)',
66
- // },
67
- // 'input:focus + &': {
68
- // '--input-border-color': 'var(--color-tinted-default-border-2)',
69
- // },
70
- // },
71
- // &[data-scheme='${$scheme}'][data-tone='${$tone}'] {
72
- // --card-bg-color: ${color.input.default.enabled.bg};
73
- // --card-fg-color: ${color.input.default.enabled.fg};
74
- // /* enabled */
75
- // *:not(:disabled) + &[data-border] {
76
- // --input-box-shadow: ${focusRingBorderStyle({
77
- // color: color.input.default.enabled.border,
78
- // width: input.border.width,
79
- // })};
80
- // }
81
- // /* invalid */
82
- // *:not(:disabled):invalid + & {
83
- // --card-bg-color: ${color.input.invalid.enabled.bg};
84
- // --card-fg-color: ${color.input.invalid.enabled.fg};
85
- // &[data-border] {
86
- // --input-box-shadow: ${focusRingBorderStyle({
87
- // color: color.input.invalid.enabled.border,
88
- // width: input.border.width,
89
- // })};
90
- // }
91
- // }
92
- // /* focused */
93
- // *:not(:disabled):focus + & {
94
- // &[data-border] {
95
- // --input-box-shadow: ${$unstableDisableFocusRing
96
- // ? undefined
97
- // : focusRingStyle({
98
- // border: {color: color.input.default.enabled.border, width: input.border.width},
99
- // focusRing: input.text.focusRing,
100
- // })};
101
- // }
102
- // &:not([data-border]) {
103
- // --input-box-shadow: ${$unstableDisableFocusRing
104
- // ? undefined
105
- // : focusRingStyle({focusRing: input.text.focusRing})};
106
- // }
107
- // }
108
- // /* disabled */
109
- // *:not(:invalid):disabled + & {
110
- // --card-bg-color: ${color.input.default.disabled.bg} !important;
111
- // --card-fg-color: ${color.input.default.disabled.fg} !important;
112
- // --card-icon-color: ${color.input.default.disabled.fg} !important;
113
- // &[data-border] {
114
- // --input-box-shadow: ${focusRingBorderStyle({
115
- // color: color.input.default.disabled.border,
116
- // width: input.border.width,
117
- // })};
118
- // }
119
- // }
120
- // *:invalid:disabled + & {
121
- // --card-bg-color: ${color.input.invalid.disabled.bg} !important;
122
- // --card-fg-color: ${color.input.invalid.disabled.fg} !important;
123
- // --card-icon-color: ${color.input.invalid.disabled.fg} !important;
124
- // &[data-border] {
125
- // --input-box-shadow: ${focusRingBorderStyle({
126
- // color: color.input.invalid.disabled.border,
127
- // width: input.border.width,
128
- // })};
129
- // }
130
- // }
131
- // /* readOnly */
132
- // *:not(:invalid):read-only + & {
133
- // --card-bg-color: ${color.input.default.readOnly.bg} !important;
134
- // --card-fg-color: ${color.input.default.readOnly.fg} !important;
135
- // }
136
- // *:invalid:read-only + & {
137
- // --card-bg-color: ${color.input.invalid.readOnly.bg} !important;
138
- // --card-fg-color: ${color.input.invalid.readOnly.fg} !important;
139
- // }
140
- // /* hovered */
141
- // @media (hover: hover) {
142
- // *:not(:disabled):not(:read-only):not(:invalid):hover + & {
143
- // --card-bg-color: ${color.input.default.hovered.bg};
144
- // --card-fg-color: ${color.input.default.hovered.fg};
145
- // }
146
- // *:invalid:not(:disabled):not(:read-only):hover + & {
147
- // --card-bg-color: ${color.input.invalid.hovered.bg};
148
- // --card-fg-color: ${color.input.invalid.hovered.fg};
149
- // }
150
- // *:not(:disabled):not(:read-only):not(:invalid):not(:focus):hover + &[data-border] {
151
- // --input-box-shadow: ${focusRingBorderStyle({
152
- // color: color.input.default.hovered.border,
153
- // width: input.border.width,
154
- // })};
155
- // }
156
- // *:invalid:not(:disabled):not(:read-only):not(:focus):hover + &[data-border] {
157
- // --input-box-shadow: ${focusRingBorderStyle({
158
- // color: color.input.invalid.hovered.border,
159
- // width: input.border.width,
160
- // })};
161
- // }
162
- // }
163
- // }
164
- },
165
- }
166
-
167
- // const Root = styled(Card).attrs({forwardedAs: 'span'})(textInputRootStyle)
168
-
169
- // const InputRoot = styled.span`
170
- // flex: 1;
171
- // min-width: 0;
172
- // display: block;
173
- // position: relative;
174
- // `
175
-
176
- // const Prefix = styled(Card).attrs({forwardedAs: 'span'})`
177
- // border-top-right-radius: 0;
178
- // border-bottom-right-radius: 0;
179
-
180
- // & > span {
181
- // display: block;
182
- // margin: -1px;
183
- // }
184
- // `
185
-
186
- // const Suffix = styled(Card).attrs({forwardedAs: 'span'})`
187
- // border-top-left-radius: 0;
188
- // border-bottom-left-radius: 0;
189
-
190
- // & > span {
191
- // display: block;
192
- // margin: -1px;
193
- // }
194
- // `
195
-
196
- // const Input = styled.input<TextInputResponsivePaddingStyleProps & TextInputInputStyleProps>(
197
- // responsiveInputPaddingStyle,
198
- // textInputBaseStyle,
199
- // textInputFontSizeStyle,
200
- // )
201
-
202
- // const Presentation = styled.span<ResponsiveRadiusStyleProps & TextInputRepresentationStyleProps>(
203
- // responsiveRadiusStyle,
204
- // textInputRepresentationStyle,
205
- // )
206
-
207
- // const LeftBox = styled(Box)`
208
- // position: absolute;
209
- // top: 0;
210
- // left: 0;
211
- // `
212
-
213
- // const RightBox = styled(Box)`
214
- // position: absolute;
215
- // top: 0;
216
- // right: 0;
217
- // `
218
-
219
- // const RightCard = styled(Card)`
220
- // background-color: transparent;
221
- // position: absolute;
222
- // top: 0;
223
- // right: 0;
224
- // `
@@ -1,19 +0,0 @@
1
- import {Rules} from '../../types'
2
-
3
- export const tooltipRules: Rules = {
4
- 'tooltip': {
5
- pointerEvents: 'none',
6
- },
7
-
8
- 'tooltip-card': {
9
- 'willChange': 'transform',
10
-
11
- '@nest': {
12
- '&[data-animate] > *': {
13
- // opacity: var(${POPOVER_MOTION_CONTENT_OPACITY_PROPERTY}, 1);
14
- opacity: `var(--motion-content-opacity, 1)`,
15
- willChange: 'opacity',
16
- },
17
- },
18
- },
19
- }