@hanzo/ui 8.27.43 → 8.27.45
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/backends/gui/animated-testimonials.cjs +2 -2
- package/dist/backends/gui/animated-testimonials.js +2 -2
- package/dist/backends/gui/animated-testimonials.js.map +1 -1
- package/dist/backends/gui/animated-tooltip.cjs +2 -2
- package/dist/backends/gui/animated-tooltip.js +2 -2
- package/dist/backends/gui/animated-tooltip.js.map +1 -1
- package/dist/backends/gui/carousel.cjs +2 -2
- package/dist/backends/gui/carousel.d.ts.map +1 -1
- package/dist/backends/gui/carousel.js +2 -2
- package/dist/backends/gui/carousel.js.map +1 -1
- package/dist/backends/gui/index.cjs +4 -5
- package/dist/backends/gui/index.d.ts +1 -1
- package/dist/backends/gui/index.d.ts.map +1 -1
- package/dist/backends/gui/index.js +1 -1
- package/dist/backends/gui/index.js.map +1 -1
- package/dist/backends/gui/input-otp.cjs +2 -1
- package/dist/backends/gui/input-otp.d.ts.map +1 -1
- package/dist/backends/gui/input-otp.js +2 -1
- package/dist/backends/gui/input-otp.js.map +1 -1
- package/dist/backends/gui/navigation-menu.cjs +24 -6
- package/dist/backends/gui/navigation-menu.d.ts +0 -6
- package/dist/backends/gui/navigation-menu.d.ts.map +1 -1
- package/dist/backends/gui/navigation-menu.js +23 -5
- package/dist/backends/gui/navigation-menu.js.map +1 -1
- package/dist/backends/gui/prose.cjs +4 -18
- package/dist/backends/gui/prose.d.ts +8 -5
- package/dist/backends/gui/prose.d.ts.map +1 -1
- package/dist/backends/gui/prose.js +4 -18
- package/dist/backends/gui/prose.js.map +1 -1
- package/dist/backends/gui/skeleton.cjs +1 -1
- package/dist/backends/gui/skeleton.d.ts.map +1 -1
- package/dist/backends/gui/skeleton.js +1 -1
- package/dist/backends/gui/skeleton.js.map +1 -1
- package/dist/backends/gui/timeline.cjs +2 -2
- package/dist/backends/gui/timeline.d.ts +1 -1
- package/dist/backends/gui/timeline.js +2 -2
- package/dist/backends/gui/timeline.js.map +1 -1
- package/dist/backends/gui/video.cjs +1 -1
- package/dist/backends/gui/video.js +1 -1
- package/dist/backends/gui/video.js.map +1 -1
- package/dist/chat/Composer.cjs +6 -1
- package/dist/chat/Composer.d.ts.map +1 -1
- package/dist/chat/Composer.js +6 -1
- package/dist/chat/Composer.js.map +1 -1
- package/dist/chat/SessionRail.cjs +1 -4
- package/dist/chat/SessionRail.js +1 -4
- package/dist/chat/SessionRail.js.map +1 -1
- package/dist/consent/Consent.cjs +43 -8
- package/dist/consent/Consent.d.ts.map +1 -1
- package/dist/consent/Consent.js +45 -10
- package/dist/consent/Consent.js.map +1 -1
- package/dist/core/cn.cjs +1 -1
- package/dist/core/cn.d.ts +1 -1
- package/dist/core/cn.js +1 -1
- package/dist/gallery.html +481 -600
- package/dist/glass.cjs +2 -24
- package/dist/glass.css +0 -196
- package/dist/glass.d.ts +2 -26
- package/dist/glass.d.ts.map +1 -1
- package/dist/glass.js +1 -22
- package/dist/glass.js.map +1 -1
- package/dist/grid.cjs +60 -10
- package/dist/grid.d.ts +20 -24
- package/dist/grid.d.ts.map +1 -1
- package/dist/grid.js +60 -10
- package/dist/grid.js.map +1 -1
- package/dist/index.cjs +6 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/index.node.cjs +6 -2
- package/dist/index.node.js +4 -1
- package/dist/masthead/index.cjs +3 -12
- package/dist/masthead/index.d.ts +3 -6
- package/dist/masthead/index.d.ts.map +1 -1
- package/dist/masthead/index.js +3 -6
- package/dist/masthead/index.js.map +1 -1
- package/dist/motion.cjs +20 -0
- package/dist/motion.d.ts +17 -0
- package/dist/motion.d.ts.map +1 -0
- package/dist/motion.js +16 -0
- package/dist/motion.js.map +1 -0
- package/dist/onboarding/account.cjs +1 -1
- package/dist/onboarding/account.d.ts +3 -3
- package/dist/onboarding/account.d.ts.map +1 -1
- package/dist/onboarding/account.js +1 -1
- package/dist/onboarding/account.js.map +1 -1
- package/dist/onboarding/frame.cjs +1 -1
- package/dist/onboarding/frame.d.ts +1 -1
- package/dist/onboarding/frame.d.ts.map +1 -1
- package/dist/onboarding/frame.js +1 -1
- package/dist/onboarding/frame.js.map +1 -1
- package/dist/product/DataTable.cjs +24 -4
- package/dist/product/DataTable.d.ts +0 -16
- package/dist/product/DataTable.d.ts.map +1 -1
- package/dist/product/DataTable.js +24 -4
- package/dist/product/DataTable.js.map +1 -1
- package/dist/product/FadeIn.cjs +1 -1
- package/dist/product/FadeIn.js +1 -1
- package/dist/product/FadeIn.js.map +1 -1
- package/dist/product/Metric.cjs +19 -2
- package/dist/product/Metric.d.ts +0 -16
- package/dist/product/Metric.d.ts.map +1 -1
- package/dist/product/Metric.js +19 -2
- package/dist/product/Metric.js.map +1 -1
- package/dist/product/Reorder.cjs +1 -1
- package/dist/product/Reorder.js +1 -1
- package/dist/product/Reorder.js.map +1 -1
- package/dist/product/Skeleton.cjs +5 -5
- package/dist/product/Skeleton.d.ts +4 -4
- package/dist/product/Skeleton.d.ts.map +1 -1
- package/dist/product/Skeleton.js +5 -5
- package/dist/product/Skeleton.js.map +1 -1
- package/dist/product/SlideOver.cjs +2 -10
- package/dist/product/SlideOver.d.ts.map +1 -1
- package/dist/product/SlideOver.js +2 -10
- package/dist/product/SlideOver.js.map +1 -1
- package/dist/product/figures.cjs +16 -0
- package/dist/product/figures.d.ts +16 -0
- package/dist/product/figures.d.ts.map +1 -0
- package/dist/product/figures.js +14 -0
- package/dist/product/figures.js.map +1 -0
- package/dist/product/social/SocialResource.cjs +2 -1
- package/dist/product/social/SocialResource.d.ts.map +1 -1
- package/dist/product/social/SocialResource.js +2 -1
- package/dist/product/social/SocialResource.js.map +1 -1
- package/dist/product/social/SocialSummaryBar.cjs +2 -1
- package/dist/product/social/SocialSummaryBar.d.ts.map +1 -1
- package/dist/product/social/SocialSummaryBar.js +2 -1
- package/dist/product/social/SocialSummaryBar.js.map +1 -1
- package/dist/style.cjs +1 -4
- package/dist/style.d.ts +0 -2
- package/dist/style.d.ts.map +1 -1
- package/dist/style.js +0 -2
- package/dist/style.js.map +1 -1
- package/dist/styles/motion.css +61 -283
- package/dist/styles.css +478 -597
- package/dist/sx.cjs +1 -1
- package/dist/sx.js +1 -1
- package/dist/theme.css +369 -292
- package/package.json +3 -4
- package/dist/masthead/Masthead.cjs +0 -168
- package/dist/masthead/Masthead.d.ts +0 -54
- package/dist/masthead/Masthead.d.ts.map +0 -1
- package/dist/masthead/Masthead.js +0 -162
- package/dist/masthead/Masthead.js.map +0 -1
- package/dist/masthead.css +0 -502
- package/dist/primitives/navigationMenuTriggerStyle.cjs +0 -8
- package/dist/primitives/navigationMenuTriggerStyle.d.ts +0 -2
- package/dist/primitives/navigationMenuTriggerStyle.d.ts.map +0 -1
- package/dist/primitives/navigationMenuTriggerStyle.js +0 -5
- package/dist/primitives/navigationMenuTriggerStyle.js.map +0 -1
package/dist/consent/Consent.cjs
CHANGED
|
@@ -43,6 +43,31 @@ const KINDS = [
|
|
|
43
43
|
{ key: 'marketing', title: 'Marketing', body: 'Lets ad platforms measure the sign-ups and orders their ads led to.' },
|
|
44
44
|
{ key: 'ads', title: 'Personalized ads', body: 'Lets those platforms use your visit to show you ads elsewhere.' },
|
|
45
45
|
];
|
|
46
|
+
/** Where the banner sits: fixed to the foot of the window, inset 12px, centred. */
|
|
47
|
+
const frame = {
|
|
48
|
+
...(0, slot_1.slot)('consent'),
|
|
49
|
+
role: 'dialog',
|
|
50
|
+
'aria-label': 'Cookie preferences',
|
|
51
|
+
position: 'fixed',
|
|
52
|
+
b: 12,
|
|
53
|
+
l: 12,
|
|
54
|
+
r: 12,
|
|
55
|
+
mx: 'auto',
|
|
56
|
+
z: 2147483000,
|
|
57
|
+
py: '$2.5',
|
|
58
|
+
px: '$3.5',
|
|
59
|
+
rounded: '$5',
|
|
60
|
+
borderWidth: 1,
|
|
61
|
+
borderColor: '$borderColor',
|
|
62
|
+
bg: '$background',
|
|
63
|
+
shadowColor: 'rgba(0,0,0,0.25)',
|
|
64
|
+
shadowRadius: 24,
|
|
65
|
+
shadowOffset: { width: 0, height: 8 },
|
|
66
|
+
};
|
|
67
|
+
/** The bar is as wide as its line and buttons, up to the window less its inset. */
|
|
68
|
+
const FIT = { width: 'fit-content' };
|
|
69
|
+
/** A link in the banner's line: the line's own ink, underlined, never broken across lines. */
|
|
70
|
+
const INLINE = { color: 'inherit', textDecoration: 'underline', whiteSpace: 'nowrap' };
|
|
46
71
|
const Consent = ({ privacy = 'https://hanzo.ai/privacy' }) => {
|
|
47
72
|
const [shown, setShown] = (0, react_1.useState)(false);
|
|
48
73
|
const [notice, setNotice] = (0, react_1.useState)(false);
|
|
@@ -82,14 +107,24 @@ const Consent = ({ privacy = 'https://hanzo.ai/privacy' }) => {
|
|
|
82
107
|
};
|
|
83
108
|
const link = (0, event_1.consentPolicy)()?.notice ?? 'Do not sell or share my personal information';
|
|
84
109
|
const small = notice && !shown;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
110
|
+
const optOut = done(() => (0, event_1.saveConsent)({ ...(0, event_1.readConsent)(), marketing: false, ads: false }));
|
|
111
|
+
if (choosing)
|
|
112
|
+
return ((0, jsx_runtime_1.jsxs)(gui_1.YStack, { ...frame, maxW: 440, gap: "$3", children: [(0, jsx_runtime_1.jsxs)(gui_1.Paragraph, { size: "$2", color: "$ink", m: 0, children: ['Choose what Hanzo may measure and share. You can change this at any time. ', (0, jsx_runtime_1.jsx)("a", { href: privacy, style: INLINE, children: "Privacy policy" })] }), locked ? ((0, jsx_runtime_1.jsx)(gui_1.Paragraph, { size: "$2", color: "$soft", m: 0, children: "Your browser sends Global Privacy Control, so marketing and personalized ads stay off." })) : null, KINDS.map((k) => {
|
|
113
|
+
const off = locked && k.key !== 'analytics';
|
|
114
|
+
return ((0, jsx_runtime_1.jsxs)(gui_1.XStack, { gap: "$3", items: "center", justify: "space-between", children: [(0, jsx_runtime_1.jsxs)(gui_1.YStack, { flex: 1, children: [(0, jsx_runtime_1.jsx)(gui_1.Paragraph, { size: "$2", color: "$ink", fontWeight: "500", m: 0, children: k.title }), (0, jsx_runtime_1.jsx)(gui_1.Paragraph, { size: "$1", color: "$soft", m: 0, children: k.body })] }), (0, jsx_runtime_1.jsx)(switch_1.Switch, { "aria-label": k.title, disabled: off, checked: off ? false : draft[k.key], onCheckedChange: (v) => setDraft({ ...draft, [k.key]: v === true }) })] }, k.key));
|
|
115
|
+
}), (0, jsx_runtime_1.jsxs)(gui_1.XStack, { gap: "$2", justify: "flex-end", children: [(0, jsx_runtime_1.jsx)(button_1.Button, { type: "button", size: "sm", variant: "secondary", onClick: done(event_1.rejectAll), children: "Reject all" }), (0, jsx_runtime_1.jsx)(button_1.Button, { type: "button", size: "sm", onClick: done(() => (0, event_1.saveConsent)(draft)), children: "Save choices" })] })] }));
|
|
116
|
+
// One bar: the line and its links, then the buttons. They share a row where
|
|
117
|
+
// the line fits beside them and the buttons drop under it where it does not,
|
|
118
|
+
// so a phone shows the line over one row of buttons and nothing breaks mid-control.
|
|
119
|
+
return ((0, jsx_runtime_1.jsxs)(gui_1.XStack, { ...frame, style: FIT, maxW: 960, flexWrap: "wrap", items: "center", columnGap: "$4", rowGap: "$2", children: [(0, jsx_runtime_1.jsx)(gui_1.YStack, { shrink: 1, minW: 0, children: (0, jsx_runtime_1.jsxs)(gui_1.Paragraph, { size: "$2", color: "$ink", m: 0, children: [small ? 'Cookies measure visits and ads. ' : 'Cookies measure visits and ads once you accept. ', (0, jsx_runtime_1.jsx)("a", { href: privacy, style: INLINE, children: "Privacy policy" }), small ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(gui_1.Span, { display: "none", $sm: { display: 'inline' }, children: ' · ' }), (0, jsx_runtime_1.jsx)(gui_1.Span, { render: "br", display: "block", $sm: { display: 'none' } }), (0, jsx_runtime_1.jsx)("a", { href: "#", role: "button", style: INLINE, onClick: (e) => {
|
|
120
|
+
e.preventDefault();
|
|
121
|
+
optOut();
|
|
122
|
+
}, onKeyDown: (e) => {
|
|
123
|
+
if (e.key !== ' ')
|
|
124
|
+
return;
|
|
125
|
+
e.preventDefault();
|
|
126
|
+
optOut();
|
|
127
|
+
}, children: link })] })) : null] }) }), (0, jsx_runtime_1.jsx)(gui_1.XStack, { gap: "$2", ml: "auto", items: "center", children: small ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(button_1.Button, { type: "button", size: "sm", variant: "secondary", onClick: choose, children: "Manage" }), (0, jsx_runtime_1.jsx)(button_1.Button, { type: "button", size: "sm", onClick: done(() => (0, event_1.saveConsent)((0, event_1.readConsent)())), children: "OK" })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(button_1.Button, { type: "button", size: "sm", variant: "link", onClick: choose, children: "Choose" }), (0, jsx_runtime_1.jsx)(button_1.Button, { type: "button", size: "sm", variant: "secondary", onClick: done(event_1.rejectAll), children: "Reject all" }), (0, jsx_runtime_1.jsx)(button_1.Button, { type: "button", size: "sm", onClick: done(event_1.acceptAll), children: "Accept all" })] })) })] }));
|
|
93
128
|
};
|
|
94
129
|
exports.Consent = Consent;
|
|
95
130
|
/** The footer link that reopens the choices, in every footer and every region. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Consent.d.ts","sourceRoot":"","sources":["../../src/consent/Consent.tsx"],"names":[],"mappings":"AAkCA,uCAAuC;AACvC,eAAO,MAAM,WAAW,QAAO,IAE9B,CAAA;
|
|
1
|
+
{"version":3,"file":"Consent.d.ts","sourceRoot":"","sources":["../../src/consent/Consent.tsx"],"names":[],"mappings":"AAkCA,uCAAuC;AACvC,eAAO,MAAM,WAAW,QAAO,IAE9B,CAAA;AAoCD,MAAM,MAAM,YAAY,GAAG;IACzB,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,QAAA,MAAM,OAAO,gBAA8C,YAAY,uCA0JtE,CAAA;AAED,kFAAkF;AAClF,QAAA,MAAM,WAAW,cAAmC;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,gCAIrE,CAAA;AAED,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
package/dist/consent/Consent.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
/**
|
|
4
4
|
* Consent — the one cookie banner every Hanzo, Lux and Zoo site mounts.
|
|
5
5
|
*
|
|
@@ -22,7 +22,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
22
22
|
* `Consent` mounts once near the root; `ConsentLink` goes wherever a footer
|
|
23
23
|
* link goes and opens the panel from anywhere.
|
|
24
24
|
*/
|
|
25
|
-
import { Paragraph, XStack, YStack } from '@hanzo/gui';
|
|
25
|
+
import { Paragraph, Span, XStack, YStack } from '@hanzo/gui';
|
|
26
26
|
import { acceptAll, asks, consentPolicy, gpc, notices, POLICY_EVENT, readConsent, rejectAll, saveConsent } from '@hanzo/event';
|
|
27
27
|
import { useEffect, useState } from 'react';
|
|
28
28
|
import { Button } from '../backends/gui/button.js';
|
|
@@ -39,6 +39,31 @@ const KINDS = [
|
|
|
39
39
|
{ key: 'marketing', title: 'Marketing', body: 'Lets ad platforms measure the sign-ups and orders their ads led to.' },
|
|
40
40
|
{ key: 'ads', title: 'Personalized ads', body: 'Lets those platforms use your visit to show you ads elsewhere.' },
|
|
41
41
|
];
|
|
42
|
+
/** Where the banner sits: fixed to the foot of the window, inset 12px, centred. */
|
|
43
|
+
const frame = {
|
|
44
|
+
...slot('consent'),
|
|
45
|
+
role: 'dialog',
|
|
46
|
+
'aria-label': 'Cookie preferences',
|
|
47
|
+
position: 'fixed',
|
|
48
|
+
b: 12,
|
|
49
|
+
l: 12,
|
|
50
|
+
r: 12,
|
|
51
|
+
mx: 'auto',
|
|
52
|
+
z: 2147483000,
|
|
53
|
+
py: '$2.5',
|
|
54
|
+
px: '$3.5',
|
|
55
|
+
rounded: '$5',
|
|
56
|
+
borderWidth: 1,
|
|
57
|
+
borderColor: '$borderColor',
|
|
58
|
+
bg: '$background',
|
|
59
|
+
shadowColor: 'rgba(0,0,0,0.25)',
|
|
60
|
+
shadowRadius: 24,
|
|
61
|
+
shadowOffset: { width: 0, height: 8 },
|
|
62
|
+
};
|
|
63
|
+
/** The bar is as wide as its line and buttons, up to the window less its inset. */
|
|
64
|
+
const FIT = { width: 'fit-content' };
|
|
65
|
+
/** A link in the banner's line: the line's own ink, underlined, never broken across lines. */
|
|
66
|
+
const INLINE = { color: 'inherit', textDecoration: 'underline', whiteSpace: 'nowrap' };
|
|
42
67
|
const Consent = ({ privacy = 'https://hanzo.ai/privacy' }) => {
|
|
43
68
|
const [shown, setShown] = useState(false);
|
|
44
69
|
const [notice, setNotice] = useState(false);
|
|
@@ -78,14 +103,24 @@ const Consent = ({ privacy = 'https://hanzo.ai/privacy' }) => {
|
|
|
78
103
|
};
|
|
79
104
|
const link = consentPolicy()?.notice ?? 'Do not sell or share my personal information';
|
|
80
105
|
const small = notice && !shown;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
106
|
+
const optOut = done(() => saveConsent({ ...readConsent(), marketing: false, ads: false }));
|
|
107
|
+
if (choosing)
|
|
108
|
+
return (_jsxs(YStack, { ...frame, maxW: 440, gap: "$3", children: [_jsxs(Paragraph, { size: "$2", color: "$ink", m: 0, children: ['Choose what Hanzo may measure and share. You can change this at any time. ', _jsx("a", { href: privacy, style: INLINE, children: "Privacy policy" })] }), locked ? (_jsx(Paragraph, { size: "$2", color: "$soft", m: 0, children: "Your browser sends Global Privacy Control, so marketing and personalized ads stay off." })) : null, KINDS.map((k) => {
|
|
109
|
+
const off = locked && k.key !== 'analytics';
|
|
110
|
+
return (_jsxs(XStack, { gap: "$3", items: "center", justify: "space-between", children: [_jsxs(YStack, { flex: 1, children: [_jsx(Paragraph, { size: "$2", color: "$ink", fontWeight: "500", m: 0, children: k.title }), _jsx(Paragraph, { size: "$1", color: "$soft", m: 0, children: k.body })] }), _jsx(Switch, { "aria-label": k.title, disabled: off, checked: off ? false : draft[k.key], onCheckedChange: (v) => setDraft({ ...draft, [k.key]: v === true }) })] }, k.key));
|
|
111
|
+
}), _jsxs(XStack, { gap: "$2", justify: "flex-end", children: [_jsx(Button, { type: "button", size: "sm", variant: "secondary", onClick: done(rejectAll), children: "Reject all" }), _jsx(Button, { type: "button", size: "sm", onClick: done(() => saveConsent(draft)), children: "Save choices" })] })] }));
|
|
112
|
+
// One bar: the line and its links, then the buttons. They share a row where
|
|
113
|
+
// the line fits beside them and the buttons drop under it where it does not,
|
|
114
|
+
// so a phone shows the line over one row of buttons and nothing breaks mid-control.
|
|
115
|
+
return (_jsxs(XStack, { ...frame, style: FIT, maxW: 960, flexWrap: "wrap", items: "center", columnGap: "$4", rowGap: "$2", children: [_jsx(YStack, { shrink: 1, minW: 0, children: _jsxs(Paragraph, { size: "$2", color: "$ink", m: 0, children: [small ? 'Cookies measure visits and ads. ' : 'Cookies measure visits and ads once you accept. ', _jsx("a", { href: privacy, style: INLINE, children: "Privacy policy" }), small ? (_jsxs(_Fragment, { children: [_jsx(Span, { display: "none", $sm: { display: 'inline' }, children: ' · ' }), _jsx(Span, { render: "br", display: "block", $sm: { display: 'none' } }), _jsx("a", { href: "#", role: "button", style: INLINE, onClick: (e) => {
|
|
116
|
+
e.preventDefault();
|
|
117
|
+
optOut();
|
|
118
|
+
}, onKeyDown: (e) => {
|
|
119
|
+
if (e.key !== ' ')
|
|
120
|
+
return;
|
|
121
|
+
e.preventDefault();
|
|
122
|
+
optOut();
|
|
123
|
+
}, children: link })] })) : null] }) }), _jsx(XStack, { gap: "$2", ml: "auto", items: "center", children: small ? (_jsxs(_Fragment, { children: [_jsx(Button, { type: "button", size: "sm", variant: "secondary", onClick: choose, children: "Manage" }), _jsx(Button, { type: "button", size: "sm", onClick: done(() => saveConsent(readConsent())), children: "OK" })] })) : (_jsxs(_Fragment, { children: [_jsx(Button, { type: "button", size: "sm", variant: "link", onClick: choose, children: "Choose" }), _jsx(Button, { type: "button", size: "sm", variant: "secondary", onClick: done(rejectAll), children: "Reject all" }), _jsx(Button, { type: "button", size: "sm", onClick: done(acceptAll), children: "Accept all" })] })) })] }));
|
|
89
124
|
};
|
|
90
125
|
/** The footer link that reopens the choices, in every footer and every region. */
|
|
91
126
|
const ConsentLink = ({ label = 'Cookie settings' }) => (_jsx(Button, { ...slot('consent-link'), type: "button", variant: "link", size: "sm", px: 0, minH: 0, onClick: openConsent, children: label }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Consent.js","sourceRoot":"","sources":["../../src/consent/Consent.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"Consent.js","sourceRoot":"","sources":["../../src/consent/Consent.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAC5D,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAe,MAAM,cAA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AM,OAAK,IAAI,CAAC,cAAc,CAAC,EAAE,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,WAAW,YAC1G,KAAK,GACC,CACV,CAAA;AAED,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
package/dist/core/cn.cjs
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* There is no Tailwind conflict-resolution step, because there are no Tailwind
|
|
6
6
|
* utilities left to resolve: styling lives in gui style props and the token
|
|
7
|
-
* scale, and a class name here is only a stable handle (`btn`, `
|
|
7
|
+
* scale, and a class name here is only a stable handle (`btn`, `badge`) that
|
|
8
8
|
* a host may select on.
|
|
9
9
|
*
|
|
10
10
|
* `flatten` lives here rather than in tw.ts because BOTH need it and there can
|
package/dist/core/cn.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* There is no Tailwind conflict-resolution step, because there are no Tailwind
|
|
5
5
|
* utilities left to resolve: styling lives in gui style props and the token
|
|
6
|
-
* scale, and a class name here is only a stable handle (`btn`, `
|
|
6
|
+
* scale, and a class name here is only a stable handle (`btn`, `badge`) that
|
|
7
7
|
* a host may select on.
|
|
8
8
|
*
|
|
9
9
|
* `flatten` lives here rather than in tw.ts because BOTH need it and there can
|
package/dist/core/cn.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* There is no Tailwind conflict-resolution step, because there are no Tailwind
|
|
5
5
|
* utilities left to resolve: styling lives in gui style props and the token
|
|
6
|
-
* scale, and a class name here is only a stable handle (`btn`, `
|
|
6
|
+
* scale, and a class name here is only a stable handle (`btn`, `badge`) that
|
|
7
7
|
* a host may select on.
|
|
8
8
|
*
|
|
9
9
|
* `flatten` lives here rather than in tw.ts because BOTH need it and there can
|