@purple/phoenix-components 5.3.1 → 5.5.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.
package/dist/index.d.ts CHANGED
@@ -51,12 +51,24 @@ declare type TextColor = typeof TextColor[number];
51
51
  declare const isTextColor: (color?: Color) => color is "primary" | "secondary" | "tertiary" | "quaternary";
52
52
  declare type Color = TextColor | ColorTheme | CSSColor;
53
53
 
54
+ declare const Sizing: readonly ["xs", "sm", "md", "lg"];
55
+ declare type Sizing = typeof Sizing[number];
56
+ declare const isSizing: (size?: Sizing | CSSValue) => size is "xs" | "sm" | "md" | "lg";
57
+ declare const SizingSmMd: readonly ["sm", "md"];
58
+ declare type SizingSmMd = typeof SizingSmMd[number];
59
+ declare const SizingMdLg: readonly ["md", "lg"];
60
+ declare type SizingMdLg = typeof SizingMdLg[number];
61
+ declare const SizingSmMdLg: readonly ["sm", "md", "lg"];
62
+ declare type SizingSmMdLg = typeof SizingSmMdLg[number];
63
+
54
64
  declare const TextAlignment: readonly ["left", "center", "right", "justify"];
55
65
  declare type TextAlignment = typeof TextAlignment[number];
56
66
 
57
67
  interface CommonTextProps<T> extends HTMLAttributes<T>, GenericComponentProps, TextAlignProp {
58
68
  color?: Color;
59
69
  bold?: boolean;
70
+ semibold?: boolean;
71
+ size?: Sizing | CSSValue;
60
72
  }
61
73
  interface TextAlignProp {
62
74
  textAlign?: TextAlignment;
@@ -283,16 +295,6 @@ declare type PhoenixIcons = keyof typeof PhoenixIconsSrc;
283
295
 
284
296
  declare type IconType = PhoenixIconsOutlined | React.ReactElement | string;
285
297
 
286
- declare const Sizing: readonly ["xs", "sm", "md", "lg"];
287
- declare type Sizing = typeof Sizing[number];
288
- declare const isSizing: (size?: Sizing | CSSValue) => size is "xs" | "sm" | "md" | "lg";
289
- declare const SizingSmMd: readonly ["sm", "md"];
290
- declare type SizingSmMd = typeof SizingSmMd[number];
291
- declare const SizingMdLg: readonly ["md", "lg"];
292
- declare type SizingMdLg = typeof SizingMdLg[number];
293
- declare const SizingSmMdLg: readonly ["sm", "md", "lg"];
294
- declare type SizingSmMdLg = typeof SizingSmMdLg[number];
295
-
296
298
  interface CommonButtonProps extends MarginProps {
297
299
  colorTheme?: ColorTheme;
298
300
  size?: Sizing;
@@ -352,8 +354,13 @@ interface CollapsibleProps extends GenericComponentProps {
352
354
  declare const Collapsible: React$1.FC<PropsWithChildren<CollapsibleProps>>;
353
355
 
354
356
  interface CollapsibleCardProps extends CardProps, GenericComponentProps {
355
- heading: string;
356
- rightContent?: React$1.ReactNode;
357
+ heading: ReactElement | string;
358
+ headingMarginBottom?: Spacing | CSSValue;
359
+ rightContent?: ReactElement;
360
+ initialOpen?: boolean;
361
+ arrowReverse?: boolean;
362
+ arrow?: ReactElement;
363
+ showCard?: boolean;
357
364
  }
358
365
  declare const CollapsibleCard: React$1.FC<PropsWithChildren<CollapsibleCardProps>>;
359
366
 
@@ -503,7 +510,6 @@ declare const Grid: React$1.FC<BoxProps>;
503
510
  declare type HeadingElement = 'h1' | 'h2' | 'h3' | 'h4';
504
511
  interface HeadingProps extends CommonTextProps<HTMLHeadingElement>, PaddingProps, MarginProps {
505
512
  element?: HeadingElement;
506
- size?: Sizing | CSSValue;
507
513
  }
508
514
  declare const Heading: React$1.FC<HeadingProps>;
509
515
 
@@ -628,7 +634,6 @@ interface NoticeProps extends GenericComponentProps, MarginProps, PaddingProps {
628
634
  declare const Notice: React$1.FC<PropsWithChildren<NoticeProps>>;
629
635
 
630
636
  interface ParagraphProps extends CommonTextProps<HTMLParagraphElement>, PaddingProps, MarginProps {
631
- size?: Sizing | CSSValue;
632
637
  lineHeight?: Sizing | CSSValue;
633
638
  }
634
639
  declare const Paragraph: React$1.FC<ParagraphProps>;
@@ -718,7 +723,6 @@ interface TagProps extends GenericComponentProps, MarginProps {
718
723
  declare const Tag: React$1.FC<TagProps>;
719
724
 
720
725
  interface TextProps extends CommonTextProps<HTMLDivElement>, PaddingProps, MarginProps {
721
- size?: Sizing | CSSValue;
722
726
  ellipsize?: boolean;
723
727
  element?: 'div' | 'span';
724
728
  title?: string;
@@ -738,6 +742,14 @@ declare const TimezonePicker: React$1.FC<TimezonePickerProps>;
738
742
 
739
743
  declare const getOptions: () => SelectOption[];
740
744
 
745
+ interface ToggleProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'>, GenericComponentProps {
746
+ colorTheme?: ColorTheme;
747
+ label?: React$1.ReactNode;
748
+ warning?: FormControlWarningType;
749
+ error?: FormControlErrorType;
750
+ }
751
+ declare const Toggle: React$1.FC<ToggleProps>;
752
+
741
753
  declare type TooltipProps = Omit<TippyProps, 'theme'> & GenericComponentProps;
742
754
  declare const Tooltip: React$1.FC<TooltipProps>;
743
755
 
@@ -1125,6 +1137,7 @@ declare const prefixedTheme: {
1125
1137
  };
1126
1138
  fontWeight: {
1127
1139
  regular: string;
1140
+ semibold: string;
1128
1141
  bold: string;
1129
1142
  };
1130
1143
  spacing: {
@@ -1516,6 +1529,63 @@ declare const prefixedTheme: {
1516
1529
  fontWeight: string;
1517
1530
  borderWidth: string;
1518
1531
  };
1532
+ toggle: {
1533
+ sizing: {
1534
+ container: {
1535
+ md: {
1536
+ width: string;
1537
+ height: string;
1538
+ };
1539
+ };
1540
+ slider: {
1541
+ md: string;
1542
+ };
1543
+ };
1544
+ color: {
1545
+ background: {
1546
+ container: {
1547
+ off: string;
1548
+ offDisabled: string;
1549
+ offInteraction: string;
1550
+ };
1551
+ slider: {
1552
+ off: string;
1553
+ offDisabled: string;
1554
+ };
1555
+ };
1556
+ border: {
1557
+ container: {
1558
+ off: string;
1559
+ offDisabled: string;
1560
+ offInteraction: string;
1561
+ };
1562
+ };
1563
+ };
1564
+ };
1565
+ modal: {
1566
+ color: {
1567
+ background: {
1568
+ overlay: string;
1569
+ };
1570
+ };
1571
+ sizing: {
1572
+ maxWidth: {
1573
+ xs: string;
1574
+ sm: string;
1575
+ md: string;
1576
+ lg: string;
1577
+ };
1578
+ };
1579
+ boxShadow: {
1580
+ x: string;
1581
+ y: string;
1582
+ blur: string;
1583
+ spread: string;
1584
+ color: string;
1585
+ type: string;
1586
+ };
1587
+ borderRadius: string;
1588
+ };
1519
1589
  color: {
1520
1590
  background: {
1521
1591
  primary: string;
@@ -1748,30 +1818,6 @@ declare const prefixedTheme: {
1748
1818
  };
1749
1819
  };
1750
1820
  };
1751
- modal: {
1752
- sizing: {
1753
- maxWidth: {
1754
- xs: string;
1755
- sm: string;
1756
- md: string;
1757
- lg: string;
1758
- };
1759
- };
1760
- boxShadow: {
1761
- x: string;
1762
- y: string;
1763
- blur: string;
1764
- spread: string;
1765
- color: string;
1766
- type: string;
1767
- };
1768
- borderRadius: string;
1769
- color: {
1770
- background: {
1771
- overlay: string;
1772
- };
1773
- };
1774
- };
1775
1821
  tabs: {
1776
1822
  borderWidth: {
1777
1823
  tab: {
@@ -1806,4 +1852,4 @@ interface BoxShadowObj {
1806
1852
  }
1807
1853
  declare const getBoxShadow: (shadow: BoxShadowObj | BoxShadowObj[]) => string;
1808
1854
 
1809
- export { Box, BoxProps, Button, ButtonGroup, ButtonGroupProps, ButtonProps, Card, CardProps, Checkbox, CheckboxProps, ClosableButton, ClosableButtonProps, ClosableItem, ClosableItemProps, Collapsible, CollapsibleCard, CollapsibleCardProps, CollapsibleProps, Color, ColorAndTheme, ColorTheme, DateInput, DateInputProps, DatePicker, DatePickerProps, DateRangePicker, DateRangePickerProps, DateRangeValue, DateValue, Dropdown, DropdownProps, FileUpload, FileUploadProps, FileWithPreview, Flex, GlobalStyles, Grid, Heading, HeadingElement, HeadingProps, HorizontalDivider, HorizontalDividerProps, Icon, IconAlignment, IconProps, IconType, Image, Label, LabelProps, Link, LinkButton, LinkButtonProps, LinkProps, List, ListItem, ListItemProps, ListProps, Menu, MenuItem, MenuItemProps, MenuProps, Modal, ModalProps, MultiSelect, MultiSelectProps, MultiSlider, MultiSliderProps, MultiSliderValue, Notice, NoticeProps, NumberInput, NumberInputProps, Paragraph, ParagraphProps, PhoenixIcons, PhoenixIconsColored, PhoenixIconsColoredSrc, PhoenixIconsOutlined, PhoenixIconsOutlinedSrc, PhoenixIconsSrc, Radio, RadioProps, Select, SelectNative, SelectNativeProps, SelectOption, SelectPicker, SelectPickerOption, SelectPickerProps, SelectProps, Sizing, SizingMdLg, SizingSmMd, SizingSmMdLg, Slider, SliderProps, SliderValue, Spacing, Spinner, SpinnerProps, Tab, TabFunctionProps, TabList, TabListProps, TabProps, Tag, TagProps, Text, TextArea, TextAreaProps, TextColor, TextInput, TextInputProps, TextProps, prefixedTheme as Theme, TimezonePicker, TimezonePickerProps, Tooltip, TooltipProps, getBoxShadow, getLineHeightUnitless, getSpacingCssValue, getTextColor, getOptions as getTimezoneOptions, getUnitlessNumber, isColorTheme, isSizing, isSpacing, isTextColor };
1855
+ export { Box, BoxProps, Button, ButtonGroup, ButtonGroupProps, ButtonProps, Card, CardProps, Checkbox, CheckboxProps, ClosableButton, ClosableButtonProps, ClosableItem, ClosableItemProps, Collapsible, CollapsibleCard, CollapsibleCardProps, CollapsibleProps, Color, ColorAndTheme, ColorTheme, DateInput, DateInputProps, DatePicker, DatePickerProps, DateRangePicker, DateRangePickerProps, DateRangeValue, DateValue, Dropdown, DropdownProps, FileUpload, FileUploadProps, FileWithPreview, Flex, GlobalStyles, Grid, Heading, HeadingElement, HeadingProps, HorizontalDivider, HorizontalDividerProps, Icon, IconAlignment, IconProps, IconType, Image, Label, LabelProps, Link, LinkButton, LinkButtonProps, LinkProps, List, ListItem, ListItemProps, ListProps, Menu, MenuItem, MenuItemProps, MenuProps, Modal, ModalProps, MultiSelect, MultiSelectProps, MultiSlider, MultiSliderProps, MultiSliderValue, Notice, NoticeProps, NumberInput, NumberInputProps, Paragraph, ParagraphProps, PhoenixIcons, PhoenixIconsColored, PhoenixIconsColoredSrc, PhoenixIconsOutlined, PhoenixIconsOutlinedSrc, PhoenixIconsSrc, Radio, RadioProps, Select, SelectNative, SelectNativeProps, SelectOption, SelectPicker, SelectPickerOption, SelectPickerProps, SelectProps, Sizing, SizingMdLg, SizingSmMd, SizingSmMdLg, Slider, SliderProps, SliderValue, Spacing, Spinner, SpinnerProps, Tab, TabFunctionProps, TabList, TabListProps, TabProps, Tag, TagProps, Text, TextArea, TextAreaProps, TextColor, TextInput, TextInputProps, TextProps, prefixedTheme as Theme, TimezonePicker, TimezonePickerProps, Toggle, Tooltip, TooltipProps, getBoxShadow, getLineHeightUnitless, getSpacingCssValue, getTextColor, getOptions as getTimezoneOptions, getUnitlessNumber, isColorTheme, isSizing, isSpacing, isTextColor };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purple/phoenix-components",
3
- "version": "5.3.1",
3
+ "version": "5.5.0",
4
4
  "description": "",
5
5
  "main": "dist/bundle.umd.js",
6
6
  "module": "dist/bundle.esm.js",
@@ -29,7 +29,8 @@
29
29
  "scripts": {
30
30
  "lint": "eslint 'src' '.storybook' --ext .ts,.tsx,.js,.jsx,.json,.d.ts",
31
31
  "lint:fix": "eslint 'src' '.storybook' --ext .ts,.tsx,.js,.jsx,.json,.d.ts --fix",
32
- "build:tokens": "(git -C my-axiory-tokens pull || git clone https://github.com/purple-technology/my-axiory-tokens.git) && ts-node --project ./ts-node.tsconfig.json --files src/tokens/build.ts && eslint 'src/tokens/' --ext .json --fix",
32
+ "build:tokens": "ts-node --project ./ts-node.tsconfig.json --files src/tokens/build.ts && eslint 'src/tokens/' --ext .json --fix",
33
+ "tokens": "(git -C my-axiory-tokens pull || git clone https://github.com/purple-technology/my-axiory-tokens.git) && npm run build:tokens",
33
34
  "build": "rollup -c && rm -r ./dist/types",
34
35
  "build-watch": "rollup -c -w",
35
36
  "prepare": "husky install",