Skip to content

Commit e47eff3

Browse files
committed
checklist > checkbox list
1 parent ac37eda commit e47eff3

9 files changed

Lines changed: 34 additions & 29 deletions

File tree

lib/platform-bible-react/dist/index.cjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

lib/platform-bible-react/dist/index.cjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/platform-bible-react/dist/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1603,8 +1603,8 @@ export type UiLanguageSelectorProps = {
16031603
* @param {UiLanguageSelectorProps} props - The props for the component.
16041604
*/
16051605
export declare function UiLanguageSelector({ knownUiLanguages, primaryLanguage, fallbackLanguages, onLanguagesChange, onPrimaryLanguageChange, onFallbackLanguagesChange, localizedStrings, className, id, }: UiLanguageSelectorProps): import("react/jsx-runtime").JSX.Element;
1606-
export type ChecklistProps = {
1607-
/** Optional string representing the id attribute of the Checklist */
1606+
export type CheckboxListProps = {
1607+
/** Optional string representing the id attribute of the CheckboxList */
16081608
id?: string;
16091609
/** Optional string representing CSS class name(s) for styling */
16101610
className?: string;
@@ -1637,7 +1637,7 @@ export type ChecklistProps = {
16371637
createComplexLabel?: (item: string) => React$1.ReactNode;
16381638
};
16391639
/** Renders a list of checkboxes. Each checkbox corresponds to an item from the `listItems` array. */
1640-
export declare function Checklist({ id, className, listItems, selectedListItems, handleSelectListItem, createLabel, createComplexLabel, }: ChecklistProps): import("react/jsx-runtime").JSX.Element;
1640+
export declare function CheckboxList({ id, className, listItems, selectedListItems, handleSelectListItem, createLabel, createComplexLabel, }: CheckboxListProps): import("react/jsx-runtime").JSX.Element;
16411641
/**
16421642
* The Popover component displays rich content in a portal, triggered by a button. This component is
16431643
* built on Radix UI's Popover component and styled by Shadcn UI.

lib/platform-bible-react/dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10445,7 +10445,7 @@ export {
1044510445
Pu as CardTitle,
1044610446
Lc as ChapterRangeSelector,
1044710447
Fn as Checkbox,
10448-
Lp as Checklist,
10448+
Lp as CheckboxList,
1044910449
ca as ComboBox,
1045010450
ye as Command,
1045110451
$r as CommandEmpty,

lib/platform-bible-react/dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/platform-bible-react/src/components/basics/checklist.component.tsx renamed to lib/platform-bible-react/src/components/basics/checkbox-list.component.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { Checkbox } from '@/components/shadcn-ui/checkbox';
22
import { ReactNode } from 'react';
33
import SmartLabel from './smart-label.component';
44

5-
export type ChecklistProps = {
6-
/** Optional string representing the id attribute of the Checklist */
5+
export type CheckboxListProps = {
6+
/** Optional string representing the id attribute of the CheckboxList */
77
id?: string;
88
/** Optional string representing CSS class name(s) for styling */
99
className?: string;
@@ -39,15 +39,15 @@ export type ChecklistProps = {
3939
};
4040

4141
/** Renders a list of checkboxes. Each checkbox corresponds to an item from the `listItems` array. */
42-
export function Checklist({
42+
export function CheckboxList({
4343
id,
4444
className,
4545
listItems,
4646
selectedListItems,
4747
handleSelectListItem,
4848
createLabel,
4949
createComplexLabel,
50-
}: ChecklistProps) {
50+
}: CheckboxListProps) {
5151
return (
5252
<div id={id} className={className}>
5353
{listItems.map((item) => (
@@ -68,4 +68,4 @@ export function Checklist({
6868
);
6969
}
7070

71-
export default Checklist;
71+
export default CheckboxList;

lib/platform-bible-react/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ export {
151151

152152
export { default as ChapterRangeSelector } from './components/basics/chapter-range-selector.component';
153153
export type { ChapterRangeSelectorProps } from './components/basics/chapter-range-selector.component';
154-
export { default as Checklist } from './components/basics/checklist.component';
155-
export type { ChecklistProps } from './components/basics/checklist.component';
154+
export { default as CheckboxList } from './components/basics/checkbox-list.component';
155+
export type { CheckboxListProps } from './components/basics/checkbox-list.component';
156156
export { default as ComboBox } from './components/basics/combo-box.component';
157157
export type {
158158
ComboBoxLabelOption,

lib/platform-bible-react/src/stories/basics/checklist.stories.tsx renamed to lib/platform-bible-react/src/stories/basics/checkbox-list.stories.tsx

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import type { Meta, StoryObj } from '@storybook/react-vite';
22
import { fn } from 'storybook/test';
33
import { useState } from 'react';
4-
import { Checklist } from '@/components/basics/checklist.component';
4+
import { CheckboxList } from '@/components/basics/checkbox-list.component';
55
import { Card, CardContent } from '@/components/shadcn-ui/card';
66
import { ThemeProvider } from '@/storybook/theme-provider.component';
77

8-
const meta: Meta<typeof Checklist> = {
9-
title: 'Basics/Checklist',
10-
component: Checklist,
8+
const meta: Meta<typeof CheckboxList> = {
9+
title: 'Basics/CheckboxList',
10+
component: CheckboxList,
1111
tags: ['autodocs'],
1212
decorators: [
1313
(Story) => (
@@ -25,7 +25,7 @@ const meta: Meta<typeof Checklist> = {
2525

2626
export default meta;
2727

28-
type Story = StoryObj<typeof Checklist>;
28+
type Story = StoryObj<typeof CheckboxList>;
2929

3030
export const Default: Story = {
3131
args: {
@@ -50,8 +50,8 @@ export const InCard: Story = {
5050

5151
return (
5252
<Card>
53-
<CardContent className="tw:h-64 tw:w-full tw:overflow-auto tw:p-4">
54-
<Checklist
53+
<CardContent className="tw-h-64 tw-w-full tw-overflow-auto tw-p-4">
54+
<CheckboxList
5555
{...args}
5656
selectedListItems={selectedItems}
5757
handleSelectListItem={handleSelect}
@@ -68,7 +68,8 @@ export const InCard: Story = {
6868
parameters: {
6969
docs: {
7070
description: {
71-
story: 'A checklist displayed inside a card container, similar to the original example.',
71+
story:
72+
'A checkbox list displayed inside a card container, similar to the original example.',
7273
},
7374
},
7475
},
@@ -88,8 +89,8 @@ export const ManyItems: Story = {
8889
};
8990

9091
return (
91-
<div className="tw:h-96 tw:w-80">
92-
<Checklist
92+
<div className="tw-h-96 tw-w-80">
93+
<CheckboxList
9394
{...args}
9495
selectedListItems={selectedItems}
9596
handleSelectListItem={handleSelect}
@@ -105,7 +106,7 @@ export const ManyItems: Story = {
105106
parameters: {
106107
docs: {
107108
description: {
108-
story: 'A checklist with many items to demonstrate scrolling behavior.',
109+
story: 'A checkbox list with many items to demonstrate scrolling behavior.',
109110
},
110111
},
111112
},
@@ -125,7 +126,11 @@ export const Interactive: Story = {
125126
};
126127

127128
return (
128-
<Checklist {...args} selectedListItems={selectedItems} handleSelectListItem={handleSelect} />
129+
<CheckboxList
130+
{...args}
131+
selectedListItems={selectedItems}
132+
handleSelectListItem={handleSelect}
133+
/>
129134
);
130135
},
131136
args: {
@@ -136,7 +141,7 @@ export const Interactive: Story = {
136141
parameters: {
137142
docs: {
138143
description: {
139-
story: 'An interactive checklist where you can select and deselect items.',
144+
story: 'An interactive checkbox list where you can select and deselect items.',
140145
},
141146
},
142147
},

src/renderer/components/dialogs/select-books-dialog.component.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Check } from 'lucide-react';
2-
import { Button, Checklist, Label } from 'platform-bible-react';
2+
import { Button, CheckboxList, Label } from 'platform-bible-react';
33
import { useState } from 'react';
44
import { Canon } from '@sillsdev/scripture';
55
import { LocalizeKey } from 'platform-bible-utils';
@@ -32,7 +32,7 @@ function SelectBooksDialog({
3232
<div className="select-books-dialog">
3333
<Label>{prompt}</Label>
3434
<div className="select-books-dialog-scroll">
35-
<Checklist
35+
<CheckboxList
3636
className="book-list"
3737
listItems={bookIds}
3838
createLabel={createBookLabel}

0 commit comments

Comments
 (0)