Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/BoemlyAccordion/BoemlyAccordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const BoemlyAccordion: React.FC<BoemlyAccordionProps> = ({
defaultIndex,
}: BoemlyAccordionProps) => {
const textColor = variant === 'black' ? 'gray.500' : 'white';
const initialExpandedValues = defaultIndex.map((index) => rows[index].id.toString());
const initialExpandedValues = defaultIndex?.map((index) => rows[index].id.toString());

return (
<Accordion.Root defaultValue={initialExpandedValues} collapsible visual={variant}>
Expand Down
2 changes: 2 additions & 0 deletions src/components/BoemlyFormControl/BoemlyFormControl.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { ReactNode } from 'react';
import {
Checkbox,
Expand Down
2 changes: 2 additions & 0 deletions src/components/BoemlyTabs/BoemlyTabs.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { useMemo, useState } from 'react';
import { Box, Flex } from '@chakra-ui/react';
import LineTabButton from './LineTabButton';
Expand Down
2 changes: 2 additions & 0 deletions src/components/BoemlyTag/BoemlyTag.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { useState } from 'react';
import { Tag, TagRootProps } from '@chakra-ui/react';

Expand Down
2 changes: 2 additions & 0 deletions src/components/DatePicker/DatePicker.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import {
CloseButton,
Flex,
Expand Down
2 changes: 2 additions & 0 deletions src/components/Expandable/Expandable.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { Box, Heading, IconButton, Flex, Text, Spinner } from '@chakra-ui/react';
import { CaretDownIcon, CaretUpIcon } from '@phosphor-icons/react';
import React, { useEffect } from 'react';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { useEffect, useState } from 'react';

interface ForceClientSideRenderProps {
Expand Down
2 changes: 2 additions & 0 deletions src/components/ImageRadioItem/ImageRadioItem.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React from 'react';
import { chakra, useToken } from '@chakra-ui/react';
import { motion, MotionConfig, useAnimation } from 'framer-motion';
Expand Down
2 changes: 2 additions & 0 deletions src/components/Layout/Layout.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { Box } from '@chakra-ui/react';
import { useWindowScroll } from '@reactuses/core';
import React, { ReactNode, useEffect, useState } from 'react';
Expand Down
2 changes: 2 additions & 0 deletions src/components/MobileMenuBurger/MobileMenuBurger.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { Flex, IconButton } from '@chakra-ui/react';
import { useAnimation } from 'framer-motion';
import React, { useEffect } from 'react';
Expand Down
2 changes: 2 additions & 0 deletions src/components/OverflownText/OverflownText.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { useRef, useState, useEffect } from 'react';
import type { TextProps } from '@chakra-ui/react';
import { Text } from '@chakra-ui/react';
Expand Down
2 changes: 2 additions & 0 deletions src/components/RichText/RichText.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { useEffect, useRef } from 'react';
import { Box, Heading, HeadingProps, Link, Text, TextProps } from '@chakra-ui/react';
import { ImageContainer } from './styles';
Expand Down
22 changes: 22 additions & 0 deletions src/components/Select/Select.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,25 @@ SearchableMultiSelect.args = {
{ label: 'Option 4', value: 'option_4' },
],
};

export const NotFullWidth = Template.bind({});
NotFullWidth.args = {
placeholder: 'Select',
isFullWidth: false,
options: [
{ label: 'Short', value: 'short' },
{
label: 'This is a much longer option label that extends beyond the trigger',
value: 'long_1',
},
{
label: 'Another very long option with even more text to demonstrate auto width',
value: 'long_2',
},
{ label: 'Medium length option', value: 'medium' },
{
label: 'Extra long option label with a lot of descriptive text for demonstration purposes',
value: 'extra_long',
},
],
};
11 changes: 7 additions & 4 deletions src/components/Select/Select.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { useState, useEffect, useMemo, useCallback, useRef } from 'react';
import {
Box,
Expand Down Expand Up @@ -81,7 +83,7 @@ export const BoemlySelect: React.FC<BoemlySelectProps> = ({

// Use controlled value if provided, otherwise use internal state
const isControlled = value !== undefined;
const selectedOptions = isControlled ? value : internalSelectedOptions;
const selectedOptions = (isControlled ? value : internalSelectedOptions) ?? [];

const filteredOptions = useMemo(() => {
if (isSearchable && searchTerm) {
Expand Down Expand Up @@ -209,7 +211,7 @@ export const BoemlySelect: React.FC<BoemlySelectProps> = ({
onClose();
}
}}
positioning={{ placement: 'bottom-start', flip: false, sameWidth: true }}
positioning={{ placement: 'bottom-start', flip: false, sameWidth: false }}
>
{/* Trigger */}
<Popover.Trigger asChild>
Expand Down Expand Up @@ -284,7 +286,8 @@ export const BoemlySelect: React.FC<BoemlySelectProps> = ({
maxHeight={dynamicMaxHeight}
overflowY="auto"
zIndex="popover"
width={dropdownWidth || menuWidth}
width={dropdownWidth || 'auto'}
minWidth={menuWidth}
>
{isSearchable && (
<InputGroup mb="4" startElement={<MagnifyingGlassIcon color="gray.500" />}>
Expand Down Expand Up @@ -356,7 +359,7 @@ export const BoemlySelect: React.FC<BoemlySelectProps> = ({
bg: disabled ? undefined : isSelected ? 'primary.200' : 'gray.100',
}}
>
<Flex justify="space-between" align="center" width="100%">
<Flex justify="space-between" align="center" width="100%" gap="3">
<Text
fontSize={selectRecipe.variants?.size[size]?.fontSize}
fontWeight={isSelected ? 'bold' : 'normal'}
Expand Down
2 changes: 2 additions & 0 deletions src/components/Slider/Slider.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { Box, Flex, FlexProps, Slider, Text, useMediaQuery } from '@chakra-ui/react';
import React, { useEffect, useMemo, useState } from 'react';
import { BoemlyFormControl } from '../BoemlyFormControl';
Expand Down
2 changes: 2 additions & 0 deletions src/components/SplitScreen/SplitScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { Box, useMediaQuery } from '@chakra-ui/react';
import React, { ReactNode, useEffect, useRef } from 'react';
import { useAnimation } from 'framer-motion';
Expand Down
2 changes: 0 additions & 2 deletions src/components/ui/provider.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use client';

import { ChakraProvider, SystemContext } from '@chakra-ui/react';
import * as React from 'react';
import defaultTheme from '../../theme';
Expand Down
2 changes: 1 addition & 1 deletion src/constants/colorPalettes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ButtonColorPalettes } from '../types/ButtonColorScheme';
import type { ButtonColorPalettes } from '../types/ButtonColorPalette';

export const COLOR_PALETTES: ButtonColorPalettes[] = [
'primary',
Expand Down
File renamed without changes.