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,308 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// components/kit/variants/input-aui-030.tsx
|
|
4
|
+
import { useEffect, useId, useMemo, useRef, useState } from "react";
|
|
5
|
+
import { Fragment, 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 ROW = 36;
|
|
9
|
+
var HEAD = 28;
|
|
10
|
+
var CSS = `
|
|
11
|
+
@keyframes aui030-pop { from { opacity: 0; transform: translateY(-6px) scale(.985) } to { opacity: 1; transform: none } }
|
|
12
|
+
@keyframes aui030-row { from { opacity: 0; transform: translateY(4px) } to { opacity: 1; transform: none } }
|
|
13
|
+
@media (prefers-reduced-motion: reduce) { .aui030 * { animation: none !important; transition: none !important } }
|
|
14
|
+
`;
|
|
15
|
+
var RECENT = ["invoice template", "brand guidelines", "q4 roadmap"];
|
|
16
|
+
var PAGES = [
|
|
17
|
+
{ label: "Projects", meta: "Workspace", kind: "page" },
|
|
18
|
+
{ label: "Team members", meta: "Settings", kind: "page" },
|
|
19
|
+
{ label: "Billing and invoices", meta: "Settings", kind: "page" }
|
|
20
|
+
];
|
|
21
|
+
function Mark({ text, q }) {
|
|
22
|
+
const i = q ? text.toLowerCase().indexOf(q.toLowerCase()) : -1;
|
|
23
|
+
if (i < 0) return /* @__PURE__ */ jsx(Fragment, { children: text });
|
|
24
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
25
|
+
text.slice(0, i),
|
|
26
|
+
/* @__PURE__ */ jsx("span", { className: "text-[var(--aui030-fg)] underline decoration-brand decoration-2 underline-offset-[3px]", children: text.slice(i, i + q.length) }),
|
|
27
|
+
text.slice(i + q.length)
|
|
28
|
+
] });
|
|
29
|
+
}
|
|
30
|
+
var Icon = ({ d, className }) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: cx("h-4 w-4 shrink-0", className), fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: d });
|
|
31
|
+
function SearchField({
|
|
32
|
+
placeholder = "Search Astabyte",
|
|
33
|
+
recent: recentProp = RECENT,
|
|
34
|
+
pages = PAGES,
|
|
35
|
+
onSearch,
|
|
36
|
+
shortcut = true,
|
|
37
|
+
defaultOpen = false,
|
|
38
|
+
tone = "dark",
|
|
39
|
+
className
|
|
40
|
+
}) {
|
|
41
|
+
const id = useId();
|
|
42
|
+
const input = useRef(null);
|
|
43
|
+
const root = useRef(null);
|
|
44
|
+
const [q, setQ] = useState("");
|
|
45
|
+
const [open, setOpen] = useState(defaultOpen);
|
|
46
|
+
const [active, setActive] = useState(0);
|
|
47
|
+
const [recent, setRecent] = useState(recentProp);
|
|
48
|
+
const dark = tone === "dark";
|
|
49
|
+
const items = useMemo(() => {
|
|
50
|
+
const s = q.trim().toLowerCase();
|
|
51
|
+
const r = recent.filter((x) => !s || x.includes(s)).map((label) => ({ label, kind: "recent" }));
|
|
52
|
+
const p = pages.filter((x) => !s || x.label.toLowerCase().includes(s));
|
|
53
|
+
return { r, p, all: [...r, ...p] };
|
|
54
|
+
}, [q, recent, pages]);
|
|
55
|
+
const y = (i) => (items.r.length && i >= 0 ? HEAD : 0) + i * ROW + (i >= items.r.length && items.p.length ? HEAD : 0);
|
|
56
|
+
const idx = Math.min(active, items.all.length - 1);
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
if (!shortcut) return;
|
|
59
|
+
const onKey = (e) => {
|
|
60
|
+
const t = e.target;
|
|
61
|
+
const typing = t && (t.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(t.tagName));
|
|
62
|
+
if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "k" || e.key === "/" && !typing) {
|
|
63
|
+
e.preventDefault();
|
|
64
|
+
input.current?.focus();
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
window.addEventListener("keydown", onKey);
|
|
68
|
+
return () => window.removeEventListener("keydown", onKey);
|
|
69
|
+
}, [shortcut]);
|
|
70
|
+
useEffect(() => {
|
|
71
|
+
if (!open) return;
|
|
72
|
+
const onDown = (e) => !root.current?.contains(e.target) && setOpen(false);
|
|
73
|
+
document.addEventListener("pointerdown", onDown);
|
|
74
|
+
return () => document.removeEventListener("pointerdown", onDown);
|
|
75
|
+
}, [open]);
|
|
76
|
+
const pick = (item) => {
|
|
77
|
+
const query = item?.label ?? q.trim();
|
|
78
|
+
if (!query) return;
|
|
79
|
+
if (!item || item.kind === "recent") setRecent((r) => [query, ...r.filter((x) => x !== query)].slice(0, 5));
|
|
80
|
+
onSearch?.(query, item);
|
|
81
|
+
setQ(item?.kind === "page" ? "" : query);
|
|
82
|
+
setOpen(false);
|
|
83
|
+
};
|
|
84
|
+
const onKeyDown = (e) => {
|
|
85
|
+
const n = items.all.length;
|
|
86
|
+
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
87
|
+
e.preventDefault();
|
|
88
|
+
if (!open) return setOpen(true);
|
|
89
|
+
if (n) setActive((a) => (Math.min(a, n - 1) + (e.key === "ArrowDown" ? 1 : n - 1)) % n);
|
|
90
|
+
} else if (e.key === "Enter") {
|
|
91
|
+
e.preventDefault();
|
|
92
|
+
pick(open && n && idx >= 0 ? items.all[idx] : void 0);
|
|
93
|
+
} else if (e.key === "Escape") {
|
|
94
|
+
if (open) setOpen(false);
|
|
95
|
+
else if (q) setQ("");
|
|
96
|
+
else input.current?.blur();
|
|
97
|
+
} else if (e.key === "Tab") setOpen(false);
|
|
98
|
+
};
|
|
99
|
+
const clear = () => {
|
|
100
|
+
setQ("");
|
|
101
|
+
setActive(0);
|
|
102
|
+
input.current?.focus();
|
|
103
|
+
};
|
|
104
|
+
const show = open && items.all.length > 0;
|
|
105
|
+
const listH = items.all.length * ROW + (items.r.length ? HEAD : 0) + (items.p.length ? HEAD : 0);
|
|
106
|
+
const optId = (i) => `${id}-o${i}`;
|
|
107
|
+
const head = (label, action) => /* @__PURE__ */ jsxs("li", { role: "presentation", className: "flex items-center justify-between px-3 font-mono text-[10.5px] uppercase tracking-[0.08em] text-mute", style: { height: HEAD }, children: [
|
|
108
|
+
label,
|
|
109
|
+
action
|
|
110
|
+
] });
|
|
111
|
+
const row = (item, i) => /* @__PURE__ */ jsxs(
|
|
112
|
+
"li",
|
|
113
|
+
{
|
|
114
|
+
id: optId(i),
|
|
115
|
+
role: "option",
|
|
116
|
+
"aria-selected": i === idx,
|
|
117
|
+
onPointerMove: () => setActive(i),
|
|
118
|
+
onPointerDown: (e) => e.preventDefault(),
|
|
119
|
+
onClick: () => pick(item),
|
|
120
|
+
className: cx(
|
|
121
|
+
"group/r relative flex cursor-pointer items-center gap-3 rounded-[8px] px-3 text-[14px] transition-colors duration-200",
|
|
122
|
+
i === idx ? "text-[var(--aui030-fg)]" : "text-[var(--aui030-dim)]"
|
|
123
|
+
),
|
|
124
|
+
style: { height: ROW, animation: `aui030-row .45s ${EASE} ${60 + i * 35}ms both` },
|
|
125
|
+
children: [
|
|
126
|
+
item.kind === "recent" ? /* @__PURE__ */ jsx(Icon, { d: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
127
|
+
/* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "5.75" }),
|
|
128
|
+
/* @__PURE__ */ jsx("path", { d: "M8 5v3l2 1.25" })
|
|
129
|
+
] }), className: "text-mute" }) : /* @__PURE__ */ jsx(Icon, { d: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
130
|
+
/* @__PURE__ */ jsx("rect", { x: "2.25", y: "2.25", width: "11.5", height: "11.5", rx: "2.5" }),
|
|
131
|
+
/* @__PURE__ */ jsx("path", { d: "M6 8h4M8.5 6 10.5 8l-2 2" })
|
|
132
|
+
] }), className: "text-mute" }),
|
|
133
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: /* @__PURE__ */ jsx(Mark, { text: item.label, q: q.trim() }) }),
|
|
134
|
+
item.kind === "recent" ? /* @__PURE__ */ jsx(
|
|
135
|
+
"button",
|
|
136
|
+
{
|
|
137
|
+
type: "button",
|
|
138
|
+
tabIndex: -1,
|
|
139
|
+
"aria-label": `Remove ${item.label}`,
|
|
140
|
+
onClick: (e) => {
|
|
141
|
+
e.stopPropagation();
|
|
142
|
+
setRecent((r) => r.filter((x) => x !== item.label));
|
|
143
|
+
},
|
|
144
|
+
className: "grid h-6 w-6 place-items-center rounded-[6px] text-mute opacity-0 transition-opacity duration-200 hover:text-[var(--aui030-fg)] group-hover/r:opacity-100",
|
|
145
|
+
children: /* @__PURE__ */ jsx(Icon, { d: /* @__PURE__ */ jsx("path", { d: "M4.5 4.5l7 7M11.5 4.5l-7 7" }), className: "h-3 w-3" })
|
|
146
|
+
}
|
|
147
|
+
) : /* @__PURE__ */ jsx("span", { className: "text-[12px] text-mute", children: item.meta }),
|
|
148
|
+
/* @__PURE__ */ jsx(
|
|
149
|
+
Icon,
|
|
150
|
+
{
|
|
151
|
+
d: /* @__PURE__ */ jsx("path", { d: "M3 8h9M8.5 4.5 12 8l-3.5 3.5" }),
|
|
152
|
+
className: cx("h-3.5 w-3.5 transition-[transform,opacity] duration-300", i === idx ? "translate-x-0 opacity-100" : "-translate-x-1 opacity-0")
|
|
153
|
+
}
|
|
154
|
+
)
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
item.kind + item.label
|
|
158
|
+
);
|
|
159
|
+
return /* @__PURE__ */ jsxs(
|
|
160
|
+
"div",
|
|
161
|
+
{
|
|
162
|
+
ref: root,
|
|
163
|
+
className: cx("aui030 relative w-full", className),
|
|
164
|
+
style: {
|
|
165
|
+
"--aui030-fg": dark ? "var(--paper)" : "var(--ink)",
|
|
166
|
+
"--aui030-dim": dark ? "color-mix(in srgb, var(--paper) 70%, transparent)" : "var(--ink-2)"
|
|
167
|
+
},
|
|
168
|
+
children: [
|
|
169
|
+
/* @__PURE__ */ jsx("style", { href: "asta-input-aui-030", precedence: "asta", children: CSS }),
|
|
170
|
+
/* @__PURE__ */ jsxs(
|
|
171
|
+
"div",
|
|
172
|
+
{
|
|
173
|
+
onPointerDown: (e) => {
|
|
174
|
+
if (e.target === e.currentTarget) {
|
|
175
|
+
e.preventDefault();
|
|
176
|
+
input.current?.focus();
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
className: cx(
|
|
180
|
+
"group/s flex h-11 items-center gap-2.5 rounded-[10px] px-3.5 transition-[box-shadow,background-color] duration-300",
|
|
181
|
+
dark ? "bg-[color-mix(in_srgb,var(--paper)_7%,transparent)] text-paper shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--paper)_10%,transparent)] hover:bg-[color-mix(in_srgb,var(--paper)_10%,transparent)] focus-within:shadow-[inset_0_0_0_1px_var(--brand),0_0_0_4px_color-mix(in_srgb,var(--brand)_28%,transparent)]" : "bg-paper text-ink shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_14%,transparent)] focus-within:shadow-[inset_0_0_0_1px_var(--brand),0_0_0_4px_color-mix(in_srgb,var(--brand)_14%,transparent)]"
|
|
182
|
+
),
|
|
183
|
+
children: [
|
|
184
|
+
/* @__PURE__ */ jsx(Icon, { d: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
185
|
+
/* @__PURE__ */ jsx("circle", { cx: "7", cy: "7", r: "4.75" }),
|
|
186
|
+
/* @__PURE__ */ jsx("path", { d: "m10.5 10.5 3 3" })
|
|
187
|
+
] }), className: "text-mute transition-colors group-focus-within/s:text-[var(--aui030-fg)]" }),
|
|
188
|
+
/* @__PURE__ */ jsx(
|
|
189
|
+
"input",
|
|
190
|
+
{
|
|
191
|
+
ref: input,
|
|
192
|
+
type: "search",
|
|
193
|
+
role: "combobox",
|
|
194
|
+
"aria-label": placeholder,
|
|
195
|
+
"aria-expanded": show,
|
|
196
|
+
"aria-controls": `${id}-list`,
|
|
197
|
+
"aria-autocomplete": "list",
|
|
198
|
+
"aria-activedescendant": show && idx >= 0 ? optId(idx) : void 0,
|
|
199
|
+
value: q,
|
|
200
|
+
placeholder,
|
|
201
|
+
onFocus: () => setOpen(true),
|
|
202
|
+
onChange: (e) => {
|
|
203
|
+
setQ(e.target.value);
|
|
204
|
+
setActive(0);
|
|
205
|
+
setOpen(true);
|
|
206
|
+
},
|
|
207
|
+
onKeyDown,
|
|
208
|
+
className: "h-full min-w-0 flex-1 bg-transparent text-[14px] tracking-[-0.01em] outline-none placeholder:text-mute [&::-webkit-search-cancel-button]:hidden"
|
|
209
|
+
}
|
|
210
|
+
),
|
|
211
|
+
/* @__PURE__ */ jsxs("span", { className: "relative grid h-6 w-8 shrink-0 place-items-center", children: [
|
|
212
|
+
/* @__PURE__ */ jsx(
|
|
213
|
+
"kbd",
|
|
214
|
+
{
|
|
215
|
+
"aria-hidden": true,
|
|
216
|
+
className: cx(
|
|
217
|
+
"absolute inset-0 grid place-items-center rounded-[6px] font-mono text-[11.5px] text-mute shadow-[inset_0_0_0_1px_color-mix(in_srgb,currentColor_45%,transparent)] transition-[transform,opacity] duration-300",
|
|
218
|
+
q ? "rotate-45 scale-50 opacity-0" : "opacity-100"
|
|
219
|
+
),
|
|
220
|
+
style: { transitionTimingFunction: EASE },
|
|
221
|
+
children: "/"
|
|
222
|
+
}
|
|
223
|
+
),
|
|
224
|
+
/* @__PURE__ */ jsx(
|
|
225
|
+
"button",
|
|
226
|
+
{
|
|
227
|
+
type: "button",
|
|
228
|
+
"aria-label": "Clear search",
|
|
229
|
+
tabIndex: q ? 0 : -1,
|
|
230
|
+
onClick: clear,
|
|
231
|
+
className: cx(
|
|
232
|
+
"absolute inset-y-0 right-1 grid w-6 place-items-center rounded-full text-[var(--aui030-fg)] outline-none transition-[transform,opacity] duration-300 focus-visible:ring-2 focus-visible:ring-brand/60",
|
|
233
|
+
dark ? "bg-[color-mix(in_srgb,var(--paper)_14%,transparent)]" : "bg-paper-2",
|
|
234
|
+
q ? "rotate-0 scale-100 opacity-100" : "pointer-events-none -rotate-90 scale-50 opacity-0"
|
|
235
|
+
),
|
|
236
|
+
style: { transitionTimingFunction: EASE },
|
|
237
|
+
children: /* @__PURE__ */ jsx(Icon, { d: /* @__PURE__ */ jsx("path", { d: "M5 5l6 6M11 5l-6 6" }), className: "h-3 w-3" })
|
|
238
|
+
}
|
|
239
|
+
)
|
|
240
|
+
] })
|
|
241
|
+
]
|
|
242
|
+
}
|
|
243
|
+
),
|
|
244
|
+
show && /* @__PURE__ */ jsxs(
|
|
245
|
+
"div",
|
|
246
|
+
{
|
|
247
|
+
className: cx(
|
|
248
|
+
"absolute inset-x-0 top-[calc(100%+8px)] z-20 origin-top rounded-[12px] p-1.5",
|
|
249
|
+
dark ? "bg-[color-mix(in_srgb,var(--ink)_92%,var(--paper))] shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--paper)_10%,transparent),0_24px_48px_-16px_rgb(0_0_0/0.6)]" : "bg-paper shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent),0_18px_40px_-20px_rgb(0_0_0/0.3)]"
|
|
250
|
+
),
|
|
251
|
+
style: { animation: `aui030-pop .4s ${EASE} both` },
|
|
252
|
+
children: [
|
|
253
|
+
/* @__PURE__ */ jsxs("ul", { id: `${id}-list`, role: "listbox", "aria-label": "Suggestions", className: "relative", style: { height: listH }, children: [
|
|
254
|
+
/* @__PURE__ */ jsx(
|
|
255
|
+
"span",
|
|
256
|
+
{
|
|
257
|
+
"aria-hidden": true,
|
|
258
|
+
className: cx(
|
|
259
|
+
"pointer-events-none absolute inset-x-0 top-0 rounded-[8px] transition-transform duration-300",
|
|
260
|
+
dark ? "bg-[color-mix(in_srgb,var(--paper)_9%,transparent)]" : "bg-paper-2"
|
|
261
|
+
),
|
|
262
|
+
style: { height: ROW, transform: `translateY(${y(idx)}px)`, transitionTimingFunction: EASE }
|
|
263
|
+
}
|
|
264
|
+
),
|
|
265
|
+
items.r.length > 0 && head(
|
|
266
|
+
"Recent",
|
|
267
|
+
/* @__PURE__ */ jsx(
|
|
268
|
+
"button",
|
|
269
|
+
{
|
|
270
|
+
type: "button",
|
|
271
|
+
onPointerDown: (e) => e.preventDefault(),
|
|
272
|
+
onClick: () => setRecent([]),
|
|
273
|
+
className: "rounded font-sans text-[11.5px] normal-case tracking-normal text-mute outline-none transition-colors hover:text-[var(--aui030-fg)] focus-visible:ring-2 focus-visible:ring-brand/60",
|
|
274
|
+
children: "Clear"
|
|
275
|
+
}
|
|
276
|
+
)
|
|
277
|
+
),
|
|
278
|
+
items.r.map((it, i) => row(it, i)),
|
|
279
|
+
items.p.length > 0 && head("Jump to"),
|
|
280
|
+
items.p.map((it, i) => row(it, items.r.length + i))
|
|
281
|
+
] }),
|
|
282
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-1 flex items-center gap-3 px-3 pb-1 pt-2 text-[11.5px] text-mute", children: [
|
|
283
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1", children: [
|
|
284
|
+
/* @__PURE__ */ jsx("kbd", { className: "font-mono", children: "\u2191\u2193" }),
|
|
285
|
+
" to move"
|
|
286
|
+
] }),
|
|
287
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1", children: [
|
|
288
|
+
/* @__PURE__ */ jsx("kbd", { className: "font-mono", children: "\u21B5" }),
|
|
289
|
+
" to open"
|
|
290
|
+
] }),
|
|
291
|
+
/* @__PURE__ */ jsxs("span", { className: "ml-auto flex items-center gap-1", children: [
|
|
292
|
+
/* @__PURE__ */ jsx("kbd", { className: "font-mono", children: "esc" }),
|
|
293
|
+
" to close"
|
|
294
|
+
] })
|
|
295
|
+
] })
|
|
296
|
+
]
|
|
297
|
+
}
|
|
298
|
+
)
|
|
299
|
+
]
|
|
300
|
+
}
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
var input_aui_030_default = SearchField;
|
|
304
|
+
|
|
305
|
+
export {
|
|
306
|
+
SearchField,
|
|
307
|
+
input_aui_030_default
|
|
308
|
+
};
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// components/kit/variants/pricing-aui-024.tsx
|
|
4
|
+
import { useCallback, useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
var cx = (...c) => c.filter(Boolean).join(" ");
|
|
7
|
+
var TIERS = [
|
|
8
|
+
{ id: "hobby", name: "Hobby", description: "1 project, community support", price: 0 },
|
|
9
|
+
{ id: "pro", name: "Pro", description: "10 projects, analytics, custom domain", price: 19, tag: "Popular" },
|
|
10
|
+
{ id: "team", name: "Team", description: "Unlimited projects, roles, 10 seats", price: 49 },
|
|
11
|
+
{ id: "scale", name: "Scale", description: "SSO, audit log, 99.9% uptime SLA", price: 149 }
|
|
12
|
+
];
|
|
13
|
+
var EASE = "ease-[cubic-bezier(.16,1,.3,1)]";
|
|
14
|
+
var CSS = `
|
|
15
|
+
@keyframes aui-tiers-rise { from { opacity: 0; transform: translateY(10px) } }
|
|
16
|
+
.aui-tiers-rise { animation: aui-tiers-rise .6s cubic-bezier(.16,1,.3,1) both }
|
|
17
|
+
@media (prefers-reduced-motion: reduce) { .aui-tiers-rise { animation: none } .aui-tiers-move { transition: none !important } }
|
|
18
|
+
`;
|
|
19
|
+
function RollChar({ c, delay }) {
|
|
20
|
+
if (!/\d/.test(c)) return /* @__PURE__ */ jsx("span", { className: "inline-block", children: c });
|
|
21
|
+
return /* @__PURE__ */ jsx("span", { className: "relative inline-block h-[1em] w-[0.6em] overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
22
|
+
"span",
|
|
23
|
+
{
|
|
24
|
+
className: cx("aui-tiers-move absolute inset-x-0 top-0 flex flex-col transition-transform duration-700", EASE),
|
|
25
|
+
style: { transform: `translateY(${-Number(c) * 10}%)`, transitionDelay: `${delay}ms` },
|
|
26
|
+
children: Array.from({ length: 10 }, (_, n) => /* @__PURE__ */ jsx("span", { className: "block h-[1em] text-center leading-[1em]", children: n }, n))
|
|
27
|
+
}
|
|
28
|
+
) });
|
|
29
|
+
}
|
|
30
|
+
function Roll({ text }) {
|
|
31
|
+
const chars = text.split("");
|
|
32
|
+
return /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "inline-flex tabular-nums", children: chars.map((c, i) => /* @__PURE__ */ jsx(RollChar, { c, delay: (chars.length - 1 - i) * 60 }, chars.length - i)) });
|
|
33
|
+
}
|
|
34
|
+
function Level({ level, on }) {
|
|
35
|
+
return /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "flex h-4 items-end gap-[2px]", children: [0, 1, 2, 3].map((i) => /* @__PURE__ */ jsx(
|
|
36
|
+
"span",
|
|
37
|
+
{
|
|
38
|
+
className: cx("block w-[3px] rounded-[1px] transition-colors duration-500", i < level ? on ? "bg-brand" : "bg-ink" : "bg-ink/15"),
|
|
39
|
+
style: { height: `${40 + i * 20}%`, transitionDelay: on ? `${i * 50}ms` : "0ms" }
|
|
40
|
+
},
|
|
41
|
+
i
|
|
42
|
+
)) });
|
|
43
|
+
}
|
|
44
|
+
function PricingTiers({
|
|
45
|
+
tiers = TIERS,
|
|
46
|
+
title = "Choose a plan",
|
|
47
|
+
subtitle = "Astabyte \xB7 12 members",
|
|
48
|
+
initials = "NS",
|
|
49
|
+
currency = "$",
|
|
50
|
+
period = "/ mo",
|
|
51
|
+
defaultValue,
|
|
52
|
+
onChange,
|
|
53
|
+
onContinue,
|
|
54
|
+
ctaLabel = "Continue",
|
|
55
|
+
hint = false,
|
|
56
|
+
className
|
|
57
|
+
}) {
|
|
58
|
+
const [value, setValue] = useState(defaultValue ?? tiers[1]?.id ?? tiers[0]?.id ?? "");
|
|
59
|
+
const list = useRef(null);
|
|
60
|
+
const rows = useRef({});
|
|
61
|
+
const touched = useRef(false);
|
|
62
|
+
const [ring, setRing] = useState({ y: 0, h: 0, ready: false });
|
|
63
|
+
const [armed, setArmed] = useState(false);
|
|
64
|
+
const measure = useCallback(() => {
|
|
65
|
+
const el = rows.current[value];
|
|
66
|
+
if (el) setRing({ y: el.offsetTop, h: el.offsetHeight, ready: true });
|
|
67
|
+
}, [value]);
|
|
68
|
+
useLayoutEffect(() => {
|
|
69
|
+
measure();
|
|
70
|
+
}, [measure]);
|
|
71
|
+
useLayoutEffect(() => {
|
|
72
|
+
const el = list.current;
|
|
73
|
+
if (!el || typeof ResizeObserver === "undefined") return;
|
|
74
|
+
const ro = new ResizeObserver(() => measure());
|
|
75
|
+
ro.observe(el);
|
|
76
|
+
return () => ro.disconnect();
|
|
77
|
+
}, [measure]);
|
|
78
|
+
useEffect(() => {
|
|
79
|
+
const t = setTimeout(() => setArmed(true), 50);
|
|
80
|
+
return () => clearTimeout(t);
|
|
81
|
+
}, []);
|
|
82
|
+
useEffect(() => {
|
|
83
|
+
if (!hint || window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
|
|
84
|
+
const start = tiers.findIndex((t) => t.id === (defaultValue ?? tiers[1]?.id));
|
|
85
|
+
const next = tiers[(start + 1) % tiers.length]?.id;
|
|
86
|
+
const back = tiers[start]?.id;
|
|
87
|
+
if (!next || !back) return;
|
|
88
|
+
const a = setTimeout(() => !touched.current && setValue(next), 1300);
|
|
89
|
+
const b = setTimeout(() => !touched.current && setValue(back), 2300);
|
|
90
|
+
return () => {
|
|
91
|
+
clearTimeout(a);
|
|
92
|
+
clearTimeout(b);
|
|
93
|
+
};
|
|
94
|
+
}, [hint, tiers, defaultValue]);
|
|
95
|
+
function choose(id, focus = false) {
|
|
96
|
+
touched.current = true;
|
|
97
|
+
setValue(id);
|
|
98
|
+
onChange?.(id);
|
|
99
|
+
if (focus) rows.current[id]?.focus();
|
|
100
|
+
}
|
|
101
|
+
function onKey(e, i) {
|
|
102
|
+
const n = tiers.length;
|
|
103
|
+
let j = -1;
|
|
104
|
+
if (e.key === "ArrowDown" || e.key === "ArrowRight") j = (i + 1) % n;
|
|
105
|
+
else if (e.key === "ArrowUp" || e.key === "ArrowLeft") j = (i - 1 + n) % n;
|
|
106
|
+
else if (e.key === "Home") j = 0;
|
|
107
|
+
else if (e.key === "End") j = n - 1;
|
|
108
|
+
if (j < 0) return;
|
|
109
|
+
e.preventDefault();
|
|
110
|
+
const t = tiers[j];
|
|
111
|
+
if (t) choose(t.id, true);
|
|
112
|
+
}
|
|
113
|
+
const index = Math.max(0, tiers.findIndex((t) => t.id === value));
|
|
114
|
+
const current = tiers[index];
|
|
115
|
+
const rise = (n) => ({ animationDelay: `${80 + n * 55}ms` });
|
|
116
|
+
return /* @__PURE__ */ jsxs(
|
|
117
|
+
"div",
|
|
118
|
+
{
|
|
119
|
+
className: cx(
|
|
120
|
+
"w-full max-w-[460px] rounded-[16px] bg-paper p-2 text-ink shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent),0_1px_2px_rgb(0_0_0/0.04),0_24px_48px_-24px_rgb(0_0_0/0.35)]",
|
|
121
|
+
className
|
|
122
|
+
),
|
|
123
|
+
children: [
|
|
124
|
+
/* @__PURE__ */ jsxs("div", { className: "aui-tiers-rise flex items-center gap-3 px-4 pb-4 pt-4", style: rise(0), children: [
|
|
125
|
+
initials && /* @__PURE__ */ jsx("span", { className: "grid h-9 w-9 shrink-0 place-items-center rounded-full bg-ink text-[12px] font-semibold tracking-[0.02em] text-paper", children: initials }),
|
|
126
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
127
|
+
/* @__PURE__ */ jsx("h3", { className: "text-[20px] font-medium leading-tight tracking-[-0.02em]", children: title }),
|
|
128
|
+
subtitle && /* @__PURE__ */ jsx("p", { className: "mt-0.5 truncate text-[13px] text-mute", children: subtitle })
|
|
129
|
+
] })
|
|
130
|
+
] }),
|
|
131
|
+
/* @__PURE__ */ jsxs("div", { ref: list, role: "radiogroup", "aria-label": title, className: "relative flex flex-col gap-1", children: [
|
|
132
|
+
/* @__PURE__ */ jsx(
|
|
133
|
+
"span",
|
|
134
|
+
{
|
|
135
|
+
"aria-hidden": true,
|
|
136
|
+
className: cx(
|
|
137
|
+
"aui-tiers-move pointer-events-none absolute inset-x-0 top-0 rounded-[11px] shadow-[inset_0_0_0_1.5px_var(--brand),0_10px_24px_-14px_var(--brand)]",
|
|
138
|
+
armed && "transition-transform duration-[600ms]",
|
|
139
|
+
EASE,
|
|
140
|
+
ring.ready ? "opacity-100" : "opacity-0"
|
|
141
|
+
),
|
|
142
|
+
style: { transform: `translateY(${ring.y}px)`, height: ring.h, background: "color-mix(in srgb, var(--brand) 5%, var(--paper))" }
|
|
143
|
+
}
|
|
144
|
+
),
|
|
145
|
+
tiers.map((t, i) => {
|
|
146
|
+
const on = t.id === value;
|
|
147
|
+
return /* @__PURE__ */ jsxs(
|
|
148
|
+
"button",
|
|
149
|
+
{
|
|
150
|
+
ref: (el) => {
|
|
151
|
+
rows.current[t.id] = el;
|
|
152
|
+
},
|
|
153
|
+
type: "button",
|
|
154
|
+
role: "radio",
|
|
155
|
+
"aria-checked": on,
|
|
156
|
+
tabIndex: on ? 0 : -1,
|
|
157
|
+
onClick: () => choose(t.id),
|
|
158
|
+
onKeyDown: (e) => onKey(e, i),
|
|
159
|
+
className: cx(
|
|
160
|
+
"aui-tiers-rise group relative flex w-full items-center gap-3.5 rounded-[11px] px-4 py-3.5 text-left outline-none transition-[background-color,transform] duration-300 active:scale-[.99] focus-visible:ring-2 focus-visible:ring-brand/40 focus-visible:ring-offset-2 focus-visible:ring-offset-paper",
|
|
161
|
+
EASE,
|
|
162
|
+
!on && "hover:bg-ink/[0.03]"
|
|
163
|
+
),
|
|
164
|
+
style: rise(1 + i),
|
|
165
|
+
children: [
|
|
166
|
+
/* @__PURE__ */ jsx(Level, { level: Math.min(4, i + 1), on }),
|
|
167
|
+
/* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
|
|
168
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2 text-[14.5px] font-medium tracking-[-0.01em]", children: [
|
|
169
|
+
t.name,
|
|
170
|
+
t.tag && /* @__PURE__ */ jsx("span", { className: "rounded-[4px] bg-brand px-1.5 text-[10.5px] font-medium leading-[18px] text-white", children: t.tag })
|
|
171
|
+
] }),
|
|
172
|
+
/* @__PURE__ */ jsx("span", { className: "mt-0.5 block truncate text-[13px] text-mute", children: t.description })
|
|
173
|
+
] }),
|
|
174
|
+
/* @__PURE__ */ jsxs("span", { className: cx("shrink-0 text-right transition-transform duration-500", EASE, on ? "-translate-x-0.5" : "translate-x-0"), children: [
|
|
175
|
+
/* @__PURE__ */ jsx("span", { className: "text-[16px] font-medium tracking-[-0.03em] tabular-nums", children: t.price === 0 ? "Free" : `${currency}${t.price}` }),
|
|
176
|
+
t.price > 0 && /* @__PURE__ */ jsx("span", { className: "ml-1 text-[12px] text-mute", children: period })
|
|
177
|
+
] })
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
t.id
|
|
181
|
+
);
|
|
182
|
+
})
|
|
183
|
+
] }),
|
|
184
|
+
/* @__PURE__ */ jsxs("div", { className: "aui-tiers-rise mt-2 flex items-center justify-between gap-4 rounded-[12px] bg-ink px-4 py-3.5 text-paper", style: rise(2 + tiers.length), children: [
|
|
185
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", "aria-live": "polite", children: [
|
|
186
|
+
/* @__PURE__ */ jsx("p", { className: "font-mono text-[10.5px] uppercase tracking-[0.08em] text-paper/50", children: "Due today" }),
|
|
187
|
+
/* @__PURE__ */ jsxs("p", { className: "mt-1 flex items-start font-medium leading-none tracking-[-0.04em]", children: [
|
|
188
|
+
/* @__PURE__ */ jsx("span", { className: "mr-0.5 mt-0.5 text-[14px] text-paper/70", children: currency }),
|
|
189
|
+
/* @__PURE__ */ jsx("span", { className: "text-[28px]", children: /* @__PURE__ */ jsx(Roll, { text: String(current?.price ?? 0) }) }),
|
|
190
|
+
/* @__PURE__ */ jsxs("span", { className: "sr-only", children: [
|
|
191
|
+
current?.name,
|
|
192
|
+
", ",
|
|
193
|
+
currency,
|
|
194
|
+
current?.price,
|
|
195
|
+
" ",
|
|
196
|
+
period
|
|
197
|
+
] }),
|
|
198
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "ml-2 self-end pb-0.5 text-[12px] font-normal tracking-normal text-paper/50", children: /* @__PURE__ */ jsxs("span", { className: "aui-tiers-rise inline-block", children: [
|
|
199
|
+
current?.name,
|
|
200
|
+
" ",
|
|
201
|
+
period
|
|
202
|
+
] }, current?.id) })
|
|
203
|
+
] })
|
|
204
|
+
] }),
|
|
205
|
+
/* @__PURE__ */ jsxs(
|
|
206
|
+
"button",
|
|
207
|
+
{
|
|
208
|
+
type: "button",
|
|
209
|
+
onClick: () => current && onContinue?.(current.id),
|
|
210
|
+
className: cx(
|
|
211
|
+
"group inline-flex h-10 shrink-0 items-center justify-center gap-1.5 rounded-[8px] bg-brand px-4 text-[13.5px] font-medium text-white shadow-[0_10px_24px_-12px_var(--brand)] outline-none transition-transform duration-300 hover:-translate-y-px active:translate-y-0 active:scale-[.97] focus-visible:ring-2 focus-visible:ring-brand/60 focus-visible:ring-offset-2 focus-visible:ring-offset-ink",
|
|
212
|
+
EASE
|
|
213
|
+
),
|
|
214
|
+
children: [
|
|
215
|
+
ctaLabel,
|
|
216
|
+
/* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: cx("h-3.5 w-3.5 transition-transform duration-300 group-hover:translate-x-0.5", EASE), fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M3 8h10M9 4l4 4-4 4" }) })
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
)
|
|
220
|
+
] }),
|
|
221
|
+
/* @__PURE__ */ jsx("style", { href: "asta-pricing-aui-024", precedence: "asta", children: CSS })
|
|
222
|
+
]
|
|
223
|
+
}
|
|
224
|
+
);
|
|
225
|
+
}
|
|
226
|
+
var pricing_aui_024_default = PricingTiers;
|
|
227
|
+
|
|
228
|
+
export {
|
|
229
|
+
PricingTiers,
|
|
230
|
+
pricing_aui_024_default
|
|
231
|
+
};
|