@cahyo-dimas/freeday 3.22.0 → 3.24.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.
Files changed (41) hide show
  1. package/CHANGELOG.md +112 -0
  2. package/COMPONENTS.md +77 -2
  3. package/README.id.md +1 -1
  4. package/README.md +1 -1
  5. package/adapters/blazor/FdyCfl.razor.cs +44 -8
  6. package/adapters/blazor/FdyTable.razor.cs +23 -1
  7. package/adapters/blazor/freeday-blazor.js +16 -2
  8. package/adapters/core/load-state.d.ts +17 -0
  9. package/adapters/core/load-state.js +37 -0
  10. package/adapters/react/components/FdyCfl.tsx +20 -5
  11. package/adapters/react/components/FdyDatepicker.tsx +10 -1
  12. package/adapters/react/components/FdyDrawer.tsx +8 -0
  13. package/adapters/react/components/FdyModal.tsx +11 -0
  14. package/adapters/react/components/FdyTable.tsx +28 -5
  15. package/adapters/react/index.d.ts +18 -0
  16. package/adapters/react/index.js +1 -0
  17. package/adapters/react/useFreeday.js +31 -0
  18. package/adapters/react/useLoad.js +53 -0
  19. package/adapters/vue/components/FdyCfl.vue +20 -6
  20. package/adapters/vue/components/FdyDatepicker.vue +10 -1
  21. package/adapters/vue/components/FdyDrawer.vue +10 -0
  22. package/adapters/vue/components/FdyModal.vue +12 -0
  23. package/adapters/vue/index.d.ts +18 -0
  24. package/adapters/vue/index.js +1 -0
  25. package/adapters/vue/useFreeday.js +32 -1
  26. package/adapters/vue/useLoad.js +47 -0
  27. package/dist/freeday-datepicker.js +25 -1
  28. package/dist/freeday-form.js +3 -0
  29. package/dist/freeday-stepper.js +14 -5
  30. package/dist/freeday-table.js +5 -1
  31. package/dist/freeday-tabs.js +76 -0
  32. package/dist/freeday-upload.js +17 -7
  33. package/dist/freeday.bundle.css +53 -0
  34. package/dist/freeday.css +53 -0
  35. package/dist/freeday.js +140 -14
  36. package/docs/getting-started.md +1 -1
  37. package/docs/reference-screen.html +1 -1
  38. package/docs/screen-states.md +3 -0
  39. package/package.json +2 -2
  40. package/src/components/link.css +14 -0
  41. package/src/components/tabs.css +38 -0
@@ -63,3 +63,41 @@
63
63
  .fdy-tabs--vertical .fdy-tabs__tab:focus-visible{border-radius:var(--radius-md);}
64
64
  .fdy-tabs--vertical .fdy-tabs__tab[aria-selected="true"],.fdy-tabs--vertical .fdy-tabs__tab[aria-current="page"]{background:var(--color-primary-soft);color:var(--color-primary-strong);font-weight:var(--weight-semibold);}
65
65
  .fdy-tabs--vertical .fdy-tabs__panel{flex:1;min-width:0;padding:0;}
66
+
67
+ /* PICKER IN A NARROW CONTAINER: `.fdy-tabs--picker-narrow`, opt-in, on either variant.
68
+ *
69
+ * At 40rem of its own width or less, the tab list gives way to `.fdy-tabs__picker`, a wrapper
70
+ * holding one combo of the same sections. Six tabs with real labels do not fit a phone as a strip,
71
+ * and as a column they fill the screen before the panel starts. A container query rather than a
72
+ * viewport one, because the same tabs can sit in a page or in a 20rem drawer.
73
+ *
74
+ * The list is hidden only through `.fdy-tabs__picker ~ .fdy-tabs__list`, so the picker has to come
75
+ * BEFORE the list, and tabs with no picker in them keep their list at every width: the class alone
76
+ * can never leave a screen with no way between its sections. On the raw path freeday-tabs.js builds
77
+ * the picker; in a typed stack it is a `FdyCombo` bound to the same state as the tabs.
78
+ *
79
+ * `flex-wrap` is what makes the vertical variant work: a container query styles what is inside the
80
+ * container, never the container itself, so `.fdy-tabs--vertical` stays a flex row. The picker takes
81
+ * a whole line and the panel wraps under it. While the list shows, the panel's `min-width:0` means it
82
+ * never wraps.
83
+ *
84
+ * 40rem: a column of labels and a panel worth reading do not both fit under it. Below Safari 16
85
+ * there are no container queries, and the same body applies by viewport width instead; that answers
86
+ * every phone, and leaves tabs in a narrow drawer on a wide screen as lists. The two bodies are
87
+ * copies, compared in test/baseline.test.mjs. */
88
+ .fdy-tabs__picker{display:none;}
89
+ .fdy-tabs--picker-narrow{flex-wrap:wrap;}
90
+ .fdy-tabs__picker > .fdy-combo{max-width:none;}
91
+ @supports (container-type:inline-size){
92
+ .fdy-tabs--picker-narrow{container:fdy-tabs / inline-size;}
93
+ @container fdy-tabs (max-width: 40rem){
94
+ .fdy-tabs--picker-narrow > .fdy-tabs__picker{display:block;flex:0 0 100%;}
95
+ .fdy-tabs--picker-narrow > .fdy-tabs__picker ~ .fdy-tabs__list{display:none;}
96
+ }
97
+ }
98
+ @supports not (container-type:inline-size){
99
+ @media (max-width:40rem){
100
+ .fdy-tabs--picker-narrow > .fdy-tabs__picker{display:block;flex:0 0 100%;}
101
+ .fdy-tabs--picker-narrow > .fdy-tabs__picker ~ .fdy-tabs__list{display:none;}
102
+ }
103
+ }