@patterninc/pattern-ui 0.0.0-main.202610080442.f227f6fcab21 → 0.0.0-main.202610080449.ea0e8cb183ed
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.
|
@@ -38,7 +38,7 @@ function SourceCollected(t0) {
|
|
|
38
38
|
const t3 = isActive && "border-depth-black-4 bg-depth-black-4";
|
|
39
39
|
let t4;
|
|
40
40
|
if ($[7] !== className || $[8] !== t3) {
|
|
41
|
-
t4 = cn("inline-flex items-center justify-center gap-1 rounded-
|
|
41
|
+
t4 = cn("inline-flex items-center justify-center gap-1 rounded-10 p-2", "border border-transparent outline-hidden focus-visible:shadow-outline-primary", "backdrop-blur-xs transition-all", "hover:bg-depth-black-4", "active:scale-95 active:bg-depth-black-4", t3, className);
|
|
42
42
|
$[7] = className;
|
|
43
43
|
$[8] = t3;
|
|
44
44
|
$[9] = t4;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TAP_SCALE } from "../shared/button-constants.js";
|
|
2
|
+
import PatternLogoIcon from "../icons/PatternLogoIcon.js";
|
|
2
3
|
import { c } from "react/compiler-runtime";
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
5
|
import { cn } from "cn";
|
|
@@ -9,6 +10,7 @@ const dividerTypes = [
|
|
|
9
10
|
"line",
|
|
10
11
|
"lineSolid",
|
|
11
12
|
"dashed",
|
|
13
|
+
"dashedLogo",
|
|
12
14
|
"space",
|
|
13
15
|
"textAndLine",
|
|
14
16
|
"text",
|
|
@@ -48,7 +50,7 @@ function DashedLine() {
|
|
|
48
50
|
return t0;
|
|
49
51
|
}
|
|
50
52
|
function Divider(t0) {
|
|
51
|
-
const $ = c(
|
|
53
|
+
const $ = c(46);
|
|
52
54
|
const { type: t1, spacing, textSeparator, action, qaTestId: t2 } = t0;
|
|
53
55
|
const type = t1 === void 0 ? "line" : t1;
|
|
54
56
|
const qaTestId = t2 === void 0 ? "divider" : t2;
|
|
@@ -201,38 +203,71 @@ function Divider(t0) {
|
|
|
201
203
|
} else t6 = $[31];
|
|
202
204
|
return t6;
|
|
203
205
|
}
|
|
206
|
+
if (type === "dashedLogo") {
|
|
207
|
+
let t3;
|
|
208
|
+
if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
|
|
209
|
+
t3 = /* @__PURE__ */ jsx("div", {
|
|
210
|
+
className: "absolute inset-x-0 flex",
|
|
211
|
+
children: /* @__PURE__ */ jsx(DashedLine, {})
|
|
212
|
+
});
|
|
213
|
+
$[32] = t3;
|
|
214
|
+
} else t3 = $[32];
|
|
215
|
+
let t4;
|
|
216
|
+
if ($[33] === Symbol.for("react.memo_cache_sentinel")) {
|
|
217
|
+
t4 = /* @__PURE__ */ jsx("div", {
|
|
218
|
+
className: "relative flex h-full items-center bg-base-inverse px-5",
|
|
219
|
+
children: /* @__PURE__ */ jsx(PatternLogoIcon, {
|
|
220
|
+
size: 24,
|
|
221
|
+
className: "size-9 text-depth-black-8",
|
|
222
|
+
"aria-hidden": true
|
|
223
|
+
})
|
|
224
|
+
});
|
|
225
|
+
$[33] = t4;
|
|
226
|
+
} else t4 = $[33];
|
|
227
|
+
let t5;
|
|
228
|
+
if ($[34] !== qaTestId) {
|
|
229
|
+
t5 = /* @__PURE__ */ jsxs("div", {
|
|
230
|
+
className: "relative flex h-9 w-full items-center justify-center",
|
|
231
|
+
"qa-test-id": qaTestId,
|
|
232
|
+
children: [t3, t4]
|
|
233
|
+
});
|
|
234
|
+
$[34] = qaTestId;
|
|
235
|
+
$[35] = t5;
|
|
236
|
+
} else t5 = $[35];
|
|
237
|
+
return t5;
|
|
238
|
+
}
|
|
204
239
|
const t3 = spacing && "flex h-4 shrink-0 items-center";
|
|
205
240
|
let t4;
|
|
206
|
-
if ($[
|
|
241
|
+
if ($[36] !== t3) {
|
|
207
242
|
t4 = cn("w-full", t3);
|
|
208
|
-
$[
|
|
209
|
-
$[
|
|
210
|
-
} else t4 = $[
|
|
243
|
+
$[36] = t3;
|
|
244
|
+
$[37] = t4;
|
|
245
|
+
} else t4 = $[37];
|
|
211
246
|
const t5 = dividerClasses[type];
|
|
212
247
|
let t6;
|
|
213
|
-
if ($[
|
|
248
|
+
if ($[38] !== t5) {
|
|
214
249
|
t6 = cn(t5, "w-full");
|
|
215
|
-
$[
|
|
216
|
-
$[
|
|
217
|
-
} else t6 = $[
|
|
250
|
+
$[38] = t5;
|
|
251
|
+
$[39] = t6;
|
|
252
|
+
} else t6 = $[39];
|
|
218
253
|
let t7;
|
|
219
|
-
if ($[
|
|
254
|
+
if ($[40] !== t6) {
|
|
220
255
|
t7 = /* @__PURE__ */ jsx("div", { className: t6 });
|
|
221
|
-
$[
|
|
222
|
-
$[
|
|
223
|
-
} else t7 = $[
|
|
256
|
+
$[40] = t6;
|
|
257
|
+
$[41] = t7;
|
|
258
|
+
} else t7 = $[41];
|
|
224
259
|
let t8;
|
|
225
|
-
if ($[
|
|
260
|
+
if ($[42] !== qaTestId || $[43] !== t4 || $[44] !== t7) {
|
|
226
261
|
t8 = /* @__PURE__ */ jsx("div", {
|
|
227
262
|
className: t4,
|
|
228
263
|
"qa-test-id": qaTestId,
|
|
229
264
|
children: t7
|
|
230
265
|
});
|
|
231
|
-
$[
|
|
232
|
-
$[
|
|
233
|
-
$[
|
|
234
|
-
$[
|
|
235
|
-
} else t8 = $[
|
|
266
|
+
$[42] = qaTestId;
|
|
267
|
+
$[43] = t4;
|
|
268
|
+
$[44] = t7;
|
|
269
|
+
$[45] = t8;
|
|
270
|
+
} else t8 = $[45];
|
|
236
271
|
return t8;
|
|
237
272
|
}
|
|
238
273
|
|
package/package.json
CHANGED
|
@@ -34,9 +34,10 @@ export function SourceCollected({
|
|
|
34
34
|
<button
|
|
35
35
|
type='button'
|
|
36
36
|
className={cn(
|
|
37
|
-
'inline-flex items-center justify-center gap-1 rounded-
|
|
38
|
-
'border border-transparent outline-
|
|
39
|
-
|
|
37
|
+
'inline-flex items-center justify-center gap-1 rounded-10 p-2',
|
|
38
|
+
'border border-transparent outline-hidden focus-visible:shadow-outline-primary',
|
|
39
|
+
// Standard blur scale: `backdrop-blur-xs` = 4px.
|
|
40
|
+
'backdrop-blur-xs transition-all',
|
|
40
41
|
'hover:bg-depth-black-4',
|
|
41
42
|
'active:scale-95 active:bg-depth-black-4',
|
|
42
43
|
isActive && 'border-depth-black-4 bg-depth-black-4',
|
|
@@ -3,12 +3,14 @@ import { motion } from 'motion/react'
|
|
|
3
3
|
import type { ComponentType } from 'react'
|
|
4
4
|
|
|
5
5
|
import type { RestrictedIconProps } from '../../lib/utils/icon-helpers'
|
|
6
|
+
import PatternLogoIcon from '../icons/PatternLogoIcon'
|
|
6
7
|
import { TAP_SCALE } from '../shared/button-constants'
|
|
7
8
|
|
|
8
9
|
export const dividerTypes = [
|
|
9
10
|
'line',
|
|
10
11
|
'lineSolid',
|
|
11
12
|
'dashed',
|
|
13
|
+
'dashedLogo',
|
|
12
14
|
'space',
|
|
13
15
|
'textAndLine',
|
|
14
16
|
'text',
|
|
@@ -140,6 +142,21 @@ export function Divider({
|
|
|
140
142
|
)
|
|
141
143
|
}
|
|
142
144
|
|
|
145
|
+
if (type === 'dashedLogo') {
|
|
146
|
+
return (
|
|
147
|
+
<div className='relative flex h-9 w-full items-center justify-center' qa-test-id={qaTestId}>
|
|
148
|
+
<div className='absolute inset-x-0 flex'>
|
|
149
|
+
<DashedLine />
|
|
150
|
+
</div>
|
|
151
|
+
{/* base-inverse masks the dashed line behind the logo; 20px side padding per Figma */}
|
|
152
|
+
<div className='relative flex h-full items-center bg-base-inverse px-5'>
|
|
153
|
+
{/* The 24px icon is scaled to Figma's 36px mark; icon sizes are restricted to 16/20/24 */}
|
|
154
|
+
<PatternLogoIcon size={24} className='size-9 text-depth-black-8' aria-hidden />
|
|
155
|
+
</div>
|
|
156
|
+
</div>
|
|
157
|
+
)
|
|
158
|
+
}
|
|
159
|
+
|
|
143
160
|
return (
|
|
144
161
|
<div
|
|
145
162
|
className={cn('w-full', spacing && 'flex h-4 shrink-0 items-center')}
|