@tribepad/themis 1.11.2 → 1.11.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tribepad/themis",
3
- "version": "1.11.2",
3
+ "version": "1.11.3",
4
4
  "description": "Accessible React component library built on React Aria primitives",
5
5
  "author": "Tribepad <mbasford@tribepad.com>",
6
6
  "license": "MIT",
@@ -37,6 +37,24 @@ const postedPresets: FilterOption[] = [
37
37
  { value: '30d', label: 'Last 30 days' },
38
38
  ];
39
39
 
40
+ // Long lists to demonstrate the popover's height cap + internal scrolling.
41
+ const countryOptions: FilterOption[] = [
42
+ 'Argentina', 'Australia', 'Austria', 'Belgium', 'Brazil', 'Canada', 'Chile',
43
+ 'China', 'Colombia', 'Denmark', 'Egypt', 'Finland', 'France', 'Germany',
44
+ 'Greece', 'India', 'Indonesia', 'Ireland', 'Israel', 'Italy', 'Japan',
45
+ 'Kenya', 'Malaysia', 'Mexico', 'Netherlands', 'New Zealand', 'Nigeria',
46
+ 'Norway', 'Poland', 'Portugal', 'Singapore', 'South Africa', 'South Korea',
47
+ 'Spain', 'Sweden', 'Switzerland', 'Thailand', 'Turkey', 'Ukraine',
48
+ 'United Arab Emirates', 'United Kingdom', 'United States', 'Vietnam',
49
+ ].map((label) => ({ value: label.toLowerCase().replace(/\s+/g, '-'), label }));
50
+
51
+ const skillOptions: FilterOption[] = [
52
+ 'Accessibility', 'Android', 'Angular', 'AWS', 'C#', 'C++', 'CSS', 'Docker',
53
+ 'Figma', 'Go', 'GraphQL', 'HTML', 'iOS', 'Java', 'JavaScript', 'Kotlin',
54
+ 'Kubernetes', 'Node.js', 'PHP', 'PostgreSQL', 'Python', 'React', 'React Native',
55
+ 'Ruby', 'Rust', 'SQL', 'Swift', 'Terraform', 'TypeScript', 'Vue',
56
+ ].map((label) => ({ value: label.toLowerCase().replace(/[.\s]+/g, '-'), label }));
57
+
40
58
  const meta = {
41
59
  title: 'Elements/Filters',
42
60
  component: Filters,
@@ -112,6 +130,32 @@ export const AsyncCombobox: Story = {
112
130
  },
113
131
  };
114
132
 
133
+ /**
134
+ * Long option list — a filter with far more options than fit on screen. The
135
+ * popover caps its height to the viewport and scrolls its body internally, so
136
+ * every option stays reachable instead of the list running off the page. For
137
+ * multi-select the "Done" header stays pinned above the scroll region.
138
+ *
139
+ * Open **Country** (single-select) or **Skills** (multi-select) to see it.
140
+ */
141
+ export const LongOptionList: Story = {
142
+ render: function LongOptionListStory(): ReactElement {
143
+ const [values, setValues] = useState<FilterValues>({});
144
+ return (
145
+ <Filters
146
+ values={values}
147
+ onChange={setValues}
148
+ labels={{ done: 'Done', clear: 'Clear' }}
149
+ aria-label="Filter candidates"
150
+ >
151
+ <FilterSelect name="country" label="Country" options={countryOptions} />
152
+ <FilterMulti name="skills" label="Skills" options={skillOptions} />
153
+ <FilterChips clearAllLabel="Clear all" removeChipLabel={(label) => `Remove ${label}`} />
154
+ </Filters>
155
+ );
156
+ },
157
+ };
158
+
115
159
  /**
116
160
  * Mobile (narrow) — the bar collapses to a "Filters" button that opens a
117
161
  * bottom-sheet of stacked controls; chips scroll horizontally. Pass `narrow`