@financedistrict/apps-ui 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/LICENSE +19 -0
  2. package/README.md +119 -0
  3. package/dist/Radio-BYWz1n7p.d.cts +32 -0
  4. package/dist/Radio-BYWz1n7p.d.ts +32 -0
  5. package/dist/SelectTrigger-By0iPBI3.d.cts +78 -0
  6. package/dist/SelectTrigger-By0iPBI3.d.ts +78 -0
  7. package/dist/accordion.cjs +322 -0
  8. package/dist/accordion.d.cts +156 -0
  9. package/dist/accordion.d.ts +156 -0
  10. package/dist/accordion.js +2 -0
  11. package/dist/apps-ui.umd.js +1 -0
  12. package/dist/button.cjs +366 -0
  13. package/dist/button.d.cts +52 -0
  14. package/dist/button.d.ts +52 -0
  15. package/dist/button.js +3 -0
  16. package/dist/checkbox.cjs +74 -0
  17. package/dist/checkbox.d.cts +63 -0
  18. package/dist/checkbox.d.ts +63 -0
  19. package/dist/checkbox.js +2 -0
  20. package/dist/chunk-3RU7JMFE.js +27 -0
  21. package/dist/chunk-5TWRK4NW.js +783 -0
  22. package/dist/chunk-7EOSDFS3.js +9 -0
  23. package/dist/chunk-AIQ4UOGK.js +142 -0
  24. package/dist/chunk-B3MMGTPV.js +200 -0
  25. package/dist/chunk-DAHQYLUI.js +146 -0
  26. package/dist/chunk-DGBXADSS.js +1 -0
  27. package/dist/chunk-E6KPNTWW.js +295 -0
  28. package/dist/chunk-EOAB6G2D.js +149 -0
  29. package/dist/chunk-FAOVKDVM.js +32 -0
  30. package/dist/chunk-FV76Z4Z2.js +78 -0
  31. package/dist/chunk-GLTLBUZ7.js +285 -0
  32. package/dist/chunk-GTZFV43T.js +154 -0
  33. package/dist/chunk-HRGZNL4A.js +88 -0
  34. package/dist/chunk-IEVN3J2F.js +98 -0
  35. package/dist/chunk-IRS3T6LF.js +352 -0
  36. package/dist/chunk-IYYHCQXG.js +146 -0
  37. package/dist/chunk-JIXW3455.js +89 -0
  38. package/dist/chunk-N4VAP2GB.js +77 -0
  39. package/dist/chunk-SJ2ZRYVV.js +167 -0
  40. package/dist/chunk-SNU4YXOR.js +66 -0
  41. package/dist/chunk-TT6JQATV.js +99 -0
  42. package/dist/chunk-UPQ3ZPCO.js +66 -0
  43. package/dist/chunk-UVUSVFOH.js +264 -0
  44. package/dist/chunk-WJFPGGJB.js +255 -0
  45. package/dist/chunk-WXEBQA7A.js +371 -0
  46. package/dist/chunk-Y2O4YYZQ.js +184 -0
  47. package/dist/cut-corner.cjs +111 -0
  48. package/dist/cut-corner.d.cts +49 -0
  49. package/dist/cut-corner.d.ts +49 -0
  50. package/dist/cut-corner.js +1 -0
  51. package/dist/dialog.cjs +441 -0
  52. package/dist/dialog.d.cts +240 -0
  53. package/dist/dialog.d.ts +240 -0
  54. package/dist/dialog.js +3 -0
  55. package/dist/feature-card.cjs +182 -0
  56. package/dist/feature-card.d.cts +54 -0
  57. package/dist/feature-card.d.ts +54 -0
  58. package/dist/feature-card.js +2 -0
  59. package/dist/filter.cjs +873 -0
  60. package/dist/filter.d.cts +129 -0
  61. package/dist/filter.d.ts +129 -0
  62. package/dist/filter.js +6 -0
  63. package/dist/index.cjs +4583 -0
  64. package/dist/index.d.cts +29 -0
  65. package/dist/index.d.ts +29 -0
  66. package/dist/index.js +27 -0
  67. package/dist/inline-select.cjs +856 -0
  68. package/dist/inline-select.d.cts +92 -0
  69. package/dist/inline-select.d.ts +92 -0
  70. package/dist/inline-select.js +6 -0
  71. package/dist/input.cjs +263 -0
  72. package/dist/input.d.cts +157 -0
  73. package/dist/input.d.ts +157 -0
  74. package/dist/input.js +4 -0
  75. package/dist/panel.cjs +185 -0
  76. package/dist/panel.d.cts +103 -0
  77. package/dist/panel.d.ts +103 -0
  78. package/dist/panel.js +2 -0
  79. package/dist/property-grid.cjs +110 -0
  80. package/dist/property-grid.d.cts +56 -0
  81. package/dist/property-grid.d.ts +56 -0
  82. package/dist/property-grid.js +2 -0
  83. package/dist/radio.cjs +74 -0
  84. package/dist/radio.d.cts +39 -0
  85. package/dist/radio.d.ts +39 -0
  86. package/dist/radio.js +2 -0
  87. package/dist/scrollbar.cjs +34 -0
  88. package/dist/scrollbar.d.cts +35 -0
  89. package/dist/scrollbar.d.ts +35 -0
  90. package/dist/scrollbar.js +1 -0
  91. package/dist/search-bar.cjs +408 -0
  92. package/dist/search-bar.d.cts +42 -0
  93. package/dist/search-bar.d.ts +42 -0
  94. package/dist/search-bar.js +4 -0
  95. package/dist/select.cjs +998 -0
  96. package/dist/select.d.cts +357 -0
  97. package/dist/select.d.ts +357 -0
  98. package/dist/select.js +5 -0
  99. package/dist/selectable-feature-card.cjs +159 -0
  100. package/dist/selectable-feature-card.d.cts +74 -0
  101. package/dist/selectable-feature-card.d.ts +74 -0
  102. package/dist/selectable-feature-card.js +3 -0
  103. package/dist/sidebar-item.cjs +175 -0
  104. package/dist/sidebar-item.d.cts +75 -0
  105. package/dist/sidebar-item.d.ts +75 -0
  106. package/dist/sidebar-item.js +2 -0
  107. package/dist/switch.cjs +86 -0
  108. package/dist/switch.d.cts +72 -0
  109. package/dist/switch.d.ts +72 -0
  110. package/dist/switch.js +2 -0
  111. package/dist/table-cell.cjs +196 -0
  112. package/dist/table-cell.d.cts +76 -0
  113. package/dist/table-cell.d.ts +76 -0
  114. package/dist/table-cell.js +2 -0
  115. package/dist/table-title.cjs +34 -0
  116. package/dist/table-title.d.cts +16 -0
  117. package/dist/table-title.d.ts +16 -0
  118. package/dist/table-title.js +2 -0
  119. package/dist/tabs.cjs +299 -0
  120. package/dist/tabs.d.cts +116 -0
  121. package/dist/tabs.d.ts +116 -0
  122. package/dist/tabs.js +2 -0
  123. package/dist/toast.cjs +87 -0
  124. package/dist/toast.d.cts +48 -0
  125. package/dist/toast.d.ts +48 -0
  126. package/dist/toast.js +2 -0
  127. package/dist/token-input.cjs +415 -0
  128. package/dist/token-input.d.cts +90 -0
  129. package/dist/token-input.d.ts +90 -0
  130. package/dist/token-input.js +3 -0
  131. package/dist/tooltip.cjs +384 -0
  132. package/dist/tooltip.d.cts +142 -0
  133. package/dist/tooltip.d.ts +142 -0
  134. package/dist/tooltip.js +2 -0
  135. package/package.json +200 -0
  136. package/src/fonts.css +33 -0
@@ -0,0 +1,129 @@
1
+ import * as React from 'react';
2
+ import { S as SelectOption } from './SelectTrigger-By0iPBI3.cjs';
3
+ import * as class_variance_authority_types from 'class-variance-authority/types';
4
+ import { VariantProps } from 'class-variance-authority';
5
+
6
+ interface FilterProps extends Omit<React.ComponentProps<"button">, "value" | "defaultValue" | "onChange"> {
7
+ /** The options to choose from (array-of-data API, shared with the select family). */
8
+ options: SelectOption[];
9
+ /** Controlled selection. `string` in single mode, `string[]` in multi. */
10
+ value?: string | string[];
11
+ /** Uncontrolled initial selection. */
12
+ defaultValue?: string | string[];
13
+ /** Fires with the next selection — `string` (single) or `string[]` (multi). */
14
+ onValueChange?: (value: string | string[]) => void;
15
+ /** Single (default) vs multi select. */
16
+ multiple?: boolean;
17
+ /**
18
+ * The filter's name. In single-select it is the trigger text ONLY when nothing
19
+ * is chosen (a pick replaces it with the option's label). In multi-select it
20
+ * is ALWAYS the trigger text, with a count badge alongside it.
21
+ */
22
+ label: string;
23
+ /** Disabled — the trigger won't open. */
24
+ disabled?: boolean;
25
+ }
26
+ /**
27
+ * Filter — a filter-chip dropdown (Figma `base-filter`, node 5026:36907). NOT a
28
+ * form field: a pill trigger that opens the shared select listbox, exactly as
29
+ * `InlineSelect` reuses that listbox behind an inline trigger. Single or multi
30
+ * in one component; the dropdown carries a Reset footer.
31
+ *
32
+ * Behaviour is shared with `Select` / `InlineSelect` via `useSelectListbox`
33
+ * (selection state, keyboard model, type-ahead, activedescendant, reposition,
34
+ * outside-click) with two Filter-specific choices:
35
+ * - `closeOnSelect: false` — a single-select pick does NOT close the dropdown
36
+ * (it stays open like multi), so several picks / a Reset are possible without
37
+ * reopening. A single pick still REPLACES the prior selection.
38
+ * - the dropdown's `footer` slot renders a **Reset** ghost button, disabled when
39
+ * nothing is selected, that clears the selection (via the hook's `reset()`)
40
+ * and keeps the dropdown open.
41
+ *
42
+ * Trigger content differs from `Select`:
43
+ * - **single**: the selected option's label (or `label` when empty); no badge.
44
+ * - **multi**: always the static `label`, plus a count badge when ≥1 selected.
45
+ *
46
+ * Uncontrolled by default (`defaultValue`) with a controlled escape hatch
47
+ * (`value` + `onValueChange`). `ref` is a normal React 19 prop, forwarded to the
48
+ * trigger button.
49
+ */
50
+ declare function Filter({ options, value: valueProp, defaultValue, onValueChange, multiple, label, disabled, id: idProp, className, ref, ...props }: FilterProps): React.JSX.Element;
51
+
52
+ interface FilterTriggerProps extends Omit<React.ComponentProps<"button">, "value"> {
53
+ /**
54
+ * The text shown in the pill. In single-select this is the selected option's
55
+ * label (or the filter `label` when nothing is chosen); in multi-select it is
56
+ * ALWAYS the static filter `label` (the count badge carries the selection).
57
+ */
58
+ displayText: string;
59
+ /**
60
+ * The number of selected options. Renders the count badge when ≥1 (multi
61
+ * only — single-select passes `0` so no badge shows). No badge at `0`.
62
+ */
63
+ count?: number;
64
+ /** Whether the listbox is open (up caret + foreground caret colour). */
65
+ open?: boolean;
66
+ /** id of the pill `<button>`. */
67
+ id: string;
68
+ }
69
+ /**
70
+ * The Filter trigger — a `<button type="button">` styled as a filter chip
71
+ * (Figma `base-filter`, node 5026:36907): a `h-10` / `rounded-sm` / `px-3` pill
72
+ * with the label, an optional count badge (multi), and a trailing caret that
73
+ * points down when closed / up when open.
74
+ *
75
+ * The caret is muted (`card-primary-foreground-muted`) at rest and strengthens
76
+ * to the full foreground on hover and while open (matching the Figma hover /
77
+ * focused&active / active states). Focus is the ADR-0010/0014 system ring (a
78
+ * chip is a button-shaped control, not a text field).
79
+ *
80
+ * Presentational leaf: all open/selection/keyboard orchestration and the ARIA
81
+ * popup wiring (`aria-haspopup`/`-expanded`/`-controls`/`-activedescendant`)
82
+ * live in `Filter`, which spreads them through `...props`. `ref` is a normal
83
+ * React 19 prop, forwarded to the button.
84
+ */
85
+ declare function FilterTrigger({ displayText, count, open, disabled, id, className, ref, ...props }: FilterTriggerProps): React.JSX.Element;
86
+
87
+ /**
88
+ * Filter styling — the filter-chip trigger (Figma `base-filter`, node
89
+ * 5026:36907) and its count badge. Binds ONLY to the semantic `--color-*` token
90
+ * layer (never primitives, never arbitrary values); theme switching is automatic
91
+ * via the `.dark` class, so no `dark:` variants are needed.
92
+ *
93
+ * The Filter reuses the shared `SelectListbox` for its dropdown (rows + footer)
94
+ * — this file owns only the pill trigger + the count badge, both unique to the
95
+ * Filter's visual (the listbox card + option rows are the select family's).
96
+ */
97
+ /**
98
+ * The pill trigger (Figma `base-filter` node 5026:36907). A `<button>` shaped
99
+ * as a chip: `h-10` / `rounded-sm` / `px-3`, a `gap-1.5` row of the label, an
100
+ * optional count badge, and a trailing caret. Surface + border are the
101
+ * `card/neutral/primary` family (strip `neutral` → `card-primary-*`), the label
102
+ * is `body-03` in `card-primary-foreground`.
103
+ *
104
+ * FOCUS is the ADR-0010/0014 system ring (this is a button-shaped control, not
105
+ * a text field): `rounded-sm outline-none` at rest, then a 2px `--focus` ring
106
+ * with a 2px offset on `:focus-visible` only, suppressed when disabled. Per the
107
+ * TW4 gotcha (ADR-0014), `outline-solid` MUST accompany `outline-2` or the ring
108
+ * paints at style `none` (invisible). The caret + label colours are applied by
109
+ * `FilterTrigger` (they depend on open/hover runtime state), so this file owns
110
+ * the shared layout + surface + focus + disabled shell.
111
+ */
112
+ declare const filterTriggerVariants: (props?: ({
113
+ disabled?: boolean | null | undefined;
114
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
115
+ type FilterTriggerVariantsProps = VariantProps<typeof filterTriggerVariants>;
116
+ /**
117
+ * The count badge shown in the multi-select trigger when ≥1 option is selected
118
+ * (Figma `CountBadge` node 5026:5358). A small brand pill: `brand-primary`
119
+ * background, `rounded-xs`, `min-w-5 h-5` (20px), centred `text-xs` medium in
120
+ * the brand foreground, `px-0.5` (2px) so a two-digit count still fits inside
121
+ * the 20px min-width. Implemented as a local piece (not a shared `Badge`) per
122
+ * ADR-0016 — a shared badge is deferred until a second, non-token-input
123
+ * consumer justifies the abstraction; the Figma `CountBadge` is a distinct
124
+ * component from `DiscardBadge`, so it does not qualify as that second consumer.
125
+ */
126
+ declare const filterCountBadgeVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
127
+ type FilterCountBadgeVariantsProps = VariantProps<typeof filterCountBadgeVariants>;
128
+
129
+ export { Filter, type FilterCountBadgeVariantsProps, type FilterProps, FilterTrigger, type FilterTriggerProps, type FilterTriggerVariantsProps, SelectOption, filterCountBadgeVariants, filterTriggerVariants };
@@ -0,0 +1,129 @@
1
+ import * as React from 'react';
2
+ import { S as SelectOption } from './SelectTrigger-By0iPBI3.js';
3
+ import * as class_variance_authority_types from 'class-variance-authority/types';
4
+ import { VariantProps } from 'class-variance-authority';
5
+
6
+ interface FilterProps extends Omit<React.ComponentProps<"button">, "value" | "defaultValue" | "onChange"> {
7
+ /** The options to choose from (array-of-data API, shared with the select family). */
8
+ options: SelectOption[];
9
+ /** Controlled selection. `string` in single mode, `string[]` in multi. */
10
+ value?: string | string[];
11
+ /** Uncontrolled initial selection. */
12
+ defaultValue?: string | string[];
13
+ /** Fires with the next selection — `string` (single) or `string[]` (multi). */
14
+ onValueChange?: (value: string | string[]) => void;
15
+ /** Single (default) vs multi select. */
16
+ multiple?: boolean;
17
+ /**
18
+ * The filter's name. In single-select it is the trigger text ONLY when nothing
19
+ * is chosen (a pick replaces it with the option's label). In multi-select it
20
+ * is ALWAYS the trigger text, with a count badge alongside it.
21
+ */
22
+ label: string;
23
+ /** Disabled — the trigger won't open. */
24
+ disabled?: boolean;
25
+ }
26
+ /**
27
+ * Filter — a filter-chip dropdown (Figma `base-filter`, node 5026:36907). NOT a
28
+ * form field: a pill trigger that opens the shared select listbox, exactly as
29
+ * `InlineSelect` reuses that listbox behind an inline trigger. Single or multi
30
+ * in one component; the dropdown carries a Reset footer.
31
+ *
32
+ * Behaviour is shared with `Select` / `InlineSelect` via `useSelectListbox`
33
+ * (selection state, keyboard model, type-ahead, activedescendant, reposition,
34
+ * outside-click) with two Filter-specific choices:
35
+ * - `closeOnSelect: false` — a single-select pick does NOT close the dropdown
36
+ * (it stays open like multi), so several picks / a Reset are possible without
37
+ * reopening. A single pick still REPLACES the prior selection.
38
+ * - the dropdown's `footer` slot renders a **Reset** ghost button, disabled when
39
+ * nothing is selected, that clears the selection (via the hook's `reset()`)
40
+ * and keeps the dropdown open.
41
+ *
42
+ * Trigger content differs from `Select`:
43
+ * - **single**: the selected option's label (or `label` when empty); no badge.
44
+ * - **multi**: always the static `label`, plus a count badge when ≥1 selected.
45
+ *
46
+ * Uncontrolled by default (`defaultValue`) with a controlled escape hatch
47
+ * (`value` + `onValueChange`). `ref` is a normal React 19 prop, forwarded to the
48
+ * trigger button.
49
+ */
50
+ declare function Filter({ options, value: valueProp, defaultValue, onValueChange, multiple, label, disabled, id: idProp, className, ref, ...props }: FilterProps): React.JSX.Element;
51
+
52
+ interface FilterTriggerProps extends Omit<React.ComponentProps<"button">, "value"> {
53
+ /**
54
+ * The text shown in the pill. In single-select this is the selected option's
55
+ * label (or the filter `label` when nothing is chosen); in multi-select it is
56
+ * ALWAYS the static filter `label` (the count badge carries the selection).
57
+ */
58
+ displayText: string;
59
+ /**
60
+ * The number of selected options. Renders the count badge when ≥1 (multi
61
+ * only — single-select passes `0` so no badge shows). No badge at `0`.
62
+ */
63
+ count?: number;
64
+ /** Whether the listbox is open (up caret + foreground caret colour). */
65
+ open?: boolean;
66
+ /** id of the pill `<button>`. */
67
+ id: string;
68
+ }
69
+ /**
70
+ * The Filter trigger — a `<button type="button">` styled as a filter chip
71
+ * (Figma `base-filter`, node 5026:36907): a `h-10` / `rounded-sm` / `px-3` pill
72
+ * with the label, an optional count badge (multi), and a trailing caret that
73
+ * points down when closed / up when open.
74
+ *
75
+ * The caret is muted (`card-primary-foreground-muted`) at rest and strengthens
76
+ * to the full foreground on hover and while open (matching the Figma hover /
77
+ * focused&active / active states). Focus is the ADR-0010/0014 system ring (a
78
+ * chip is a button-shaped control, not a text field).
79
+ *
80
+ * Presentational leaf: all open/selection/keyboard orchestration and the ARIA
81
+ * popup wiring (`aria-haspopup`/`-expanded`/`-controls`/`-activedescendant`)
82
+ * live in `Filter`, which spreads them through `...props`. `ref` is a normal
83
+ * React 19 prop, forwarded to the button.
84
+ */
85
+ declare function FilterTrigger({ displayText, count, open, disabled, id, className, ref, ...props }: FilterTriggerProps): React.JSX.Element;
86
+
87
+ /**
88
+ * Filter styling — the filter-chip trigger (Figma `base-filter`, node
89
+ * 5026:36907) and its count badge. Binds ONLY to the semantic `--color-*` token
90
+ * layer (never primitives, never arbitrary values); theme switching is automatic
91
+ * via the `.dark` class, so no `dark:` variants are needed.
92
+ *
93
+ * The Filter reuses the shared `SelectListbox` for its dropdown (rows + footer)
94
+ * — this file owns only the pill trigger + the count badge, both unique to the
95
+ * Filter's visual (the listbox card + option rows are the select family's).
96
+ */
97
+ /**
98
+ * The pill trigger (Figma `base-filter` node 5026:36907). A `<button>` shaped
99
+ * as a chip: `h-10` / `rounded-sm` / `px-3`, a `gap-1.5` row of the label, an
100
+ * optional count badge, and a trailing caret. Surface + border are the
101
+ * `card/neutral/primary` family (strip `neutral` → `card-primary-*`), the label
102
+ * is `body-03` in `card-primary-foreground`.
103
+ *
104
+ * FOCUS is the ADR-0010/0014 system ring (this is a button-shaped control, not
105
+ * a text field): `rounded-sm outline-none` at rest, then a 2px `--focus` ring
106
+ * with a 2px offset on `:focus-visible` only, suppressed when disabled. Per the
107
+ * TW4 gotcha (ADR-0014), `outline-solid` MUST accompany `outline-2` or the ring
108
+ * paints at style `none` (invisible). The caret + label colours are applied by
109
+ * `FilterTrigger` (they depend on open/hover runtime state), so this file owns
110
+ * the shared layout + surface + focus + disabled shell.
111
+ */
112
+ declare const filterTriggerVariants: (props?: ({
113
+ disabled?: boolean | null | undefined;
114
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
115
+ type FilterTriggerVariantsProps = VariantProps<typeof filterTriggerVariants>;
116
+ /**
117
+ * The count badge shown in the multi-select trigger when ≥1 option is selected
118
+ * (Figma `CountBadge` node 5026:5358). A small brand pill: `brand-primary`
119
+ * background, `rounded-xs`, `min-w-5 h-5` (20px), centred `text-xs` medium in
120
+ * the brand foreground, `px-0.5` (2px) so a two-digit count still fits inside
121
+ * the 20px min-width. Implemented as a local piece (not a shared `Badge`) per
122
+ * ADR-0016 — a shared badge is deferred until a second, non-token-input
123
+ * consumer justifies the abstraction; the Figma `CountBadge` is a distinct
124
+ * component from `DiscardBadge`, so it does not qualify as that second consumer.
125
+ */
126
+ declare const filterCountBadgeVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
127
+ type FilterCountBadgeVariantsProps = VariantProps<typeof filterCountBadgeVariants>;
128
+
129
+ export { Filter, type FilterCountBadgeVariantsProps, type FilterProps, FilterTrigger, type FilterTriggerProps, type FilterTriggerVariantsProps, SelectOption, filterCountBadgeVariants, filterTriggerVariants };
package/dist/filter.js ADDED
@@ -0,0 +1,6 @@
1
+ export { Filter, FilterTrigger, filterCountBadgeVariants, filterTriggerVariants } from './chunk-B3MMGTPV.js';
2
+ import './chunk-5TWRK4NW.js';
3
+ import './chunk-IEVN3J2F.js';
4
+ import './chunk-SNU4YXOR.js';
5
+ import './chunk-FAOVKDVM.js';
6
+ import './chunk-7EOSDFS3.js';