asheeui 1.0.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. package/LICENSE +201 -21
  2. package/NOTICE +10 -0
  3. package/README.md +63 -166
  4. package/dist/components/accordion/Accordion.d.ts +1 -1
  5. package/dist/components/alert/Alert.d.ts.map +1 -1
  6. package/dist/components/alert/Alert.js +6 -6
  7. package/dist/components/auth-layout/AuthLayout.d.ts +79 -0
  8. package/dist/components/auth-layout/AuthLayout.d.ts.map +1 -0
  9. package/dist/components/auth-layout/AuthLayout.js +54 -0
  10. package/dist/components/auth-layout/auth-layout-config.d.ts +41 -0
  11. package/dist/components/auth-layout/auth-layout-config.d.ts.map +1 -0
  12. package/dist/components/auth-layout/auth-layout-config.js +18 -0
  13. package/dist/components/auth-layout/auth-layout-styles.d.ts +25 -0
  14. package/dist/components/auth-layout/auth-layout-styles.d.ts.map +1 -0
  15. package/dist/components/auth-layout/auth-layout-styles.js +11 -0
  16. package/dist/components/auth-layout/index.d.ts +3 -0
  17. package/dist/components/auth-layout/index.d.ts.map +1 -0
  18. package/dist/components/auth-layout/index.js +3 -0
  19. package/dist/components/autocomplete/Autocomplete.d.ts.map +1 -1
  20. package/dist/components/avatar/Avatar.d.ts.map +1 -1
  21. package/dist/components/avatar/Avatar.js +7 -7
  22. package/dist/components/badge/Badge.d.ts.map +1 -1
  23. package/dist/components/badge/Badge.js +3 -3
  24. package/dist/components/breadcrumb/Breadcrumb.d.ts.map +1 -1
  25. package/dist/components/breadcrumb/Breadcrumb.js +6 -6
  26. package/dist/components/calendar/Calendar.d.ts.map +1 -1
  27. package/dist/components/calendar/Calendar.js +4 -4
  28. package/dist/components/calendar/DateGrid.d.ts.map +1 -1
  29. package/dist/components/calendar/DateGrid.js +87 -87
  30. package/dist/components/clipboard/Clipboard.d.ts +75 -0
  31. package/dist/components/clipboard/Clipboard.d.ts.map +1 -0
  32. package/dist/components/clipboard/Clipboard.js +53 -0
  33. package/dist/components/clipboard/CopyButton.d.ts +64 -0
  34. package/dist/components/clipboard/CopyButton.d.ts.map +1 -0
  35. package/dist/components/clipboard/CopyButton.js +44 -0
  36. package/dist/components/clipboard/clipboard-config.d.ts +42 -0
  37. package/dist/components/clipboard/clipboard-config.d.ts.map +1 -0
  38. package/dist/components/clipboard/clipboard-config.js +23 -0
  39. package/dist/components/clipboard/clipboard-styles.d.ts +11 -0
  40. package/dist/components/clipboard/clipboard-styles.d.ts.map +1 -0
  41. package/dist/components/clipboard/clipboard-styles.js +5 -0
  42. package/dist/components/clipboard/index.d.ts +4 -0
  43. package/dist/components/clipboard/index.d.ts.map +1 -0
  44. package/dist/components/clipboard/index.js +4 -0
  45. package/dist/components/container/Container.d.ts +51 -0
  46. package/dist/components/container/Container.d.ts.map +1 -0
  47. package/dist/components/container/Container.js +21 -0
  48. package/dist/components/container/container-config.d.ts +61 -0
  49. package/dist/components/container/container-config.d.ts.map +1 -0
  50. package/dist/components/container/container-config.js +16 -0
  51. package/dist/components/container/container-styles.d.ts +18 -0
  52. package/dist/components/container/container-styles.d.ts.map +1 -0
  53. package/dist/components/container/container-styles.js +12 -0
  54. package/dist/components/container/index.d.ts +3 -0
  55. package/dist/components/container/index.d.ts.map +1 -0
  56. package/dist/components/container/index.js +3 -0
  57. package/dist/components/cta/CTA.d.ts +81 -0
  58. package/dist/components/cta/CTA.d.ts.map +1 -0
  59. package/dist/components/cta/CTA.js +60 -0
  60. package/dist/components/cta/cta-config.d.ts +69 -0
  61. package/dist/components/cta/cta-config.d.ts.map +1 -0
  62. package/dist/components/cta/cta-config.js +22 -0
  63. package/dist/components/cta/cta-styles.d.ts +8 -0
  64. package/dist/components/cta/cta-styles.d.ts.map +1 -0
  65. package/dist/components/cta/cta-styles.js +9 -0
  66. package/dist/components/cta/index.d.ts +3 -0
  67. package/dist/components/cta/index.d.ts.map +1 -0
  68. package/dist/components/cta/index.js +3 -0
  69. package/dist/components/dropmenu/Dropmenu.d.ts.map +1 -1
  70. package/dist/components/empty-state/EmptyState.d.ts +77 -0
  71. package/dist/components/empty-state/EmptyState.d.ts.map +1 -0
  72. package/dist/components/empty-state/EmptyState.js +46 -0
  73. package/dist/components/empty-state/empty-state-config.d.ts +44 -0
  74. package/dist/components/empty-state/empty-state-config.d.ts.map +1 -0
  75. package/dist/components/empty-state/empty-state-config.js +16 -0
  76. package/dist/components/empty-state/empty-state-styles.d.ts +13 -0
  77. package/dist/components/empty-state/empty-state-styles.d.ts.map +1 -0
  78. package/dist/components/empty-state/empty-state-styles.js +18 -0
  79. package/dist/components/empty-state/index.d.ts +3 -0
  80. package/dist/components/empty-state/index.d.ts.map +1 -0
  81. package/dist/components/empty-state/index.js +3 -0
  82. package/dist/components/feature-grid/FeatureGrid.d.ts +107 -0
  83. package/dist/components/feature-grid/FeatureGrid.d.ts.map +1 -0
  84. package/dist/components/feature-grid/FeatureGrid.js +94 -0
  85. package/dist/components/feature-grid/feature-grid-config.d.ts +80 -0
  86. package/dist/components/feature-grid/feature-grid-config.d.ts.map +1 -0
  87. package/dist/components/feature-grid/feature-grid-config.js +28 -0
  88. package/dist/components/feature-grid/feature-grid-styles.d.ts +11 -0
  89. package/dist/components/feature-grid/feature-grid-styles.d.ts.map +1 -0
  90. package/dist/components/feature-grid/feature-grid-styles.js +5 -0
  91. package/dist/components/feature-grid/index.d.ts +3 -0
  92. package/dist/components/feature-grid/index.d.ts.map +1 -0
  93. package/dist/components/feature-grid/index.js +3 -0
  94. package/dist/components/footer/Footer.d.ts +73 -0
  95. package/dist/components/footer/Footer.d.ts.map +1 -0
  96. package/dist/components/footer/Footer.js +112 -0
  97. package/dist/components/footer/footer-config.d.ts +40 -0
  98. package/dist/components/footer/footer-config.d.ts.map +1 -0
  99. package/dist/components/footer/footer-config.js +18 -0
  100. package/dist/components/footer/footer-styles.d.ts +22 -0
  101. package/dist/components/footer/footer-styles.d.ts.map +1 -0
  102. package/dist/components/footer/footer-styles.js +9 -0
  103. package/dist/components/footer/index.d.ts +3 -0
  104. package/dist/components/footer/index.d.ts.map +1 -0
  105. package/dist/components/footer/index.js +3 -0
  106. package/dist/components/form/Form.d.ts.map +1 -1
  107. package/dist/components/grid/Grid.d.ts +71 -0
  108. package/dist/components/grid/Grid.d.ts.map +1 -0
  109. package/dist/components/grid/Grid.js +23 -0
  110. package/dist/components/grid/grid-config.d.ts +63 -0
  111. package/dist/components/grid/grid-config.d.ts.map +1 -0
  112. package/dist/components/grid/grid-config.js +16 -0
  113. package/dist/components/grid/grid-styles.d.ts +12 -0
  114. package/dist/components/grid/grid-styles.d.ts.map +1 -0
  115. package/dist/components/grid/grid-styles.js +31 -0
  116. package/dist/components/grid/index.d.ts +3 -0
  117. package/dist/components/grid/index.d.ts.map +1 -0
  118. package/dist/components/grid/index.js +3 -0
  119. package/dist/components/hero/Hero.d.ts +90 -0
  120. package/dist/components/hero/Hero.d.ts.map +1 -0
  121. package/dist/components/hero/Hero.js +63 -0
  122. package/dist/components/hero/hero-config.d.ts +71 -0
  123. package/dist/components/hero/hero-config.d.ts.map +1 -0
  124. package/dist/components/hero/hero-config.js +22 -0
  125. package/dist/components/hero/hero-styles.d.ts +19 -0
  126. package/dist/components/hero/hero-styles.d.ts.map +1 -0
  127. package/dist/components/hero/hero-styles.js +5 -0
  128. package/dist/components/hero/index.d.ts +3 -0
  129. package/dist/components/hero/index.d.ts.map +1 -0
  130. package/dist/components/hero/index.js +3 -0
  131. package/dist/components/multi-select/MultiSelect.d.ts.map +1 -1
  132. package/dist/components/navbar/Navbar.d.ts +87 -0
  133. package/dist/components/navbar/Navbar.d.ts.map +1 -0
  134. package/dist/components/navbar/Navbar.js +117 -0
  135. package/dist/components/navbar/index.d.ts +3 -0
  136. package/dist/components/navbar/index.d.ts.map +1 -0
  137. package/dist/components/navbar/index.js +3 -0
  138. package/dist/components/navbar/navbar-config.d.ts +52 -0
  139. package/dist/components/navbar/navbar-config.d.ts.map +1 -0
  140. package/dist/components/navbar/navbar-config.js +20 -0
  141. package/dist/components/navbar/navbar-styles.d.ts +28 -0
  142. package/dist/components/navbar/navbar-styles.d.ts.map +1 -0
  143. package/dist/components/navbar/navbar-styles.js +9 -0
  144. package/dist/components/page/Page.d.ts +166 -0
  145. package/dist/components/page/Page.d.ts.map +1 -0
  146. package/dist/components/page/Page.js +90 -0
  147. package/dist/components/page/index.d.ts +3 -0
  148. package/dist/components/page/index.d.ts.map +1 -0
  149. package/dist/components/page/index.js +3 -0
  150. package/dist/components/page/page-config.d.ts +57 -0
  151. package/dist/components/page/page-config.d.ts.map +1 -0
  152. package/dist/components/page/page-config.js +20 -0
  153. package/dist/components/page/page-styles.d.ts +25 -0
  154. package/dist/components/page/page-styles.d.ts.map +1 -0
  155. package/dist/components/page/page-styles.js +5 -0
  156. package/dist/components/pagination/Pagination.d.ts.map +1 -1
  157. package/dist/components/pagination/Pagination.js +8 -8
  158. package/dist/components/pin-input/PinInput.d.ts +109 -0
  159. package/dist/components/pin-input/PinInput.d.ts.map +1 -0
  160. package/dist/components/pin-input/PinInput.js +124 -0
  161. package/dist/components/pin-input/index.d.ts +3 -0
  162. package/dist/components/pin-input/index.d.ts.map +1 -0
  163. package/dist/components/pin-input/index.js +3 -0
  164. package/dist/components/pin-input/pin-input-config.d.ts +82 -0
  165. package/dist/components/pin-input/pin-input-config.d.ts.map +1 -0
  166. package/dist/components/pin-input/pin-input-config.js +23 -0
  167. package/dist/components/pin-input/pin-input-styles.d.ts +16 -0
  168. package/dist/components/pin-input/pin-input-styles.d.ts.map +1 -0
  169. package/dist/components/pin-input/pin-input-styles.js +9 -0
  170. package/dist/components/pricing-card/PricingCard.d.ts +87 -0
  171. package/dist/components/pricing-card/PricingCard.d.ts.map +1 -0
  172. package/dist/components/pricing-card/PricingCard.js +79 -0
  173. package/dist/components/pricing-card/index.d.ts +3 -0
  174. package/dist/components/pricing-card/index.d.ts.map +1 -0
  175. package/dist/components/pricing-card/index.js +3 -0
  176. package/dist/components/pricing-card/pricing-card-config.d.ts +35 -0
  177. package/dist/components/pricing-card/pricing-card-config.d.ts.map +1 -0
  178. package/dist/components/pricing-card/pricing-card-config.js +16 -0
  179. package/dist/components/pricing-card/pricing-card-styles.d.ts +21 -0
  180. package/dist/components/pricing-card/pricing-card-styles.d.ts.map +1 -0
  181. package/dist/components/pricing-card/pricing-card-styles.js +5 -0
  182. package/dist/components/radio/RadioGroup.d.ts.map +1 -1
  183. package/dist/components/section/Section.d.ts +56 -0
  184. package/dist/components/section/Section.d.ts.map +1 -0
  185. package/dist/components/section/Section.js +27 -0
  186. package/dist/components/section/index.d.ts +3 -0
  187. package/dist/components/section/index.d.ts.map +1 -0
  188. package/dist/components/section/index.js +3 -0
  189. package/dist/components/section/section-config.d.ts +64 -0
  190. package/dist/components/section/section-config.d.ts.map +1 -0
  191. package/dist/components/section/section-config.js +20 -0
  192. package/dist/components/section/section-styles.d.ts +8 -0
  193. package/dist/components/section/section-styles.d.ts.map +1 -0
  194. package/dist/components/section/section-styles.js +9 -0
  195. package/dist/components/section-kit/ActionGroup.d.ts +47 -0
  196. package/dist/components/section-kit/ActionGroup.d.ts.map +1 -0
  197. package/dist/components/section-kit/ActionGroup.js +35 -0
  198. package/dist/components/section-kit/SectionHeading.d.ts +65 -0
  199. package/dist/components/section-kit/SectionHeading.d.ts.map +1 -0
  200. package/dist/components/section-kit/SectionHeading.js +34 -0
  201. package/dist/components/section-kit/index.d.ts +12 -0
  202. package/dist/components/section-kit/index.d.ts.map +1 -0
  203. package/dist/components/section-kit/index.js +2 -0
  204. package/dist/components/sidebar-layout/SidebarLayout.d.ts +67 -0
  205. package/dist/components/sidebar-layout/SidebarLayout.d.ts.map +1 -0
  206. package/dist/components/sidebar-layout/SidebarLayout.js +40 -0
  207. package/dist/components/sidebar-layout/index.d.ts +3 -0
  208. package/dist/components/sidebar-layout/index.d.ts.map +1 -0
  209. package/dist/components/sidebar-layout/index.js +3 -0
  210. package/dist/components/sidebar-layout/sidebar-layout-config.d.ts +49 -0
  211. package/dist/components/sidebar-layout/sidebar-layout-config.d.ts.map +1 -0
  212. package/dist/components/sidebar-layout/sidebar-layout-config.js +16 -0
  213. package/dist/components/sidebar-layout/sidebar-layout-styles.d.ts +21 -0
  214. package/dist/components/sidebar-layout/sidebar-layout-styles.d.ts.map +1 -0
  215. package/dist/components/sidebar-layout/sidebar-layout-styles.js +9 -0
  216. package/dist/components/skeleton/Skeleton.d.ts.map +1 -1
  217. package/dist/components/stack/Stack.d.ts +107 -0
  218. package/dist/components/stack/Stack.d.ts.map +1 -0
  219. package/dist/components/stack/Stack.js +36 -0
  220. package/dist/components/stack/index.d.ts +3 -0
  221. package/dist/components/stack/index.d.ts.map +1 -0
  222. package/dist/components/stack/index.js +3 -0
  223. package/dist/components/stack/stack-config.d.ts +68 -0
  224. package/dist/components/stack/stack-config.d.ts.map +1 -0
  225. package/dist/components/stack/stack-config.js +20 -0
  226. package/dist/components/stack/stack-styles.d.ts +10 -0
  227. package/dist/components/stack/stack-styles.d.ts.map +1 -0
  228. package/dist/components/stack/stack-styles.js +21 -0
  229. package/dist/components/testimonials/Testimonials.d.ts +78 -0
  230. package/dist/components/testimonials/Testimonials.d.ts.map +1 -0
  231. package/dist/components/testimonials/Testimonials.js +96 -0
  232. package/dist/components/testimonials/index.d.ts +3 -0
  233. package/dist/components/testimonials/index.d.ts.map +1 -0
  234. package/dist/components/testimonials/index.js +3 -0
  235. package/dist/components/testimonials/testimonials-config.d.ts +44 -0
  236. package/dist/components/testimonials/testimonials-config.d.ts.map +1 -0
  237. package/dist/components/testimonials/testimonials-config.js +28 -0
  238. package/dist/components/testimonials/testimonials-styles.d.ts +11 -0
  239. package/dist/components/testimonials/testimonials-styles.d.ts.map +1 -0
  240. package/dist/components/testimonials/testimonials-styles.js +5 -0
  241. package/dist/components/typography/typography-styles.d.ts.map +1 -1
  242. package/dist/config/validate-config.d.ts.map +1 -1
  243. package/dist/icons/CopyIcon.d.ts +3 -0
  244. package/dist/icons/CopyIcon.d.ts.map +1 -0
  245. package/dist/icons/CopyIcon.js +24 -0
  246. package/dist/index.d.ts +19 -2
  247. package/dist/index.d.ts.map +1 -1
  248. package/dist/index.js +107 -72
  249. package/dist/puck/adapters.d.ts +41 -0
  250. package/dist/puck/adapters.d.ts.map +1 -0
  251. package/dist/puck/adapters.js +30 -0
  252. package/dist/puck/blocks/content.d.ts +32 -0
  253. package/dist/puck/blocks/content.d.ts.map +1 -0
  254. package/dist/puck/blocks/content.js +54 -0
  255. package/dist/puck/blocks/layout.d.ts +44 -0
  256. package/dist/puck/blocks/layout.d.ts.map +1 -0
  257. package/dist/puck/blocks/layout.js +69 -0
  258. package/dist/puck/blocks/navigation.d.ts +66 -0
  259. package/dist/puck/blocks/navigation.d.ts.map +1 -0
  260. package/dist/puck/blocks/navigation.js +122 -0
  261. package/dist/puck/blocks/sections.d.ts +134 -0
  262. package/dist/puck/blocks/sections.d.ts.map +1 -0
  263. package/dist/puck/blocks/sections.js +232 -0
  264. package/dist/puck/blocks/utility.d.ts +22 -0
  265. package/dist/puck/blocks/utility.d.ts.map +1 -0
  266. package/dist/puck/blocks/utility.js +49 -0
  267. package/dist/puck/config.d.ts +63 -0
  268. package/dist/puck/config.d.ts.map +1 -0
  269. package/dist/puck/config.js +79 -0
  270. package/dist/puck/fields.d.ts +94 -0
  271. package/dist/puck/fields.d.ts.map +1 -0
  272. package/dist/puck/fields.js +116 -0
  273. package/dist/puck/index.d.ts +21 -0
  274. package/dist/puck/index.d.ts.map +1 -0
  275. package/dist/puck/index.js +10 -0
  276. package/dist/shared/action.d.ts +52 -0
  277. package/dist/shared/action.d.ts.map +1 -0
  278. package/dist/shared/index.d.ts +2 -0
  279. package/dist/shared/index.d.ts.map +1 -1
  280. package/dist/shared/spacing.d.ts +38 -0
  281. package/dist/shared/spacing.d.ts.map +1 -0
  282. package/dist/shared/spacing.js +29 -0
  283. package/dist/shared/typography.d.ts.map +1 -1
  284. package/dist/utils/resolve-token.d.ts +32 -7
  285. package/dist/utils/resolve-token.d.ts.map +1 -1
  286. package/dist/utils/resolve-token.js +9 -1
  287. package/package.json +18 -4
@@ -0,0 +1,57 @@
1
+ import { Space } from '../../shared';
2
+ import { ContainerSize } from '../container/container-config';
3
+ /**
4
+ * Theme configuration options shared by the page parts.
5
+ *
6
+ * Set under `components.page` in the AsheeUI config. Values feed the
7
+ * component-level fallback tier of the theme cascade for all four parts, so an
8
+ * application can set its page shell once.
9
+ */
10
+ export interface PageConfig {
11
+ /**
12
+ * Whether a part wraps its content in a {@link Container}.
13
+ *
14
+ * @default true
15
+ */
16
+ contained?: boolean;
17
+ /**
18
+ * Maximum content width used when a part is contained.
19
+ *
20
+ * @default "lg"
21
+ */
22
+ containerSize?: ContainerSize;
23
+ /**
24
+ * Vertical rhythm of the content area.
25
+ *
26
+ * @default "md"
27
+ */
28
+ spacing?: Space;
29
+ /**
30
+ * Whether the header stays at the top of the viewport while the content
31
+ * scrolls.
32
+ *
33
+ * @default true
34
+ */
35
+ sticky?: boolean;
36
+ /**
37
+ * Whether the header and the footer draw a separator line against the
38
+ * content.
39
+ *
40
+ * @default true
41
+ */
42
+ divider?: boolean;
43
+ }
44
+ /**
45
+ * Default config values registered for the page parts.
46
+ */
47
+ export declare const defaultPageConfig: PageConfig;
48
+ declare module "../../libs/registry" {
49
+ interface ComponentTypeConfigRegistry {
50
+ page: PageConfig;
51
+ }
52
+ }
53
+ /**
54
+ * Hard fallback values used when no config tier provides a value.
55
+ */
56
+ export declare const FALLBACK_PAGE_CONFIG: Required<PageConfig>;
57
+ //# sourceMappingURL=page-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-config.d.ts","sourceRoot":"","sources":["../../../src/components/page/page-config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAE9B;;;;OAIG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC;IAEhB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,UAM/B,CAAC;AAEF,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,IAAI,EAAE,UAAU,CAAC;KAClB;CACF;AAID;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,UAAU,CAMrD,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use client";
2
+ import { registerComponentDefaults as e } from "../../libs/registry.js";
3
+ //#region src/components/page/page-config.ts
4
+ var t = {
5
+ contained: !0,
6
+ containerSize: "lg",
7
+ spacing: "md",
8
+ sticky: !0,
9
+ divider: !0
10
+ };
11
+ e("page", t);
12
+ var n = {
13
+ contained: !0,
14
+ containerSize: "lg",
15
+ spacing: "md",
16
+ sticky: !0,
17
+ divider: !0
18
+ };
19
+ //#endregion
20
+ export { n as FALLBACK_PAGE_CONFIG, t as defaultPageConfig };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Page component styles for AsheeUI.
3
+ * This file provides the static class mappings for the four page parts: the
4
+ * shell, the header, the content area and the footer.
5
+ */
6
+ /** The page shell: a full-height column that owns the theme background. */
7
+ export declare const PAGE_CLASS = "flex min-h-dvh w-full flex-col bg-background";
8
+ /** Shared base classes for the page header. */
9
+ export declare const PAGE_HEADER_CLASS = "w-full bg-background/95 backdrop-blur";
10
+ /** Header classes applied while the header sticks to the top of the viewport. */
11
+ export declare const PAGE_HEADER_STICKY_CLASS = "sticky top-0 z-10";
12
+ /** Inner padding of the header, applied inside its container. */
13
+ export declare const PAGE_HEADER_INNER_CLASS = "flex w-full items-center gap-4 py-3";
14
+ /** Shared base classes for the content area: it fills the space between the
15
+ * header and the footer. */
16
+ export declare const PAGE_CONTENT_CLASS = "flex w-full flex-1 flex-col";
17
+ /** Shared base classes for the page footer. */
18
+ export declare const PAGE_FOOTER_CLASS = "w-full bg-secondary/30";
19
+ /** Inner padding of the footer, applied inside its container. */
20
+ export declare const PAGE_FOOTER_INNER_CLASS = "flex w-full flex-col gap-2 py-6";
21
+ /** Separator drawn between the header and the content area. */
22
+ export declare const PAGE_DIVIDER_CLASS = "border-b border-border";
23
+ /** Separator drawn between the content area and the footer. */
24
+ export declare const PAGE_FOOTER_DIVIDER_CLASS = "border-t border-border";
25
+ //# sourceMappingURL=page-styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-styles.d.ts","sourceRoot":"","sources":["../../../src/components/page/page-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,2EAA2E;AAC3E,eAAO,MAAM,UAAU,iDAAiD,CAAC;AAEzE,+CAA+C;AAC/C,eAAO,MAAM,iBAAiB,0CAA0C,CAAC;AAEzE,iFAAiF;AACjF,eAAO,MAAM,wBAAwB,sBAAsB,CAAC;AAE5D,iEAAiE;AACjE,eAAO,MAAM,uBAAuB,wCAAwC,CAAC;AAE7E;4BAC4B;AAC5B,eAAO,MAAM,kBAAkB,gCAAgC,CAAC;AAEhE,+CAA+C;AAC/C,eAAO,MAAM,iBAAiB,2BAA2B,CAAC;AAE1D,iEAAiE;AACjE,eAAO,MAAM,uBAAuB,oCAAoC,CAAC;AAEzE,+DAA+D;AAC/D,eAAO,MAAM,kBAAkB,2BAA2B,CAAC;AAE3D,+DAA+D;AAC/D,eAAO,MAAM,yBAAyB,2BAA2B,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use client";
2
+ //#region src/components/page/page-styles.ts
3
+ var e = "flex min-h-dvh w-full flex-col bg-background", t = "w-full bg-background/95 backdrop-blur", n = "sticky top-0 z-10", r = "flex w-full items-center gap-4 py-3", i = "flex w-full flex-1 flex-col", a = "w-full bg-secondary/30", o = "flex w-full flex-col gap-2 py-6", s = "border-b border-border", c = "border-t border-border";
4
+ //#endregion
5
+ export { e as PAGE_CLASS, i as PAGE_CONTENT_CLASS, s as PAGE_DIVIDER_CLASS, a as PAGE_FOOTER_CLASS, c as PAGE_FOOTER_DIVIDER_CLASS, o as PAGE_FOOTER_INNER_CLASS, t as PAGE_HEADER_CLASS, r as PAGE_HEADER_INNER_CLASS, n as PAGE_HEADER_STICKY_CLASS };
@@ -1 +1 @@
1
- {"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../src/components/pagination/Pagination.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,OAAO,CAAC;AAUf,OAAO,EACL,KAAK,gBAAgB,EAEtB,MAAM,qBAAqB,CAAC;AAQ7B,KAAK,mBAAmB,GAAG,gBAAgB,GACzC,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,mBAAmB;IAC1D;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAEtC;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAEvC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,eAAO,MAAM,UAAU,yGAgMtB,CAAC"}
1
+ {"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../src/components/pagination/Pagination.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAc,KAAK,cAAc,EAAkB,MAAM,OAAO,CAAC;AAWxE,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,qBAAqB,CAAC;AAO7B,KAAK,mBAAmB,GAAG,gBAAgB,GACzC,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,mBAAmB;IAC1D;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAEtC;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAEvC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,eAAO,MAAM,UAAU,yGAqMtB,CAAC"}
@@ -9,14 +9,14 @@ import { Button as o } from "../button/Button.js";
9
9
  import { ChevronRightIcon as s } from "../../icons/ChevronRightIcon.js";
10
10
  import { Link as c } from "../link/Link.js";
11
11
  import { ChevronLeftIcon as l } from "../../icons/ChevronLeftIcon.js";
12
- import { FALLBACK_PAGINATION_CONFIG as u } from "./pagination-config.js";
13
- import { PAGINATION_BASE_CLASS as d, PAGINATION_GAP_CLASS as f, PAGINATION_LIST_CLASS as p } from "./pagination-styles.js";
14
- import { getPaginationRange as m } from "./pagination.helpers.js";
12
+ import { getPaginationRange as u } from "./pagination.helpers.js";
13
+ import { FALLBACK_PAGINATION_CONFIG as d } from "./pagination-config.js";
14
+ import { PAGINATION_BASE_CLASS as f, PAGINATION_GAP_CLASS as p, PAGINATION_LIST_CLASS as m } from "./pagination-styles.js";
15
15
  import { forwardRef as h } from "react";
16
16
  import { jsx as g, jsxs as _ } from "react/jsx-runtime";
17
17
  //#region src/components/pagination/Pagination.tsx
18
18
  var v = h(({ page: h, pageCount: v, onPageChange: y, hrefForPage: b, label: x = "Pagination", size: S, variant: C, color: w, radius: T, siblingCount: E, showEdges: D, isDisabled: O = !1, className: k, ...A }, j) => {
19
- let M = r(), N = M.components?.pagination, P = i(S, N?.size, void 0, u.size), F = i(C, N?.variant, M.defaultVariant, u.variant), I = i(w, N?.color, M.defaultColor, u.color), L = a(T, N?.radius, M.defaultRadius, u.radius), R = i(E, N?.siblingCount, void 0, u.siblingCount), z = i(D, N?.showEdges, void 0, u.showEdges), B = Math.min(Math.max(h, 1), Math.max(v, 1)), V = Math.max(v, 1), H = (e) => {
19
+ let M = r(), N = M.components?.pagination, P = i(S, N?.size, void 0, d.size), F = i(C, N?.variant, M.defaultVariant, d.variant), I = i(w, N?.color, M.defaultColor, d.color), L = a(T, N?.radius, M.defaultRadius, d.radius), R = i(E, N?.siblingCount, void 0, d.siblingCount), z = i(D, N?.showEdges, void 0, d.showEdges), B = Math.min(Math.max(h, 1), Math.max(v, 1)), V = Math.max(v, 1), H = (e) => {
20
20
  e === B || e < 1 || e > v || y?.(e);
21
21
  }, U = (r, i, a, s = !1) => {
22
22
  let l = r < 1 || r > v;
@@ -39,20 +39,20 @@ var v = h(({ page: h, pageCount: v, onPageChange: y, hrefForPage: b, label: x =
39
39
  onClick: () => H(r),
40
40
  children: a
41
41
  });
42
- }, W = m(B, v, R);
42
+ }, W = u(B, v, R);
43
43
  return /* @__PURE__ */ g("nav", {
44
44
  ref: j,
45
45
  "aria-label": x,
46
- className: e(d, k),
46
+ className: e(f, k),
47
47
  ...A,
48
48
  children: /* @__PURE__ */ _("ul", {
49
- className: p,
49
+ className: m,
50
50
  children: [
51
51
  z && /* @__PURE__ */ g("li", { children: U(1, "First page", /* @__PURE__ */ g(l, { "aria-hidden": "true" })) }),
52
52
  /* @__PURE__ */ g("li", { children: U(B - 1, "Previous page", /* @__PURE__ */ g(l, { "aria-hidden": "true" })) }),
53
53
  W.map((e, t) => e === "ellipsis" ? /* @__PURE__ */ g("li", { children: /* @__PURE__ */ g("span", {
54
54
  "aria-hidden": "true",
55
- className: f,
55
+ className: p,
56
56
  children: "…"
57
57
  }) }, `gap-${t}`) : /* @__PURE__ */ g("li", { children: U(e, `Page ${e}`, e, e === B) }, e)),
58
58
  /* @__PURE__ */ g("li", { children: U(B + 1, "Next page", /* @__PURE__ */ g(s, { "aria-hidden": "true" })) }),
@@ -0,0 +1,109 @@
1
+ import { InputHTMLAttributes } from 'react';
2
+ import { FieldStatus, LabelAlign } from '../field/field-config';
3
+ import { PinInputConfig, PinInputMode } from './pin-input-config';
4
+ /**
5
+ * Keep only the characters a mode accepts.
6
+ *
7
+ * @param raw - The text to filter.
8
+ * @param mode - The characters the field accepts.
9
+ * @returns The filtered text.
10
+ */
11
+ export declare function sanitizePinValue(raw: string, mode: PinInputMode): string;
12
+ type BasePinInputProps = PinInputConfig & Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "value" | "defaultValue" | "onChange" | "color" | "type" | "children" | "autoFocus">;
13
+ /**
14
+ * Props for the PinInput component.
15
+ */
16
+ export interface PinInputProps extends BasePinInputProps {
17
+ /** The code, for a consumer that owns the value. */
18
+ value?: string;
19
+ /** The initial code, for a consumer that does not. */
20
+ defaultValue?: string;
21
+ /** Called with the whole code whenever it changes. */
22
+ onValueChange?: (value: string) => void;
23
+ /**
24
+ * Called once when the code reaches its full length.
25
+ * It fires once per completion, not on every keystroke, so a consumer can
26
+ * submit from it.
27
+ */
28
+ onComplete?: (value: string) => void;
29
+ /** Label of the field, shown above the boxes. */
30
+ label?: string;
31
+ /** Alignment of the label. @default "left" */
32
+ labelAlign?: LabelAlign;
33
+ /** Description under the label. */
34
+ description?: string;
35
+ /** Validation message under the boxes. */
36
+ message?: string;
37
+ /** Validation status, which colours the message. @default "default" */
38
+ status?: FieldStatus;
39
+ /** Whether the field is required. @default false */
40
+ required?: boolean;
41
+ /** Whether the label shows a pending state. @default false */
42
+ isLoading?: boolean;
43
+ /**
44
+ * Accessible name of the group of boxes.
45
+ * Used when the field has no visible label.
46
+ *
47
+ * @default "Verification code"
48
+ */
49
+ groupLabel?: string;
50
+ /**
51
+ * Draw a separator after this many boxes.
52
+ * Purely presentational grouping, hidden from assistive technology.
53
+ */
54
+ separatorAfter?: number;
55
+ }
56
+ /**
57
+ * A field that collects a code one character at a time.
58
+ *
59
+ * PinInput accepts a dense code string: the characters are always packed
60
+ * left to right, so deleting a character in the middle moves the characters
61
+ * after it left rather than leaving a gap. A consumer therefore never has to
62
+ * reason about positions when it reads `value`.
63
+ *
64
+ * Typing a character moves focus to the next box, Backspace clears the box
65
+ * behind the caret, the arrow keys move between boxes, Home and End jump to the
66
+ * ends, and a pasted code fills the boxes from the caret. Because the value is
67
+ * dense, a caret beyond the characters that are already filled pastes at the end
68
+ * of them, which is where the next character would have gone. The code is
69
+ * reported through `onValueChange` on every change and through `onComplete` when
70
+ * it becomes complete, so a consumer can submit from either.
71
+ *
72
+ * The boxes are one named group element (a `fieldset`), because the value is one
73
+ * value even though it is typed in several places. The component never focuses
74
+ * itself: a consumer that moves the reader to the field (after sending a code,
75
+ * for example) does so through the ref, which is the group element, so the
76
+ * decision to move focus stays with the screen that knows why.
77
+ *
78
+ * @param props - PinInput configuration options and field props.
79
+ * @param props.length - Number of characters. Defaults to 4.
80
+ * @param props.mode - Accepted characters. Defaults to "numeric".
81
+ * @param props.size - Density of the boxes. Defaults to "md".
82
+ * @param props.masked - Hide the typed characters. Defaults to false.
83
+ * @param props.value - Controlled value.
84
+ * @param props.defaultValue - Initial value.
85
+ * @param props.onValueChange - Called with the code on every change.
86
+ * @param props.onComplete - Called when the code becomes complete.
87
+ * @param props.label - Label of the field.
88
+ * @param props.description - Description under the label.
89
+ * @param props.message - Validation message under the boxes.
90
+ * @param props.status - Validation status.
91
+ * @param props.isDisabled - Disable the field. Defaults to false.
92
+ * @param props.isInvalid - Mark the value invalid. Defaults to false.
93
+ * @returns The rendered field.
94
+ *
95
+ * @example
96
+ * ```tsx
97
+ * <PinInput
98
+ * label="Verification code"
99
+ * length={6}
100
+ * description="The six digits we sent to your phone."
101
+ * onComplete={verify}
102
+ * />
103
+ * ```
104
+ *
105
+ * @see Input - The single-value field.
106
+ */
107
+ export declare const PinInput: import('react').ForwardRefExoticComponent<PinInputProps & import('react').RefAttributes<HTMLFieldSetElement>>;
108
+ export {};
109
+ //# sourceMappingURL=PinInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PinInput.d.ts","sourceRoot":"","sources":["../../../src/components/pin-input/PinInput.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAIL,KAAK,mBAAmB,EAKzB,MAAM,OAAO,CAAC;AAUf,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,EAClB,MAAM,oBAAoB,CAAC;AAW5B;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,MAAM,CAQxE;AAED,KAAK,iBAAiB,GAAG,cAAc,GACrC,IAAI,CACF,mBAAmB,CAAC,gBAAgB,CAAC,EACnC,MAAM,GACN,OAAO,GACP,cAAc,GACd,UAAU,GACV,OAAO,GACP,MAAM,GACN,UAAU,GACV,WAAW,CACd,CAAC;AAEJ;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,iBAAiB;IACtD,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,sDAAsD;IACtD,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,sDAAsD;IACtD,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAExC;;;;OAIG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAErC,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,8CAA8C;IAC9C,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB,mCAAmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,uEAAuE;IACvE,MAAM,CAAC,EAAE,WAAW,CAAC;IAErB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,eAAO,MAAM,QAAQ,+GA2QpB,CAAC"}
@@ -0,0 +1,124 @@
1
+ "use client";
2
+ "use client";
3
+ import { cn as e } from "../../utils/cn.js";
4
+ import { RADIUS_CLASS as t } from "../../shared/radius.js";
5
+ import { useAsheeConfig as n } from "../../libs/context.js";
6
+ import { resolveClassKey as r, resolveConfigCascade as i, resolveRadiusKey as a } from "../../utils/resolve-token.js";
7
+ import { FieldShell as o } from "../field/FieldShell.js";
8
+ import { FALLBACK_PIN_INPUT_CONFIG as s } from "./pin-input-config.js";
9
+ import { PIN_INPUT_BOX_CLASS as ee, PIN_INPUT_BOX_DEFAULT_CLASS as te, PIN_INPUT_BOX_DISABLED_CLASS as c, PIN_INPUT_BOX_INVALID_CLASS as l, PIN_INPUT_GROUP_CLASS as u, PIN_INPUT_SIZE_CLASS as d } from "./pin-input-styles.js";
10
+ import { Fragment as f, forwardRef as p, useId as ne, useRef as m, useState as h } from "react";
11
+ import { jsx as g, jsxs as _ } from "react/jsx-runtime";
12
+ //#region src/components/pin-input/PinInput.tsx
13
+ function v(e, t) {
14
+ return t === "numeric" ? e.replace(/\D+/g, "") : t === "alphanumeric" ? e.replace(/[^0-9a-zA-Z]+/g, "") : e.replace(/\s+/g, "");
15
+ }
16
+ var y = p(({ value: p, defaultValue: y, onValueChange: re, onComplete: b, length: x, mode: ie, size: ae, masked: oe, radius: S, isDisabled: se, isInvalid: ce, label: C, labelAlign: w, description: T, message: E, status: D, required: O, isLoading: k, groupLabel: A = "Verification code", separatorAfter: j, name: M, className: N, id: P, placeholder: F, ...I }, L) => {
17
+ let R = n(), z = R.components?.pininput, B = i({
18
+ length: x,
19
+ mode: ie,
20
+ size: ae,
21
+ masked: oe,
22
+ isDisabled: se,
23
+ isInvalid: ce,
24
+ radius: S ?? void 0
25
+ }, z, s), V = a(S, z?.radius, R.defaultRadius, s.radius), H = r(V, t, s.radius), U = ne(), W = P ?? U, G = `${W}-label`, K = `${W}-description`, q = `${W}-message`, [le, ue] = h(y ?? ""), J = p !== void 0, Y = J ? p : le, X = m([]), Z = (e) => {
26
+ let t = Math.max(0, Math.min(e, B.length - 1));
27
+ X.current[t]?.focus();
28
+ }, Q = (e) => {
29
+ let t = e.slice(0, B.length);
30
+ J || ue(t), re?.(t), t.length === B.length && b?.(t);
31
+ }, $ = (e, t) => {
32
+ let n = v(t, B.mode), r = (Y.slice(0, e) + n + Y.slice(e + n.length)).slice(0, B.length);
33
+ Q(r), Z(e + n.length);
34
+ }, de = (e, t) => {
35
+ let n = v(t, B.mode);
36
+ if (n.length === 0) {
37
+ Q(Y.slice(0, e) + Y.slice(e + 1));
38
+ return;
39
+ }
40
+ if (n.length > 1) {
41
+ $(e, n);
42
+ return;
43
+ }
44
+ let r = e >= Y.length ? Y + n : Y.slice(0, e) + n + Y.slice(e + 1);
45
+ Q(r), Z(e + 1);
46
+ }, fe = (e, t) => {
47
+ switch (t.key) {
48
+ case "Backspace":
49
+ t.preventDefault(), e < Y.length && Q(Y.slice(0, e) + Y.slice(e + 1)), Z(e - 1);
50
+ return;
51
+ case "Delete":
52
+ t.preventDefault(), e < Y.length && Q(Y.slice(0, e) + Y.slice(e + 1));
53
+ return;
54
+ case "ArrowLeft":
55
+ t.preventDefault(), Z(e - 1);
56
+ return;
57
+ case "ArrowRight":
58
+ t.preventDefault(), Z(e + 1);
59
+ return;
60
+ case "Home":
61
+ t.preventDefault(), Z(0);
62
+ return;
63
+ case "End":
64
+ t.preventDefault(), Z(B.length - 1);
65
+ return;
66
+ }
67
+ }, pe = (e, t) => {
68
+ let n = t.clipboardData?.getData("text") ?? "";
69
+ n && (t.preventDefault(), $(e, n));
70
+ }, me = [T ? K : null, E ? q : null].filter(Boolean).join(" ") || void 0;
71
+ return /* @__PURE__ */ g(o, {
72
+ id: W,
73
+ htmlFor: null,
74
+ labelId: G,
75
+ label: C,
76
+ labelAlign: w,
77
+ description: T,
78
+ descriptionId: K,
79
+ message: E,
80
+ messageId: q,
81
+ status: D,
82
+ required: O,
83
+ isLoading: k,
84
+ children: /* @__PURE__ */ _("fieldset", {
85
+ ref: L,
86
+ "aria-labelledby": C ? G : void 0,
87
+ "aria-label": C ? void 0 : A,
88
+ "aria-describedby": me,
89
+ "data-disabled": B.isDisabled ? "true" : void 0,
90
+ className: e(u, N),
91
+ children: [Array.from({ length: B.length }, (t, n) => /* @__PURE__ */ _(f, { children: [/* @__PURE__ */ g("input", {
92
+ ref: (e) => {
93
+ X.current[n] = e;
94
+ },
95
+ id: n === 0 ? W : `${W}-${n}`,
96
+ type: B.masked ? "password" : "text",
97
+ inputMode: B.mode === "numeric" ? "numeric" : "text",
98
+ pattern: B.mode === "numeric" ? "[0-9]*" : void 0,
99
+ autoComplete: n === 0 ? "one-time-code" : "off",
100
+ placeholder: F,
101
+ disabled: B.isDisabled,
102
+ "aria-label": `${A}, character ${n + 1} of ${B.length}`,
103
+ "aria-invalid": B.isInvalid || void 0,
104
+ value: Y[n] ?? "",
105
+ onKeyDown: (e) => fe(n, e),
106
+ onPaste: (e) => pe(n, e),
107
+ onChange: (e) => de(n, e.target.value),
108
+ className: e(ee, d[B.size], H, B.isDisabled ? c : B.isInvalid ? l : te),
109
+ ...I
110
+ }), j !== void 0 && j > 0 && n + 1 === j && n + 1 < B.length && /* @__PURE__ */ g("span", {
111
+ "aria-hidden": "true",
112
+ className: "px-1 text-foreground/40",
113
+ children: "-"
114
+ })] }, `pin-${n}`)), M && /* @__PURE__ */ g("input", {
115
+ type: "hidden",
116
+ name: M,
117
+ value: Y
118
+ })]
119
+ })
120
+ });
121
+ });
122
+ y.displayName = "PinInput";
123
+ //#endregion
124
+ export { y as PinInput, v as sanitizePinValue };
@@ -0,0 +1,3 @@
1
+ export * from './PinInput';
2
+ export * from './pin-input-config';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/pin-input/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./PinInput.js";
2
+ export * from "./pin-input-config.js";
3
+ export * from "./pin-input-styles.js";
@@ -0,0 +1,82 @@
1
+ import { Radius } from '../../shared';
2
+ /**
3
+ * Characters a PIN field accepts.
4
+ *
5
+ * - `numeric`: digits only, which is what a code sent by SMS contains.
6
+ * - `alphanumeric`: letters and digits, for a code that mixes both.
7
+ * - `text`: any character except whitespace.
8
+ */
9
+ export type PinInputMode = "numeric" | "alphanumeric" | "text";
10
+ /**
11
+ * Density of a PIN field.
12
+ */
13
+ export type PinInputSize = "sm" | "md" | "lg";
14
+ /**
15
+ * Theme configuration options for the PinInput component.
16
+ *
17
+ * Set under `components.pininput` in the AsheeUI config. Values feed the
18
+ * component-level fallback tier of the theme cascade.
19
+ */
20
+ export interface PinInputConfig {
21
+ /**
22
+ * Number of characters the field collects.
23
+ *
24
+ * @default 4
25
+ */
26
+ length?: number;
27
+ /**
28
+ * Characters the field accepts.
29
+ *
30
+ * @default "numeric"
31
+ */
32
+ mode?: PinInputMode;
33
+ /**
34
+ * Density of the boxes.
35
+ *
36
+ * @default "md"
37
+ */
38
+ size?: PinInputSize;
39
+ /**
40
+ * Whether the typed characters are hidden.
41
+ * Use it for a value that must not be readable over a shoulder.
42
+ *
43
+ * @default false
44
+ */
45
+ masked?: boolean;
46
+ /**
47
+ * Corner rounding of each box.
48
+ * Defaults to the framework radius, so a PIN field matches the surrounding
49
+ * form.
50
+ */
51
+ radius?: Radius;
52
+ /**
53
+ * Whether the field is disabled.
54
+ *
55
+ * @default false
56
+ */
57
+ isDisabled?: boolean;
58
+ /**
59
+ * Whether the current value is invalid.
60
+ * Marks the group for assistive technology and colours the boxes, so an
61
+ * error is never carried by colour alone.
62
+ *
63
+ * @default false
64
+ */
65
+ isInvalid?: boolean;
66
+ }
67
+ /**
68
+ * Default config values registered for the PinInput component.
69
+ */
70
+ export declare const defaultPinInputConfig: PinInputConfig;
71
+ declare module "../../libs/registry" {
72
+ interface ComponentTypeConfigRegistry {
73
+ pininput: PinInputConfig;
74
+ }
75
+ }
76
+ /**
77
+ * Hard fallback values used when no config tier provides a value.
78
+ */
79
+ export declare const FALLBACK_PIN_INPUT_CONFIG: Required<Omit<PinInputConfig, "radius">> & {
80
+ radius: Radius;
81
+ };
82
+ //# sourceMappingURL=pin-input-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pin-input-config.d.ts","sourceRoot":"","sources":["../../../src/components/pin-input/pin-input-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,cAAc,GAAG,MAAM,CAAC;AAE/D;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;IAEpB;;;;OAIG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;IAEpB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,cAOnC,CAAC;AAEF,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,QAAQ,EAAE,cAAc,CAAC;KAC1B;CACF;AAID;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAC9C,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,CAC/B,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAQnB,CAAC"}
@@ -0,0 +1,23 @@
1
+ "use client";
2
+ import { registerComponentDefaults as e } from "../../libs/registry.js";
3
+ //#region src/components/pin-input/pin-input-config.ts
4
+ var t = {
5
+ length: 4,
6
+ mode: "numeric",
7
+ size: "md",
8
+ masked: !1,
9
+ isDisabled: !1,
10
+ isInvalid: !1
11
+ };
12
+ e("pininput", t);
13
+ var n = {
14
+ length: 4,
15
+ mode: "numeric",
16
+ size: "md",
17
+ masked: !1,
18
+ isDisabled: !1,
19
+ isInvalid: !1,
20
+ radius: "sm"
21
+ };
22
+ //#endregion
23
+ export { n as FALLBACK_PIN_INPUT_CONFIG, t as defaultPinInputConfig };
@@ -0,0 +1,16 @@
1
+ import { PinInputSize } from './pin-input-config';
2
+ /** The group of boxes. */
3
+ export declare const PIN_INPUT_GROUP_CLASS = "flex flex-wrap items-center gap-2";
4
+ /** Shared base classes for a box. */
5
+ export declare const PIN_INPUT_BOX_CLASS = "border-2 text-center font-semibold tabular-nums transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-1 disabled:cursor-not-allowed";
6
+ /** Box density classes. */
7
+ export declare const PIN_INPUT_SIZE_CLASS: Record<PinInputSize, string>;
8
+ /** Box state: no error, not disabled. */
9
+ export declare const PIN_INPUT_BOX_DEFAULT_CLASS = "border-border bg-background text-foreground";
10
+ /** Box state: the value is invalid. */
11
+ export declare const PIN_INPUT_BOX_INVALID_CLASS = "border-danger bg-background text-foreground";
12
+ /** Box state: the field is disabled. */
13
+ export declare const PIN_INPUT_BOX_DISABLED_CLASS = "border-border bg-secondary/40 text-foreground/60";
14
+ /** The separator shown between groups of boxes. */
15
+ export declare const PIN_INPUT_SEPARATOR_CLASS = "px-1 text-foreground/40";
16
+ //# sourceMappingURL=pin-input-styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pin-input-styles.d.ts","sourceRoot":"","sources":["../../../src/components/pin-input/pin-input-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,0BAA0B;AAC1B,eAAO,MAAM,qBAAqB,sCAAsC,CAAC;AAEzE,qCAAqC;AACrC,eAAO,MAAM,mBAAmB,yMACwK,CAAC;AAEzM,2BAA2B;AAC3B,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAI7D,CAAC;AAEF,yCAAyC;AACzC,eAAO,MAAM,2BAA2B,gDACO,CAAC;AAEhD,uCAAuC;AACvC,eAAO,MAAM,2BAA2B,gDACO,CAAC;AAEhD,wCAAwC;AACxC,eAAO,MAAM,4BAA4B,qDACW,CAAC;AAErD,mDAAmD;AACnD,eAAO,MAAM,yBAAyB,4BAA4B,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ //#region src/components/pin-input/pin-input-styles.ts
3
+ var e = "flex flex-wrap items-center gap-2", t = "border-2 text-center font-semibold tabular-nums transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-1 disabled:cursor-not-allowed", n = {
4
+ sm: "h-9 w-8 text-sm",
5
+ md: "h-11 w-10 text-base",
6
+ lg: "h-14 w-12 text-lg"
7
+ }, r = "border-border bg-background text-foreground", i = "border-danger bg-background text-foreground", a = "border-border bg-secondary/40 text-foreground/60", o = "px-1 text-foreground/40";
8
+ //#endregion
9
+ export { t as PIN_INPUT_BOX_CLASS, r as PIN_INPUT_BOX_DEFAULT_CLASS, a as PIN_INPUT_BOX_DISABLED_CLASS, i as PIN_INPUT_BOX_INVALID_CLASS, e as PIN_INPUT_GROUP_CLASS, o as PIN_INPUT_SEPARATOR_CLASS, n as PIN_INPUT_SIZE_CLASS };
@@ -0,0 +1,87 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ import { ActionConfig } from '../../shared';
3
+ import { PricingCardConfig } from './pricing-card-config';
4
+ /**
5
+ * One line of a plan's feature list.
6
+ */
7
+ export interface PricingFeatureItem {
8
+ /** Stable identifier for the line. Defaults to its position in the list. */
9
+ id?: string | number;
10
+ /** What the line says. */
11
+ label: ReactNode;
12
+ /**
13
+ * Whether the plan includes this line.
14
+ * An excluded line also carries the wording "(not included)" for assistive
15
+ * technology, so the meaning never depends on the visual treatment alone.
16
+ *
17
+ * @default true
18
+ */
19
+ included?: boolean;
20
+ }
21
+ type BasePricingCardProps = PricingCardConfig & Omit<HTMLAttributes<HTMLDivElement>, "color" | "title">;
22
+ /**
23
+ * Props for the PricingCard component.
24
+ */
25
+ export interface PricingCardProps extends BasePricingCardProps {
26
+ /** Name of the plan. */
27
+ name: ReactNode;
28
+ /** The amount, shown as the card's leading figure. */
29
+ price: ReactNode;
30
+ /** Billing period shown beside the amount, for example "/month". */
31
+ period?: ReactNode;
32
+ /** One sentence about who the plan is for. */
33
+ description?: ReactNode;
34
+ /** Short label above the plan name, for example "Most popular". */
35
+ badge?: ReactNode;
36
+ /** The plan's feature lines. */
37
+ features?: PricingFeatureItem[];
38
+ /** The emphasised action, typically the plan's signup. */
39
+ primaryAction?: ActionConfig;
40
+ /** The supporting action, typically a sales contact. */
41
+ secondaryAction?: ActionConfig;
42
+ /** Content below the actions. */
43
+ children?: ReactNode;
44
+ }
45
+ /**
46
+ * One plan in a pricing table.
47
+ *
48
+ * The amount is a required prop and renders as text rather than being parsed as
49
+ * a number, so a plan can say "Free", "$12" or "Custom" without the framework
50
+ * pretending to understand currency. A recommended plan is marked visually and
51
+ * carries the reason in its `badge`, so the recommendation is never communicated
52
+ * by colour alone.
53
+ *
54
+ * @param props - PricingCard configuration options and element attributes.
55
+ * @param props.name - Name of the plan.
56
+ * @param props.price - The amount.
57
+ * @param props.period - Billing period shown beside the amount.
58
+ * @param props.description - One sentence about the plan.
59
+ * @param props.badge - Short label above the plan name.
60
+ * @param props.features - The plan's feature lines.
61
+ * @param props.primaryAction - The emphasised action.
62
+ * @param props.secondaryAction - The supporting action.
63
+ * @param props.variant - Surface treatment. Defaults to "bordered".
64
+ * @param props.size - Card density. Defaults to "lg".
65
+ * @param props.highlighted - Mark the plan as recommended. Defaults to false.
66
+ *
67
+ * @returns The rendered card.
68
+ *
69
+ * @example
70
+ * ```tsx
71
+ * <PricingCard
72
+ * badge="Most popular"
73
+ * name="Growth"
74
+ * price="$29"
75
+ * period="/month"
76
+ * highlighted
77
+ * features={[{ label: "10,000 messages" }]}
78
+ * primaryAction={{ label: "Choose Growth", href: "/signup" }}
79
+ * />
80
+ * ```
81
+ *
82
+ * @see Grid - Places several plans in a table.
83
+ * @see Card - The surface the plan renders in.
84
+ */
85
+ export declare const PricingCard: import('react').ForwardRefExoticComponent<PricingCardProps & import('react').RefAttributes<HTMLDivElement>>;
86
+ export {};
87
+ //# sourceMappingURL=PricingCard.d.ts.map