@a4ui/core 0.16.0 → 0.18.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 (40) hide show
  1. package/dist/{Checkbox-B5Gb3h5J.js → Checkbox-BZjX1GMG.js} +153 -146
  2. package/dist/commerce/ProductCard.d.ts +10 -0
  3. package/dist/commerce/createCart.d.ts +53 -0
  4. package/dist/commerce/index.d.ts +1 -0
  5. package/dist/commerce.js +160 -133
  6. package/dist/elements.css +244 -0
  7. package/dist/elements.iife.js +3 -3
  8. package/dist/elements.js +590 -583
  9. package/dist/full.css +244 -0
  10. package/dist/index.d.ts +5 -1
  11. package/dist/index.js +3090 -2798
  12. package/dist/layout/ActionBar.d.ts +53 -0
  13. package/dist/layout/Section.d.ts +31 -0
  14. package/dist/styles.css +66 -0
  15. package/dist/ui/Badge.d.ts +6 -0
  16. package/dist/ui/BeforeAfter.d.ts +34 -0
  17. package/dist/ui/Carousel.d.ts +6 -0
  18. package/dist/ui/FloatingActionButton.d.ts +6 -0
  19. package/dist/ui/Image.d.ts +6 -0
  20. package/dist/ui/List.d.ts +5 -0
  21. package/dist/ui/PricingTable.d.ts +60 -0
  22. package/dist/ui/Skeleton.d.ts +10 -3
  23. package/package.json +1 -1
  24. package/src/commerce/ProductCard.tsx +26 -2
  25. package/src/commerce/createCart.ts +102 -0
  26. package/src/commerce/index.ts +1 -0
  27. package/src/index.ts +5 -1
  28. package/src/layout/ActionBar.tsx +121 -0
  29. package/src/layout/Section.tsx +69 -0
  30. package/src/ui/Accordion.tsx +3 -1
  31. package/src/ui/Badge.tsx +14 -2
  32. package/src/ui/BeforeAfter.tsx +162 -0
  33. package/src/ui/Carousel.tsx +48 -3
  34. package/src/ui/Collapse.tsx +13 -4
  35. package/src/ui/FloatingActionButton.tsx +16 -1
  36. package/src/ui/Image.tsx +29 -1
  37. package/src/ui/List.tsx +10 -2
  38. package/src/ui/PricingTable.tsx +196 -0
  39. package/src/ui/Skeleton.tsx +17 -5
  40. package/src/ui/SpeedDial.tsx +3 -1
package/dist/full.css CHANGED
@@ -163,6 +163,72 @@ body {
163
163
  animation: toast-out 0.18s ease-in;
164
164
  }
165
165
 
166
+ /* Skeleton shimmer — a light band sweeping across the placeholder (opt-in
167
+ alternative to the default pulse). The band color is token-driven so it reads
168
+ on every theme; the sweep is a pure CSS animation (no engine). */
169
+ @keyframes skeleton-shimmer {
170
+ 100% {
171
+ transform: translateX(100%);
172
+ }
173
+ }
174
+ .skeleton-shimmer {
175
+ position: relative;
176
+ overflow: hidden;
177
+ }
178
+ .skeleton-shimmer::after {
179
+ content: '';
180
+ position: absolute;
181
+ inset: 0;
182
+ transform: translateX(-100%);
183
+ background: linear-gradient(90deg, transparent, hsl(var(--foreground) / 0.08), transparent);
184
+ animation: skeleton-shimmer 1.5s ease-in-out infinite;
185
+ }
186
+
187
+ /* Accordion open/close — animate the panel height using Kobalte's measured
188
+ `--kb-accordion-content-height` var (presence keyed off data-expanded/closed,
189
+ animationend-driven like Modal). Engine-free. */
190
+ @keyframes accordion-down {
191
+ from {
192
+ height: 0;
193
+ }
194
+ to {
195
+ height: var(--kb-accordion-content-height);
196
+ }
197
+ }
198
+ @keyframes accordion-up {
199
+ from {
200
+ height: var(--kb-accordion-content-height);
201
+ }
202
+ to {
203
+ height: 0;
204
+ }
205
+ }
206
+ .accordion-content {
207
+ overflow: hidden;
208
+ }
209
+ .accordion-content[data-expanded] {
210
+ animation: accordion-down 0.2s ease-out;
211
+ }
212
+ .accordion-content[data-closed] {
213
+ animation: accordion-up 0.2s ease-out;
214
+ }
215
+
216
+ /* List stagger — rows fade/slide in on mount, delayed per index (set inline as
217
+ `animation-delay`). Opt-in via <List stagger>. */
218
+ @keyframes list-row-in {
219
+ from {
220
+ opacity: 0;
221
+ transform: translateY(6px);
222
+ }
223
+ to {
224
+ opacity: 1;
225
+ transform: none;
226
+ }
227
+ }
228
+ .list-row-stagger {
229
+ animation: list-row-in 0.35s both ease-out;
230
+ }
231
+
166
232
  /* Table row enter/exit fade. */
167
233
  .row-enter-active,
168
234
  .row-exit-active {
@@ -1450,9 +1516,15 @@ html.calm .tile-glass {
1450
1516
  .-top-1\.5 {
1451
1517
  top: -0.375rem;
1452
1518
  }
1519
+ .-top-3 {
1520
+ top: -0.75rem;
1521
+ }
1453
1522
  .bottom-0 {
1454
1523
  bottom: 0px;
1455
1524
  }
1525
+ .bottom-3 {
1526
+ bottom: 0.75rem;
1527
+ }
1456
1528
  .bottom-4 {
1457
1529
  bottom: 1rem;
1458
1530
  }
@@ -1465,6 +1537,9 @@ html.calm .tile-glass {
1465
1537
  .left-2 {
1466
1538
  left: 0.5rem;
1467
1539
  }
1540
+ .left-3 {
1541
+ left: 0.75rem;
1542
+ }
1468
1543
  .left-6 {
1469
1544
  left: 1.5rem;
1470
1545
  }
@@ -1634,6 +1709,9 @@ html.calm .tile-glass {
1634
1709
  .aspect-square {
1635
1710
  aspect-ratio: 1 / 1;
1636
1711
  }
1712
+ .aspect-video {
1713
+ aspect-ratio: 16 / 9;
1714
+ }
1637
1715
  .size-3 {
1638
1716
  width: 0.75rem;
1639
1717
  height: 0.75rem;
@@ -1872,12 +1950,27 @@ html.calm .tile-glass {
1872
1950
  .min-w-\[8rem\] {
1873
1951
  min-width: 8rem;
1874
1952
  }
1953
+ .max-w-2xl {
1954
+ max-width: 42rem;
1955
+ }
1956
+ .max-w-4xl {
1957
+ max-width: 56rem;
1958
+ }
1959
+ .max-w-6xl {
1960
+ max-width: 72rem;
1961
+ }
1962
+ .max-w-7xl {
1963
+ max-width: 80rem;
1964
+ }
1875
1965
  .max-w-\[520px\] {
1876
1966
  max-width: 520px;
1877
1967
  }
1878
1968
  .max-w-\[90vw\] {
1879
1969
  max-width: 90vw;
1880
1970
  }
1971
+ .max-w-full {
1972
+ max-width: 100%;
1973
+ }
1881
1974
  .max-w-lg {
1882
1975
  max-width: 32rem;
1883
1976
  }
@@ -1887,6 +1980,9 @@ html.calm .tile-glass {
1887
1980
  .max-w-sm {
1888
1981
  max-width: 24rem;
1889
1982
  }
1983
+ .max-w-xl {
1984
+ max-width: 36rem;
1985
+ }
1890
1986
  .max-w-xs {
1891
1987
  max-width: 20rem;
1892
1988
  }
@@ -1935,9 +2031,24 @@ html.calm .tile-glass {
1935
2031
  --tw-rotate: 90deg;
1936
2032
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
1937
2033
  }
2034
+ .scale-\[1\.03\] {
2035
+ --tw-scale-x: 1.03;
2036
+ --tw-scale-y: 1.03;
2037
+ transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
2038
+ }
1938
2039
  .transform {
1939
2040
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
1940
2041
  }
2042
+ @keyframes ping {
2043
+
2044
+ 75%, 100% {
2045
+ transform: scale(2);
2046
+ opacity: 0;
2047
+ }
2048
+ }
2049
+ .animate-ping {
2050
+ animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
2051
+ }
1941
2052
  @keyframes pulse {
1942
2053
 
1943
2054
  50% {
@@ -1959,6 +2070,9 @@ html.calm .tile-glass {
1959
2070
  .cursor-col-resize {
1960
2071
  cursor: col-resize;
1961
2072
  }
2073
+ .cursor-ew-resize {
2074
+ cursor: ew-resize;
2075
+ }
1962
2076
  .cursor-grab {
1963
2077
  cursor: grab;
1964
2078
  }
@@ -1974,6 +2088,13 @@ html.calm .tile-glass {
1974
2088
  .cursor-zoom-in {
1975
2089
  cursor: zoom-in;
1976
2090
  }
2091
+ .touch-none {
2092
+ touch-action: none;
2093
+ }
2094
+ .touch-pan-y {
2095
+ --tw-pan-y: pan-y;
2096
+ touch-action: var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom);
2097
+ }
1977
2098
  .select-none {
1978
2099
  user-select: none;
1979
2100
  }
@@ -1998,6 +2119,12 @@ html.calm .tile-glass {
1998
2119
  .grid-cols-7 {
1999
2120
  grid-template-columns: repeat(7, minmax(0, 1fr));
2000
2121
  }
2122
+ .grid-rows-\[0fr\] {
2123
+ grid-template-rows: 0fr;
2124
+ }
2125
+ .grid-rows-\[1fr\] {
2126
+ grid-template-rows: 1fr;
2127
+ }
2001
2128
  .flex-row {
2002
2129
  flex-direction: row;
2003
2130
  }
@@ -2058,6 +2185,9 @@ html.calm .tile-glass {
2058
2185
  .gap-6 {
2059
2186
  gap: 1.5rem;
2060
2187
  }
2188
+ .gap-8 {
2189
+ gap: 2rem;
2190
+ }
2061
2191
  .gap-x-6 {
2062
2192
  column-gap: 1.5rem;
2063
2193
  }
@@ -2296,6 +2426,12 @@ html.calm .tile-glass {
2296
2426
  --tw-bg-opacity: 1;
2297
2427
  background-color: hsl(var(--muted) / var(--tw-bg-opacity, 1));
2298
2428
  }
2429
+ .bg-muted\/30 {
2430
+ background-color: hsl(var(--muted) / 0.3);
2431
+ }
2432
+ .bg-muted\/40 {
2433
+ background-color: hsl(var(--muted) / 0.4);
2434
+ }
2299
2435
  .bg-muted\/80 {
2300
2436
  background-color: hsl(var(--muted) / 0.8);
2301
2437
  }
@@ -2442,6 +2578,10 @@ html.calm .tile-glass {
2442
2578
  padding-top: 3rem;
2443
2579
  padding-bottom: 3rem;
2444
2580
  }
2581
+ .py-14 {
2582
+ padding-top: 3.5rem;
2583
+ padding-bottom: 3.5rem;
2584
+ }
2445
2585
  .py-2 {
2446
2586
  padding-top: 0.5rem;
2447
2587
  padding-bottom: 0.5rem;
@@ -2525,6 +2665,10 @@ html.calm .tile-glass {
2525
2665
  font-size: 1.5rem;
2526
2666
  line-height: 2rem;
2527
2667
  }
2668
+ .text-3xl {
2669
+ font-size: 1.875rem;
2670
+ line-height: 2.25rem;
2671
+ }
2528
2672
  .text-4xl {
2529
2673
  font-size: 2.25rem;
2530
2674
  line-height: 2.5rem;
@@ -2801,6 +2945,10 @@ html.calm .tile-glass {
2801
2945
  --tw-blur: blur(8px);
2802
2946
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
2803
2947
  }
2948
+ .blur-lg {
2949
+ --tw-blur: blur(16px);
2950
+ filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
2951
+ }
2804
2952
  .brightness-110 {
2805
2953
  --tw-brightness: brightness(1.1);
2806
2954
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
@@ -2836,11 +2984,31 @@ html.calm .tile-glass {
2836
2984
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
2837
2985
  transition-duration: 150ms;
2838
2986
  }
2987
+ .transition-\[background-color\2c transform\] {
2988
+ transition-property: background-color,transform;
2989
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
2990
+ transition-duration: 150ms;
2991
+ }
2992
+ .transition-\[clip-path\] {
2993
+ transition-property: clip-path;
2994
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
2995
+ transition-duration: 150ms;
2996
+ }
2839
2997
  .transition-\[color\2c background-color\2c transform\] {
2840
2998
  transition-property: color,background-color,transform;
2841
2999
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
2842
3000
  transition-duration: 150ms;
2843
3001
  }
3002
+ .transition-\[filter\2c transform\] {
3003
+ transition-property: filter,transform;
3004
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
3005
+ transition-duration: 150ms;
3006
+ }
3007
+ .transition-\[grid-template-rows\] {
3008
+ transition-property: grid-template-rows;
3009
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
3010
+ transition-duration: 150ms;
3011
+ }
2844
3012
  .transition-\[transform\2c opacity\] {
2845
3013
  transition-property: transform,opacity;
2846
3014
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
@@ -2891,6 +3059,41 @@ html.calm .tile-glass {
2891
3059
  --tw-text-opacity: 1;
2892
3060
  color: hsl(var(--muted-foreground) / var(--tw-text-opacity, 1));
2893
3061
  }
3062
+ .before\:pointer-events-none::before {
3063
+ content: var(--tw-content);
3064
+ pointer-events: none;
3065
+ }
3066
+ .before\:absolute::before {
3067
+ content: var(--tw-content);
3068
+ position: absolute;
3069
+ }
3070
+ .before\:inset-y-0::before {
3071
+ content: var(--tw-content);
3072
+ top: 0px;
3073
+ bottom: 0px;
3074
+ }
3075
+ .before\:left-1\/2::before {
3076
+ content: var(--tw-content);
3077
+ left: 50%;
3078
+ }
3079
+ .before\:w-px::before {
3080
+ content: var(--tw-content);
3081
+ width: 1px;
3082
+ }
3083
+ .before\:-translate-x-1\/2::before {
3084
+ content: var(--tw-content);
3085
+ --tw-translate-x: -50%;
3086
+ transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
3087
+ }
3088
+ .before\:bg-background::before {
3089
+ content: var(--tw-content);
3090
+ --tw-bg-opacity: 1;
3091
+ background-color: hsl(var(--background) / var(--tw-bg-opacity, 1));
3092
+ }
3093
+ .before\:content-\[\'\'\]::before {
3094
+ --tw-content: '';
3095
+ content: var(--tw-content);
3096
+ }
2894
3097
  .last\:flex-none:last-child {
2895
3098
  flex: none;
2896
3099
  }
@@ -2919,6 +3122,9 @@ html.calm .tile-glass {
2919
3122
  .hover\:border-ring\/60:hover {
2920
3123
  border-color: hsl(var(--ring) / 0.6);
2921
3124
  }
3125
+ .hover\:bg-accent\/90:hover {
3126
+ background-color: hsl(var(--accent) / 0.9);
3127
+ }
2922
3128
  .hover\:bg-muted:hover {
2923
3129
  --tw-bg-opacity: 1;
2924
3130
  background-color: hsl(var(--muted) / var(--tw-bg-opacity, 1));
@@ -3022,6 +3228,21 @@ html.calm .tile-glass {
3022
3228
  .disabled\:opacity-50:disabled {
3023
3229
  opacity: 0.5;
3024
3230
  }
3231
+ .group:focus-visible .group-focus-visible\:ring-2 {
3232
+ --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
3233
+ --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
3234
+ box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
3235
+ }
3236
+ .group:focus-visible .group-focus-visible\:ring-primary {
3237
+ --tw-ring-opacity: 1;
3238
+ --tw-ring-color: hsl(var(--primary) / var(--tw-ring-opacity, 1));
3239
+ }
3240
+ .group:focus-visible .group-focus-visible\:ring-offset-2 {
3241
+ --tw-ring-offset-width: 2px;
3242
+ }
3243
+ .group:focus-visible .group-focus-visible\:ring-offset-background {
3244
+ --tw-ring-offset-color: hsl(var(--background) / 1);
3245
+ }
3025
3246
  .group[open] .group-\[\[open\]\]\:rotate-90 {
3026
3247
  --tw-rotate: 90deg;
3027
3248
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
@@ -3075,8 +3296,18 @@ html.calm .tile-glass {
3075
3296
  .data-\[disabled\]\:opacity-50[data-disabled] {
3076
3297
  opacity: 0.5;
3077
3298
  }
3299
+ @media (prefers-reduced-motion: reduce) {
3300
+
3301
+ .motion-reduce\:transition-none {
3302
+ transition-property: none;
3303
+ }
3304
+ }
3078
3305
  @media (min-width: 640px) {
3079
3306
 
3307
+ .sm\:block {
3308
+ display: block;
3309
+ }
3310
+
3080
3311
  .sm\:grid-cols-2 {
3081
3312
  grid-template-columns: repeat(2, minmax(0, 1fr));
3082
3313
  }
@@ -3101,13 +3332,26 @@ html.calm .tile-glass {
3101
3332
  justify-content: space-between;
3102
3333
  }
3103
3334
 
3335
+ .sm\:gap-3 {
3336
+ gap: 0.75rem;
3337
+ }
3338
+
3104
3339
  .sm\:px-6 {
3105
3340
  padding-left: 1.5rem;
3106
3341
  padding-right: 1.5rem;
3107
3342
  }
3343
+
3344
+ .sm\:text-base {
3345
+ font-size: 1rem;
3346
+ line-height: 1.5rem;
3347
+ }
3108
3348
  }
3109
3349
  @media (min-width: 1024px) {
3110
3350
 
3351
+ .lg\:grid-cols-3 {
3352
+ grid-template-columns: repeat(3, minmax(0, 1fr));
3353
+ }
3354
+
3111
3355
  .lg\:grid-cols-4 {
3112
3356
  grid-template-columns: repeat(4, minmax(0, 1fr));
3113
3357
  }
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const A4UI_VERSION = "0.16.0";
1
+ export declare const A4UI_VERSION = "0.18.0";
2
2
  export { cn } from './lib/cn';
3
3
  export { useTheme, toggleTheme, setTheme, storedTheme, applyTheme, toggled, type Theme } from './lib/theme';
4
4
  export { useEffects, isCalm, setEffects } from './lib/effects';
@@ -56,6 +56,8 @@ export { Carousel, type CarouselProps } from './ui/Carousel';
56
56
  export { Stepper, type StepItem, type StepperProps } from './ui/Stepper';
57
57
  export { Timeline, type TimelineItem, type TimelineTone, type TimelineProps } from './ui/Timeline';
58
58
  export { Rating, type RatingProps } from './ui/Rating';
59
+ export { PricingTable, type PricingTier, type PricingPeriod } from './ui/PricingTable';
60
+ export { BeforeAfter, type BeforeAfterProps } from './ui/BeforeAfter';
59
61
  export { Empty, type EmptyProps } from './ui/Empty';
60
62
  export { Calendar, type CalendarProps } from './ui/Calendar';
61
63
  export { Tree, type TreeNode, type TreeProps } from './ui/Tree';
@@ -119,4 +121,6 @@ export { ChristmasBackground } from './layout/ChristmasBackground';
119
121
  export { ThemeToggle } from './layout/ThemeToggle';
120
122
  export { EffectsToggle } from './layout/EffectsToggle';
121
123
  export { NavGroup } from './layout/NavGroup';
124
+ export { Section, type SectionWidth, type SectionPad } from './layout/Section';
125
+ export { ActionBar, type ActionBarProps, type ActionBarPosition } from './layout/ActionBar';
122
126
  export { themes, space, dino, doctor, scientist, soccer, snow, christmas, activeTheme, selectTheme, applyThemeDefinition, initTheme, themeToCss, themeToJson, TOKEN_ORDER, type ThemeDefinition, type Palette, } from './themes';