asta-ui 0.3.0 → 0.5.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/dist/accordion.js +1 -1
- package/dist/base/card-checkout.js +1 -1
- package/dist/base/checkbox-aui-052.d.ts +2 -0
- package/dist/base/checkbox-aui-052.js +9 -0
- package/dist/base/checkbox-aui-053.d.ts +2 -0
- package/dist/base/checkbox-aui-053.js +9 -0
- package/dist/base/checkbox-aui-054.d.ts +2 -0
- package/dist/base/checkbox-aui-054.js +9 -0
- package/dist/base/combobox-aui-046.d.ts +2 -0
- package/dist/base/combobox-aui-046.js +9 -0
- package/dist/base/combobox-aui-047.d.ts +2 -0
- package/dist/base/combobox-aui-047.js +9 -0
- package/dist/base/date-picker-aui-050.d.ts +2 -0
- package/dist/base/date-picker-aui-050.js +9 -0
- package/dist/base/date-picker-aui-051.d.ts +2 -0
- package/dist/base/date-picker-aui-051.js +9 -0
- package/dist/base/footer-aui-025.d.ts +2 -0
- package/dist/base/footer-aui-025.js +9 -0
- package/dist/base/footer-aui-026.d.ts +2 -0
- package/dist/base/footer-aui-026.js +9 -0
- package/dist/base/footer-aui-027.d.ts +2 -0
- package/dist/base/footer-aui-027.js +9 -0
- package/dist/base/footer-aui-028.d.ts +2 -0
- package/dist/base/footer-aui-028.js +9 -0
- package/dist/base/input-aui-029.d.ts +2 -0
- package/dist/base/input-aui-029.js +9 -0
- package/dist/base/input-aui-030.d.ts +2 -0
- package/dist/base/input-aui-030.js +9 -0
- package/dist/base/input-aui-031.d.ts +2 -0
- package/dist/base/input-aui-031.js +9 -0
- package/dist/base/input-aui-032.d.ts +2 -0
- package/dist/base/input-aui-032.js +11 -0
- package/dist/base/input-aui-033.d.ts +2 -0
- package/dist/base/input-aui-033.js +11 -0
- package/dist/base/input-aui-034.d.ts +2 -0
- package/dist/base/input-aui-034.js +9 -0
- package/dist/base/navbar-aui-009.d.ts +2 -0
- package/dist/base/navbar-aui-009.js +9 -0
- package/dist/base/navbar-aui-010.d.ts +2 -0
- package/dist/base/navbar-aui-010.js +9 -0
- package/dist/base/navbar-aui-011.d.ts +2 -0
- package/dist/base/navbar-aui-011.js +9 -0
- package/dist/base/navbar-aui-012.d.ts +2 -0
- package/dist/base/navbar-aui-012.js +9 -0
- package/dist/base/navbar-aui-013.d.ts +2 -0
- package/dist/base/navbar-aui-013.js +9 -0
- package/dist/base/navbar-aui-014.d.ts +2 -0
- package/dist/base/navbar-aui-014.js +9 -0
- package/dist/base/now-playing.js +1 -1
- package/dist/base/otp-input-aui-041.d.ts +2 -0
- package/dist/base/otp-input-aui-041.js +9 -0
- package/dist/base/otp-input-aui-042.d.ts +2 -0
- package/dist/base/otp-input-aui-042.js +9 -0
- package/dist/base/password-input-aui-039.d.ts +2 -0
- package/dist/base/password-input-aui-039.js +9 -0
- package/dist/base/password-input-aui-040.d.ts +2 -0
- package/dist/base/password-input-aui-040.js +11 -0
- package/dist/base/payment-received.js +1 -1
- package/dist/base/pricing-aui-021.d.ts +2 -0
- package/dist/base/pricing-aui-021.js +9 -0
- package/dist/base/pricing-aui-022.d.ts +2 -0
- package/dist/base/pricing-aui-022.js +9 -0
- package/dist/base/pricing-aui-023.d.ts +2 -0
- package/dist/base/pricing-aui-023.js +9 -0
- package/dist/base/pricing-aui-024.d.ts +2 -0
- package/dist/base/pricing-aui-024.js +9 -0
- package/dist/base/radio-group-aui-055.d.ts +2 -0
- package/dist/base/radio-group-aui-055.js +9 -0
- package/dist/base/radio-group-aui-056.d.ts +2 -0
- package/dist/base/radio-group-aui-056.js +9 -0
- package/dist/base/radio-group-aui-057.d.ts +2 -0
- package/dist/base/radio-group-aui-057.js +9 -0
- package/dist/base/select-aui-043.d.ts +2 -0
- package/dist/base/select-aui-043.js +9 -0
- package/dist/base/select-aui-044.d.ts +2 -0
- package/dist/base/select-aui-044.js +9 -0
- package/dist/base/select-aui-045.d.ts +2 -0
- package/dist/base/select-aui-045.js +9 -0
- package/dist/base/sign-in-aui-015.d.ts +2 -0
- package/dist/base/sign-in-aui-015.js +9 -0
- package/dist/base/sign-in-aui-016.d.ts +2 -0
- package/dist/base/sign-in-aui-016.js +9 -0
- package/dist/base/sign-in-aui-017.d.ts +2 -0
- package/dist/base/sign-in-aui-017.js +9 -0
- package/dist/base/sign-in-aui-018.d.ts +2 -0
- package/dist/base/sign-in-aui-018.js +9 -0
- package/dist/base/sign-in-aui-019.d.ts +2 -0
- package/dist/base/sign-in-aui-019.js +9 -0
- package/dist/base/sign-in-aui-020.d.ts +2 -0
- package/dist/base/sign-in-aui-020.js +9 -0
- package/dist/base/slider-aui-061.d.ts +2 -0
- package/dist/base/slider-aui-061.js +9 -0
- package/dist/base/slider-aui-062.d.ts +2 -0
- package/dist/base/slider-aui-062.js +9 -0
- package/dist/base/slider-aui-063.d.ts +2 -0
- package/dist/base/slider-aui-063.js +9 -0
- package/dist/base/spinner.js +1 -1
- package/dist/base/switch-aui-058.d.ts +2 -0
- package/dist/base/switch-aui-058.js +9 -0
- package/dist/base/switch-aui-059.d.ts +2 -0
- package/dist/base/switch-aui-059.js +9 -0
- package/dist/base/switch-aui-060.d.ts +2 -0
- package/dist/base/switch-aui-060.js +9 -0
- package/dist/base/tag-input-aui-048.d.ts +2 -0
- package/dist/base/tag-input-aui-048.js +9 -0
- package/dist/base/tag-input-aui-049.d.ts +2 -0
- package/dist/base/tag-input-aui-049.js +9 -0
- package/dist/base/textarea-aui-035.d.ts +2 -0
- package/dist/base/textarea-aui-035.js +9 -0
- package/dist/base/textarea-aui-036.d.ts +2 -0
- package/dist/base/textarea-aui-036.js +9 -0
- package/dist/base/textarea-aui-037.d.ts +2 -0
- package/dist/base/textarea-aui-037.js +9 -0
- package/dist/base/textarea-aui-038.d.ts +2 -0
- package/dist/base/textarea-aui-038.js +11 -0
- package/dist/base.js +360 -22
- package/dist/card-checkout.js +1 -1
- package/dist/checkbox-aui-052.d.ts +2 -0
- package/dist/checkbox-aui-052.js +9 -0
- package/dist/checkbox-aui-053.d.ts +2 -0
- package/dist/checkbox-aui-053.js +9 -0
- package/dist/checkbox-aui-054.d.ts +2 -0
- package/dist/checkbox-aui-054.js +9 -0
- package/dist/chunk-2LSUWI2Z.js +180 -0
- package/dist/chunk-2SQQFICY.js +493 -0
- package/dist/chunk-3XMVXIOF.js +267 -0
- package/dist/chunk-4YNUJFTL.js +165 -0
- package/dist/chunk-5OHHGQV6.js +175 -0
- package/dist/chunk-5TMFFW3Y.js +149 -0
- package/dist/{chunk-QJXPS55V.js → chunk-5TSQZY34.js} +1 -1
- package/dist/chunk-5U4H2CXC.js +308 -0
- package/dist/chunk-5WGDQ62P.js +122 -0
- package/dist/chunk-6B6NTRMC.js +293 -0
- package/dist/chunk-6NNHSXFD.js +539 -0
- package/dist/chunk-746WX2DF.js +480 -0
- package/dist/chunk-7GKCX4IE.js +636 -0
- package/dist/chunk-7SNVRPED.js +223 -0
- package/dist/chunk-ANZANDQM.js +107 -0
- package/dist/chunk-BGVAXPHD.js +305 -0
- package/dist/chunk-BIYNJDPD.js +158 -0
- package/dist/chunk-BV5HEXB5.js +339 -0
- package/dist/chunk-CDQNLDO6.js +156 -0
- package/dist/chunk-CZCZB5YP.js +142 -0
- package/dist/chunk-D6LGKFZH.js +140 -0
- package/dist/chunk-EKPTPTKK.js +93 -0
- package/dist/chunk-EVCUN45S.js +167 -0
- package/dist/chunk-F526V5BA.js +254 -0
- package/dist/chunk-FGQPCDXI.js +136 -0
- package/dist/chunk-GERWW3CA.js +311 -0
- package/dist/chunk-GJ3R6IZL.js +232 -0
- package/dist/chunk-HVFB44HO.js +219 -0
- package/dist/chunk-I2WXKWTQ.js +151 -0
- package/dist/chunk-J6GK2V2C.js +252 -0
- package/dist/chunk-JVTDNOHQ.js +173 -0
- package/dist/chunk-K5PWBSVO.js +200 -0
- package/dist/chunk-KQCXQY5K.js +155 -0
- package/dist/chunk-KXWC2UHE.js +308 -0
- package/dist/chunk-LPTY5WXM.js +231 -0
- package/dist/chunk-MDI73RL6.js +245 -0
- package/dist/chunk-MUDW65ZT.js +220 -0
- package/dist/chunk-NICNFGHT.js +138 -0
- package/dist/chunk-NZRQL3SA.js +201 -0
- package/dist/chunk-OFYGJUKP.js +278 -0
- package/dist/{chunk-NDBLIYMX.js → chunk-OKCSTMX3.js} +2 -2
- package/dist/chunk-P37H477M.js +236 -0
- package/dist/chunk-P3USWDWR.js +331 -0
- package/dist/chunk-QSLS3ENY.js +469 -0
- package/dist/chunk-QYI7LQBQ.js +208 -0
- package/dist/chunk-RRHQBGRO.js +327 -0
- package/dist/chunk-U6N7CZYN.js +305 -0
- package/dist/{chunk-2OGTIQVU.js → chunk-UEOEWP7L.js} +1 -1
- package/dist/chunk-UMDVPRJW.js +117 -0
- package/dist/{chunk-BP3LXM3X.js → chunk-UTGEGGSE.js} +1 -1
- package/dist/chunk-VPZP6TCT.js +155 -0
- package/dist/chunk-VVAL2JZJ.js +332 -0
- package/dist/chunk-VWYHP4SB.js +154 -0
- package/dist/chunk-W7RITVDV.js +182 -0
- package/dist/chunk-WNPMHOXE.js +136 -0
- package/dist/chunk-WSTQ6WZO.js +193 -0
- package/dist/chunk-WTNNS7AX.js +362 -0
- package/dist/{chunk-AS6RA64I.js → chunk-XTP6ITUJ.js} +3 -1
- package/dist/chunk-Z5GNX2S3.js +171 -0
- package/dist/chunk-ZBF2UYXP.js +225 -0
- package/dist/combobox-aui-046.d.ts +2 -0
- package/dist/combobox-aui-046.js +9 -0
- package/dist/combobox-aui-047.d.ts +2 -0
- package/dist/combobox-aui-047.js +9 -0
- package/dist/date-picker-aui-050.d.ts +2 -0
- package/dist/date-picker-aui-050.js +9 -0
- package/dist/date-picker-aui-051.d.ts +2 -0
- package/dist/date-picker-aui-051.js +9 -0
- package/dist/footer-aui-025.d.ts +2 -0
- package/dist/footer-aui-025.js +9 -0
- package/dist/footer-aui-026.d.ts +2 -0
- package/dist/footer-aui-026.js +9 -0
- package/dist/footer-aui-027.d.ts +2 -0
- package/dist/footer-aui-027.js +9 -0
- package/dist/footer-aui-028.d.ts +2 -0
- package/dist/footer-aui-028.js +9 -0
- package/dist/index.js +361 -23
- package/dist/input-aui-029.d.ts +2 -0
- package/dist/input-aui-029.js +9 -0
- package/dist/input-aui-030.d.ts +2 -0
- package/dist/input-aui-030.js +9 -0
- package/dist/input-aui-031.d.ts +2 -0
- package/dist/input-aui-031.js +9 -0
- package/dist/input-aui-032.d.ts +2 -0
- package/dist/input-aui-032.js +11 -0
- package/dist/input-aui-033.d.ts +2 -0
- package/dist/input-aui-033.js +11 -0
- package/dist/input-aui-034.d.ts +2 -0
- package/dist/input-aui-034.js +9 -0
- package/dist/navbar-aui-009.d.ts +2 -0
- package/dist/navbar-aui-009.js +9 -0
- package/dist/navbar-aui-010.d.ts +2 -0
- package/dist/navbar-aui-010.js +9 -0
- package/dist/navbar-aui-011.d.ts +2 -0
- package/dist/navbar-aui-011.js +9 -0
- package/dist/navbar-aui-012.d.ts +2 -0
- package/dist/navbar-aui-012.js +9 -0
- package/dist/navbar-aui-013.d.ts +2 -0
- package/dist/navbar-aui-013.js +9 -0
- package/dist/navbar-aui-014.d.ts +2 -0
- package/dist/navbar-aui-014.js +9 -0
- package/dist/now-playing.js +1 -1
- package/dist/otp-input-aui-041.d.ts +2 -0
- package/dist/otp-input-aui-041.js +9 -0
- package/dist/otp-input-aui-042.d.ts +2 -0
- package/dist/otp-input-aui-042.js +9 -0
- package/dist/password-input-aui-039.d.ts +2 -0
- package/dist/password-input-aui-039.js +9 -0
- package/dist/password-input-aui-040.d.ts +2 -0
- package/dist/password-input-aui-040.js +11 -0
- package/dist/payment-received.js +1 -1
- package/dist/pricing-aui-021.d.ts +2 -0
- package/dist/pricing-aui-021.js +9 -0
- package/dist/pricing-aui-022.d.ts +2 -0
- package/dist/pricing-aui-022.js +9 -0
- package/dist/pricing-aui-023.d.ts +2 -0
- package/dist/pricing-aui-023.js +9 -0
- package/dist/pricing-aui-024.d.ts +2 -0
- package/dist/pricing-aui-024.js +9 -0
- package/dist/radio-group-aui-055.d.ts +2 -0
- package/dist/radio-group-aui-055.js +9 -0
- package/dist/radio-group-aui-056.d.ts +2 -0
- package/dist/radio-group-aui-056.js +9 -0
- package/dist/radio-group-aui-057.d.ts +2 -0
- package/dist/radio-group-aui-057.js +9 -0
- package/dist/select-aui-043.d.ts +2 -0
- package/dist/select-aui-043.js +9 -0
- package/dist/select-aui-044.d.ts +2 -0
- package/dist/select-aui-044.js +9 -0
- package/dist/select-aui-045.d.ts +2 -0
- package/dist/select-aui-045.js +9 -0
- package/dist/sign-in-aui-015.d.ts +2 -0
- package/dist/sign-in-aui-015.js +9 -0
- package/dist/sign-in-aui-016.d.ts +2 -0
- package/dist/sign-in-aui-016.js +9 -0
- package/dist/sign-in-aui-017.d.ts +2 -0
- package/dist/sign-in-aui-017.js +9 -0
- package/dist/sign-in-aui-018.d.ts +2 -0
- package/dist/sign-in-aui-018.js +9 -0
- package/dist/sign-in-aui-019.d.ts +2 -0
- package/dist/sign-in-aui-019.js +9 -0
- package/dist/sign-in-aui-020.d.ts +2 -0
- package/dist/sign-in-aui-020.js +9 -0
- package/dist/slider-aui-061.d.ts +2 -0
- package/dist/slider-aui-061.js +9 -0
- package/dist/slider-aui-062.d.ts +2 -0
- package/dist/slider-aui-062.js +9 -0
- package/dist/slider-aui-063.d.ts +2 -0
- package/dist/slider-aui-063.js +9 -0
- package/dist/spinner.js +1 -1
- package/dist/switch-aui-058.d.ts +2 -0
- package/dist/switch-aui-058.js +9 -0
- package/dist/switch-aui-059.d.ts +2 -0
- package/dist/switch-aui-059.js +9 -0
- package/dist/switch-aui-060.d.ts +2 -0
- package/dist/switch-aui-060.js +9 -0
- package/dist/tag-input-aui-048.d.ts +2 -0
- package/dist/tag-input-aui-048.js +9 -0
- package/dist/tag-input-aui-049.d.ts +2 -0
- package/dist/tag-input-aui-049.js +9 -0
- package/dist/textarea-aui-035.d.ts +2 -0
- package/dist/textarea-aui-035.js +9 -0
- package/dist/textarea-aui-036.d.ts +2 -0
- package/dist/textarea-aui-036.js +9 -0
- package/dist/textarea-aui-037.d.ts +2 -0
- package/dist/textarea-aui-037.js +9 -0
- package/dist/textarea-aui-038.d.ts +2 -0
- package/dist/textarea-aui-038.js +11 -0
- package/dist/types/components/kit/variants/checkbox-aui-052.d.ts +29 -0
- package/dist/types/components/kit/variants/checkbox-aui-053.d.ts +24 -0
- package/dist/types/components/kit/variants/checkbox-aui-054.d.ts +33 -0
- package/dist/types/components/kit/variants/combobox-aui-046.d.ts +23 -0
- package/dist/types/components/kit/variants/combobox-aui-047.d.ts +24 -0
- package/dist/types/components/kit/variants/date-picker-aui-050.d.ts +26 -0
- package/dist/types/components/kit/variants/date-picker-aui-051.d.ts +23 -0
- package/dist/types/components/kit/variants/footer-aui-025.d.ts +22 -0
- package/dist/types/components/kit/variants/footer-aui-026.d.ts +21 -0
- package/dist/types/components/kit/variants/footer-aui-027.d.ts +36 -0
- package/dist/types/components/kit/variants/footer-aui-028.d.ts +34 -0
- package/dist/types/components/kit/variants/input-aui-029.d.ts +21 -0
- package/dist/types/components/kit/variants/input-aui-030.d.ts +29 -0
- package/dist/types/components/kit/variants/input-aui-031.d.ts +24 -0
- package/dist/types/components/kit/variants/input-aui-032.d.ts +36 -0
- package/dist/types/components/kit/variants/input-aui-033.d.ts +23 -0
- package/dist/types/components/kit/variants/input-aui-034.d.ts +29 -0
- package/dist/types/components/kit/variants/navbar-aui-009.d.ts +62 -0
- package/dist/types/components/kit/variants/navbar-aui-010.d.ts +30 -0
- package/dist/types/components/kit/variants/navbar-aui-011.d.ts +65 -0
- package/dist/types/components/kit/variants/navbar-aui-012.d.ts +50 -0
- package/dist/types/components/kit/variants/navbar-aui-013.d.ts +70 -0
- package/dist/types/components/kit/variants/navbar-aui-014.d.ts +31 -0
- package/dist/types/components/kit/variants/otp-input-aui-041.d.ts +20 -0
- package/dist/types/components/kit/variants/otp-input-aui-042.d.ts +23 -0
- package/dist/types/components/kit/variants/password-input-aui-039.d.ts +16 -0
- package/dist/types/components/kit/variants/password-input-aui-040.d.ts +24 -0
- package/dist/types/components/kit/variants/pricing-aui-021.d.ts +30 -0
- package/dist/types/components/kit/variants/pricing-aui-022.d.ts +34 -0
- package/dist/types/components/kit/variants/pricing-aui-023.d.ts +26 -0
- package/dist/types/components/kit/variants/pricing-aui-024.d.ts +29 -0
- package/dist/types/components/kit/variants/radio-group-aui-055.d.ts +27 -0
- package/dist/types/components/kit/variants/radio-group-aui-056.d.ts +28 -0
- package/dist/types/components/kit/variants/radio-group-aui-057.d.ts +26 -0
- package/dist/types/components/kit/variants/select-aui-043.d.ts +29 -0
- package/dist/types/components/kit/variants/select-aui-044.d.ts +24 -0
- package/dist/types/components/kit/variants/select-aui-045.d.ts +29 -0
- package/dist/types/components/kit/variants/sign-in-aui-015.d.ts +21 -0
- package/dist/types/components/kit/variants/sign-in-aui-016.d.ts +28 -0
- package/dist/types/components/kit/variants/sign-in-aui-017.d.ts +21 -0
- package/dist/types/components/kit/variants/sign-in-aui-018.d.ts +22 -0
- package/dist/types/components/kit/variants/sign-in-aui-019.d.ts +22 -0
- package/dist/types/components/kit/variants/sign-in-aui-020.d.ts +27 -0
- package/dist/types/components/kit/variants/slider-aui-061.d.ts +20 -0
- package/dist/types/components/kit/variants/slider-aui-062.d.ts +24 -0
- package/dist/types/components/kit/variants/slider-aui-063.d.ts +17 -0
- package/dist/types/components/kit/variants/switch-aui-058.d.ts +24 -0
- package/dist/types/components/kit/variants/switch-aui-059.d.ts +20 -0
- package/dist/types/components/kit/variants/switch-aui-060.d.ts +15 -0
- package/dist/types/components/kit/variants/tag-input-aui-048.d.ts +16 -0
- package/dist/types/components/kit/variants/tag-input-aui-049.d.ts +15 -0
- package/dist/types/components/kit/variants/textarea-aui-035.d.ts +19 -0
- package/dist/types/components/kit/variants/textarea-aui-036.d.ts +23 -0
- package/dist/types/components/kit/variants/textarea-aui-037.d.ts +30 -0
- package/dist/types/components/kit/variants/textarea-aui-038.d.ts +28 -0
- package/dist/types/packages/asta-ui/src/base/checkbox-aui-052.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/checkbox-aui-053.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/checkbox-aui-054.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/combobox-aui-046.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/combobox-aui-047.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/date-picker-aui-050.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/date-picker-aui-051.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/footer-aui-025.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/footer-aui-026.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/footer-aui-027.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/footer-aui-028.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/input-aui-029.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/input-aui-030.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/input-aui-031.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/input-aui-032.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/input-aui-033.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/input-aui-034.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/navbar-aui-009.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/navbar-aui-010.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/navbar-aui-011.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/navbar-aui-012.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/navbar-aui-013.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/navbar-aui-014.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/otp-input-aui-041.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/otp-input-aui-042.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/password-input-aui-039.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/password-input-aui-040.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/pricing-aui-021.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/pricing-aui-022.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/pricing-aui-023.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/pricing-aui-024.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/radio-group-aui-055.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/radio-group-aui-056.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/radio-group-aui-057.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/select-aui-043.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/select-aui-044.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/select-aui-045.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/sign-in-aui-015.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/sign-in-aui-016.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/sign-in-aui-017.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/sign-in-aui-018.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/sign-in-aui-019.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/sign-in-aui-020.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/slider-aui-061.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/slider-aui-062.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/slider-aui-063.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/switch-aui-058.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/switch-aui-059.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/switch-aui-060.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/tag-input-aui-048.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/tag-input-aui-049.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/textarea-aui-035.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/textarea-aui-036.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/textarea-aui-037.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/textarea-aui-038.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base.d.ts +110 -0
- package/dist/types/packages/asta-ui/src/checkbox-aui-052.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/checkbox-aui-053.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/checkbox-aui-054.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/combobox-aui-046.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/combobox-aui-047.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/date-picker-aui-050.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/date-picker-aui-051.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/footer-aui-025.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/footer-aui-026.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/footer-aui-027.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/footer-aui-028.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/index.d.ts +110 -0
- package/dist/types/packages/asta-ui/src/input-aui-029.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/input-aui-030.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/input-aui-031.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/input-aui-032.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/input-aui-033.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/input-aui-034.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/navbar-aui-009.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/navbar-aui-010.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/navbar-aui-011.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/navbar-aui-012.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/navbar-aui-013.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/navbar-aui-014.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/otp-input-aui-041.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/otp-input-aui-042.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/password-input-aui-039.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/password-input-aui-040.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/pricing-aui-021.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/pricing-aui-022.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/pricing-aui-023.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/pricing-aui-024.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/radio-group-aui-055.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/radio-group-aui-056.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/radio-group-aui-057.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/select-aui-043.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/select-aui-044.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/select-aui-045.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/sign-in-aui-015.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/sign-in-aui-016.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/sign-in-aui-017.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/sign-in-aui-018.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/sign-in-aui-019.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/sign-in-aui-020.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/slider-aui-061.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/slider-aui-062.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/slider-aui-063.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/switch-aui-058.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/switch-aui-059.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/switch-aui-060.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/tag-input-aui-048.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/tag-input-aui-049.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/textarea-aui-035.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/textarea-aui-036.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/textarea-aui-037.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/textarea-aui-038.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// components/kit/variants/switch-aui-060.tsx
|
|
4
|
+
import { useId, useState } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
var cx = (...c) => c.filter(Boolean).join(" ");
|
|
7
|
+
var EASE = "cubic-bezier(.16,1,.3,1)";
|
|
8
|
+
var SPRING = "cubic-bezier(.34,1.56,.64,1)";
|
|
9
|
+
var CSS = `
|
|
10
|
+
@keyframes aui060-rise { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }
|
|
11
|
+
@keyframes aui060-bar { from { transform: scaleY(0) } to { transform: scaleY(1) } }
|
|
12
|
+
@media (prefers-reduced-motion: reduce) { .aui060 * { animation: none !important; transition: none !important } }
|
|
13
|
+
`;
|
|
14
|
+
var rise = (i) => ({ animation: `aui060-rise .6s ${EASE} ${80 + i * 55}ms both` });
|
|
15
|
+
var BARS = [0.42, 0.6, 0.5, 0.78, 0.66, 0.92, 0.7];
|
|
16
|
+
var DAYS = ["M", "T", "W", "T", "F", "S", "S"];
|
|
17
|
+
var CX = 48;
|
|
18
|
+
var CY = 35;
|
|
19
|
+
var R = 640;
|
|
20
|
+
function Face({ tone, person }) {
|
|
21
|
+
const dark = tone === "dark";
|
|
22
|
+
const mute = dark ? "text-paper/50" : "text-mute";
|
|
23
|
+
const fg = dark ? "text-paper" : "text-ink";
|
|
24
|
+
const surface = dark ? "bg-paper/[0.07]" : "bg-paper-2";
|
|
25
|
+
return /* @__PURE__ */ jsxs("div", { className: cx("p-5 sm:p-6", fg), children: [
|
|
26
|
+
/* @__PURE__ */ jsxs("div", { className: "pr-20", style: rise(0), children: [
|
|
27
|
+
/* @__PURE__ */ jsxs("p", { className: cx("font-mono text-[11px] uppercase tracking-[0.08em]", mute), children: [
|
|
28
|
+
"Astabyte \xB7 ",
|
|
29
|
+
dark ? "Dark" : "Light"
|
|
30
|
+
] }),
|
|
31
|
+
/* @__PURE__ */ jsxs("p", { className: "mt-1.5 text-[20px] font-medium leading-tight tracking-[-0.02em]", children: [
|
|
32
|
+
"Good ",
|
|
33
|
+
dark ? "evening" : "morning",
|
|
34
|
+
", ",
|
|
35
|
+
person
|
|
36
|
+
] })
|
|
37
|
+
] }),
|
|
38
|
+
/* @__PURE__ */ jsx("div", { className: cx("mt-5 rounded-[11px] p-4", surface), style: rise(1), children: /* @__PURE__ */ jsxs("div", { className: "flex items-end justify-between gap-4", children: [
|
|
39
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
40
|
+
/* @__PURE__ */ jsx("p", { className: cx("text-[12px]", mute), children: "Paid this week" }),
|
|
41
|
+
/* @__PURE__ */ jsxs("p", { className: "mt-1 text-[28px] font-medium leading-none tracking-[-0.04em]", children: [
|
|
42
|
+
/* @__PURE__ */ jsx("span", { className: cx("mr-0.5 align-top text-[13px] tracking-normal", mute), children: "$" }),
|
|
43
|
+
"9,640"
|
|
44
|
+
] })
|
|
45
|
+
] }),
|
|
46
|
+
/* @__PURE__ */ jsx("div", { className: "flex h-12 items-end gap-1.5", "aria-hidden": true, children: BARS.map((b, i) => /* @__PURE__ */ jsxs("span", { className: "flex flex-col items-center gap-1", children: [
|
|
47
|
+
/* @__PURE__ */ jsx("span", { className: "flex h-9 w-2 items-end", children: /* @__PURE__ */ jsx("span", { className: cx("block w-full origin-bottom rounded-[3px]", i === 5 ? "bg-brand" : dark ? "bg-paper/25" : "bg-[color-mix(in_srgb,var(--ink)_16%,transparent)]"), style: { height: `${b * 100}%`, animation: `aui060-bar .7s ${EASE} ${200 + i * 40}ms both` } }) }),
|
|
48
|
+
/* @__PURE__ */ jsx("span", { className: cx("text-[9px] leading-none", mute), children: DAYS[i] })
|
|
49
|
+
] }, i)) })
|
|
50
|
+
] }) }),
|
|
51
|
+
/* @__PURE__ */ jsx("ul", { className: "mt-3 space-y-1", style: rise(2), children: [
|
|
52
|
+
["Invoice 1042", "Design studio", "Paid"],
|
|
53
|
+
["Invoice 1043", "Coffee roaster", "Due Fri"]
|
|
54
|
+
].map(([a, b, c], i) => /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-3 py-1.5", children: [
|
|
55
|
+
/* @__PURE__ */ jsx("span", { className: cx("grid h-7 w-7 place-items-center rounded-[7px] text-[10.5px] font-medium", surface), children: b[0] }),
|
|
56
|
+
/* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
|
|
57
|
+
/* @__PURE__ */ jsx("span", { className: "block text-[13.5px]", children: a }),
|
|
58
|
+
/* @__PURE__ */ jsx("span", { className: cx("block text-[12px]", mute), children: b })
|
|
59
|
+
] }),
|
|
60
|
+
/* @__PURE__ */ jsx("span", { className: cx("text-[12px] font-medium", i === 0 ? dark ? "text-[color-mix(in_srgb,var(--brand)_55%,var(--paper))]" : "text-brand" : mute), children: c })
|
|
61
|
+
] }, a)) })
|
|
62
|
+
] });
|
|
63
|
+
}
|
|
64
|
+
function ThemeSwitch({ theme, defaultTheme = "light", onThemeChange, person = "Maya", className }) {
|
|
65
|
+
const uid = useId();
|
|
66
|
+
const [inner, setInner] = useState(defaultTheme);
|
|
67
|
+
const current = theme ?? inner;
|
|
68
|
+
const dark = current === "dark";
|
|
69
|
+
const flip = () => {
|
|
70
|
+
const next = dark ? "light" : "dark";
|
|
71
|
+
if (theme === void 0) setInner(next);
|
|
72
|
+
onThemeChange?.(next);
|
|
73
|
+
};
|
|
74
|
+
return /* @__PURE__ */ jsxs(
|
|
75
|
+
"div",
|
|
76
|
+
{
|
|
77
|
+
className: cx(
|
|
78
|
+
"aui060 relative isolate w-full max-w-[400px] overflow-hidden rounded-[14px] bg-paper",
|
|
79
|
+
"shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent),0_1px_2px_rgb(0_0_0/0.04),0_18px_40px_-20px_rgb(0_0_0/0.3)]",
|
|
80
|
+
className
|
|
81
|
+
),
|
|
82
|
+
children: [
|
|
83
|
+
/* @__PURE__ */ jsx("style", { href: "asta-aui060", precedence: "asta", children: CSS }),
|
|
84
|
+
/* @__PURE__ */ jsx("div", { "aria-hidden": dark, children: /* @__PURE__ */ jsx(Face, { tone: "light", person }) }),
|
|
85
|
+
/* @__PURE__ */ jsxs("div", { "aria-hidden": !dark, className: "pointer-events-none absolute inset-0", children: [
|
|
86
|
+
/* @__PURE__ */ jsx(
|
|
87
|
+
"span",
|
|
88
|
+
{
|
|
89
|
+
className: "absolute rounded-full bg-ink transition-transform duration-700",
|
|
90
|
+
style: { width: R * 2, height: R * 2, right: CX - R, top: CY - R, transform: `scale(${dark ? 1 : 0})`, transitionTimingFunction: EASE }
|
|
91
|
+
}
|
|
92
|
+
),
|
|
93
|
+
/* @__PURE__ */ jsx("div", { className: "relative transition-opacity", style: { opacity: dark ? 1 : 0, transitionDuration: dark ? "500ms" : "200ms", transitionDelay: dark ? "160ms" : "0ms" }, children: /* @__PURE__ */ jsx(Face, { tone: "dark", person }) })
|
|
94
|
+
] }),
|
|
95
|
+
/* @__PURE__ */ jsxs(
|
|
96
|
+
"button",
|
|
97
|
+
{
|
|
98
|
+
type: "button",
|
|
99
|
+
role: "switch",
|
|
100
|
+
"aria-checked": dark,
|
|
101
|
+
"aria-label": "Dark mode",
|
|
102
|
+
"aria-describedby": `${uid}-s`,
|
|
103
|
+
onClick: flip,
|
|
104
|
+
className: cx(
|
|
105
|
+
"group/sw absolute right-5 top-5 z-10 h-[30px] w-[56px] rounded-full outline-none transition-transform duration-200 active:scale-[0.96] sm:right-6 sm:top-6",
|
|
106
|
+
"focus-visible:ring-2 focus-visible:ring-brand/60 focus-visible:ring-offset-2",
|
|
107
|
+
dark ? "focus-visible:ring-offset-ink" : "focus-visible:ring-offset-paper"
|
|
108
|
+
),
|
|
109
|
+
style: { animation: `aui060-rise .6s ${EASE} 120ms both` },
|
|
110
|
+
children: [
|
|
111
|
+
/* @__PURE__ */ jsx("span", { id: `${uid}-s`, className: "sr-only", children: dark ? "Dark theme on" : "Light theme on" }),
|
|
112
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "absolute inset-0 rounded-full bg-[color-mix(in_srgb,var(--ink)_8%,var(--paper))] shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent),inset_0_1px_2px_rgb(0_0_0/0.06)]" }),
|
|
113
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "absolute inset-0 rounded-full bg-[color-mix(in_srgb,var(--paper)_14%,var(--ink))] shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--paper)_14%,transparent)] transition-opacity duration-500", style: { opacity: dark ? 1 : 0 } }),
|
|
114
|
+
[
|
|
115
|
+
[9, 9, 0],
|
|
116
|
+
[16, 17, 80],
|
|
117
|
+
[8, 20, 140]
|
|
118
|
+
].map(([x, y, d], i) => /* @__PURE__ */ jsx(
|
|
119
|
+
"span",
|
|
120
|
+
{
|
|
121
|
+
"aria-hidden": true,
|
|
122
|
+
className: "absolute h-[3px] w-[3px] rounded-full bg-paper transition-[transform,opacity] duration-500",
|
|
123
|
+
style: { left: x, top: y, opacity: dark ? 0.9 : 0, transform: dark ? "scale(1)" : "scale(0)", transitionDelay: dark ? `${200 + d}ms` : "0ms", transitionTimingFunction: SPRING }
|
|
124
|
+
},
|
|
125
|
+
i
|
|
126
|
+
)),
|
|
127
|
+
/* @__PURE__ */ jsxs(
|
|
128
|
+
"span",
|
|
129
|
+
{
|
|
130
|
+
"aria-hidden": true,
|
|
131
|
+
className: "absolute left-[3px] top-[3px] grid h-6 w-6 place-items-center rounded-full shadow-[0_1px_2px_rgb(0_0_0/0.25),0_3px_8px_-2px_rgb(0_0_0/0.3)] transition-transform duration-500",
|
|
132
|
+
style: { transform: `translateX(${dark ? 26 : 0}px) rotate(${dark ? 360 : 0}deg)`, transitionTimingFunction: SPRING },
|
|
133
|
+
children: [
|
|
134
|
+
/* @__PURE__ */ jsx("span", { className: "absolute inset-0 rounded-full bg-white" }),
|
|
135
|
+
/* @__PURE__ */ jsx("span", { className: "absolute inset-0 rounded-full bg-[color-mix(in_srgb,var(--brand)_14%,white)] transition-opacity duration-500", style: { opacity: dark ? 1 : 0 } }),
|
|
136
|
+
/* @__PURE__ */ jsxs("svg", { viewBox: "0 0 16 16", className: "absolute h-3.5 w-3.5 text-ink transition-[transform,opacity] duration-500", style: { opacity: dark ? 0 : 1, transform: dark ? "scale(.4) rotate(-90deg)" : "none", transitionTimingFunction: EASE }, fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", children: [
|
|
137
|
+
/* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "2.8" }),
|
|
138
|
+
/* @__PURE__ */ jsx("path", { d: "M8 1.5v1.4M8 13.1v1.4M1.5 8h1.4M13.1 8h1.4M3.4 3.4l1 1M11.6 11.6l1 1M3.4 12.6l1-1M11.6 4.4l1-1" })
|
|
139
|
+
] }),
|
|
140
|
+
/* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "absolute h-3.5 w-3.5 text-brand transition-[transform,opacity] duration-500", style: { opacity: dark ? 1 : 0, transform: dark ? "none" : "scale(.4) rotate(90deg)", transitionTimingFunction: EASE }, fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M13.3 10.1A5.6 5.6 0 015.9 2.7a5.6 5.6 0 107.4 7.4z" }) })
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
)
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
var switch_aui_060_default = ThemeSwitch;
|
|
152
|
+
|
|
153
|
+
export {
|
|
154
|
+
ThemeSwitch,
|
|
155
|
+
switch_aui_060_default
|
|
156
|
+
};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// components/kit/variants/checkbox-aui-053.tsx
|
|
4
|
+
import { useEffect, useId, useLayoutEffect, useRef, useState } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
var cx = (...c) => c.filter(Boolean).join(" ");
|
|
7
|
+
var EASE = "cubic-bezier(.16,1,.3,1)";
|
|
8
|
+
var SPRING = "cubic-bezier(.34,1.56,.64,1)";
|
|
9
|
+
var CSS = `
|
|
10
|
+
@keyframes aui053-rise { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
|
|
11
|
+
@media (prefers-reduced-motion: reduce) { .aui053 * { animation: none !important; transition: none !important } }
|
|
12
|
+
`;
|
|
13
|
+
var rise = (i) => ({ animation: `aui053-rise .6s ${EASE} ${80 + i * 50}ms both` });
|
|
14
|
+
var TASKS = [
|
|
15
|
+
{ id: "copy", title: "Final pass on launch copy", meta: "Due 11:00", owner: "MS" },
|
|
16
|
+
{ id: "og", title: "Export social cards", meta: "Due 13:30", owner: "RA" },
|
|
17
|
+
{ id: "dns", title: "Point the domain to the new build", meta: "Due 15:00", owner: "DK" },
|
|
18
|
+
{ id: "mail", title: "Schedule the announcement email", meta: "Due 16:00", owner: "MS" },
|
|
19
|
+
{ id: "brief", title: "Write the kickoff brief", meta: "Done yesterday", owner: "RA" }
|
|
20
|
+
];
|
|
21
|
+
var prefersReduced = () => typeof window !== "undefined" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
22
|
+
function TaskCheckbox({ tasks = TASKS, done: doneProp, defaultDone = ["brief"], onChange, eyebrow = "Astabyte \xB7 Thu 19 Nov", title = "Launch day", className }) {
|
|
23
|
+
const uid = useId();
|
|
24
|
+
const [inner, setInner] = useState(defaultDone);
|
|
25
|
+
const done = doneProp ?? inner;
|
|
26
|
+
const doneKey = done.join("|");
|
|
27
|
+
const [order, setOrder] = useState(() => [...tasks.filter((t) => !done.includes(t.id)), ...tasks.filter((t) => done.includes(t.id))].map((t) => t.id));
|
|
28
|
+
const settled = useRef(done);
|
|
29
|
+
const rows = useRef(/* @__PURE__ */ new Map());
|
|
30
|
+
const last = useRef(/* @__PURE__ */ new Map());
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
const now = doneKey ? doneKey.split("|") : [];
|
|
33
|
+
const t = setTimeout(() => {
|
|
34
|
+
const prev = settled.current;
|
|
35
|
+
settled.current = now;
|
|
36
|
+
setOrder((o) => {
|
|
37
|
+
const open = o.filter((x) => !now.includes(x));
|
|
38
|
+
const kept = o.filter((x) => now.includes(x) && prev.includes(x));
|
|
39
|
+
const fresh = o.filter((x) => now.includes(x) && !prev.includes(x));
|
|
40
|
+
return [...open, ...kept, ...fresh];
|
|
41
|
+
});
|
|
42
|
+
}, 480);
|
|
43
|
+
return () => clearTimeout(t);
|
|
44
|
+
}, [doneKey]);
|
|
45
|
+
useLayoutEffect(() => {
|
|
46
|
+
const reduce = prefersReduced();
|
|
47
|
+
rows.current.forEach((el, id) => {
|
|
48
|
+
const top = el.offsetTop;
|
|
49
|
+
const was = last.current.get(id);
|
|
50
|
+
if (was !== void 0 && was !== top && !reduce) {
|
|
51
|
+
el.animate([{ transform: `translateY(${was - top}px)` }, { transform: "none" }], { duration: 560, easing: EASE });
|
|
52
|
+
}
|
|
53
|
+
last.current.set(id, top);
|
|
54
|
+
});
|
|
55
|
+
}, [order]);
|
|
56
|
+
const toggle = (id) => {
|
|
57
|
+
const next = done.includes(id) ? done.filter((x) => x !== id) : [...done, id];
|
|
58
|
+
if (doneProp === void 0) setInner(next);
|
|
59
|
+
onChange?.(next);
|
|
60
|
+
};
|
|
61
|
+
const byId = new Map(tasks.map((t) => [t.id, t]));
|
|
62
|
+
const count = done.filter((d) => byId.has(d)).length;
|
|
63
|
+
return /* @__PURE__ */ jsxs(
|
|
64
|
+
"section",
|
|
65
|
+
{
|
|
66
|
+
"aria-labelledby": `${uid}-t`,
|
|
67
|
+
className: cx(
|
|
68
|
+
"aui053 w-full max-w-[420px] rounded-[14px] bg-paper p-5 sm:p-6",
|
|
69
|
+
"shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent),0_1px_2px_rgb(0_0_0/0.04),0_18px_40px_-20px_rgb(0_0_0/0.25)]",
|
|
70
|
+
className
|
|
71
|
+
),
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ jsx("style", { href: "asta-aui053", precedence: "asta", children: CSS }),
|
|
74
|
+
/* @__PURE__ */ jsxs("div", { style: rise(0), children: [
|
|
75
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-end justify-between gap-4", children: [
|
|
76
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
77
|
+
/* @__PURE__ */ jsx("p", { className: "font-mono text-[11px] uppercase tracking-[0.08em] text-mute", children: eyebrow }),
|
|
78
|
+
/* @__PURE__ */ jsx("h3", { id: `${uid}-t`, className: "mt-1.5 text-[20px] font-medium leading-tight tracking-[-0.02em] text-ink", children: title })
|
|
79
|
+
] }),
|
|
80
|
+
/* @__PURE__ */ jsxs("p", { className: "pb-0.5 text-[13px] tabular-nums text-mute", "aria-live": "polite", children: [
|
|
81
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium text-ink", children: count }),
|
|
82
|
+
" of ",
|
|
83
|
+
tasks.length,
|
|
84
|
+
" done"
|
|
85
|
+
] })
|
|
86
|
+
] }),
|
|
87
|
+
/* @__PURE__ */ jsx("div", { "aria-hidden": true, className: "mt-4 h-1 overflow-hidden rounded-full bg-[color-mix(in_srgb,var(--ink)_8%,transparent)]", children: /* @__PURE__ */ jsx("div", { className: "h-full origin-left rounded-full bg-brand transition-transform duration-700", style: { transform: `scaleX(${tasks.length ? count / tasks.length : 0})`, transitionTimingFunction: EASE } }) })
|
|
88
|
+
] }),
|
|
89
|
+
/* @__PURE__ */ jsx("ul", { className: "relative mt-3 -mx-2", children: order.map((id) => {
|
|
90
|
+
const t = byId.get(id);
|
|
91
|
+
if (!t) return null;
|
|
92
|
+
const on = done.includes(id);
|
|
93
|
+
const cid = `${uid}-${id}`;
|
|
94
|
+
return /* @__PURE__ */ jsx(
|
|
95
|
+
"li",
|
|
96
|
+
{
|
|
97
|
+
ref: (el) => {
|
|
98
|
+
if (el) rows.current.set(id, el);
|
|
99
|
+
else rows.current.delete(id);
|
|
100
|
+
},
|
|
101
|
+
className: "relative",
|
|
102
|
+
children: /* @__PURE__ */ jsxs("label", { htmlFor: cid, style: rise(tasks.indexOf(t) + 1), className: "group/task relative flex cursor-pointer select-none items-center gap-3 rounded-[10px] px-2 py-2.5 has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-brand", children: [
|
|
103
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "pointer-events-none absolute inset-0 rounded-[10px] bg-paper-2 opacity-0 transition-opacity duration-300 group-hover/task:opacity-70" }),
|
|
104
|
+
/* @__PURE__ */ jsx("input", { id: cid, type: "checkbox", checked: on, onChange: () => toggle(id), className: "sr-only" }),
|
|
105
|
+
/* @__PURE__ */ jsx(Circle, { on }),
|
|
106
|
+
/* @__PURE__ */ jsxs("span", { className: "relative min-w-0 flex-1", children: [
|
|
107
|
+
/* @__PURE__ */ jsxs("span", { className: "relative inline-block max-w-full align-top", children: [
|
|
108
|
+
/* @__PURE__ */ jsx("span", { className: "block truncate text-[14px] tracking-[-0.01em] text-ink transition-opacity duration-500", style: { opacity: on ? 0.42 : 1 }, children: t.title }),
|
|
109
|
+
/* @__PURE__ */ jsx(
|
|
110
|
+
"span",
|
|
111
|
+
{
|
|
112
|
+
"aria-hidden": true,
|
|
113
|
+
className: "absolute inset-x-0 top-1/2 h-[1.5px] origin-left rounded-full bg-ink transition-transform",
|
|
114
|
+
style: { transform: `scaleX(${on ? 1 : 0})`, opacity: 0.55, transitionDuration: on ? "420ms" : "220ms", transitionTimingFunction: EASE }
|
|
115
|
+
}
|
|
116
|
+
)
|
|
117
|
+
] }),
|
|
118
|
+
t.meta && /* @__PURE__ */ jsx("span", { className: "mt-0.5 block text-[12px] text-mute", children: t.meta })
|
|
119
|
+
] }),
|
|
120
|
+
t.owner && /* @__PURE__ */ jsx("span", { "aria-label": `Owner ${t.owner}`, className: "relative grid h-6 w-6 shrink-0 place-items-center rounded-full bg-paper-2 text-[10px] font-medium tracking-[0.02em] text-ink shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_8%,transparent)] transition-opacity duration-500", style: { opacity: on ? 0.5 : 1 }, children: t.owner })
|
|
121
|
+
] })
|
|
122
|
+
},
|
|
123
|
+
id
|
|
124
|
+
);
|
|
125
|
+
}) })
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
function Circle({ on }) {
|
|
131
|
+
return /* @__PURE__ */ jsxs("span", { "aria-hidden": true, className: "relative grid h-[18px] w-[18px] shrink-0 place-items-center", children: [
|
|
132
|
+
/* @__PURE__ */ jsx("span", { className: "absolute inset-0 rounded-full shadow-[inset_0_0_0_1.5px_color-mix(in_srgb,var(--ink)_24%,transparent)] transition-opacity duration-200 group-hover/task:shadow-[inset_0_0_0_1.5px_color-mix(in_srgb,var(--ink)_42%,transparent)]", style: { opacity: on ? 0 : 1 } }),
|
|
133
|
+
/* @__PURE__ */ jsx("span", { className: "absolute inset-0 rounded-full bg-brand transition-[transform,opacity] duration-500", style: { transform: on ? "scale(1)" : "scale(0.3)", opacity: on ? 1 : 0, transitionTimingFunction: SPRING } }),
|
|
134
|
+
/* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "relative h-[11px] w-[11px] text-white", fill: "none", stroke: "currentColor", strokeWidth: "2.6", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M3.5 8.5l3 3 6-7", pathLength: 1, strokeDasharray: "1", className: "transition-[stroke-dashoffset]", style: { strokeDashoffset: on ? 0 : 1, transitionDuration: on ? "380ms" : "100ms", transitionDelay: on ? "100ms" : "0ms", transitionTimingFunction: EASE } }) })
|
|
135
|
+
] });
|
|
136
|
+
}
|
|
137
|
+
var checkbox_aui_053_default = TaskCheckbox;
|
|
138
|
+
|
|
139
|
+
export {
|
|
140
|
+
TaskCheckbox,
|
|
141
|
+
checkbox_aui_053_default
|
|
142
|
+
};
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// components/kit/variants/switch-aui-058.tsx
|
|
4
|
+
import { useEffect, useId, useRef, useState } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
var cx = (...c) => c.filter(Boolean).join(" ");
|
|
7
|
+
var EASE = "cubic-bezier(.16,1,.3,1)";
|
|
8
|
+
var SPRING = "cubic-bezier(.34,1.56,.64,1)";
|
|
9
|
+
var CSS = `
|
|
10
|
+
@keyframes aui058-rise { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
|
|
11
|
+
@keyframes aui058-spin { to { transform: rotate(360deg) } }
|
|
12
|
+
@media (prefers-reduced-motion: reduce) { .aui058 * { animation: none !important; transition: none !important } }
|
|
13
|
+
`;
|
|
14
|
+
var rise = (i) => ({ animation: `aui058-rise .6s ${EASE} ${80 + i * 55}ms both` });
|
|
15
|
+
var SETTINGS = [
|
|
16
|
+
{ id: "mentions", label: "Mentions and replies", description: "When someone tags you or answers a thread" },
|
|
17
|
+
{ id: "digest", label: "Weekly digest", description: "A Monday summary of what moved" },
|
|
18
|
+
{ id: "product", label: "Product news", description: "New features, about once a month" },
|
|
19
|
+
{ id: "security", label: "Security alerts", description: "New sign-ins and password changes", locked: "Always on" }
|
|
20
|
+
];
|
|
21
|
+
var fakeSave = () => new Promise((r) => setTimeout(r, 650));
|
|
22
|
+
function SettingSwitch({
|
|
23
|
+
settings = SETTINGS,
|
|
24
|
+
value,
|
|
25
|
+
defaultValue = { mentions: true, digest: false, product: false, security: true },
|
|
26
|
+
onChange,
|
|
27
|
+
onSave = fakeSave,
|
|
28
|
+
eyebrow = "Astabyte \xB7 Settings",
|
|
29
|
+
title = "Email notifications",
|
|
30
|
+
className
|
|
31
|
+
}) {
|
|
32
|
+
const uid = useId();
|
|
33
|
+
const [inner, setInner] = useState(defaultValue);
|
|
34
|
+
const state = value ?? inner;
|
|
35
|
+
const [status, setStatus] = useState({});
|
|
36
|
+
const [announce, setAnnounce] = useState("");
|
|
37
|
+
const alive = useRef(true);
|
|
38
|
+
const timers = useRef(/* @__PURE__ */ new Map());
|
|
39
|
+
const runs = useRef(/* @__PURE__ */ new Map());
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
alive.current = true;
|
|
42
|
+
const t = timers.current;
|
|
43
|
+
return () => {
|
|
44
|
+
alive.current = false;
|
|
45
|
+
t.forEach(clearTimeout);
|
|
46
|
+
};
|
|
47
|
+
}, []);
|
|
48
|
+
const flip = async (s) => {
|
|
49
|
+
if (s.locked) return;
|
|
50
|
+
const on = !state[s.id];
|
|
51
|
+
const next = { ...state, [s.id]: on };
|
|
52
|
+
if (value === void 0) setInner(next);
|
|
53
|
+
onChange?.(next);
|
|
54
|
+
const run = (runs.current.get(s.id) ?? 0) + 1;
|
|
55
|
+
runs.current.set(s.id, run);
|
|
56
|
+
clearTimeout(timers.current.get(s.id));
|
|
57
|
+
setStatus((st) => ({ ...st, [s.id]: "saving" }));
|
|
58
|
+
try {
|
|
59
|
+
await onSave(s.id, on);
|
|
60
|
+
} catch {
|
|
61
|
+
}
|
|
62
|
+
if (!alive.current || runs.current.get(s.id) !== run) return;
|
|
63
|
+
setStatus((st) => ({ ...st, [s.id]: "saved" }));
|
|
64
|
+
setAnnounce(`${s.label} ${on ? "on" : "off"}. Saved.`);
|
|
65
|
+
timers.current.set(
|
|
66
|
+
s.id,
|
|
67
|
+
setTimeout(() => alive.current && setStatus((st) => ({ ...st, [s.id]: "idle" })), 1800)
|
|
68
|
+
);
|
|
69
|
+
};
|
|
70
|
+
return /* @__PURE__ */ jsxs(
|
|
71
|
+
"section",
|
|
72
|
+
{
|
|
73
|
+
"aria-labelledby": `${uid}-t`,
|
|
74
|
+
className: cx(
|
|
75
|
+
"aui058 w-full max-w-[460px] rounded-[14px] bg-paper p-5 sm:p-6",
|
|
76
|
+
"shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent),0_1px_2px_rgb(0_0_0/0.04),0_18px_40px_-20px_rgb(0_0_0/0.25)]",
|
|
77
|
+
className
|
|
78
|
+
),
|
|
79
|
+
children: [
|
|
80
|
+
/* @__PURE__ */ jsx("style", { href: "asta-aui058", precedence: "asta", children: CSS }),
|
|
81
|
+
/* @__PURE__ */ jsxs("div", { style: rise(0), children: [
|
|
82
|
+
/* @__PURE__ */ jsx("p", { className: "font-mono text-[11px] uppercase tracking-[0.08em] text-mute", children: eyebrow }),
|
|
83
|
+
/* @__PURE__ */ jsx("h3", { id: `${uid}-t`, className: "mt-1.5 text-[20px] font-medium leading-tight tracking-[-0.02em] text-ink", children: title }),
|
|
84
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1 text-[13px] text-mute", children: "Changes save as you go." })
|
|
85
|
+
] }),
|
|
86
|
+
/* @__PURE__ */ jsx("p", { className: "sr-only", "aria-live": "polite", children: announce }),
|
|
87
|
+
/* @__PURE__ */ jsx("ul", { className: "mt-4 -mx-2", children: settings.map((s, i) => {
|
|
88
|
+
const on = !!state[s.id];
|
|
89
|
+
const st = status[s.id] ?? "idle";
|
|
90
|
+
const id = `${uid}-${s.id}`;
|
|
91
|
+
return /* @__PURE__ */ jsxs("li", { style: rise(i + 1), className: "group/set relative flex items-center gap-4 rounded-[10px] px-2 py-3", children: [
|
|
92
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "pointer-events-none absolute inset-0 rounded-[10px] bg-paper-2 opacity-0 transition-opacity duration-300 group-hover/set:opacity-60" }),
|
|
93
|
+
/* @__PURE__ */ jsxs("span", { className: "relative min-w-0 flex-1", children: [
|
|
94
|
+
/* @__PURE__ */ jsx("label", { htmlFor: id, className: cx("block text-[14px] font-medium tracking-[-0.01em] text-ink", !s.locked && "cursor-pointer"), children: s.label }),
|
|
95
|
+
s.description && /* @__PURE__ */ jsx("span", { id: `${id}-d`, className: "mt-0.5 block text-[12.5px] leading-snug text-mute", children: s.description })
|
|
96
|
+
] }),
|
|
97
|
+
/* @__PURE__ */ jsxs("span", { className: "relative flex shrink-0 items-center gap-3", children: [
|
|
98
|
+
s.locked ? /* @__PURE__ */ jsx("span", { className: "text-[11.5px] text-mute", children: s.locked }) : /* @__PURE__ */ jsx(SaveState, { status: st }),
|
|
99
|
+
/* @__PURE__ */ jsxs(
|
|
100
|
+
"button",
|
|
101
|
+
{
|
|
102
|
+
id,
|
|
103
|
+
type: "button",
|
|
104
|
+
role: "switch",
|
|
105
|
+
"aria-checked": on,
|
|
106
|
+
"aria-describedby": s.description ? `${id}-d` : void 0,
|
|
107
|
+
disabled: !!s.locked,
|
|
108
|
+
onClick: () => flip(s),
|
|
109
|
+
className: "group/sw relative h-[22px] w-[38px] shrink-0 rounded-full outline-none focus-visible:ring-2 focus-visible:ring-brand/50 focus-visible:ring-offset-2 focus-visible:ring-offset-paper disabled:cursor-not-allowed disabled:opacity-50",
|
|
110
|
+
children: [
|
|
111
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "absolute inset-0 rounded-full bg-[color-mix(in_srgb,var(--ink)_14%,var(--paper))] shadow-[inset_0_1px_2px_rgb(0_0_0/0.08)]" }),
|
|
112
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "absolute inset-0 rounded-full bg-brand shadow-[inset_0_1px_2px_rgb(0_0_0/0.15)] transition-opacity duration-300", style: { opacity: on ? 1 : 0 } }),
|
|
113
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "absolute left-[2px] top-[2px] block h-[18px] w-[18px] transition-transform duration-[450ms]", style: { transform: `translateX(${on ? 16 : 0}px)`, transitionTimingFunction: SPRING }, children: /* @__PURE__ */ jsx("span", { className: cx("block h-full w-full rounded-full bg-white shadow-[0_1px_2px_rgb(0_0_0/0.2),0_2px_6px_-1px_rgb(0_0_0/0.18)] transition-transform duration-200 group-active/sw:scale-x-[1.18]", on ? "origin-right" : "origin-left") }) })
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
)
|
|
117
|
+
] })
|
|
118
|
+
] }, s.id);
|
|
119
|
+
}) })
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
function SaveState({ status }) {
|
|
125
|
+
const saving = status === "saving";
|
|
126
|
+
const saved = status === "saved";
|
|
127
|
+
return /* @__PURE__ */ jsxs("span", { "aria-hidden": true, className: "relative block h-5 w-[58px]", children: [
|
|
128
|
+
/* @__PURE__ */ jsx("span", { className: "absolute inset-0 flex items-center justify-end transition-[transform,opacity] duration-300", style: { opacity: saving ? 1 : 0, transform: saving ? "none" : "translateY(-4px)", transitionTimingFunction: EASE }, children: /* @__PURE__ */ jsx("span", { className: "h-3 w-3 rounded-full border-[1.5px] border-[color-mix(in_srgb,var(--ink)_25%,transparent)] border-t-ink", style: { animation: saving ? "aui058-spin .7s linear infinite" : "none" } }) }),
|
|
129
|
+
/* @__PURE__ */ jsxs("span", { className: "absolute inset-0 flex items-center justify-end gap-1 text-[12px] font-medium text-brand transition-[transform,opacity] duration-500", style: { opacity: saved ? 1 : 0, transform: saved ? "none" : "translateY(4px)", transitionTimingFunction: EASE }, children: [
|
|
130
|
+
/* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-3.5 w-3.5", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M3.5 8.5l3 3 6-7", pathLength: 1, strokeDasharray: "1", className: "transition-[stroke-dashoffset]", style: { strokeDashoffset: saved ? 0 : 1, transitionDuration: saved ? "420ms" : "0ms", transitionDelay: saved ? "80ms" : "0ms", transitionTimingFunction: EASE } }) }),
|
|
131
|
+
"Saved"
|
|
132
|
+
] })
|
|
133
|
+
] });
|
|
134
|
+
}
|
|
135
|
+
var switch_aui_058_default = SettingSwitch;
|
|
136
|
+
|
|
137
|
+
export {
|
|
138
|
+
SettingSwitch,
|
|
139
|
+
switch_aui_058_default
|
|
140
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// components/kit/variants/radio-group-aui-057.tsx
|
|
4
|
+
import { useEffect, useId, useRef, useState } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
var cx = (...c) => c.filter(Boolean).join(" ");
|
|
7
|
+
var EASE = "cubic-bezier(.16,1,.3,1)";
|
|
8
|
+
var SPRING = "cubic-bezier(.34,1.56,.64,1)";
|
|
9
|
+
var CSS = `
|
|
10
|
+
@keyframes aui057-rise { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }
|
|
11
|
+
@keyframes aui057-pop { from { opacity: 0; transform: scale(.6) } to { opacity: 1; transform: none } }
|
|
12
|
+
@media (prefers-reduced-motion: reduce) { .aui057 * { animation: none !important; transition: none !important } }
|
|
13
|
+
`;
|
|
14
|
+
var rise = (i) => ({ animation: `aui057-rise .6s ${EASE} ${80 + i * 50}ms both` });
|
|
15
|
+
var mix = (a, p, b) => `color-mix(in srgb, var(--color-${a}) ${p}%, var(--color-${b}))`;
|
|
16
|
+
var SWATCHES = [
|
|
17
|
+
{ value: "ink", name: "Ink", color: "var(--ink)", on: "var(--paper)" },
|
|
18
|
+
{ value: "graphite", name: "Graphite", color: mix("ink", 62, "paper"), on: "var(--paper)" },
|
|
19
|
+
{ value: "fog", name: "Fog", color: mix("ink", 9, "paper"), on: "var(--ink)" },
|
|
20
|
+
{ value: "cobalt", name: "Cobalt", color: "var(--brand)", on: "#fff" },
|
|
21
|
+
{ value: "midnight", name: "Midnight", color: mix("brand", 45, "ink"), on: "#fff" },
|
|
22
|
+
{ value: "ice", name: "Ice", color: mix("brand", 16, "paper"), on: "var(--brand)" }
|
|
23
|
+
];
|
|
24
|
+
function SwatchRadio({ swatches = SWATCHES, value, defaultValue = "cobalt", onChange, title = "App icon", description = "How Astabyte looks on your dock and home screen.", mark = "A", name, className }) {
|
|
25
|
+
const uid = useId();
|
|
26
|
+
const [inner, setInner] = useState(defaultValue);
|
|
27
|
+
const current = value ?? inner;
|
|
28
|
+
const index = Math.max(0, swatches.findIndex((s) => s.value === current));
|
|
29
|
+
const icon = useRef(null);
|
|
30
|
+
const first = useRef(true);
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
if (first.current) {
|
|
33
|
+
first.current = false;
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
|
|
37
|
+
icon.current?.animate([{ transform: "scale(1)" }, { transform: "scale(.92)", offset: 0.3 }, { transform: "scale(1)" }], { duration: 520, easing: SPRING });
|
|
38
|
+
}, [index]);
|
|
39
|
+
const pick = (v) => {
|
|
40
|
+
if (value === void 0) setInner(v);
|
|
41
|
+
onChange?.(v);
|
|
42
|
+
};
|
|
43
|
+
return /* @__PURE__ */ jsxs(
|
|
44
|
+
"div",
|
|
45
|
+
{
|
|
46
|
+
className: cx(
|
|
47
|
+
"aui057 w-full max-w-[440px] rounded-[14px] bg-paper p-5 sm:p-6",
|
|
48
|
+
"shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent),0_1px_2px_rgb(0_0_0/0.04),0_18px_40px_-20px_rgb(0_0_0/0.25)]",
|
|
49
|
+
className
|
|
50
|
+
),
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ jsx("style", { href: "asta-aui057", precedence: "asta", children: CSS }),
|
|
53
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-5", children: [
|
|
54
|
+
/* @__PURE__ */ jsxs("div", { ref: icon, "aria-hidden": true, className: "relative h-[84px] w-[84px] shrink-0 overflow-hidden rounded-[22px] shadow-[0_1px_2px_rgb(0_0_0/0.08),0_12px_28px_-14px_rgb(0_0_0/0.45)]", style: { animation: `aui057-pop .7s ${SPRING} 80ms both` }, children: [
|
|
55
|
+
swatches.map((s, i) => /* @__PURE__ */ jsx("span", { className: "absolute inset-0 grid place-items-center transition-opacity duration-500", style: { background: s.color, opacity: i === index ? 1 : 0, transitionTimingFunction: EASE }, children: /* @__PURE__ */ jsx("span", { className: "text-[38px] font-semibold leading-none tracking-[-0.06em]", style: { color: s.on }, children: mark }) }, s.value)),
|
|
56
|
+
/* @__PURE__ */ jsx("span", { className: "absolute inset-0 rounded-[22px] bg-[linear-gradient(180deg,rgb(255_255_255/0.22),transparent_45%)] shadow-[inset_0_0_0_1px_rgb(0_0_0/0.06)]" })
|
|
57
|
+
] }),
|
|
58
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", style: rise(1), children: [
|
|
59
|
+
/* @__PURE__ */ jsx("h3", { id: `${uid}-t`, className: "text-[20px] font-medium leading-tight tracking-[-0.02em] text-ink", children: title }),
|
|
60
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1 text-[13px] leading-snug text-mute", children: description })
|
|
61
|
+
] })
|
|
62
|
+
] }),
|
|
63
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-6 flex items-center justify-between gap-3", style: rise(2), children: [
|
|
64
|
+
/* @__PURE__ */ jsx("p", { className: "font-mono text-[11px] uppercase tracking-[0.08em] text-mute", children: "Colour" }),
|
|
65
|
+
/* @__PURE__ */ jsx("span", { className: "relative block h-5 w-24 overflow-hidden text-right text-[14px] font-medium tracking-[-0.01em] text-ink", "aria-live": "polite", children: /* @__PURE__ */ jsx("span", { className: "absolute inset-x-0 top-0 flex flex-col transition-transform duration-500", style: { transform: `translateY(${-index * 20}px)`, transitionTimingFunction: EASE }, children: swatches.map((s, i) => /* @__PURE__ */ jsx("span", { "aria-hidden": i !== index, className: "block h-5 leading-5", children: s.name }, s.value)) }) })
|
|
66
|
+
] }),
|
|
67
|
+
/* @__PURE__ */ jsx("div", { role: "radiogroup", "aria-labelledby": `${uid}-t`, className: "-mx-1 mt-3 grid justify-items-center gap-1", style: { gridTemplateColumns: `repeat(${swatches.length}, minmax(0, 1fr))` }, children: swatches.map((s, i) => {
|
|
68
|
+
const on = i === index;
|
|
69
|
+
const id = `${uid}-${s.value}`;
|
|
70
|
+
return /* @__PURE__ */ jsxs("label", { htmlFor: id, title: s.name, className: "group/sw relative grid h-10 w-10 cursor-pointer sm:h-11 sm:w-11 place-items-center rounded-full", style: { animation: `aui057-pop .5s ${SPRING} ${220 + i * 45}ms both` }, children: [
|
|
71
|
+
/* @__PURE__ */ jsx("input", { id, type: "radio", name: name ?? uid, value: s.value, checked: on, onChange: () => pick(s.value), "aria-label": s.name, className: "peer sr-only" }),
|
|
72
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "absolute inset-0 rounded-full shadow-[inset_0_0_0_2px_var(--ink)] transition-[transform,opacity] duration-500", style: { opacity: on ? 1 : 0, transform: on ? "scale(1)" : "scale(.7)", transitionTimingFunction: SPRING } }),
|
|
73
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "absolute inset-[-3px] rounded-full opacity-0 shadow-[0_0_0_2px_var(--brand)] peer-focus-visible:opacity-100" }),
|
|
74
|
+
/* @__PURE__ */ jsx(
|
|
75
|
+
"span",
|
|
76
|
+
{
|
|
77
|
+
"aria-hidden": true,
|
|
78
|
+
className: "relative h-7 w-7 rounded-full sm:h-8 sm:w-8 shadow-[inset_0_0_0_1px_rgb(0_0_0/0.08),inset_0_1px_0_rgb(255_255_255/0.2)] transition-transform duration-300 group-hover/sw:scale-110 group-active/sw:scale-95",
|
|
79
|
+
style: { background: s.color, transform: on ? "scale(.82)" : void 0, transitionTimingFunction: SPRING }
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
] }, s.value);
|
|
83
|
+
}) })
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
var radio_group_aui_057_default = SwatchRadio;
|
|
89
|
+
|
|
90
|
+
export {
|
|
91
|
+
SwatchRadio,
|
|
92
|
+
radio_group_aui_057_default
|
|
93
|
+
};
|