@typlog/ui 0.15.0 → 0.16.0
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/addons.css +33 -29
- package/addons.d.ts +8 -4
- package/addons.js +58 -38
- package/charts.d.ts +2 -2
- package/index.css +13652 -2
- package/{components.d.ts → index.d.ts} +659 -301
- package/{components.js → index.js} +1106 -157
- package/package.json +8 -15
- package/base.css +0 -6753
- package/components.css +0 -5410
- package/tailwind.css +0 -1111
package/addons.css
CHANGED
|
@@ -1,40 +1,42 @@
|
|
|
1
1
|
|
|
2
|
+
@layer components {
|
|
2
3
|
.ui-SocialButton:where(.r-variant-classic) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
background-color: var(--social-button-background-color);
|
|
5
|
+
color: var(--social-button-text-color);
|
|
6
|
+
box-shadow: 0px 1px 2px 0px #0A0D120D, 0px -2px 0px 0px #0A0D120D inset, 0px 0px 0px 1px #0A0D122E inset;
|
|
7
|
+
--social-button-background-color: black;
|
|
8
|
+
--social-button-text-color: white;
|
|
9
|
+
--social-button-hover-filter: brightness(0.92) saturate(1.1);
|
|
9
10
|
}
|
|
10
11
|
@media (hover: hover) {
|
|
11
12
|
.ui-SocialButton:where(:hover) {
|
|
12
|
-
|
|
13
|
+
filter: var(--social-button-hover-filter);
|
|
13
14
|
}
|
|
14
15
|
}
|
|
15
16
|
.ui-SocialButton:where(.r-brand-google) {
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
--social-button-background-color: var(--color-background);
|
|
18
|
+
--social-button-text-color: var(--gray-12);
|
|
18
19
|
}
|
|
19
20
|
.ui-SocialButton:where(.r-brand-facebook) {
|
|
20
|
-
|
|
21
|
+
--social-button-background-color: #1877F2;
|
|
21
22
|
}
|
|
22
23
|
.ui-SocialButton:where(.r-brand-github) {
|
|
23
|
-
|
|
24
|
+
--social-button-background-color: #333;
|
|
24
25
|
}
|
|
25
26
|
.ui-SocialButton:where(.r-variant-classic):where(.r-brand-slack) {
|
|
26
|
-
|
|
27
|
+
--social-button-background-color: #611f69;
|
|
27
28
|
}
|
|
28
29
|
.ui-SocialButton:where(.r-variant-classic):where(:focus-visible) {
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
outline: 2px solid var(--focus-8);
|
|
31
|
+
outline-offset: 2px;
|
|
31
32
|
}
|
|
32
33
|
.ui-SocialButton:where(.r-variant-classic):where(:active) {
|
|
33
|
-
|
|
34
|
+
box-shadow: var(--shadow-1);
|
|
34
35
|
}
|
|
35
36
|
.ui-SocialButton:where(.r-variant-classic):where([data-disabled]) {
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
color: var(--gray-a10);
|
|
38
|
+
background-color: var(--gray-a2);
|
|
39
|
+
}
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
@layer components {
|
|
@@ -248,38 +250,40 @@
|
|
|
248
250
|
color: var(--gray-a11);
|
|
249
251
|
text-align: center;
|
|
250
252
|
}
|
|
251
|
-
}
|
|
252
253
|
@container icon-collection (min-width: 768px) {
|
|
253
254
|
.ui-IconCollectionToolbar {
|
|
254
|
-
|
|
255
|
-
|
|
255
|
+
flex-direction: row;
|
|
256
|
+
align-items: center;
|
|
256
257
|
}
|
|
257
258
|
.ui-IconCollectionFilter {
|
|
258
|
-
|
|
259
|
+
max-width: 28rem;
|
|
259
260
|
}
|
|
260
261
|
.ui-IconCollectionCards {
|
|
261
|
-
|
|
262
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
262
263
|
}
|
|
263
264
|
}
|
|
264
265
|
@container icon-collection (min-width: 1024px) {
|
|
265
266
|
.ui-IconCollectionCards {
|
|
266
|
-
|
|
267
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
267
268
|
}
|
|
268
269
|
}
|
|
269
270
|
@container icon-collection (min-width: 1280px) {
|
|
270
271
|
.ui-IconCollectionCards {
|
|
271
|
-
|
|
272
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
273
|
+
}
|
|
272
274
|
}
|
|
273
275
|
}
|
|
274
276
|
|
|
277
|
+
@layer components {
|
|
275
278
|
.ui-Turnstile {
|
|
276
|
-
|
|
279
|
+
background: var(--gray-a3);
|
|
277
280
|
}
|
|
278
281
|
.ui-Turnstile:where(.r-size-normal) {
|
|
279
|
-
|
|
280
|
-
|
|
282
|
+
width: 300px;
|
|
283
|
+
height: 65px;
|
|
281
284
|
}
|
|
282
285
|
.ui-Turnstile:where(.r-size-compact) {
|
|
283
|
-
|
|
284
|
-
|
|
286
|
+
width: 150px;
|
|
287
|
+
height: 140px;
|
|
288
|
+
}
|
|
285
289
|
}
|
package/addons.d.ts
CHANGED
|
@@ -60,7 +60,11 @@ declare const __VLS_export_3: __VLS_WithSlots_2< DefineComponent<IconGridProps,
|
|
|
60
60
|
'header-search'?: (props: {}) => any;
|
|
61
61
|
}>;
|
|
62
62
|
|
|
63
|
-
declare const __VLS_export_4: DefineComponent<TurnstileProps, {
|
|
63
|
+
declare const __VLS_export_4: DefineComponent<TurnstileProps, {
|
|
64
|
+
render: () => Promise<void>;
|
|
65
|
+
reset: () => void;
|
|
66
|
+
remove: () => void;
|
|
67
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
64
68
|
"update:modelValue": (args_0: string) => any;
|
|
65
69
|
}, string, PublicProps, Readonly<TurnstileProps> & Readonly<{
|
|
66
70
|
"onUpdate:modelValue"?: ((args_0: string) => any) | undefined;
|
|
@@ -198,7 +202,7 @@ export declare interface IconifyCollectionItem {
|
|
|
198
202
|
[key: string]: unknown;
|
|
199
203
|
}
|
|
200
204
|
|
|
201
|
-
declare type RadiusType = 'none' | 'small' | 'medium' | 'large' | 'full'
|
|
205
|
+
declare type RadiusType = 'none' | 'small' | 'medium' | 'large' | 'full';
|
|
202
206
|
|
|
203
207
|
export declare const SocialButton: typeof __VLS_export;
|
|
204
208
|
|
|
@@ -232,7 +236,7 @@ export { }
|
|
|
232
236
|
|
|
233
237
|
declare global {
|
|
234
238
|
interface Window {
|
|
235
|
-
turnstile
|
|
236
|
-
|
|
239
|
+
turnstile?: TurnstileApi;
|
|
240
|
+
cfTurnstileOnLoad?: () => void;
|
|
237
241
|
}
|
|
238
242
|
}
|
package/addons.js
CHANGED
|
@@ -1720,10 +1720,31 @@ var IconCollection_default = /* @__PURE__ */ defineComponent({
|
|
|
1720
1720
|
//#region src/addons/turnstile/Turnstile.vue?vue&type=script&setup=true&lang.ts
|
|
1721
1721
|
var turnstileSrc = "https://challenges.cloudflare.com/turnstile/v0/api.js";
|
|
1722
1722
|
var turnstileLoadFunction = "cfTurnstileOnLoad";
|
|
1723
|
-
var
|
|
1724
|
-
var
|
|
1725
|
-
|
|
1726
|
-
|
|
1723
|
+
var turnstileLoadPromise;
|
|
1724
|
+
var loadTurnstile = () => {
|
|
1725
|
+
if (typeof window === "undefined") return Promise.reject(/* @__PURE__ */ new Error("Turnstile is only available in a browser."));
|
|
1726
|
+
if (window.turnstile) return Promise.resolve();
|
|
1727
|
+
if (turnstileLoadPromise) return turnstileLoadPromise;
|
|
1728
|
+
turnstileLoadPromise = new Promise((resolve, reject) => {
|
|
1729
|
+
const onLoad = () => {
|
|
1730
|
+
if (window.turnstile) resolve();
|
|
1731
|
+
else reject(/* @__PURE__ */ new Error("Turnstile loaded without exposing its API."));
|
|
1732
|
+
};
|
|
1733
|
+
window[turnstileLoadFunction] = onLoad;
|
|
1734
|
+
const script = document.createElement("script");
|
|
1735
|
+
script.src = `${turnstileSrc}?onload=${turnstileLoadFunction}&render=explicit`;
|
|
1736
|
+
script.async = true;
|
|
1737
|
+
script.addEventListener("error", () => {
|
|
1738
|
+
reject(/* @__PURE__ */ new Error("Failed to load Turnstile."));
|
|
1739
|
+
}, { once: true });
|
|
1740
|
+
document.head.appendChild(script);
|
|
1741
|
+
}).catch((error) => {
|
|
1742
|
+
turnstileLoadPromise = void 0;
|
|
1743
|
+
if (window.cfTurnstileOnLoad) delete window.cfTurnstileOnLoad;
|
|
1744
|
+
throw error;
|
|
1745
|
+
});
|
|
1746
|
+
return turnstileLoadPromise;
|
|
1747
|
+
};
|
|
1727
1748
|
//#endregion
|
|
1728
1749
|
//#region src/addons/turnstile/Turnstile.vue
|
|
1729
1750
|
var Turnstile_default = /* @__PURE__ */ defineComponent({
|
|
@@ -1742,29 +1763,48 @@ var Turnstile_default = /* @__PURE__ */ defineComponent({
|
|
|
1742
1763
|
}
|
|
1743
1764
|
},
|
|
1744
1765
|
emits: ["update:modelValue"],
|
|
1745
|
-
setup(__props, { emit: __emit }) {
|
|
1766
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
1746
1767
|
const props = __props;
|
|
1747
1768
|
const emit = __emit;
|
|
1748
1769
|
const element = useTemplateRef("element");
|
|
1770
|
+
const mounted = ref(false);
|
|
1771
|
+
let widgetId;
|
|
1772
|
+
let resetTimeout;
|
|
1773
|
+
const clearResetTimeout = () => {
|
|
1774
|
+
if (resetTimeout !== void 0) {
|
|
1775
|
+
clearTimeout(resetTimeout);
|
|
1776
|
+
resetTimeout = void 0;
|
|
1777
|
+
}
|
|
1778
|
+
};
|
|
1749
1779
|
const resetTurnstile = () => {
|
|
1750
|
-
if (window.turnstile) {
|
|
1780
|
+
if (widgetId !== void 0 && window.turnstile) {
|
|
1781
|
+
clearResetTimeout();
|
|
1751
1782
|
emit("update:modelValue", "");
|
|
1752
|
-
window.turnstile.reset();
|
|
1783
|
+
window.turnstile.reset(widgetId);
|
|
1753
1784
|
}
|
|
1754
1785
|
};
|
|
1755
1786
|
const removeTurnstile = () => {
|
|
1756
|
-
|
|
1757
|
-
|
|
1787
|
+
clearResetTimeout();
|
|
1788
|
+
if (widgetId !== void 0) {
|
|
1789
|
+
if (window.turnstile) window.turnstile.remove(widgetId);
|
|
1758
1790
|
widgetId = void 0;
|
|
1759
1791
|
}
|
|
1760
1792
|
};
|
|
1761
1793
|
const callbackTurnstile = (token) => {
|
|
1762
1794
|
emit("update:modelValue", token);
|
|
1795
|
+
clearResetTimeout();
|
|
1763
1796
|
resetTimeout = setTimeout(() => {
|
|
1764
1797
|
resetTurnstile();
|
|
1765
1798
|
}, props.resetInterval);
|
|
1766
1799
|
};
|
|
1767
|
-
const renderTurnstile = () => {
|
|
1800
|
+
const renderTurnstile = async () => {
|
|
1801
|
+
if (!mounted.value || widgetId !== void 0 || !element.value) return;
|
|
1802
|
+
if (!window.turnstile) try {
|
|
1803
|
+
await loadTurnstile();
|
|
1804
|
+
} catch {
|
|
1805
|
+
return;
|
|
1806
|
+
}
|
|
1807
|
+
if (!mounted.value || widgetId !== void 0 || !element.value || !window.turnstile) return;
|
|
1768
1808
|
widgetId = window.turnstile.render(element.value, {
|
|
1769
1809
|
sitekey: props.sitekey,
|
|
1770
1810
|
theme: props.theme,
|
|
@@ -1774,38 +1814,18 @@ var Turnstile_default = /* @__PURE__ */ defineComponent({
|
|
|
1774
1814
|
appearance: props.appearance
|
|
1775
1815
|
});
|
|
1776
1816
|
};
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
});
|
|
1785
|
-
window[turnstileLoadFunction] = () => {
|
|
1786
|
-
turnstileLoad.resolve();
|
|
1787
|
-
turnstileState = "ready";
|
|
1788
|
-
};
|
|
1789
|
-
const ensureTurnstile = () => {
|
|
1790
|
-
if (turnstileState === "unloaded") {
|
|
1791
|
-
turnstileState = "loading";
|
|
1792
|
-
const url = `${turnstileSrc}?onload=${turnstileLoadFunction}&render=explicit`;
|
|
1793
|
-
const script = document.createElement("script");
|
|
1794
|
-
script.src = url;
|
|
1795
|
-
script.async = true;
|
|
1796
|
-
script.addEventListener("error", () => {
|
|
1797
|
-
turnstileLoad.reject("Failed to load Turnstile.");
|
|
1798
|
-
});
|
|
1799
|
-
document.head.appendChild(script);
|
|
1800
|
-
}
|
|
1801
|
-
return turnstileLoadPromise;
|
|
1802
|
-
};
|
|
1803
|
-
await ensureTurnstile();
|
|
1817
|
+
__expose({
|
|
1818
|
+
render: renderTurnstile,
|
|
1819
|
+
reset: resetTurnstile,
|
|
1820
|
+
remove: removeTurnstile
|
|
1821
|
+
});
|
|
1822
|
+
onMounted(() => {
|
|
1823
|
+
mounted.value = true;
|
|
1804
1824
|
if (props.renderOnMount) renderTurnstile();
|
|
1805
1825
|
});
|
|
1806
1826
|
onBeforeUnmount(() => {
|
|
1827
|
+
mounted.value = false;
|
|
1807
1828
|
removeTurnstile();
|
|
1808
|
-
clearTimeout(resetTimeout);
|
|
1809
1829
|
});
|
|
1810
1830
|
return (_ctx, _cache) => {
|
|
1811
1831
|
return openBlock(), createElementBlock("div", {
|