@integrigo/integrigo-ui 1.6.16 → 1.6.17-b
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/lib/index.d.ts +3 -1
- package/lib/index.esm.js +1 -1
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/src/components/atoms/Chip/Chip.d.ts +5 -17
- package/lib/src/components/atoms/DateTime/DateTime.d.ts +10 -0
- package/lib/src/components/atoms/DateTime/DateTime.stories.d.ts +5 -0
- package/lib/src/components/atoms/DateTime/index.d.ts +1 -0
- package/lib/src/components/atoms/Divider/Divider.stories.d.ts +4 -4
- package/lib/src/components/atoms/Dot/Dot.stories.d.ts +3 -3
- package/lib/src/components/atoms/Icon/Icon.d.ts +8 -1
- package/lib/src/components/atoms/Icon/Icon.stories.d.ts +2 -2
- package/lib/src/components/atoms/Icon/icons/CalendarSlash.d.ts +3 -0
- package/lib/src/components/atoms/Icon/icons/CommentDots.d.ts +3 -0
- package/lib/src/components/atoms/Icon/icons/DiceOne.d.ts +3 -0
- package/lib/src/components/atoms/Icon/icons/Heart.d.ts +3 -0
- package/lib/src/components/atoms/Icon/icons/HeartAlt.d.ts +3 -0
- package/lib/src/components/atoms/Icon/icons/QuestionCircle.d.ts +3 -0
- package/lib/src/components/atoms/Icon/icons/Rocket.d.ts +3 -0
- package/lib/src/components/atoms/index.d.ts +1 -0
- package/lib/src/components/molecules/Dropdown/Dropdown.d.ts +6 -4
- package/lib/src/components/molecules/Dropdown/Dropdown.stories.d.ts +12 -6
- package/lib/src/components/molecules/Dropdown/Option.d.ts +5 -2
- package/lib/src/components/molecules/Input/Input.d.ts +1 -1
- package/lib/src/components/molecules/Input/Input.stories.d.ts +9 -9
- package/lib/src/components/organisms/Select/Select.d.ts +10 -0
- package/lib/src/components/organisms/Select/index.d.ts +1 -0
- package/lib/src/components/organisms/index.d.ts +1 -0
- package/lib/src/index.d.ts +2 -2
- package/package.json +2 -1
- package/src/components/atoms/Chip/Chip.test.tsx +11 -9
- package/src/components/atoms/Chip/Chip.tsx +103 -73
- package/src/components/atoms/DateTime/DateTime.stories.tsx +22 -0
- package/src/components/atoms/DateTime/DateTime.tsx +39 -0
- package/src/components/atoms/DateTime/index.ts +1 -0
- package/src/components/atoms/Icon/Icon.tsx +15 -1
- package/src/components/atoms/Icon/icons/CalendarSlash.tsx +9 -0
- package/src/components/atoms/Icon/icons/CommentDots.tsx +9 -0
- package/src/components/atoms/Icon/icons/DiceOne.tsx +9 -0
- package/src/components/atoms/Icon/icons/Heart.tsx +9 -0
- package/src/components/atoms/Icon/icons/HeartAlt.tsx +9 -0
- package/src/components/atoms/Icon/icons/QuestionCircle.tsx +9 -0
- package/src/components/atoms/Icon/icons/Rocket.tsx +9 -0
- package/src/components/atoms/Initials/Initials.tsx +1 -0
- package/src/components/atoms/index.ts +1 -0
- package/src/components/molecules/Dropdown/Dropdown.tsx +4 -4
- package/src/components/molecules/Dropdown/Option.tsx +10 -3
- package/src/components/molecules/Profile/Profile.tsx +12 -3
- package/src/components/organisms/Select/Select.tsx +16 -0
- package/src/components/organisms/Select/index.ts +1 -0
- package/src/components/organisms/index.ts +2 -1
- package/src/index.ts +2 -1
| @@ -10,6 +10,14 @@ type ProfileProps = Partial<React.ComponentProps<typeof Avatar>> & { | |
| 10 10 | 
             
              children?: React.ReactNode;
         | 
| 11 11 | 
             
            };
         | 
| 12 12 |  | 
| 13 | 
            +
            const fontSizeVariant = {
         | 
| 14 | 
            +
              s: 12,
         | 
| 15 | 
            +
              m: 16,
         | 
| 16 | 
            +
              l: 20,
         | 
| 17 | 
            +
              xl: 24,
         | 
| 18 | 
            +
              xxl: 32,
         | 
| 19 | 
            +
            };
         | 
| 20 | 
            +
             | 
| 13 21 | 
             
            const getInitials = (text: string): string =>
         | 
| 14 22 | 
             
              text
         | 
| 15 23 | 
             
                .split(' ')
         | 
| @@ -32,7 +40,7 @@ export const Profile: React.FC<ProfileProps> = ({ | |
| 32 40 | 
             
                )}
         | 
| 33 41 |  | 
| 34 42 | 
             
                <Details>
         | 
| 35 | 
            -
                  <Name as="span">{name}</Name>
         | 
| 43 | 
            +
                  <Name as="span" size={size}>{name}</Name>
         | 
| 36 44 | 
             
                  {children}
         | 
| 37 45 | 
             
                </Details>
         | 
| 38 46 | 
             
              </Root>
         | 
| @@ -40,14 +48,15 @@ export const Profile: React.FC<ProfileProps> = ({ | |
| 40 48 |  | 
| 41 49 | 
             
            const Root = styled.div`
         | 
| 42 50 | 
             
              display: flex;
         | 
| 43 | 
            -
              gap: var(--padding- | 
| 51 | 
            +
              gap: var(--padding-s);
         | 
| 44 52 | 
             
              align-items: center;
         | 
| 45 53 | 
             
            `;
         | 
| 46 54 |  | 
| 47 55 | 
             
            Root.displayName = 'Root';
         | 
| 48 56 |  | 
| 49 | 
            -
            const Name = styled(Hero) | 
| 57 | 
            +
            const Name = styled(Hero)<{ size: ProfileProps['size']}>`
         | 
| 50 58 | 
             
              font-weight: var(--font-bold);
         | 
| 59 | 
            +
              font-size: ${p => fontSizeVariant[p.size || 'm']}px;
         | 
| 51 60 | 
             
            `;
         | 
| 52 61 |  | 
| 53 62 | 
             
            Name.displayName = 'Name';
         | 
| @@ -0,0 +1,16 @@ | |
| 1 | 
            +
            import React from "react";
         | 
| 2 | 
            +
            import { Dropdown } from "../../molecules";
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            interface SelectProps extends React.ComponentProps<typeof Dropdown> {
         | 
| 5 | 
            +
              options: { value: string | number; label: React.ReactNode }[];
         | 
| 6 | 
            +
            }
         | 
| 7 | 
            +
             | 
| 8 | 
            +
            export const Select: React.FC<SelectProps> = ({ options, ...props }) => (
         | 
| 9 | 
            +
              <Dropdown {...props}>
         | 
| 10 | 
            +
                {options.map((option) => (
         | 
| 11 | 
            +
                  <Dropdown.Option key={option.value} value={option.value}>
         | 
| 12 | 
            +
                    {option.label}
         | 
| 13 | 
            +
                  </Dropdown.Option>
         | 
| 14 | 
            +
                ))}
         | 
| 15 | 
            +
              </Dropdown>
         | 
| 16 | 
            +
            );
         | 
| @@ -0,0 +1 @@ | |
| 1 | 
            +
            export { Select } from './Select'
         | 
    
        package/src/index.ts
    CHANGED
    
    | @@ -3,6 +3,7 @@ export { | |
| 3 3 | 
             
              Avatar,
         | 
| 4 4 | 
             
              Card,
         | 
| 5 5 | 
             
              Divider,
         | 
| 6 | 
            +
              DateTime,
         | 
| 6 7 | 
             
              Icon,
         | 
| 7 8 | 
             
              Nav,
         | 
| 8 9 | 
             
              Pill,
         | 
| @@ -25,6 +26,6 @@ export { | |
| 25 26 | 
             
              Tile,
         | 
| 26 27 | 
             
            } from "./components/molecules";
         | 
| 27 28 |  | 
| 28 | 
            -
            export { Menu, Setting, Modal } from "./components/organisms";
         | 
| 29 | 
            +
            export { Menu, Setting, Modal, Select } from "./components/organisms";
         | 
| 29 30 |  | 
| 30 31 | 
             
            export { GlobalStyles as IntegrigoUI, Color } from "./styles";
         |