@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.
- package/libs/chunk-5RAWNUVD.js +8 -0
- package/libs/chunk-5RAWNUVD.js.map +1 -0
- package/libs/{chunk-UJAQVHWC.js → chunk-CWRNJA4P.js} +2 -2
- package/libs/{chunk-R7NLLZU2.cjs → chunk-DYFAUAB7.cjs} +3 -3
- package/libs/chunk-NWJDAHP6.cjs +17 -0
- package/libs/chunk-NWJDAHP6.cjs.map +1 -0
- package/libs/components/breadcrumbs/breadcrumb.cjs +5 -5
- package/libs/components/breadcrumbs/breadcrumb.d.cts +2 -2
- package/libs/components/breadcrumbs/breadcrumb.d.ts +2 -2
- package/libs/components/breadcrumbs/breadcrumb.js +2 -2
- package/libs/components/flexbox/flex.css +1 -0
- package/libs/components/flexbox/flex.css.map +1 -0
- package/libs/components/flexbox/flex.min.css +3 -0
- package/libs/components/link/link.cjs +5 -5
- package/libs/components/link/link.css +1 -1
- package/libs/components/link/link.css.map +1 -1
- package/libs/components/link/link.d.cts +2 -131
- package/libs/components/link/link.d.ts +2 -131
- package/libs/components/link/link.js +1 -1
- package/libs/components/link/link.min.css +2 -2
- package/libs/components/nav/nav.css +1 -1
- package/libs/components/nav/nav.css.map +1 -1
- package/libs/components/nav/nav.min.css +2 -2
- package/libs/hooks.cjs +3 -3
- package/libs/hooks.d.cts +1 -1
- package/libs/hooks.d.ts +1 -1
- package/libs/hooks.js +2 -2
- package/libs/index.cjs +30 -29
- package/libs/index.cjs.map +1 -1
- package/libs/index.css +1 -1
- package/libs/index.css.map +1 -1
- package/libs/index.d.cts +246 -290
- package/libs/index.d.ts +246 -290
- package/libs/index.js +15 -15
- package/libs/index.js.map +1 -1
- package/libs/link-59ad884f.d.ts +371 -0
- package/package.json +2 -2
- package/src/components/flexbox/README.mdx +996 -0
- package/src/components/flexbox/flex.scss +847 -0
- package/src/components/flexbox/flex.stories.tsx +1233 -0
- package/src/components/flexbox/flex.test.tsx +689 -0
- package/src/components/flexbox/flex.tsx +484 -0
- package/src/components/flexbox/flex.types.ts +224 -0
- package/src/components/link/link.scss +4 -10
- package/src/components/link/link.tsx +18 -3
- package/src/components/nav/nav.scss +1 -1
- package/src/index.scss +1 -0
- package/src/index.ts +19 -2
- package/src/patterns/page/page-header.tsx +1 -3
- package/src/styles/flexbox/flex.css +736 -0
- package/src/styles/flexbox/flex.css.map +1 -0
- package/src/styles/index.css +739 -9
- package/src/styles/index.css.map +1 -1
- package/src/styles/link/link.css +2 -6
- package/src/styles/link/link.css.map +1 -1
- package/src/styles/nav/nav.css +3 -3
- package/libs/chunk-5PJYLVFY.cjs +0 -17
- package/libs/chunk-5PJYLVFY.cjs.map +0 -1
- package/libs/chunk-NNTBIHSD.js +0 -8
- package/libs/chunk-NNTBIHSD.js.map +0 -1
- package/libs/components/alert/alert.min.min.css +0 -2
- package/libs/components/badge/badge.min.min.css +0 -2
- package/libs/components/breadcrumbs/breadcrumb.min.min.css +0 -2
- package/libs/components/buttons/button.min.min.css +0 -2
- package/libs/components/cards/card-style.min.min.css +0 -2
- package/libs/components/cards/card.min.min.css +0 -2
- package/libs/components/details/details.min.min.css +0 -2
- package/libs/components/dialog/dialog.min.min.css +0 -2
- package/libs/components/form/form.min.min.css +0 -2
- package/libs/components/icons/icon.min.min.css +0 -2
- package/libs/components/images/img.min.min.css +0 -2
- package/libs/components/layout/landmarks.min.min.css +0 -2
- package/libs/components/link/link.min.min.css +0 -2
- package/libs/components/list/list.min.min.css +0 -2
- package/libs/components/nav/nav.min.min.css +0 -2
- package/libs/components/progress/progress.min.min.css +0 -2
- package/libs/components/styles/index.min.min.css +0 -2
- package/libs/components/tag/tag.min.min.css +0 -2
- package/libs/components/text-to-speech/text-to-speech.min.min.css +0 -2
- /package/libs/{chunk-UJAQVHWC.js.map → chunk-CWRNJA4P.js.map} +0 -0
- /package/libs/{chunk-R7NLLZU2.cjs.map → chunk-DYFAUAB7.cjs.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use
|
|
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.
|
|
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~=
|
|
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
|
-
|
|
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;
|
package/src/index.scss
CHANGED
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
|
|
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',
|