@fpkit/acss 2.2.0 → 3.1.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.
Files changed (81) hide show
  1. package/libs/chunk-5RAWNUVD.js +8 -0
  2. package/libs/chunk-5RAWNUVD.js.map +1 -0
  3. package/libs/{chunk-UJAQVHWC.js → chunk-CWRNJA4P.js} +2 -2
  4. package/libs/{chunk-R7NLLZU2.cjs → chunk-DYFAUAB7.cjs} +3 -3
  5. package/libs/chunk-NWJDAHP6.cjs +17 -0
  6. package/libs/chunk-NWJDAHP6.cjs.map +1 -0
  7. package/libs/components/breadcrumbs/breadcrumb.cjs +5 -5
  8. package/libs/components/breadcrumbs/breadcrumb.d.cts +2 -2
  9. package/libs/components/breadcrumbs/breadcrumb.d.ts +2 -2
  10. package/libs/components/breadcrumbs/breadcrumb.js +2 -2
  11. package/libs/components/flexbox/flex.css +1 -0
  12. package/libs/components/flexbox/flex.css.map +1 -0
  13. package/libs/components/flexbox/flex.min.css +3 -0
  14. package/libs/components/link/link.cjs +5 -5
  15. package/libs/components/link/link.css +1 -1
  16. package/libs/components/link/link.css.map +1 -1
  17. package/libs/components/link/link.d.cts +2 -131
  18. package/libs/components/link/link.d.ts +2 -131
  19. package/libs/components/link/link.js +1 -1
  20. package/libs/components/link/link.min.css +2 -2
  21. package/libs/components/nav/nav.css +1 -1
  22. package/libs/components/nav/nav.css.map +1 -1
  23. package/libs/components/nav/nav.min.css +2 -2
  24. package/libs/hooks.cjs +3 -3
  25. package/libs/hooks.d.cts +1 -1
  26. package/libs/hooks.d.ts +1 -1
  27. package/libs/hooks.js +2 -2
  28. package/libs/index.cjs +30 -29
  29. package/libs/index.cjs.map +1 -1
  30. package/libs/index.css +1 -1
  31. package/libs/index.css.map +1 -1
  32. package/libs/index.d.cts +246 -290
  33. package/libs/index.d.ts +246 -290
  34. package/libs/index.js +15 -15
  35. package/libs/index.js.map +1 -1
  36. package/libs/link-59ad884f.d.ts +371 -0
  37. package/package.json +2 -2
  38. package/src/components/flexbox/README.mdx +996 -0
  39. package/src/components/flexbox/flex.scss +847 -0
  40. package/src/components/flexbox/flex.stories.tsx +1233 -0
  41. package/src/components/flexbox/flex.test.tsx +689 -0
  42. package/src/components/flexbox/flex.tsx +484 -0
  43. package/src/components/flexbox/flex.types.ts +224 -0
  44. package/src/components/link/link.scss +4 -10
  45. package/src/components/link/link.tsx +18 -3
  46. package/src/components/nav/nav.scss +1 -1
  47. package/src/index.scss +1 -0
  48. package/src/index.ts +19 -2
  49. package/src/patterns/page/page-header.tsx +1 -3
  50. package/src/styles/flexbox/flex.css +736 -0
  51. package/src/styles/flexbox/flex.css.map +1 -0
  52. package/src/styles/index.css +739 -9
  53. package/src/styles/index.css.map +1 -1
  54. package/src/styles/link/link.css +2 -6
  55. package/src/styles/link/link.css.map +1 -1
  56. package/src/styles/nav/nav.css +3 -3
  57. package/libs/chunk-5PJYLVFY.cjs +0 -17
  58. package/libs/chunk-5PJYLVFY.cjs.map +0 -1
  59. package/libs/chunk-NNTBIHSD.js +0 -8
  60. package/libs/chunk-NNTBIHSD.js.map +0 -1
  61. package/libs/components/alert/alert.min.min.css +0 -2
  62. package/libs/components/badge/badge.min.min.css +0 -2
  63. package/libs/components/breadcrumbs/breadcrumb.min.min.css +0 -2
  64. package/libs/components/buttons/button.min.min.css +0 -2
  65. package/libs/components/cards/card-style.min.min.css +0 -2
  66. package/libs/components/cards/card.min.min.css +0 -2
  67. package/libs/components/details/details.min.min.css +0 -2
  68. package/libs/components/dialog/dialog.min.min.css +0 -2
  69. package/libs/components/form/form.min.min.css +0 -2
  70. package/libs/components/icons/icon.min.min.css +0 -2
  71. package/libs/components/images/img.min.min.css +0 -2
  72. package/libs/components/layout/landmarks.min.min.css +0 -2
  73. package/libs/components/link/link.min.min.css +0 -2
  74. package/libs/components/list/list.min.min.css +0 -2
  75. package/libs/components/nav/nav.min.min.css +0 -2
  76. package/libs/components/progress/progress.min.min.css +0 -2
  77. package/libs/components/styles/index.min.min.css +0 -2
  78. package/libs/components/tag/tag.min.min.css +0 -2
  79. package/libs/components/text-to-speech/text-to-speech.min.min.css +0 -2
  80. /package/libs/{chunk-UJAQVHWC.js.map → chunk-CWRNJA4P.js.map} +0 -0
  81. /package/libs/{chunk-R7NLLZU2.cjs.map → chunk-DYFAUAB7.cjs.map} +0 -0
@@ -1,4 +1,4 @@
1
- @use '../../sass/mixins';
1
+ @use "../../sass/mixins";
2
2
 
3
3
  /**
4
4
  * Link Component Styles
@@ -33,7 +33,7 @@ a[href] {
33
33
  --link-padding-block: 0;
34
34
 
35
35
  // Transitions
36
- --link-transition: all 0.75s ease-in-out;
36
+ --link-transition: all 0.35s ease-in-out;
37
37
 
38
38
  // Focus Indicator (WCAG 2.4.7 - 3:1 contrast minimum)
39
39
  --link-focus-color: currentColor;
@@ -66,18 +66,12 @@ a[href] {
66
66
  }
67
67
 
68
68
  // Focus state - WCAG 2.4.7 compliant focus indicator
69
- &:focus {
70
- outline: var(--link-focus-width) var(--link-focus-style)
71
- var(--link-focus-color);
72
- outline-offset: var(--link-focus-offset);
73
- --link-decoration: underline;
74
- }
75
-
76
69
  // Focus-visible for better UX (only show outline on keyboard focus)
77
70
  &:focus-visible {
78
71
  outline: var(--link-focus-width) var(--link-focus-style)
79
72
  var(--link-focus-color);
80
73
  outline-offset: var(--link-focus-offset);
74
+ font-weight: bold;
81
75
  }
82
76
 
83
77
  // Visited and active states
@@ -130,7 +124,7 @@ a[href] {
130
124
  }
131
125
 
132
126
  // Pill variant (rounded corners)
133
- &[data-link~='pill'],
127
+ &[data-link~="pill"],
134
128
  &:has(> i) {
135
129
  --link-radius: 99rem;
136
130
  --link-decoration: none;
@@ -176,14 +176,29 @@ export const LinkButton = React.forwardRef<HTMLAnchorElement, LinkProps>(
176
176
  ({ href, children, ...props }, ref) => {
177
177
  return (
178
178
  <Link ref={ref} href={href} {...props}>
179
- {children}
179
+ <i>{children}</i>
180
180
  </Link>
181
181
  );
182
182
  }
183
183
  );
184
184
 
185
+ Link.displayName = "Link";
185
186
  IconLink.displayName = "IconLink";
186
187
  LinkButton.displayName = "LinkButton";
187
- Link.displayName = "Link";
188
188
 
189
- export default Link;
189
+ // Compound component pattern - attach subcomponents to Link with proper typing
190
+ export interface LinkComponent
191
+ extends React.ForwardRefExoticComponent<
192
+ LinkProps & React.RefAttributes<HTMLAnchorElement>
193
+ > {
194
+ LinkButton: typeof LinkButton;
195
+ IconLink: typeof IconLink;
196
+ }
197
+
198
+ // Attach subcomponents to Link using Object.assign for better type inference
199
+ const LinkWithSubcomponents = Object.assign(Link, {
200
+ LinkButton,
201
+ IconLink,
202
+ });
203
+
204
+ export default LinkWithSubcomponents as LinkComponent;
@@ -24,7 +24,7 @@ body > nav,
24
24
  &:hover {
25
25
  background-color: var(--nav-hover-bg, #e8e8e8);
26
26
  }
27
- &:hover:where(img, button) {
27
+ &:hover:has(img, button) {
28
28
  background-color: transparent;
29
29
  }
30
30
  }
package/src/index.scss CHANGED
@@ -22,4 +22,5 @@
22
22
  @use "./components/list/list.scss";
23
23
  @use "./components/alert/alert.scss";
24
24
  @use "./components/text-to-speech/text-to-speech.scss";
25
+ @use "./components/flexbox/flex.scss";
25
26
  @use "./sass/styles";
package/src/index.ts CHANGED
@@ -23,9 +23,9 @@ export { Input, type InputProps } from "./components/form/inputs";
23
23
  export { Icon, type IconProps } from "./components/icons/icon";
24
24
  export { Img } from "./components/images/img";
25
25
  export type { ImgProps } from "./components/images/img.types";
26
- export { Link } from "./components/link/link";
26
+ export { default as Link } from "./components/link/link";
27
27
  export type { LinkProps } from "./components/link/link.types";
28
- export { List, type ListItemProps } from "./components/list/list";
28
+ export { default as List, type ListProps, type ListItemProps } from "./components/list/list";
29
29
  export { Modal, type ModalProps } from "./components/modal/modal";
30
30
  export { Popover, type PopoverProps } from "./components/popover/popover";
31
31
  export { RenderTable as TBL, type TableProps } from "./components/tables/table";
@@ -34,6 +34,23 @@ export { TextToSpeech } from "./components/text-to-speech/TextToSpeech";
34
34
 
35
35
  // Layout components
36
36
  export * from "./components/layout/landmarks";
37
+ export { default as Flex } from "./components/flexbox/flex";
38
+ export type {
39
+ FlexProps,
40
+ FlexItemProps,
41
+ FlexSpacerProps,
42
+ FlexContainerElement,
43
+ FlexItemElement,
44
+ FlexDirection,
45
+ FlexWrap,
46
+ FlexJustify,
47
+ FlexAlign,
48
+ FlexAlignContent,
49
+ FlexAlignSelf,
50
+ FlexGap,
51
+ FlexVariant,
52
+ ResponsiveFlexProps,
53
+ } from "./components/flexbox/flex.types";
37
54
 
38
55
  // Navigation components
39
56
  export * from "./components/nav/nav";
@@ -1,8 +1,6 @@
1
- import React, { Component } from 'react'
1
+ import React from 'react'
2
2
  import Landmarks from '#components/layout/landmarks'
3
3
  import Heading from '#components/heading/heading'
4
- import { Link } from '#components/link/link'
5
- import { ComponentProps } from '#types'
6
4
 
7
5
  export enum HeaderVariants {
8
6
  Cover = 'cover',