slice-machine-ui 1.26.1-beta.22 → 1.26.1-beta.24

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 (46) hide show
  1. package/out/404.html +1 -1
  2. package/out/_next/static/{00IorDaiiNnMBMZk4IvKZ → _z4M3uOYLhYBbMuPXreuk}/_buildManifest.js +1 -1
  3. package/out/_next/static/chunks/{188-79599b3fe9d94d98.js → 188-9cdca9e923488afd.js} +1 -1
  4. package/out/_next/static/chunks/614-5130fbdbcfab2d35.js +1 -0
  5. package/out/_next/static/chunks/661-78c8c89d258133b8.js +1 -0
  6. package/out/_next/static/chunks/pages/{_app-796f1d4d0885a614.js → _app-825d7517c3bc9ebd.js} +1 -1
  7. package/out/_next/static/chunks/pages/custom-types/{[customTypeId]-b902c68c744370e9.js → [customTypeId]-982ecf1d799b6bcf.js} +1 -1
  8. package/out/_next/static/chunks/pages/page-types/{[pageTypeId]-82b82c537f0123f9.js → [pageTypeId]-886fc28240831dae.js} +1 -1
  9. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-d3e157cc3a540dd4.js +1 -0
  10. package/out/_next/static/css/172e1bc0b9586c22.css +1 -0
  11. package/out/_next/static/css/6279e95f6aff22d5.css +1 -0
  12. package/out/_next/static/css/824d6e761aed01d2.css +1 -0
  13. package/out/_next/static/css/f01f60095c76c7fb.css +1 -0
  14. package/out/changelog.html +1 -1
  15. package/out/changes.html +1 -1
  16. package/out/custom-types/[customTypeId].html +1 -1
  17. package/out/custom-types.html +1 -1
  18. package/out/index.html +1 -1
  19. package/out/labs.html +1 -1
  20. package/out/page-types/[pageTypeId].html +1 -1
  21. package/out/settings.html +1 -1
  22. package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
  23. package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
  24. package/out/slices.html +1 -1
  25. package/package.json +3 -3
  26. package/src/components/Card/Card.module.css +202 -0
  27. package/src/components/Card/Card.module.css.d.ts +22 -0
  28. package/src/components/Card/Card.tsx +5 -6
  29. package/src/components/List/List.css.ts +4 -2
  30. package/src/legacy/lib/builders/CustomTypeBuilder/TabZone/index.tsx +2 -0
  31. package/src/legacy/lib/builders/SliceBuilder/FieldZones/index.tsx +8 -0
  32. package/src/legacy/lib/builders/common/Zone/components/ZoneEmptyState/ZoneEmptyState.module.css +12 -0
  33. package/src/legacy/lib/builders/common/Zone/components/ZoneEmptyState/ZoneEmptyState.module.css.d.ts +5 -0
  34. package/src/legacy/lib/builders/common/Zone/components/ZoneEmptyState/ZoneEmptyState.tsx +39 -0
  35. package/src/legacy/lib/builders/common/Zone/components/ZoneEmptyState/index.tsx +1 -0
  36. package/src/legacy/lib/builders/common/Zone/index.jsx +30 -9
  37. package/out/_next/static/chunks/614-873c38acd991869b.js +0 -1
  38. package/out/_next/static/chunks/96-d28e81d2b1c10a08.js +0 -1
  39. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-b3bc0bc4e579bbaa.js +0 -1
  40. package/out/_next/static/css/321d78460d2d69bc.css +0 -1
  41. package/out/_next/static/css/86d77b8e1fcf68ba.css +0 -1
  42. package/out/_next/static/css/dc201720b301472d.css +0 -1
  43. package/out/_next/static/css/e5745b5b0494af29.css +0 -1
  44. package/src/components/Card/Card.css.ts +0 -188
  45. package/src/legacy/lib/builders/common/Zone/components/EmptyState/index.tsx +0 -33
  46. /package/out/_next/static/{00IorDaiiNnMBMZk4IvKZ → _z4M3uOYLhYBbMuPXreuk}/_ssgManifest.js +0 -0
@@ -1,188 +0,0 @@
1
- import { colors, selectors, sprinkles, vars } from "@prismicio/editor-ui";
2
- import { style, styleVariants } from "@vanilla-extract/css";
3
- import { calc } from "@vanilla-extract/css-utils";
4
-
5
- const flex = sprinkles({ all: "unset", display: "flex" });
6
-
7
- const column = style([flex, sprinkles({ flexDirection: "column" })]);
8
-
9
- export const root = style([
10
- column,
11
- sprinkles({
12
- borderColor: colors.grey6,
13
- borderRadius: 6,
14
- borderStyle: "solid",
15
- borderWidth: 1,
16
- boxSizing: "border-box",
17
- overflowX: "hidden",
18
- position: "relative",
19
- }),
20
- ]);
21
-
22
- export const size = styleVariants({
23
- small: { height: "240px" },
24
- medium: { height: "320px" },
25
- });
26
-
27
- export const variant = styleVariants({
28
- solid: [
29
- sprinkles({
30
- backgroundColor: colors.grey3,
31
- borderColor: selectors.checked(colors.purple10),
32
- }),
33
- ],
34
- outlined: [
35
- sprinkles({
36
- backgroundColor: colors.grey2,
37
- borderColor: selectors.checked(colors.purple8),
38
- }),
39
- ],
40
- });
41
-
42
- export const interactive = style({
43
- ":focus-visible": { boxShadow: "0px 0px 0px 4px hsla(251, 63%, 63%, 0.1)" },
44
- selectors: {
45
- "&[data-disabled]": { opacity: vars.opacity["50%"] },
46
- "&:not([data-disabled])": { cursor: vars.cursor.pointer },
47
- },
48
- });
49
-
50
- export const interactiveVariant = {
51
- solid: sprinkles({
52
- backgroundColor: selectors.focusVisible(colors.grey5),
53
- borderColor: selectors.focusVisible(colors.purple10),
54
- }),
55
- outlined: sprinkles({
56
- backgroundColor: {
57
- ...selectors.active(colors.grey4),
58
- ...selectors.focusVisible(colors.grey1),
59
- ...selectors.hover(colors.grey4),
60
- },
61
- borderColor: {
62
- ...selectors.active(colors.purple9),
63
- ...selectors.focusVisible(colors.purple8),
64
- },
65
- }),
66
- };
67
-
68
- export const media = style([
69
- column,
70
- sprinkles({ flexBasis: 0, flexGrow: 1, minHeight: 0, position: "relative" }),
71
- {
72
- order: 0,
73
- selectors: {
74
- [`${variant.solid} > &`]: {
75
- padding: calc.subtract(vars.space[32], vars.borderWidth[1]),
76
- },
77
- [`${variant.outlined} > &`]: {
78
- backgroundColor: vars.color.greyLight3,
79
- marginInline: calc.subtract(vars.space[16], vars.borderWidth[1]),
80
- marginTop: calc.subtract(vars.space[16], vars.borderWidth[1]),
81
- padding: vars.space[16],
82
- },
83
- },
84
- },
85
- ]);
86
-
87
- const grid = sprinkles({ all: "unset", display: "grid" });
88
-
89
- export const mediaComponent = styleVariants({
90
- div: [grid, sprinkles({ flexGrow: 1 })],
91
- img: [
92
- sprinkles({ height: "100%", objectFit: "contain" }),
93
- { selectors: { "&:not([src])": { visibility: "hidden" } } },
94
- ],
95
- });
96
-
97
- export const mediaOverlay = style([
98
- grid,
99
- sprinkles({ inset: 0, position: "absolute", visibility: "hidden" }),
100
- {
101
- "::before": {
102
- backgroundColor: vars.color.greyLight12,
103
- content: "",
104
- inset: vars.space[0],
105
- opacity: vars.opacity["10%"],
106
- position: "absolute",
107
- },
108
- selectors: {
109
- [`${interactive}:focus-visible &, ${interactive}:not([data-disabled]) ${media}:hover > &`]:
110
- { visibility: "visible" },
111
- [`${interactive}:not([data-disabled]) &:has(:focus-visible)`]: {
112
- visibility: "visible",
113
- },
114
- },
115
- },
116
- ]);
117
-
118
- const nonMedia = style([
119
- flex,
120
- sprinkles({
121
- alignItems: "center",
122
- boxSizing: "border-box",
123
- flexDirection: "row",
124
- }),
125
- {
126
- selectors: {
127
- [`${variant.solid} > &`]: { backgroundColor: vars.color.greyLight1 },
128
- [`${variant.solid} > &:not(:first-child)`]: {
129
- borderTopColor: vars.color.greyLight6,
130
- borderTopStyle: "inherit",
131
- borderTopWidth: "inherit",
132
- },
133
- },
134
- },
135
- ]);
136
-
137
- export const actions = style([
138
- nonMedia,
139
- sprinkles({ height: 48, justifyContent: "space-between" }),
140
- {
141
- order: 1,
142
- selectors: {
143
- [`${variant.solid} > &`]: {
144
- paddingLeft: calc.subtract(vars.space[12], vars.borderWidth[1]),
145
- paddingRight: calc.subtract(vars.space[8], vars.borderWidth[1]),
146
- },
147
- [`${variant.outlined} > &`]: {
148
- paddingInline: calc.subtract(vars.space[16], vars.borderWidth[1]),
149
- },
150
- },
151
- },
152
- ]);
153
-
154
- export const footer = style([
155
- nonMedia,
156
- sprinkles({ gap: 8, height: 60 }),
157
- {
158
- order: 2,
159
- selectors: {
160
- [`${variant.solid} > &`]: {
161
- paddingInline: calc.subtract(vars.space[12], vars.borderWidth[1]),
162
- },
163
- [`${variant.outlined} > &`]: {
164
- paddingInline: calc.subtract(vars.space[16], vars.borderWidth[1]),
165
- },
166
- },
167
- },
168
- ]);
169
-
170
- export const footerTexts = style([
171
- column,
172
- sprinkles({ flexBasis: 0, flexGrow: 1, minWidth: 0 }),
173
- // Offset `title` and `subtitle` so that they are centered vertically despite
174
- // having different line heights.
175
- { marginBottom: `calc((${24 / 16}rem - ${16 / 16}rem) / 2)` },
176
- ]);
177
-
178
- export const status = style([
179
- column,
180
- sprinkles({
181
- height: 24,
182
- insetInline: 0,
183
- justifyContent: "center",
184
- paddingInline: 8,
185
- position: "absolute",
186
- }),
187
- { backgroundColor: "hsl(251, 91%, 95%)", color: "hsl(250, 43%, 48%)" },
188
- ]);
@@ -1,33 +0,0 @@
1
- import { Button } from "@prismicio/editor-ui";
2
- import { Box, Heading, Text } from "theme-ui";
3
-
4
- const ZoneEmptyState = ({
5
- onEnterSelectMode,
6
- zoneName,
7
- }: {
8
- // eslint-disable-next-line @typescript-eslint/ban-types
9
- onEnterSelectMode: Function;
10
- zoneName: string;
11
- }) => (
12
- <Box sx={{ textAlign: "center", my: 4 }}>
13
- <Heading as="h5">Add a new field here</Heading>
14
- <Box sx={{ my: 2 }}>
15
- <Text sx={{ color: "textClear" }}>
16
- Fields are inputs for content (e.g. text, images, links).
17
- </Text>
18
- </Box>
19
- <Box sx={{ display: "flex", justifyContent: "center", marginTop: 16 }}>
20
- <Button
21
- color="grey"
22
- // eslint-disable-next-line @typescript-eslint/no-unsafe-return
23
- onClick={() => onEnterSelectMode()}
24
- data-testid={`add-${zoneName}-field`}
25
- startIcon="add"
26
- >
27
- Add a new field
28
- </Button>
29
- </Box>
30
- </Box>
31
- );
32
-
33
- export default ZoneEmptyState;