@douglasneuroinformatics/libui 2.8.1 → 2.9.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 (28) hide show
  1. package/dist/components/Form/StringField/StringFieldInput.d.ts +4 -2
  2. package/dist/components/Form/StringField/StringFieldInput.d.ts.map +1 -1
  3. package/dist/components/Form/StringField/StringFieldInput.js +2 -2
  4. package/dist/components/Form/StringField/StringFieldTextArea.d.ts +4 -2
  5. package/dist/components/Form/StringField/StringFieldTextArea.d.ts.map +1 -1
  6. package/dist/components/Form/StringField/StringFieldTextArea.js +2 -2
  7. package/dist/components/Input/Input.js +1 -1
  8. package/dist/components/TextArea/TextArea.js +1 -1
  9. package/dist/douglasneuroinformatics-libui-2.9.0.tgz +0 -0
  10. package/dist/styles/globals.css +1 -0
  11. package/dist/testing/mocks.js +1 -1
  12. package/package.json +19 -14
  13. package/src/components/DatePicker/DatePicker.tsx +1 -1
  14. package/src/components/Form/FieldsComponent.tsx +1 -1
  15. package/src/components/Form/Form.stories.tsx +2 -0
  16. package/src/components/Form/NumberRecordField.tsx +1 -1
  17. package/src/components/Form/RecordArrayField.tsx +2 -2
  18. package/src/components/Form/StringField/StringField.stories.tsx +1 -0
  19. package/src/components/Form/StringField/StringFieldInput.tsx +4 -1
  20. package/src/components/Form/StringField/StringFieldTextArea.tsx +4 -1
  21. package/src/components/Form/utils.ts +1 -1
  22. package/src/components/Input/Input.tsx +1 -1
  23. package/src/components/TextArea/TextArea.tsx +1 -1
  24. package/src/hooks/useNotificationsStore.test.ts +1 -1
  25. package/src/i18n.ts +2 -2
  26. package/src/styles/globals.css +1 -0
  27. package/src/testing/mocks.ts +1 -1
  28. package/dist/douglasneuroinformatics-libui-2.8.1.tgz +0 -0
@@ -1,6 +1,8 @@
1
1
  import React from 'react';
2
2
  import type { StringFormField } from '@douglasneuroinformatics/libui-form-types';
3
3
  import type { BaseFieldComponentProps } from '../types.js';
4
- export type StringFieldInputProps = BaseFieldComponentProps<string> & StringFormField;
5
- export declare const StringFieldInput: ({ description, error, label, name, readOnly, setValue, value }: StringFieldInputProps) => React.JSX.Element;
4
+ export type StringFieldInputProps = BaseFieldComponentProps<string> & Extract<StringFormField, {
5
+ variant: 'input' | 'textarea';
6
+ }>;
7
+ export declare const StringFieldInput: ({ description, error, label, name, placeholder, readOnly, setValue, value }: StringFieldInputProps) => React.JSX.Element;
6
8
  //# sourceMappingURL=StringFieldInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StringFieldInput.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/StringField/StringFieldInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAMjF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAE3D,MAAM,MAAM,qBAAqB,GAAG,uBAAuB,CAAC,MAAM,CAAC,GAAG,eAAe,CAAC;AAEtF,eAAO,MAAM,gBAAgB,mEAQ1B,qBAAqB,sBAkBvB,CAAC"}
1
+ {"version":3,"file":"StringFieldInput.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/StringField/StringFieldInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAMjF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAE3D,MAAM,MAAM,qBAAqB,GAAG,uBAAuB,CAAC,MAAM,CAAC,GACjE,OAAO,CAAC,eAAe,EAAE;IAAE,OAAO,EAAE,OAAO,GAAG,UAAU,CAAA;CAAE,CAAC,CAAC;AAE9D,eAAO,MAAM,gBAAgB,gFAS1B,qBAAqB,sBAmBvB,CAAC"}
@@ -2,11 +2,11 @@ import React from 'react';
2
2
  import { Input } from '../../Input/Input.js';
3
3
  import { Label } from '../../Label/Label.js';
4
4
  import { FieldGroup } from '../FieldGroup/FieldGroup.js';
5
- export const StringFieldInput = ({ description, error, label, name, readOnly, setValue, value }) => {
5
+ export const StringFieldInput = ({ description, error, label, name, placeholder, readOnly, setValue, value }) => {
6
6
  return (React.createElement(FieldGroup, null,
7
7
  React.createElement(FieldGroup.Row, null,
8
8
  React.createElement(Label, { htmlFor: name }, label),
9
9
  React.createElement(FieldGroup.Description, { description: description })),
10
- React.createElement(Input, { disabled: readOnly, id: name, name: name, type: "text", value: value ?? '', onChange: (event) => setValue(event.target.value) }),
10
+ React.createElement(Input, { disabled: readOnly, id: name, name: name, placeholder: placeholder, type: "text", value: value ?? '', onChange: (event) => setValue(event.target.value) }),
11
11
  React.createElement(FieldGroup.Error, { error: error })));
12
12
  };
@@ -1,6 +1,8 @@
1
1
  import React from 'react';
2
2
  import type { StringFormField } from '@douglasneuroinformatics/libui-form-types';
3
3
  import type { BaseFieldComponentProps } from '../types.js';
4
- export type StringFieldTextAreaProps = BaseFieldComponentProps<string> & StringFormField;
5
- export declare const StringFieldTextArea: ({ description, error, label, name, readOnly, setValue, value }: StringFieldTextAreaProps) => React.JSX.Element;
4
+ export type StringFieldTextAreaProps = BaseFieldComponentProps<string> & Extract<StringFormField, {
5
+ variant: 'input' | 'textarea';
6
+ }>;
7
+ export declare const StringFieldTextArea: ({ description, error, label, name, placeholder, readOnly, setValue, value }: StringFieldTextAreaProps) => React.JSX.Element;
6
8
  //# sourceMappingURL=StringFieldTextArea.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StringFieldTextArea.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/StringField/StringFieldTextArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAMjF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAE3D,MAAM,MAAM,wBAAwB,GAAG,uBAAuB,CAAC,MAAM,CAAC,GAAG,eAAe,CAAC;AAEzF,eAAO,MAAM,mBAAmB,mEAQ7B,wBAAwB,sBAkB1B,CAAC"}
1
+ {"version":3,"file":"StringFieldTextArea.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/StringField/StringFieldTextArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAMjF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAE3D,MAAM,MAAM,wBAAwB,GAAG,uBAAuB,CAAC,MAAM,CAAC,GACpE,OAAO,CAAC,eAAe,EAAE;IAAE,OAAO,EAAE,OAAO,GAAG,UAAU,CAAA;CAAE,CAAC,CAAC;AAE9D,eAAO,MAAM,mBAAmB,gFAS7B,wBAAwB,sBAmB1B,CAAC"}
@@ -2,11 +2,11 @@ import React from 'react';
2
2
  import { Label } from '../../Label/Label.js';
3
3
  import { TextArea } from '../../TextArea/TextArea.js';
4
4
  import { FieldGroup } from '../FieldGroup/FieldGroup.js';
5
- export const StringFieldTextArea = ({ description, error, label, name, readOnly, setValue, value }) => {
5
+ export const StringFieldTextArea = ({ description, error, label, name, placeholder, readOnly, setValue, value }) => {
6
6
  return (React.createElement(FieldGroup, null,
7
7
  React.createElement(FieldGroup.Row, null,
8
8
  React.createElement(Label, { htmlFor: name }, label),
9
9
  React.createElement(FieldGroup.Description, { description: description })),
10
- React.createElement(TextArea, { disabled: readOnly, id: name, name: name, rows: 5, value: value ?? '', onChange: (event) => setValue(event.target.value) }),
10
+ React.createElement(TextArea, { disabled: readOnly, id: name, name: name, placeholder: placeholder, rows: 5, value: value ?? '', onChange: (event) => setValue(event.target.value) }),
11
11
  React.createElement(FieldGroup.Error, { error: error })));
12
12
  };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { cn } from '../../utils.js';
3
3
  export const Input = React.forwardRef(function Input({ className, type, ...props }, ref) {
4
- return (React.createElement("input", { autoComplete: "off", className: cn('flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50', className), "data-testid": "input", ref: ref, type: type, ...props }));
4
+ return (React.createElement("input", { autoComplete: "off", className: cn('flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground placeholder:opacity-80 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50', className), "data-testid": "input", ref: ref, type: type, ...props }));
5
5
  });
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { cn } from '../../utils.js';
3
3
  export const TextArea = React.forwardRef(function TextArea({ className, ...props }, ref) {
4
- return (React.createElement("textarea", { autoComplete: "off", className: cn('flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50', className), "data-testid": "text-area", ref: ref, ...props }));
4
+ return (React.createElement("textarea", { autoComplete: "off", className: cn('flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground placeholder:opacity-80 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50', className), "data-testid": "text-area", ref: ref, ...props }));
5
5
  });
@@ -70,6 +70,7 @@
70
70
  @layer base {
71
71
  * {
72
72
  @apply border-border;
73
+ scrollbar-width: thin;
73
74
  }
74
75
  body {
75
76
  @apply bg-background text-foreground;
@@ -31,7 +31,7 @@ export const mockStorage = (name) => {
31
31
  this.store = {};
32
32
  }
33
33
  getItem(key) {
34
- return this.store[key] || null;
34
+ return this.store[key] ?? null;
35
35
  }
36
36
  removeItem(key) {
37
37
  delete this.store[key];
package/package.json CHANGED
@@ -1,18 +1,15 @@
1
1
  {
2
2
  "name": "@douglasneuroinformatics/libui",
3
3
  "type": "module",
4
- "version": "2.8.1",
4
+ "version": "2.9.0",
5
5
  "packageManager": "pnpm@9.3.0",
6
- "description": "Generic UI components for DNP projects, built using React and TailwindCSS",
7
- "author": {
8
- "name": "Douglas Neuroinformatics",
9
- "email": "support@douglasneuroinformatics.ca"
10
- },
6
+ "description": "Generic UI components for DNP projects, built using React and Tailwind CSS",
7
+ "author": "Joshua Unrau",
11
8
  "license": "Apache-2.0",
12
9
  "homepage": "https://github.com/DouglasNeuroInformatics/libui#readme",
13
10
  "repository": {
14
11
  "type": "git",
15
- "url": "git+https://github.com/DouglasNeuroInformatics/libui"
12
+ "url": "https://github.com/DouglasNeuroInformatics/libui"
16
13
  },
17
14
  "bugs": {
18
15
  "url": "https://github.com/DouglasNeuroInformatics/libui/issues"
@@ -67,7 +64,7 @@
67
64
  },
68
65
  "dependencies": {
69
66
  "@douglasneuroinformatics/libjs": "^0.3.1",
70
- "@douglasneuroinformatics/libui-form-types": "^0.9.0",
67
+ "@douglasneuroinformatics/libui-form-types": "^0.10.0",
71
68
  "@headlessui/tailwindcss": "^0.2.1",
72
69
  "@heroicons/react": "^2.1.3",
73
70
  "@radix-ui/react-accordion": "^1.1.2",
@@ -116,11 +113,10 @@
116
113
  "devDependencies": {
117
114
  "@commitlint/cli": "^19.3.0",
118
115
  "@commitlint/config-conventional": "^19.2.2",
119
- "@commitlint/types": "^19.0.3",
120
116
  "@douglasneuroinformatics/eslint-config": "^4.2.2",
121
- "@semantic-release/changelog": "^6.0.3",
122
- "@semantic-release/git": "^10.0.1",
123
- "@semantic-release/npm": "^12.0.1",
117
+ "@douglasneuroinformatics/prettier-config": "^0.0.1",
118
+ "@douglasneuroinformatics/semantic-release": "^0.0.1",
119
+ "@douglasneuroinformatics/tsconfig": "^1.0.1",
124
120
  "@storybook/addon-essentials": "^8.1.6",
125
121
  "@storybook/addon-interactions": "^8.1.6",
126
122
  "@storybook/addon-links": "^8.1.6",
@@ -147,9 +143,8 @@
147
143
  "husky": "^9.0.11",
148
144
  "jsdom": "24.1.0",
149
145
  "postcss": "^8.4.38",
150
- "prettier": "^3.3.1",
146
+ "prettier": "^3.3.2",
151
147
  "prettier-plugin-tailwindcss": "^0.6.2",
152
- "semantic-release": "^23.0.8",
153
148
  "sort-json": "^2.0.1",
154
149
  "storybook": "^8.1.6",
155
150
  "storybook-react-i18next": "^3.1.1",
@@ -157,5 +152,15 @@
157
152
  "typescript": "~5.4.5",
158
153
  "vite": "5.2.13",
159
154
  "vitest": "^1.6.0"
155
+ },
156
+ "commitlint": {
157
+ "extends": [
158
+ "@commitlint/config-conventional"
159
+ ]
160
+ },
161
+ "release": {
162
+ "extends": [
163
+ "@douglasneuroinformatics/semantic-release"
164
+ ]
160
165
  }
161
166
  }
@@ -72,7 +72,7 @@ export const DatePicker = React.forwardRef<React.ElementRef<typeof Card>, DatePi
72
72
  // the duration is doubled because presumably it is to mount old and mount new
73
73
  const [canSetMonth, setCanSetMonth] = useState(true);
74
74
 
75
- const monthName = t(`months.${MONTHS[date.getMonth()]}`);
75
+ const monthName = t(`months.${MONTHS[date.getMonth()]!}`);
76
76
 
77
77
  const handleYearSelection = (date: Date) => {
78
78
  dispatch({ type: 'set-year', value: date.getFullYear() });
@@ -19,7 +19,7 @@ export type FieldsComponentProps<T extends FormDataType> = {
19
19
  /** Renders an object containing key value pairs, where the value is a FormField of some kind */
20
20
  export const FieldsComponent = <T extends FormDataType>({ fields, ...props }: FieldsComponentProps<T>) => {
21
21
  return Object.keys(fields).map((name) => {
22
- const field = fields[name];
22
+ const field = fields[name]!;
23
23
  if (field.kind === 'dynamic') {
24
24
  return <DynamicField {...props} field={field} key={name} name={name} />;
25
25
  }
@@ -160,6 +160,7 @@ const stringFields: FormFields<
160
160
  },
161
161
  stringTextArea: {
162
162
  kind: 'string',
163
+ placeholder: 'This is a text area...',
163
164
  label: 'Text Area',
164
165
  variant: 'textarea'
165
166
  },
@@ -175,6 +176,7 @@ const stringFields: FormFields<
175
176
  description: 'This is a string field',
176
177
  kind: 'string',
177
178
  label: 'Input',
179
+ placeholder: 'This in an input field...',
178
180
  variant: 'input'
179
181
  },
180
182
  stringRadio: {
@@ -41,7 +41,7 @@ export const NumberRecordField = <T extends NumberRecordFieldValue = NumberRecor
41
41
  </Heading>
42
42
  <div className="space-y-6">
43
43
  {Object.keys(items).map((name) => {
44
- const item = items[name];
44
+ const item = items[name]!;
45
45
  return (
46
46
  <NumberField
47
47
  error={recordError?.[name]}
@@ -73,12 +73,12 @@ export const RecordArrayField = memo(function RecordArrayField({
73
73
  if (!newArrayError[i]) {
74
74
  newArrayError[i] = {};
75
75
  }
76
- newArrayError[i][name] = error;
76
+ newArrayError[i]![name] = error;
77
77
  setArrayError(newArrayError);
78
78
  }}
79
79
  setValue={(value) => {
80
80
  const newArrayValue = [...arrayValue];
81
- newArrayValue[i][name] = value;
81
+ newArrayValue[i]![name] = value;
82
82
  setArrayValue(newArrayValue);
83
83
  }}
84
84
  value={arrayValue?.[i]?.[name]}
@@ -40,6 +40,7 @@ export const TextArea: Story = {
40
40
  description: 'Lorem ipsum dolor sit amet consectetur adipisicing elit.',
41
41
  label: 'Text Area',
42
42
  name: 'text',
43
+ placeholder: 'This is a text area...',
43
44
  setValue,
44
45
  value,
45
46
  variant: 'textarea'
@@ -8,13 +8,15 @@ import { FieldGroup } from '../FieldGroup/FieldGroup.js';
8
8
 
9
9
  import type { BaseFieldComponentProps } from '../types.js';
10
10
 
11
- export type StringFieldInputProps = BaseFieldComponentProps<string> & StringFormField;
11
+ export type StringFieldInputProps = BaseFieldComponentProps<string> &
12
+ Extract<StringFormField, { variant: 'input' | 'textarea' }>;
12
13
 
13
14
  export const StringFieldInput = ({
14
15
  description,
15
16
  error,
16
17
  label,
17
18
  name,
19
+ placeholder,
18
20
  readOnly,
19
21
  setValue,
20
22
  value
@@ -29,6 +31,7 @@ export const StringFieldInput = ({
29
31
  disabled={readOnly}
30
32
  id={name}
31
33
  name={name}
34
+ placeholder={placeholder}
32
35
  type="text"
33
36
  value={value ?? ''}
34
37
  onChange={(event) => setValue(event.target.value)}
@@ -8,13 +8,15 @@ import { FieldGroup } from '../FieldGroup/FieldGroup.js';
8
8
 
9
9
  import type { BaseFieldComponentProps } from '../types.js';
10
10
 
11
- export type StringFieldTextAreaProps = BaseFieldComponentProps<string> & StringFormField;
11
+ export type StringFieldTextAreaProps = BaseFieldComponentProps<string> &
12
+ Extract<StringFormField, { variant: 'input' | 'textarea' }>;
12
13
 
13
14
  export const StringFieldTextArea = ({
14
15
  description,
15
16
  error,
16
17
  label,
17
18
  name,
19
+ placeholder,
18
20
  readOnly,
19
21
  setValue,
20
22
  value
@@ -29,6 +31,7 @@ export const StringFieldTextArea = ({
29
31
  disabled={readOnly}
30
32
  id={name}
31
33
  name={name}
34
+ placeholder={placeholder}
32
35
  rows={5}
33
36
  value={value ?? ''}
34
37
  onChange={(event) => setValue(event.target.value)}
@@ -28,7 +28,7 @@ export function getFormFields<T extends FormDataType>(content: FormContent<T>):
28
28
  if (!Array.isArray(content)) {
29
29
  return content;
30
30
  }
31
- return content.reduce((prev, current) => ({ ...prev, ...current.fields }), content[0].fields) as FormFields<T>;
31
+ return content.reduce((prev, current) => ({ ...prev, ...current.fields }), content[0]!.fields) as FormFields<T>;
32
32
  }
33
33
 
34
34
  /**
@@ -9,7 +9,7 @@ export const Input = React.forwardRef<HTMLInputElement, InputProps>(function Inp
9
9
  <input
10
10
  autoComplete="off"
11
11
  className={cn(
12
- 'flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50',
12
+ 'flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground placeholder:opacity-80 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50',
13
13
  className
14
14
  )}
15
15
  data-testid="input"
@@ -12,7 +12,7 @@ export const TextArea = React.forwardRef<HTMLTextAreaElement, TextAreaProps>(fun
12
12
  <textarea
13
13
  autoComplete="off"
14
14
  className={cn(
15
- 'flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50',
15
+ 'flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground placeholder:opacity-80 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50',
16
16
  className
17
17
  )}
18
18
  data-testid="text-area"
@@ -23,7 +23,7 @@ describe('useNotificationsStore', () => {
23
23
  expect(result.current.notifications.length).toBe(1);
24
24
  expect(result.current.notifications[0]).toMatchObject({ message: 'test' });
25
25
  act(() => {
26
- result.current.dismissNotification(result.current.notifications[0].id);
26
+ result.current.dismissNotification(result.current.notifications[0]!.id);
27
27
  });
28
28
  expect(result.current.notifications.length).toBe(0);
29
29
  });
package/src/i18n.ts CHANGED
@@ -69,8 +69,8 @@ i18n.addPreInitTranslations = function (this, translations) {
69
69
  return;
70
70
  }
71
71
  const resources = createResources(translations);
72
- Object.assign(this.options.resources.en, resources.en);
73
- Object.assign(this.options.resources.fr, resources.fr);
72
+ Object.assign(this.options.resources.en!, resources.en);
73
+ Object.assign(this.options.resources.fr!, resources.fr);
74
74
  };
75
75
 
76
76
  i18n.use(initReactI18next).use(LanguageDetector);
@@ -70,6 +70,7 @@
70
70
  @layer base {
71
71
  * {
72
72
  @apply border-border;
73
+ scrollbar-width: thin;
73
74
  }
74
75
  body {
75
76
  @apply bg-background text-foreground;
@@ -35,7 +35,7 @@ export const mockStorage = (name: 'localStorage' | 'sessionStorage'): void => {
35
35
  }
36
36
 
37
37
  getItem(key: string) {
38
- return this.store[key] || null;
38
+ return this.store[key] ?? null;
39
39
  }
40
40
 
41
41
  removeItem(key: string) {