@4alldigital/foundation-ui--core 3.7.0 → 3.8.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@4alldigital/foundation-ui--core",
3
- "version": "3.7.0",
3
+ "version": "3.8.1",
4
4
  "description": "Foundation UI Core Component Library (source distribution)",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -32,5 +32,5 @@
32
32
  },
33
33
  "author": "Joe Mewes",
34
34
  "license": "MIT",
35
- "gitHead": "0049b7335f8f06215701846c7d2efb20d12ed15a"
35
+ "gitHead": "ce0e9c0611e849447eafe4377f5c05d1f5d21f6b"
36
36
  }
@@ -29,7 +29,7 @@ const buttonVariants = cva(
29
29
 
30
30
  // Outline is handled as compound variant
31
31
  outline:
32
- 'border-primary bg-transparent text-body-text dark:text-body-text-dark hover:bg-opacity-30 border-primary-300 dark:border-primary-400 hover:border-primary-400 dark:hover:border-primary-500',
32
+ 'border-primary bg-transparent text-body-text dark:text-body-text-dark hover:bg-primary/10 border-primary-300 dark:border-primary-400 hover:border-primary-400 dark:hover:border-primary-500',
33
33
  },
34
34
  size: {
35
35
  sm: 'h-8 px-3 py-1 text-xs',
@@ -87,7 +87,7 @@ const Button = ({
87
87
  { 'text-white border-primary bg-primary hover:bg-primary-darker': variant === BTN_VARIANTS.PRIMARY },
88
88
  { 'text-white border-secondary bg-secondary hover:bg-secondary-darker': variant === BTN_VARIANTS.SECONDARY },
89
89
  { 'text-black border-tertiary bg-tertiary hover:bg-tertiary-darker': variant === BTN_VARIANTS.TERTIARY },
90
- { 'border-primary bg-transparent text-body-text dark:text-body-text-dark hover:bg-opacity-30': outline },
90
+ { 'border-primary bg-transparent text-body-text dark:text-body-text-dark hover:bg-primary/10': outline },
91
91
  { 'border-primary-300 dark:border-primary-400 hover:border-primary-400 dark:hover:border-primary-500': outline },
92
92
  {
93
93
  'px-0 text-body-text dark:text-body-text-dark border-transparent bg-transparent hover:bg-transparent shadow-none group-hover:invert':
@@ -53,7 +53,7 @@ const CardBasic = ({
53
53
  </div>
54
54
  )}
55
55
  {titleOverlay && title && (
56
- <div className="absolute inset-0 w-full h-full z-10 flex items-center justify-center bg-black bg-opacity-30">
56
+ <div className="absolute inset-0 w-full h-full z-10 flex items-center justify-center bg-black/30">
57
57
  <Heading tag={HEADING_TAGS.H4} singleLine flush className='text-white'>
58
58
  {title}
59
59
  </Heading>
@@ -42,7 +42,7 @@ const CardMedia = ({
42
42
  className={cx('absolute inset-0 object-cover group-hover:scale-110', animateClasses)}
43
43
  />
44
44
  {accessRestriced && (
45
- <div className="absolute top-0 left-0 right-0 bottom-0 bg-body-bg bg-opacity-50 flex items-center justify-center">
45
+ <div className="absolute top-0 left-0 right-0 bottom-0 bg-body-bg/50 flex items-center justify-center">
46
46
  <Copy bold transform={COPY_TRANSFORM.UPPERCASE}>
47
47
  {T.UI.PURCHASE_TO_ACCESS}
48
48
  </Copy>
@@ -24,7 +24,7 @@ const FullScreenVideoModal = ({
24
24
  isOpen={modalIsOpen}
25
25
  onRequestClose={onCloseCallback}
26
26
  className="absolute bg-none top-1/2 left-1/2 right-auto bottom-auto mr-[-50%] transform translate-x-[-50%] translate-y-[-50%] w-full h-full p-0"
27
- overlayClassName="fixed top-0 left-0 right-0 bottom-0 bg-black bg-opacity-100 z-50"
27
+ overlayClassName="fixed top-0 left-0 right-0 bottom-0 bg-black z-50"
28
28
  ariaHideApp={ariaHideApp} // Only use in development, adjust for production use
29
29
  data-testid={testID || 'FullScreenVideoModal'}>
30
30
  <div className="h-full relative">
@@ -21,7 +21,7 @@ const Screen = ({
21
21
  {showHeader && (
22
22
  <Header
23
23
  className={cx({
24
- 'absolute top-0 left-0 right-0 bg-opacity-0 dark:bg-opacity-0 md:bg-opacity-20 md:dark:bg-opacity-20 z-50':
24
+ 'absolute top-0 left-0 right-0 bg-header-bg/0 dark:bg-header-bg-dark/0 md:bg-header-bg/20 md:dark:bg-header-bg-dark/20 z-50':
25
25
  fixedHeader,
26
26
  })}
27
27
  />
@@ -355,7 +355,7 @@ const SubscriptionManager = ({
355
355
  )}
356
356
  </div>
357
357
  {isLoading && (
358
- <div className="absolute top-0 left-0 w-full h-full bg-body-bg bg-opacity-50 flex items-center justify-center">
358
+ <div className="absolute top-0 left-0 w-full h-full bg-body-bg/50 flex items-center justify-center">
359
359
  <Loader />
360
360
  </div>
361
361
  )}
@@ -17,7 +17,7 @@ function SearchBox({
17
17
  return (
18
18
  <div className={cx('m-0 md:px-48', className)}>
19
19
  <form onSubmit={e => onSubmit(e)} className="flex items-center">
20
- <div className="flex-1 bg-body-bg dark:bg-body-bg-dark bg-opacity-80 rounded">
20
+ <div className="flex-1 bg-body-bg/80 dark:bg-body-bg-dark/80 rounded">
21
21
  <TextInput
22
22
  name="SearchBoxInput"
23
23
  type={InputType.TEXT}
@@ -71,6 +71,7 @@ const sampleProducts: Product[] = [
71
71
  export const Default: Story = {
72
72
  args: {
73
73
  title: 'Shop Partnerships',
74
+ intro: 'Our Partnerships page showcases a curated selection of products available for pre-order through the NRG at Home platform, created in collaboration with trusted partners and innovators. These early-access opportunities allow our community to support new ideas, shape future offerings, and be among the first to experience products that align with our values of performance, quality, and innovation—bringing the future of NRG at Home directly into your everyday life.',
74
75
  products: sampleProducts,
75
76
  isLoading: false,
76
77
  onProductClick: (product) => console.log('Product clicked:', product),
@@ -80,6 +81,7 @@ export const Default: Story = {
80
81
  export const Loading: Story = {
81
82
  args: {
82
83
  title: 'Shop Partnerships',
84
+ intro: 'Browse our curated selection of high-performance gear.',
83
85
  products: [],
84
86
  isLoading: true,
85
87
  },
@@ -114,6 +116,7 @@ export const SingleProduct: Story = {
114
116
  export const ManyProducts: Story = {
115
117
  args: {
116
118
  title: 'Shop Partnerships',
119
+ intro: 'Explore our extensive range of athletic essentials, from performance apparel to cutting-edge accessories that help you achieve your fitness goals.',
117
120
  products: [...sampleProducts, ...sampleProducts, ...sampleProducts],
118
121
  isLoading: false,
119
122
  onProductClick: (product) => console.log('Product clicked:', product),
@@ -1,14 +1,20 @@
1
1
  import Screen from '../../components/Screen';
2
2
  import DisplayHeading from '../../components/DisplayHeading';
3
+ import Copy from '../../components/Copy';
3
4
  import { ProductCard } from '../../components/ProductCard';
4
5
  import { Props } from './ProductListScreen.types';
5
6
 
6
- const ProductListScreen = ({ testID, title, products, isLoading, error, onProductClick }: Props) => {
7
+ const ProductListScreen = ({ testID, title, intro, products, isLoading, error, onProductClick }: Props) => {
7
8
  return (
8
9
  <Screen data-testid={testID || 'ProductListScreen'}>
9
10
  {title && <DisplayHeading text={title} />}
11
+ {intro && (
12
+ <div className="container mx-auto">
13
+ <Copy>{intro}</Copy>
14
+ </div>
15
+ )}
10
16
 
11
- <div className="container mx-auto px-4 py-8">
17
+ <div className="container mx-auto">
12
18
  {error && (
13
19
  <div className="rounded-lg bg-destructive/10 p-8 text-center">
14
20
  <h2 className="mb-2 text-2xl font-bold text-destructive">Unable to Load Products</h2>
@@ -3,6 +3,7 @@ import { Product } from '../../components/ProductCard';
3
3
  export interface Props {
4
4
  testID?: string;
5
5
  title?: string;
6
+ intro?: string;
6
7
  products: Product[];
7
8
  isLoading?: boolean;
8
9
  error?: string;