wally-ui 1.10.0 → 1.11.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/package.json +1 -1
- package/playground/showcase/src/app/components/button/button.html +3 -9
- package/playground/showcase/src/app/components/button/button.ts +28 -2
- package/playground/showcase/src/app/pages/documentation/components/button-docs/button-docs.examples.ts +177 -28
- package/playground/showcase/src/app/pages/documentation/components/button-docs/button-docs.html +517 -364
- package/playground/showcase/src/app/pages/documentation/components/button-docs/button-docs.ts +26 -10
- package/playground/showcase/src/index.html +13 -6
package/playground/showcase/src/app/pages/documentation/components/button-docs/button-docs.ts
CHANGED
|
@@ -25,6 +25,7 @@ export class ButtonDocs {
|
|
|
25
25
|
{ label: 'Button' }
|
|
26
26
|
];
|
|
27
27
|
|
|
28
|
+
// Installation & Import
|
|
28
29
|
basicUsageCode = getFormattedCode(ButtonCodeExamples.installation, 'bash');
|
|
29
30
|
importCode = getFormattedCode(ButtonCodeExamples.import, 'typescript');
|
|
30
31
|
componentImportCode = getFormattedCode(ButtonCodeExamples.componentImport, 'typescript');
|
|
@@ -33,29 +34,44 @@ export class ButtonDocs {
|
|
|
33
34
|
// Variants
|
|
34
35
|
primaryVariantCode = getFormattedCode(ButtonCodeExamples.primaryVariant, 'html');
|
|
35
36
|
secondaryVariantCode = getFormattedCode(ButtonCodeExamples.secondaryVariant, 'html');
|
|
37
|
+
destructiveVariantCode = getFormattedCode(ButtonCodeExamples.destructiveVariant, 'html');
|
|
38
|
+
outlineVariantCode = getFormattedCode(ButtonCodeExamples.outlineVariant, 'html');
|
|
39
|
+
ghostVariantCode = getFormattedCode(ButtonCodeExamples.ghostVariant, 'html');
|
|
40
|
+
linkVariantCode = getFormattedCode(ButtonCodeExamples.linkVariant, 'html');
|
|
41
|
+
|
|
42
|
+
// States
|
|
36
43
|
disabledCode = getFormattedCode(ButtonCodeExamples.disabled, 'html');
|
|
37
44
|
loadingCode = getFormattedCode(ButtonCodeExamples.loading, 'html');
|
|
38
45
|
notificationCode = getFormattedCode(ButtonCodeExamples.notification, 'html');
|
|
46
|
+
|
|
47
|
+
// Production Examples
|
|
48
|
+
ctaExampleCode = getFormattedCode(ButtonCodeExamples.ctaExample, 'html');
|
|
49
|
+
loginExampleCode = getFormattedCode(ButtonCodeExamples.loginExample, 'html');
|
|
50
|
+
loginExampleTsCode = getFormattedCode(ButtonCodeExamples.loginExampleTs, 'typescript');
|
|
51
|
+
deleteExampleCode = getFormattedCode(ButtonCodeExamples.deleteExample, 'html');
|
|
52
|
+
dashboardExampleCode = getFormattedCode(ButtonCodeExamples.dashboardExample, 'html');
|
|
53
|
+
notificationButtonCode = getFormattedCode(ButtonCodeExamples.notificationButton, 'html');
|
|
54
|
+
|
|
55
|
+
// Button Types
|
|
39
56
|
submitCode = getFormattedCode(ButtonCodeExamples.submit, 'html');
|
|
57
|
+
resetCode = getFormattedCode(ButtonCodeExamples.reset, 'html');
|
|
58
|
+
|
|
59
|
+
// Events
|
|
40
60
|
clickCodeHTML = getFormattedCode(ButtonCodeExamples.clickTemplate, 'html');
|
|
41
61
|
clickCodeTs = getFormattedCode(ButtonCodeExamples.clickMethod, 'typescript');
|
|
62
|
+
|
|
63
|
+
// Icons
|
|
42
64
|
iconCode = getFormattedCode(ButtonCodeExamples.iconWithText, 'html');
|
|
43
|
-
|
|
65
|
+
iconOnlyCode = getFormattedCode(ButtonCodeExamples.iconOnly, 'html');
|
|
66
|
+
iconLeftCode = getFormattedCode(ButtonCodeExamples.iconLeft, 'html');
|
|
44
67
|
|
|
45
68
|
// Accessibility
|
|
46
69
|
ariaLabelCode = getFormattedCode(ButtonCodeExamples.ariaLabel, 'html');
|
|
47
70
|
ariaPressedCode = getFormattedCode(ButtonCodeExamples.ariaPressed, 'html');
|
|
48
71
|
ariaBusyCode = getFormattedCode(ButtonCodeExamples.ariaBusy, 'html');
|
|
72
|
+
ariaDescribedByCode = getFormattedCode(ButtonCodeExamples.ariaDescribedBy, 'html');
|
|
49
73
|
|
|
50
|
-
//
|
|
51
|
-
propertyTypeCode = getFormattedCode(ButtonCodeExamples.propertyType, 'typescript');
|
|
52
|
-
propertyDisabledCode = getFormattedCode(ButtonCodeExamples.propertyDisabled, 'typescript');
|
|
53
|
-
propertyLoadingCode = getFormattedCode(ButtonCodeExamples.propertyLoading, 'typescript');
|
|
54
|
-
propertyShowNotificationCode = getFormattedCode(ButtonCodeExamples.propertyShowNotification, 'typescript');
|
|
55
|
-
propertyAriaLabelCode = getFormattedCode(ButtonCodeExamples.propertyAriaLabel, 'typescript');
|
|
56
|
-
propertyAriaPressedCode = getFormattedCode(ButtonCodeExamples.propertyAriaPressed, 'typescript');
|
|
57
|
-
propertyAriaDescribedByCode = getFormattedCode(ButtonCodeExamples.propertyAriaDescribedBy, 'typescript');
|
|
58
|
-
|
|
74
|
+
// Interactive states
|
|
59
75
|
clickMessage: WritableSignal<string> = signal<string>('');
|
|
60
76
|
toggleState: WritableSignal<boolean> = signal<boolean>(false);
|
|
61
77
|
|
|
@@ -48,12 +48,19 @@
|
|
|
48
48
|
|
|
49
49
|
<script>
|
|
50
50
|
// Tailwind V4
|
|
51
|
-
|
|
52
|
-
"dark"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
function updateTheme() {
|
|
52
|
+
const isDark = localStorage.theme === "dark" ||
|
|
53
|
+
(!("theme" in localStorage) &&
|
|
54
|
+
window.matchMedia("(prefers-color-scheme: dark)").matches);
|
|
55
|
+
|
|
56
|
+
document.documentElement.classList.toggle("dark", isDark);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Initial theme
|
|
60
|
+
updateTheme();
|
|
61
|
+
|
|
62
|
+
// Listen for system theme changes
|
|
63
|
+
window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", updateTheme);
|
|
57
64
|
</script>
|
|
58
65
|
|
|
59
66
|
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4944285767597175"
|