bord-design-system 0.0.2 → 0.0.4

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 (48) hide show
  1. package/dist/components/BordBadge/BordBadge.d.ts +2 -1
  2. package/dist/components/BordBadge/BordBadge.d.ts.map +1 -1
  3. package/dist/components/BordButton/BordButton.d.ts +1 -1
  4. package/dist/components/BordButton/BordButton.types.d.ts +6 -6
  5. package/dist/components/BordButton/BordButton.types.d.ts.map +1 -1
  6. package/dist/components/BordCellCard/components/BordCellHeader/BordCellHeader.d.ts.map +1 -1
  7. package/dist/components/BordCellCard/components/BordCellItem/BordCellItem.d.ts.map +1 -1
  8. package/dist/components/BordCellCard/components/BordCellItem/BordCellItem.types.d.ts +1 -0
  9. package/dist/components/BordCellCard/components/BordCellItem/BordCellItem.types.d.ts.map +1 -1
  10. package/dist/components/BordFeedbackAlert/BordFeedbackAlert.d.ts +15 -0
  11. package/dist/components/BordFeedbackAlert/BordFeedbackAlert.d.ts.map +1 -0
  12. package/dist/components/BordFeedbackAlert/BordFeedbackAlert.stories.d.ts +7 -0
  13. package/dist/components/BordFeedbackAlert/BordFeedbackAlert.stories.d.ts.map +1 -0
  14. package/dist/components/BordInfoCard/BordInfoCard.d.ts +17 -0
  15. package/dist/components/BordInfoCard/BordInfoCard.d.ts.map +1 -0
  16. package/dist/components/BordInfoCard/BordInfoCard.types.d.ts +26 -0
  17. package/dist/components/BordInfoCard/BordInfoCard.types.d.ts.map +1 -0
  18. package/dist/components/BordInfoCard/constants.d.ts +11 -0
  19. package/dist/components/BordInfoCard/constants.d.ts.map +1 -0
  20. package/dist/components/BordMetricCard/BordMetricCard.d.ts +18 -0
  21. package/dist/components/BordMetricCard/BordMetricCard.d.ts.map +1 -0
  22. package/dist/components/BordMetricCards/BordMetricCards.d.ts +13 -0
  23. package/dist/components/BordMetricCards/BordMetricCards.d.ts.map +1 -0
  24. package/dist/components/BordOneToneIcon/BordOneToneIcon.d.ts +1 -1
  25. package/dist/components/BordOneToneIcon/BordOneToneIcon.d.ts.map +1 -1
  26. package/dist/components/BordTabBar/BordTabBar.d.ts +16 -0
  27. package/dist/components/BordTabBar/BordTabBar.d.ts.map +1 -0
  28. package/dist/components/BordTabs/BordTabs.type.d.ts.map +1 -1
  29. package/dist/components/BordTabsGroup/BordTabsGroupWithBadge.d.ts.map +1 -1
  30. package/dist/components/BordTabsGroup/BordTabsGroupWithBadge.type.d.ts +8 -6
  31. package/dist/components/BordTabsGroup/BordTabsGroupWithBadge.type.d.ts.map +1 -1
  32. package/dist/components/BordTrelloRowFooterBadgeList/BordTrelloRowFooterBadgeList.d.ts +6 -5
  33. package/dist/components/BordTrelloRowFooterBadgeList/BordTrelloRowFooterBadgeList.d.ts.map +1 -1
  34. package/dist/components/index.d.ts +16 -10
  35. package/dist/components/index.d.ts.map +1 -1
  36. package/dist/hooks/index.d.ts +4 -0
  37. package/dist/hooks/index.d.ts.map +1 -0
  38. package/dist/hooks/useViewport.d.ts +46 -0
  39. package/dist/hooks/useViewport.d.ts.map +1 -0
  40. package/dist/index.d.ts +148 -14
  41. package/dist/index.esm.js +723 -15
  42. package/dist/index.esm.js.map +1 -1
  43. package/dist/index.js +727 -13
  44. package/dist/index.js.map +1 -1
  45. package/dist/styles/theme/light.d.ts.map +1 -1
  46. package/dist/utils/setOpacityToHex.d.ts +1 -1
  47. package/dist/utils/setOpacityToHex.d.ts.map +1 -1
  48. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as React from 'react';
3
- import { ComponentProps } from 'react';
2
+ import * as React$1 from 'react';
3
+ import { ComponentProps, ReactNode, ReactElement } from 'react';
4
4
 
5
5
  type TbordAvatarsVariant = 'circularFigma' | 'circularUser' | 'circularWorld' | 'circularZeppelin' | 'circularBordMascot' | 'rectangularFigma' | 'rectangularUser' | 'rectangularWorld' | 'rectangularZeppelin' | 'rectangularBordMascot';
6
6
  interface IBordAvatarProps extends ComponentProps<'svg'> {
@@ -28,11 +28,13 @@ declare const BordOneToneIcon: ({ variant, standardSize, customWidth, style, ...
28
28
 
29
29
  interface IbordOneToneIconProps extends ComponentProps<'svg'> {
30
30
  variant: TbordOneToneIcon;
31
- standardSize?: 12 | 14 | 16 | 20 | 24 | 32;
31
+ standardSize?: 12 | 14 | 16 | 18 | 20 | 24 | 32;
32
32
  customWidth?: string;
33
33
  }
34
34
 
35
35
  type TformComponentsStandardSizes = 'w-80' | 'w-180' | 'w-280' | 'w-380';
36
+ type TSemanticColors = 'informative' | 'success' | 'warning' | 'danger';
37
+ type TTabValue = string | number;
36
38
 
37
39
  interface IBordTextInputProps extends ComponentProps<"input"> {
38
40
  placeholder: string;
@@ -96,7 +98,7 @@ interface IBordAttentionButton extends ComponentProps<'div'> {
96
98
  * @prop {string} [customClassName=""] - Add a custom class to the component.
97
99
  * @returns {React.ReactElement} An attention button component.
98
100
  */
99
- declare const BordAttentionButton: (props: IBordAttentionButton) => React.ReactElement;
101
+ declare const BordAttentionButton: (props: IBordAttentionButton) => React$1.ReactElement;
100
102
 
101
103
  interface IBordInfoBannerDivProps extends ComponentProps<'div'> {
102
104
  className?: string;
@@ -143,26 +145,25 @@ interface IBordInfoBanner extends ComponentProps<'div'> {
143
145
  * @prop {IBordInfoBannerAlertLabelProps} [bordInfoBannerAlertLabelProps] - Props for the alert label.
144
146
  * @returns {React.ReactElement} An info banner component.
145
147
  */
146
- declare const BordInfoBanner: (props: IBordInfoBanner) => React.ReactElement;
148
+ declare const BordInfoBanner: (props: IBordInfoBanner) => React$1.ReactElement;
147
149
 
148
150
  type THeight = 'auto' | '42';
149
151
  interface IBordButton extends ComponentProps<'button'> {
150
152
  label?: string;
151
153
  formId?: string;
152
154
  customClassName?: string;
153
- buttonIconOne?: TbordOneToneIcon;
154
- buttonIconTwo?: TbordOneToneIcon;
155
155
  customWidth?: TformComponentsStandardSizes;
156
156
  customHeight?: THeight;
157
157
  bordButtonStyle?: 'filled' | 'outlined';
158
158
  customFontSize?: string;
159
159
  disabled?: boolean;
160
160
  isLoading?: boolean;
161
- modeButton?: 'primary' | 'secondary' | 'tertiary' | 'quaternary';
162
- standardSizeIcon?: 12 | 14 | 16 | 20 | 24 | 32;
161
+ modeButton?: 'primary' | 'secondary' | 'tertiary' | 'quaternary' | 'danger';
163
162
  standardPaddingSize?: 'rectangular' | 'squared';
164
- buttonIconOneStroke?: string;
165
- buttonIconTwoStroke?: string;
163
+ buttonIconOneProps?: IbordOneToneIconProps;
164
+ buttonIconTwoProps?: IbordOneToneIconProps;
165
+ buttonIconOne?: TbordOneToneIcon;
166
+ buttonIconTwo?: TbordOneToneIcon;
166
167
  }
167
168
 
168
169
  /**
@@ -179,10 +180,143 @@ interface IBordButton extends ComponentProps<'button'> {
179
180
  * @prop {boolean} [isLoading=false] - Whether the button is in a loading state or not.
180
181
  * @prop {string} [label="Button Text"] - The label of the button.
181
182
  * @prop {string} [customHeight="auto"] - The height of the button, can be any valid CSS unit.
182
- * @prop {"primary" | "secondary" | "tertiary"} [modeButton="primary"] - The mode of the button, can be "primary", "secondary" or "tertiary".
183
+ * @prop {"primary" | "secondary" | "tertiary" | "danger"} [modeButton="primary"] - The mode of the button, can be "primary", "secondary", "tertiary" or "danger".
183
184
  * @prop {"rectangular" | "squared"} [standardPaddingSize="rectangular"] - The padding size of the button.
184
185
  * @returns {React.ReactElement} A button component with different styles and loading state.
185
186
  */
186
- declare const BordButton: (props: IBordButton) => React.ReactElement;
187
+ declare const BordButton: (props: IBordButton) => React$1.ReactElement;
188
+
189
+ type TTabSemanticColors = TSemanticColors;
190
+ interface IBordTab {
191
+ label: ReactNode;
192
+ value?: TTabValue;
193
+ icon?: ReactElement;
194
+ iconPosition?: 'top' | 'bottom' | 'start' | 'end';
195
+ className?: string;
196
+ style?: React.CSSProperties;
197
+ selected?: boolean;
198
+ textColor?: TTabSemanticColors;
199
+ disabled?: boolean;
200
+ onClick?: (evt: React.MouseEvent<HTMLButtonElement>, value?: TTabValue) => void;
201
+ }
202
+
203
+ interface IBordTabs {
204
+ textColor?: TTabSemanticColors;
205
+ defaultValue?: TTabValue;
206
+ children: ReactNode;
207
+ value?: TTabValue;
208
+ onChange?: (value: TTabValue) => void;
209
+ }
210
+
211
+ declare const BordTabs: ({ value, children, defaultValue, textColor, onChange }: IBordTabs) => react_jsx_runtime.JSX.Element;
212
+
213
+ type TBadgeItemProps = {
214
+ icon?: IbordOneToneIconProps;
215
+ text?: string;
216
+ title?: string;
217
+ className?: string;
218
+ };
219
+ type TBadgeItem = TBadgeItemProps | ReactNode;
220
+ type TTitleProps = {
221
+ icon?: IbordOneToneIconProps;
222
+ text?: string;
223
+ className?: string;
224
+ };
225
+ interface IRowFooterProps {
226
+ title?: ReactNode | TTitleProps;
227
+ badgeList?: TBadgeItem[];
228
+ children?: ReactNode;
229
+ }
230
+
231
+ interface IBordInfoCardItem {
232
+ title?: string;
233
+ icon?: ReactNode;
234
+ label?: string;
235
+ customContentElement?: ReactNode;
236
+ }
237
+ interface IBordInfoCardHeader {
238
+ icon?: ReactNode;
239
+ title?: string;
240
+ subtitle?: string;
241
+ description?: string;
242
+ }
243
+ interface IBordInfoCard extends ComponentProps<'div'> {
244
+ header?: IBordInfoCardHeader;
245
+ items?: IBordInfoCardItem[];
246
+ primaryButtonProps?: IBordButton;
247
+ secondaryButtonProps?: IBordButton;
248
+ tertiaryButtonProps?: IBordButton;
249
+ variant?: 'success' | 'danger';
250
+ customClassName?: string;
251
+ bordTrelloRowFooterBadgeListProps?: IRowFooterProps;
252
+ }
253
+
254
+ /**
255
+ * @description A card component that displays information in a horizontal layout (desktop): Header | Items (horizontal row) | Buttons.
256
+ * @prop {IBordInfoCardHeader} [header] - Optional header with icon, title, subtitle, and description (left section).
257
+ * @prop {IBordInfoCardItem[]} [items] - Optional array of items to display in a horizontal row (center section, desktop) or grid (tablet/mobile).
258
+ * @prop {Omit<IBordButton, 'bordButtonStyle' | 'modeButton'>} [primaryButton] - Optional primary button (filled style, right section).
259
+ * @prop {Omit<IBordButton, 'bordButtonStyle' | 'modeButton'>} [secondaryButton] - Optional secondary button (outlined style, right section).
260
+ * @prop {Omit<IBordButton, 'bordButtonStyle' | 'modeButton' | 'label'>} [menuButton] - Optional menu button (icon only, right section).
261
+ * @prop {"success" | "danger"} [variant="success"] - The color variant of the card.
262
+ * @prop {string} [customClassName=""] - Add a custom class to the component.
263
+ * @returns {React.ReactElement} An info card component.
264
+ */
265
+ declare const BordInfoCard: (props: IBordInfoCard) => React$1.ReactElement;
266
+
267
+ type TBordMetricCardSizes = 'lg' | 'sm';
268
+ interface IBordMetricCardProps {
269
+ title: ReactNode | string;
270
+ value?: number;
271
+ textColor?: string;
272
+ size?: TBordMetricCardSizes;
273
+ titleProps?: {
274
+ className?: string;
275
+ };
276
+ valueProps?: {
277
+ className?: string;
278
+ };
279
+ }
280
+ declare const BordMetricCard: ({ title, value, textColor, size, titleProps, valueProps, }: IBordMetricCardProps) => react_jsx_runtime.JSX.Element;
281
+
282
+ interface IBordTabItem {
283
+ id: string;
284
+ label: string;
285
+ }
286
+ interface IBordTabBarProps {
287
+ tabs: IBordTabItem[];
288
+ defaultValue?: string;
289
+ activeTab?: string;
290
+ onChange?: (id: string) => void;
291
+ containerClassName?: string;
292
+ buttonClassName?: string;
293
+ activeTabClassName?: string;
294
+ }
295
+ declare const BordTabBar: ({ tabs, defaultValue, activeTab: externalActiveTab, onChange, containerClassName, buttonClassName, activeTabClassName, }: IBordTabBarProps) => react_jsx_runtime.JSX.Element;
296
+
297
+ declare const BordTab: ({ label, className, style, icon, iconPosition, textColor, selected, value, disabled, onClick, }: IBordTab) => react_jsx_runtime.JSX.Element;
298
+
299
+ interface IBordBadgeProps {
300
+ label: ReactNode;
301
+ variant?: 'default' | 'gradient';
302
+ color?: TSemanticColors | 'default';
303
+ className?: string;
304
+ filled?: boolean;
305
+ disabled?: boolean;
306
+ restProps?: ComponentProps<'div'>;
307
+ }
308
+
309
+ type TabWithBadge = IBordTab & {
310
+ badge?: IBordBadgeProps;
311
+ };
312
+ interface IBordTabsGroupProps {
313
+ value?: TTabValue;
314
+ defaultValue?: TTabValue;
315
+ tabs: TabWithBadge[];
316
+ textColor?: TTabSemanticColors;
317
+ onChange?: (value: TTabValue) => void;
318
+ }
319
+
320
+ declare function BordTabsGroupWithBadge({ value, defaultValue, tabs, textColor, onChange }: IBordTabsGroupProps): react_jsx_runtime.JSX.Element;
187
321
 
188
- export { BordAttentionButton, BordAvatar, BordBackButton, BordButton, BordFlag, BordInfoBanner, BordOneToneIcon, BordTextInput, BordTwoToneIcon };
322
+ export { BordAttentionButton, BordAvatar, BordBackButton, BordButton, BordFlag, BordInfoBanner, BordInfoCard, BordMetricCard, BordOneToneIcon, BordTab, BordTabBar, BordTabs, BordTabsGroupWithBadge, BordTextInput, BordTwoToneIcon };