@fpkit/acss 0.5.5 → 0.5.7
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-PWVRDQ3R.js +8 -0
- package/libs/chunk-PWVRDQ3R.js.map +1 -0
- package/libs/chunk-SVS4MX3U.cjs +31 -0
- package/libs/chunk-SVS4MX3U.cjs.map +1 -0
- package/libs/{icons-1f5afc0c.d.ts → icons-31ace3de.d.ts} +86 -49
- package/libs/icons.cjs +2 -2
- package/libs/icons.d.cts +1 -1
- package/libs/icons.d.ts +1 -1
- package/libs/icons.js +1 -1
- package/libs/index.cjs +34 -34
- package/libs/index.cjs.map +1 -1
- package/libs/index.d.cts +46 -15
- package/libs/index.d.ts +46 -15
- package/libs/index.js +7 -7
- package/libs/index.js.map +1 -1
- package/package.json +4 -3
- package/src/components/README.mdx +84 -0
- package/src/components/alert/README.mdx +86 -0
- package/src/components/alert/alert.mdx +74 -0
- package/src/components/alert/alert.scss +80 -0
- package/src/components/alert/alert.stories.tsx +133 -0
- package/src/components/alert/alert.tsx +154 -0
- package/src/components/alert/elements/README.mdx +77 -0
- package/src/components/alert/elements/dismiss-button.stories.tsx +31 -0
- package/src/components/alert/elements/dismiss-button.tsx +28 -0
- package/src/components/badge/badge.mdx +124 -0
- package/src/components/badge/badge.scss +4 -4
- package/src/components/buttons/button.scss +1 -0
- package/src/components/buttons/button.test.tsx +72 -72
- package/src/components/details/details.scss +20 -1
- package/src/components/dialog/README.mdx +187 -0
- package/src/components/dialog/dialog-modal.stories.tsx +113 -0
- package/src/components/dialog/dialog-modal.tsx +111 -0
- package/src/components/dialog/dialog.scss +28 -13
- package/src/components/dialog/dialog.stories.tsx +85 -30
- package/src/components/dialog/dialog.tsx +106 -61
- package/src/components/dialog/hooks/useClickOutside.ts +33 -0
- package/src/components/dialog/views/README.mdx +182 -0
- package/src/components/dialog/views/dialog-footer.tsx +45 -0
- package/src/components/dialog/{view → views}/dialog-header.stories.tsx +3 -4
- package/src/components/dialog/views/dialog-header.tsx +61 -0
- package/src/components/icons/components/add.tsx +14 -14
- package/src/components/icons/components/alert-solid.tsx +36 -0
- package/src/components/icons/components/alert-square-solid.tsx +36 -0
- package/src/components/icons/components/info-solid.tsx +40 -0
- package/src/components/icons/components/info.tsx +36 -0
- package/src/components/icons/components/question-solid.tsx +36 -0
- package/src/components/icons/components/success-solid.tsx +36 -0
- package/src/components/icons/components/warn-solid.tsx +36 -0
- package/src/components/icons/icon.stories.tsx +42 -0
- package/src/components/icons/icon.tsx +57 -41
- package/src/components/icons/index.ts +36 -29
- package/src/components/ui.tsx +28 -25
- package/src/decorators/instructions.tsx +44 -0
- package/src/hooks/useDialogClickHandler.ts +26 -0
- package/src/index.scss +23 -22
- package/src/sass/_globals.scss +7 -1
- package/src/styles/alert/alert.css +68 -0
- package/src/styles/alert/alert.css.map +1 -0
- package/src/styles/badge/badge.css +3 -3
- package/src/styles/buttons/button.css +1 -0
- package/src/styles/buttons/button.css.map +1 -1
- package/src/styles/details/details.css +14 -1
- package/src/styles/details/details.css.map +1 -1
- package/src/styles/dialog/dialog.css +28 -13
- package/src/styles/dialog/dialog.css.map +1 -1
- package/src/styles/index.css +122 -28
- package/src/styles/index.css.map +1 -1
- package/libs/chunk-QHIABQNQ.js +0 -8
- package/libs/chunk-QHIABQNQ.js.map +0 -1
- package/libs/chunk-ZOHIKF6I.cjs +0 -31
- package/libs/chunk-ZOHIKF6I.cjs.map +0 -1
- package/libs/components/badge/badge.css +0 -1
- package/libs/components/badge/badge.css.map +0 -1
- package/libs/components/badge/badge.min.css +0 -3
- package/libs/components/breadcrumbs/breadcrumb.css +0 -1
- package/libs/components/breadcrumbs/breadcrumb.css.map +0 -1
- package/libs/components/breadcrumbs/breadcrumb.min.css +0 -3
- package/libs/components/buttons/button.css +0 -1
- package/libs/components/buttons/button.css.map +0 -1
- package/libs/components/buttons/button.min.css +0 -3
- package/libs/components/cards/card-style.css +0 -1
- package/libs/components/cards/card-style.css.map +0 -1
- package/libs/components/cards/card-style.min.css +0 -3
- package/libs/components/cards/card.css +0 -1
- package/libs/components/cards/card.css.map +0 -1
- package/libs/components/cards/card.min.css +0 -3
- package/libs/components/details/details.css +0 -1
- package/libs/components/details/details.css.map +0 -1
- package/libs/components/details/details.min.css +0 -3
- package/libs/components/dialog/dialog.css +0 -1
- package/libs/components/dialog/dialog.css.map +0 -1
- package/libs/components/dialog/dialog.min.css +0 -3
- package/libs/components/form/form.css +0 -1
- package/libs/components/form/form.css.map +0 -1
- package/libs/components/form/form.min.css +0 -3
- package/libs/components/icons/icon.css +0 -1
- package/libs/components/icons/icon.css.map +0 -1
- package/libs/components/icons/icon.min.css +0 -3
- package/libs/components/images/img.css +0 -1
- package/libs/components/images/img.css.map +0 -1
- package/libs/components/images/img.min.css +0 -3
- package/libs/components/layout/landmarks.css +0 -1
- package/libs/components/layout/landmarks.css.map +0 -1
- package/libs/components/layout/landmarks.min.css +0 -3
- package/libs/components/link/link.css +0 -1
- package/libs/components/link/link.css.map +0 -1
- package/libs/components/link/link.min.css +0 -3
- package/libs/components/nav/nav.css +0 -1
- package/libs/components/nav/nav.css.map +0 -1
- package/libs/components/nav/nav.min.css +0 -3
- package/libs/components/progress/progress.css +0 -1
- package/libs/components/progress/progress.css.map +0 -1
- package/libs/components/progress/progress.min.css +0 -3
- package/libs/components/styles/index.css +0 -1
- package/libs/components/styles/index.css.map +0 -1
- package/libs/components/styles/index.min.css +0 -3
- package/libs/components/tag/tag.css +0 -1
- package/libs/components/tag/tag.css.map +0 -1
- package/libs/components/tag/tag.min.css +0 -3
- package/libs/components/text-to-speech/text-to-speech.css +0 -1
- package/libs/components/text-to-speech/text-to-speech.css.map +0 -1
- package/libs/components/text-to-speech/text-to-speech.min.css +0 -3
- package/libs/index.css +0 -1
- package/libs/index.css.map +0 -1
- package/src/components/alert-dialog/alert-dialog.stories.tsx +0 -35
- package/src/components/alert-dialog/alert-dialog.tsx +0 -76
- package/src/components/dialog/view/dialog-header.tsx +0 -32
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
Copy,
|
|
10
10
|
Down,
|
|
11
11
|
Home,
|
|
12
|
+
Info,
|
|
12
13
|
Left,
|
|
13
14
|
Minus,
|
|
14
15
|
Remove,
|
|
@@ -23,11 +24,17 @@ import {
|
|
|
23
24
|
PlaySolid,
|
|
24
25
|
PauseSolid,
|
|
25
26
|
ResumeSolid,
|
|
26
|
-
StopSolid
|
|
27
|
-
|
|
27
|
+
StopSolid,
|
|
28
|
+
AlertSolid,
|
|
29
|
+
InfoSolid,
|
|
30
|
+
QuestionSolid,
|
|
31
|
+
WarnSolid,
|
|
32
|
+
SuccessSolid,
|
|
33
|
+
AlertSquareSolid,
|
|
34
|
+
} from "./index";
|
|
28
35
|
|
|
29
|
-
import UI from
|
|
30
|
-
import React from
|
|
36
|
+
import UI from "#components/ui";
|
|
37
|
+
import React from "react";
|
|
31
38
|
|
|
32
39
|
/**
|
|
33
40
|
* The default styles object for the Icon component.
|
|
@@ -39,14 +46,14 @@ import React from 'react'
|
|
|
39
46
|
* @property {string} width - Sets width to 'auto' for automatic sizing.
|
|
40
47
|
*/
|
|
41
48
|
const defaultStyles = {
|
|
42
|
-
display:
|
|
43
|
-
direction:
|
|
44
|
-
gap:
|
|
45
|
-
placeItems:
|
|
46
|
-
width:
|
|
47
|
-
}
|
|
49
|
+
display: "inline-flex",
|
|
50
|
+
direction: "row",
|
|
51
|
+
gap: ".2rem",
|
|
52
|
+
placeItems: "center",
|
|
53
|
+
width: "auto",
|
|
54
|
+
};
|
|
48
55
|
|
|
49
|
-
export type IconProps = React.ComponentProps<typeof UI
|
|
56
|
+
export type IconProps = React.ComponentProps<typeof UI>;
|
|
50
57
|
|
|
51
58
|
export const Icon = ({
|
|
52
59
|
id,
|
|
@@ -67,34 +74,43 @@ export const Icon = ({
|
|
|
67
74
|
>
|
|
68
75
|
{children}
|
|
69
76
|
</UI>
|
|
70
|
-
)
|
|
71
|
-
}
|
|
77
|
+
);
|
|
78
|
+
};
|
|
72
79
|
|
|
73
|
-
export default Icon
|
|
74
|
-
Icon.displayName =
|
|
75
|
-
Icon.
|
|
76
|
-
Icon.
|
|
77
|
-
Icon.
|
|
78
|
-
Icon.
|
|
79
|
-
Icon.
|
|
80
|
-
Icon.
|
|
81
|
-
Icon.
|
|
82
|
-
Icon.
|
|
83
|
-
Icon.
|
|
84
|
-
Icon.Home = Home
|
|
85
|
-
Icon.
|
|
86
|
-
Icon.
|
|
87
|
-
Icon.
|
|
88
|
-
Icon.
|
|
89
|
-
Icon.
|
|
90
|
-
Icon.
|
|
91
|
-
Icon.
|
|
92
|
-
Icon.
|
|
93
|
-
Icon.
|
|
94
|
-
Icon.
|
|
95
|
-
Icon.
|
|
96
|
-
Icon.
|
|
97
|
-
Icon.
|
|
98
|
-
Icon.
|
|
99
|
-
Icon.
|
|
100
|
-
Icon.StopSolid = StopSolid
|
|
80
|
+
export default Icon;
|
|
81
|
+
Icon.displayName = "Icon";
|
|
82
|
+
Icon.Add = Add;
|
|
83
|
+
Icon.ArrowDown = ArrowDown;
|
|
84
|
+
Icon.ArrowLeft = ArrowLeft;
|
|
85
|
+
Icon.ArrowRight = ArrowRight;
|
|
86
|
+
Icon.ArrowUp = ArrowUp;
|
|
87
|
+
Icon.Chat = Chat;
|
|
88
|
+
Icon.Code = Code;
|
|
89
|
+
Icon.Copy = Copy;
|
|
90
|
+
Icon.Down = Down;
|
|
91
|
+
Icon.Home = Home;
|
|
92
|
+
Icon.Info = Info;
|
|
93
|
+
Icon.InfoSolid = InfoSolid;
|
|
94
|
+
Icon.AlertSolid = AlertSolid;
|
|
95
|
+
Icon.Left = Left;
|
|
96
|
+
Icon.Minus = Minus;
|
|
97
|
+
Icon.Pause = Pause;
|
|
98
|
+
Icon.PauseSolid = PauseSolid;
|
|
99
|
+
Icon.Play = Play;
|
|
100
|
+
Icon.PlaySolid = PlaySolid;
|
|
101
|
+
Icon.Remove = Remove;
|
|
102
|
+
Icon.Resume = Resume;
|
|
103
|
+
Icon.ResumeSolid = ResumeSolid;
|
|
104
|
+
Icon.Right = Right;
|
|
105
|
+
Icon.Star = Star;
|
|
106
|
+
Icon.Stop = Stop;
|
|
107
|
+
Icon.StopSolid = StopSolid;
|
|
108
|
+
Icon.Up = Up;
|
|
109
|
+
Icon.User = User;
|
|
110
|
+
Icon.styles = defaultStyles;
|
|
111
|
+
Icon.QuestionSolid = QuestionSolid;
|
|
112
|
+
Icon.WarnSolid = WarnSolid;
|
|
113
|
+
Icon.SuccessSolid = SuccessSolid;
|
|
114
|
+
Icon.AlertSquareSolid = AlertSquareSolid;
|
|
115
|
+
// aliases
|
|
116
|
+
Icon.Close = Icon.Remove;
|
|
@@ -1,29 +1,36 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from
|
|
23
|
-
export * from
|
|
24
|
-
export * from
|
|
25
|
-
export * from
|
|
26
|
-
export * from
|
|
27
|
-
export * from
|
|
28
|
-
export * from
|
|
29
|
-
export * from
|
|
1
|
+
export * from "./types";
|
|
2
|
+
export * from "./components/code";
|
|
3
|
+
export * from "./components/home";
|
|
4
|
+
export * from "./components/add";
|
|
5
|
+
export * from "./components/arrow-left";
|
|
6
|
+
export * from "./components/chat";
|
|
7
|
+
export * from "./components/arrow-down";
|
|
8
|
+
export * from "./components/arrow-left";
|
|
9
|
+
export * from "./components/arrow-up";
|
|
10
|
+
export * from "./components/arrow-right";
|
|
11
|
+
export * from "./components/user";
|
|
12
|
+
export * from "./components/right";
|
|
13
|
+
export * from "./components/left";
|
|
14
|
+
export * from "./components/minus";
|
|
15
|
+
export * from "./components/remove";
|
|
16
|
+
export * from "./components/copy";
|
|
17
|
+
export * from "./components/svg";
|
|
18
|
+
export * from "./components/up";
|
|
19
|
+
export * from "./components/down";
|
|
20
|
+
export * from "./components/star";
|
|
21
|
+
export * from "./components/user";
|
|
22
|
+
export * from "./components/play";
|
|
23
|
+
export * from "./components/pause";
|
|
24
|
+
export * from "./components/resume";
|
|
25
|
+
export * from "./components/stop";
|
|
26
|
+
export * from "./components/stop-solid";
|
|
27
|
+
export * from "./components/play-solid";
|
|
28
|
+
export * from "./components/pause-solid";
|
|
29
|
+
export * from "./components/resume-solid";
|
|
30
|
+
export * from "./components/info";
|
|
31
|
+
export * from "./components/alert-solid";
|
|
32
|
+
export * from "./components/info-solid";
|
|
33
|
+
export * from "./components/question-solid";
|
|
34
|
+
export * from "./components/warn-solid";
|
|
35
|
+
export * from "./components/success-solid";
|
|
36
|
+
export * from "./components/alert-square-solid";
|
package/src/components/ui.tsx
CHANGED
|
@@ -1,38 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
import React from "react";
|
|
3
4
|
|
|
4
5
|
type PolymorphicRef<C extends React.ElementType> =
|
|
5
|
-
React.ComponentPropsWithRef<C>[
|
|
6
|
+
React.ComponentPropsWithRef<C>["ref"];
|
|
6
7
|
|
|
7
8
|
type AsProp<C extends React.ElementType> = {
|
|
8
|
-
as?: C
|
|
9
|
-
}
|
|
9
|
+
as?: C;
|
|
10
|
+
};
|
|
10
11
|
|
|
11
|
-
type PropsToOmit<C extends React.ElementType, P> = keyof (AsProp<C> & P)
|
|
12
|
+
type PropsToOmit<C extends React.ElementType, P> = keyof (AsProp<C> & P);
|
|
12
13
|
|
|
13
14
|
type PolymorphicComponentProp<
|
|
14
15
|
C extends React.ElementType,
|
|
15
16
|
Props = {},
|
|
16
17
|
> = React.PropsWithChildren<Props & AsProp<C>> &
|
|
17
|
-
Omit<React.ComponentPropsWithoutRef<C>, PropsToOmit<C, Props
|
|
18
|
+
Omit<React.ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>;
|
|
18
19
|
|
|
19
20
|
type PolymorphicComponentPropWithRef<
|
|
20
21
|
C extends React.ElementType,
|
|
21
22
|
Props = {},
|
|
22
23
|
> = PolymorphicComponentProp<C, Props> & {
|
|
23
|
-
ref?: PolymorphicRef<C
|
|
24
|
-
}
|
|
24
|
+
ref?: PolymorphicRef<C>;
|
|
25
|
+
};
|
|
25
26
|
|
|
26
27
|
type FPProps<C extends React.ElementType> = PolymorphicComponentPropWithRef<
|
|
27
28
|
C,
|
|
28
29
|
{
|
|
29
|
-
renderStyles?: boolean
|
|
30
|
-
styles?: React.CSSProperties
|
|
31
|
-
classes?: string
|
|
32
|
-
id?: string
|
|
33
|
-
children?: React.ReactNode
|
|
30
|
+
renderStyles?: boolean;
|
|
31
|
+
styles?: React.CSSProperties;
|
|
32
|
+
classes?: string;
|
|
33
|
+
id?: string;
|
|
34
|
+
children?: React.ReactNode;
|
|
34
35
|
}
|
|
35
|
-
|
|
36
|
+
>;
|
|
36
37
|
|
|
37
38
|
/*
|
|
38
39
|
* FPComponent type definition
|
|
@@ -43,25 +44,27 @@ type FPProps<C extends React.ElementType> = PolymorphicComponentPropWithRef<
|
|
|
43
44
|
* @param props - The component props
|
|
44
45
|
* @returns React component
|
|
45
46
|
*/
|
|
46
|
-
type FPComponent = <C extends React.ElementType =
|
|
47
|
-
props: FPProps<C
|
|
48
|
-
) => React.ReactElement | any
|
|
47
|
+
type FPComponent = <C extends React.ElementType = "span">(
|
|
48
|
+
props: FPProps<C>
|
|
49
|
+
) => React.ReactElement | (any & { displayName?: String });
|
|
49
50
|
|
|
50
51
|
const FP: FPComponent = React.forwardRef(
|
|
51
52
|
<C extends React.ElementType>(
|
|
52
53
|
{ as, styles, classes, children, defaultStyles, ...props }: FPProps<C>,
|
|
53
|
-
ref?: PolymorphicRef<C
|
|
54
|
+
ref?: PolymorphicRef<C>
|
|
54
55
|
) => {
|
|
55
|
-
const Component = as
|
|
56
|
+
const Component = as ?? "div";
|
|
56
57
|
|
|
57
|
-
const styleObj: React.CSSProperties = { ...defaultStyles, ...styles }
|
|
58
|
+
const styleObj: React.CSSProperties = { ...defaultStyles, ...styles };
|
|
58
59
|
|
|
59
60
|
return (
|
|
60
61
|
<Component ref={ref} style={styleObj} className={classes} {...props}>
|
|
61
62
|
{children}
|
|
62
63
|
</Component>
|
|
63
|
-
)
|
|
64
|
-
}
|
|
65
|
-
)
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
);
|
|
66
67
|
|
|
67
|
-
export default FP
|
|
68
|
+
export default FP;
|
|
69
|
+
// @ts-expect-error -- React component displayName
|
|
70
|
+
FP.displayName = "FP";
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { StoryFn } from "@storybook/react";
|
|
2
|
+
import UI from "#components/ui";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A decorator that wraps a Storybook story with instructions and an optional title.
|
|
6
|
+
* This decorator creates a container that displays instructions above the story component.
|
|
7
|
+
*
|
|
8
|
+
* @param {React.ReactNode} [instructions] - Optional instructions to display above the story
|
|
9
|
+
* @param {string} [title] - Optional title for the instructions section. Defaults to "Story Instructions"
|
|
10
|
+
* @returns {Function} A decorator function that wraps the story component
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* export const MyStory = Template.bind({});
|
|
15
|
+
* MyStory.decorators = [
|
|
16
|
+
* WithInstructions(
|
|
17
|
+
* <p>Follow these steps to interact with the component...</p>,
|
|
18
|
+
* "Usage Instructions"
|
|
19
|
+
* )
|
|
20
|
+
* ];
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export const WithInstructions =
|
|
24
|
+
(instructions?: React.ReactNode, title?: string) => (Story: StoryFn) => {
|
|
25
|
+
return (
|
|
26
|
+
<UI
|
|
27
|
+
style={{
|
|
28
|
+
paddingBlock: "2rem",
|
|
29
|
+
display: "flex",
|
|
30
|
+
flexDirection: "column",
|
|
31
|
+
gap: "3rem",
|
|
32
|
+
width: "max(320px, 90%)",
|
|
33
|
+
}}
|
|
34
|
+
>
|
|
35
|
+
<Story />
|
|
36
|
+
<div style={{ paddingInline: "1rem" }}>
|
|
37
|
+
<h3>{title || "Story Instructions"}</h3>
|
|
38
|
+
{instructions}
|
|
39
|
+
</div>
|
|
40
|
+
</UI>
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export default WithInstructions;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { useCallback, RefObject } from "react";
|
|
2
|
+
|
|
3
|
+
export const useDialogClickHandler = (
|
|
4
|
+
dialogRef: RefObject<HTMLDialogElement>,
|
|
5
|
+
handleClose: () => void
|
|
6
|
+
) => {
|
|
7
|
+
const handleClick = useCallback(
|
|
8
|
+
(e: React.MouseEvent<HTMLDialogElement>) => {
|
|
9
|
+
const dialogDimensions = dialogRef.current?.getBoundingClientRect();
|
|
10
|
+
if (dialogDimensions) {
|
|
11
|
+
const isClickOutside =
|
|
12
|
+
e.clientY < dialogDimensions.top ||
|
|
13
|
+
e.clientY > dialogDimensions.bottom ||
|
|
14
|
+
e.clientX < dialogDimensions.left ||
|
|
15
|
+
e.clientX > dialogDimensions.right;
|
|
16
|
+
|
|
17
|
+
if (isClickOutside) {
|
|
18
|
+
handleClose();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
[dialogRef, handleClose]
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
return handleClick;
|
|
26
|
+
};
|
package/src/index.scss
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
3
|
-
@
|
|
4
|
-
@
|
|
5
|
-
@
|
|
6
|
-
@
|
|
7
|
-
@
|
|
8
|
-
@
|
|
9
|
-
@
|
|
10
|
-
@
|
|
11
|
-
@
|
|
12
|
-
@
|
|
13
|
-
@
|
|
14
|
-
@
|
|
15
|
-
@
|
|
16
|
-
@
|
|
17
|
-
@
|
|
18
|
-
@
|
|
19
|
-
@
|
|
20
|
-
@
|
|
21
|
-
@
|
|
22
|
-
@
|
|
1
|
+
@use "./sass/reset";
|
|
2
|
+
@use "./sass/layout";
|
|
3
|
+
@use "./sass/type";
|
|
4
|
+
@use "./sass/properties";
|
|
5
|
+
@use "./sass/globals";
|
|
6
|
+
@use "./sass/elements";
|
|
7
|
+
@use "./components/buttons/button.scss";
|
|
8
|
+
@use "./components/tag/tag.scss";
|
|
9
|
+
@use "./components/images/img.scss";
|
|
10
|
+
@use "./components/cards/card.scss";
|
|
11
|
+
@use "./components/progress/progress.scss";
|
|
12
|
+
@use "./components/details/details.scss";
|
|
13
|
+
@use "./components/link/link.scss";
|
|
14
|
+
@use "./components/layout/landmarks.scss";
|
|
15
|
+
@use "./components/dialog/dialog.scss";
|
|
16
|
+
@use "./sass/_grid.scss";
|
|
17
|
+
@use "./components/badge/badge.scss";
|
|
18
|
+
@use "./components/nav/nav.scss";
|
|
19
|
+
@use "./components/form/form.scss";
|
|
20
|
+
@use "./components/breadcrumbs/breadcrumb.scss";
|
|
21
|
+
@use "./components/alert/alert.scss";
|
|
22
|
+
@use "./components/text-to-speech/text-to-speech.scss";
|
|
23
|
+
@use "./sass/styles";
|
package/src/sass/_globals.scss
CHANGED
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
--TRUE: initial;
|
|
6
6
|
--FALSE: ;
|
|
7
7
|
--fs-weight: 500;
|
|
8
|
+
--min-w: 20rem;
|
|
9
|
+
--border-radius: 0.25rem;
|
|
10
|
+
--padding: 1.5rem;
|
|
8
11
|
}
|
|
9
12
|
|
|
10
13
|
html {
|
|
@@ -46,6 +49,9 @@ body {
|
|
|
46
49
|
* + ul,
|
|
47
50
|
* + section {
|
|
48
51
|
margin-block-start: 1rem;
|
|
52
|
+
&:empty {
|
|
53
|
+
display: none;
|
|
54
|
+
}
|
|
49
55
|
}
|
|
50
56
|
|
|
51
57
|
main,
|
|
@@ -87,7 +93,7 @@ ol {
|
|
|
87
93
|
flex-direction: var(--li-direction, column);
|
|
88
94
|
gap: var(--li-gap, 0.2rem);
|
|
89
95
|
flex-wrap: var(--li-wrap, nowrap);
|
|
90
|
-
padding-inline-start: var(--li-ps, var(--spc-
|
|
96
|
+
padding-inline-start: var(--li-ps, var(--spc-3));
|
|
91
97
|
&[role="list"],
|
|
92
98
|
&[data-list~="unstyled"] {
|
|
93
99
|
list-style: var(--li-style, none);
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
[role=alert] {
|
|
2
|
+
/* Success colors */
|
|
3
|
+
--alert-success-bg: #e6f4ea;
|
|
4
|
+
--alert-success-border: #34a853;
|
|
5
|
+
--alert-success-text: #1e4620;
|
|
6
|
+
/* Error colors */
|
|
7
|
+
--alert-error-bg: #fdeded;
|
|
8
|
+
--alert-error-border: #d32f2f;
|
|
9
|
+
--alert-error-text: #5f2120;
|
|
10
|
+
/* Warning colors */
|
|
11
|
+
--alert-warning-bg: #fff4e5;
|
|
12
|
+
--alert-warning-border: #ff9800;
|
|
13
|
+
--alert-warning-text: #663c00;
|
|
14
|
+
/* Info colors */
|
|
15
|
+
--alert-info-bg: #e5f6fd;
|
|
16
|
+
--alert-info-border: #0288d1;
|
|
17
|
+
--alert-info-text: #084154;
|
|
18
|
+
--alert-border: thin solid currentColor;
|
|
19
|
+
background-color: var(--alert-bg, whitesmoke);
|
|
20
|
+
border: var(--alert-border, currentColor);
|
|
21
|
+
color: var(--alert-color, currentColor);
|
|
22
|
+
padding: var(--alert-padding, var(--spc-4));
|
|
23
|
+
margin-block-end: var(--alert-margin-block-end);
|
|
24
|
+
font-size: var(--fs-0);
|
|
25
|
+
line-height: 1.6;
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: row;
|
|
28
|
+
border-radius: var(--alert-border-radius, var(--border-radius));
|
|
29
|
+
border: var(--alert-border);
|
|
30
|
+
gap: var(--alert-gap, var(--spc-4));
|
|
31
|
+
}
|
|
32
|
+
[role=alert] div {
|
|
33
|
+
margin-block-start: 0;
|
|
34
|
+
align-items: center;
|
|
35
|
+
}
|
|
36
|
+
[role=alert] .alert-message {
|
|
37
|
+
flex: 2;
|
|
38
|
+
margin-block-start: 0;
|
|
39
|
+
}
|
|
40
|
+
[role=alert] .alert-message h3 {
|
|
41
|
+
margin-block-end: 0;
|
|
42
|
+
}
|
|
43
|
+
[role=alert][data-alert~=info] {
|
|
44
|
+
--alert-bg: var(--alert-info-bg);
|
|
45
|
+
--alert-color: var(--alert-info-text);
|
|
46
|
+
border-color: var(--alert-info-border);
|
|
47
|
+
}
|
|
48
|
+
[role=alert][data-alert~=warning] {
|
|
49
|
+
--alert-bg: var(--alert-warning-bg);
|
|
50
|
+
--alert-color: var(--alert-warning-text);
|
|
51
|
+
border-color: var(--alert-warning-border);
|
|
52
|
+
}
|
|
53
|
+
[role=alert][data-alert~=error] {
|
|
54
|
+
--alert-bg: var(--alert-error-bg);
|
|
55
|
+
--alert-color: var(--alert-error-text);
|
|
56
|
+
border-color: var(--alert-error-border);
|
|
57
|
+
}
|
|
58
|
+
[role=alert][data-alert~=success] {
|
|
59
|
+
--alert-bg: var(--alert-success-bg);
|
|
60
|
+
--alert-color: var(--alert-success-text);
|
|
61
|
+
border-color: var(--alert-success-border);
|
|
62
|
+
}
|
|
63
|
+
[role=alert] button[data-btn~=icon] {
|
|
64
|
+
--btn-bg: transparent;
|
|
65
|
+
max-height: fit-content;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/*# sourceMappingURL=alert.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../components/alert/alert.scss"],"names":[],"mappings":"AAAA;AACE;EACA;EACA;EACA;AAEA;EACA;EACA;EACA;AAEA;EACA;EACA;EACA;AAEA;EACA;EACA;EACA;EAEA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;;AACA;EACE;EACA;;AAGF;EACE;EACA;;AACA;EACE;;AAIJ;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAIA;EACE;EACA","file":"alert.css"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
sup:has(> span) {
|
|
2
2
|
--badge-bg: lightgray;
|
|
3
3
|
--badge-color: currentColor;
|
|
4
|
-
--badge-radius: 0.
|
|
5
|
-
--badge-padding: 0.
|
|
4
|
+
--badge-radius: 0.5rem;
|
|
5
|
+
--badge-padding: 0.3rem;
|
|
6
6
|
--badge-v-align: 0.5rem;
|
|
7
|
-
--badge-fs:
|
|
7
|
+
--badge-fs: var(--fs-1);
|
|
8
8
|
background-color: var(--badge-bg);
|
|
9
9
|
color: var(--badge-color);
|
|
10
10
|
padding: var(--badge-padding);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../components/buttons/button.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EAEE;EACA;;AAGF;EAEE;;AAGA;EACE;;AAOJ;EAEE;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAIJ;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EAGE;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA","file":"button.css"}
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../components/buttons/button.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EAEE;EACA;;AAGF;EAEE;;AAGA;EACE;;AAOJ;EAEE;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAIJ;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EAGE;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA","file":"button.css"}
|
|
@@ -8,7 +8,7 @@ details {
|
|
|
8
8
|
--details-gap: 0rem;
|
|
9
9
|
--details-px: 1.5rem;
|
|
10
10
|
--details-py: 1rem;
|
|
11
|
-
--details-radius:
|
|
11
|
+
--details-radius: var(--border-radius);
|
|
12
12
|
--summary-cursor: pointer;
|
|
13
13
|
--summary-transitions: all 0.75s ease-in-out;
|
|
14
14
|
--summary-display: flex;
|
|
@@ -29,6 +29,19 @@ details {
|
|
|
29
29
|
overflow: clip;
|
|
30
30
|
border-radius: var(--details-radius);
|
|
31
31
|
}
|
|
32
|
+
details + details {
|
|
33
|
+
border-radius: 0;
|
|
34
|
+
border-top: none;
|
|
35
|
+
}
|
|
36
|
+
details:first-of-type {
|
|
37
|
+
border-radius: var(--details-radius) var(--details-radius) 0 0;
|
|
38
|
+
}
|
|
39
|
+
details:last-of-type {
|
|
40
|
+
border-radius: 0 0 var(--details-radius) var(--details-radius);
|
|
41
|
+
}
|
|
42
|
+
details:only-of-type {
|
|
43
|
+
border-radius: var(--details-radius);
|
|
44
|
+
}
|
|
32
45
|
details::marker {
|
|
33
46
|
content: none;
|
|
34
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../components/details/details.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../components/details/details.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGA;EACE;EACA;;AAGF;EACE;;AAGF;EACE;;AAIF;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAYA;;AAVA;EACE;;AAGF;EACE;EACA;EACA;;AAIF;EACE;;AAEF;EACE;;AAIJ;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;;AACA;EACE;;AAEF;EACE","file":"details.css"}
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--dialog-min-w:
|
|
3
|
-
--dialog-gap: 0.
|
|
2
|
+
--dialog-min-w: max(20rem, 80%);
|
|
3
|
+
--dialog-gap: 0.625rem;
|
|
4
4
|
--dialog-border-color: lightgray;
|
|
5
|
-
--dialog-border-
|
|
6
|
-
--dialog-
|
|
5
|
+
--dialog-border-width: thin;
|
|
6
|
+
--dialog-border-style: solid;
|
|
7
|
+
--dialog-border-radius: var(--border-radius);
|
|
8
|
+
--dialog-padding: 1.5rem;
|
|
7
9
|
--dialog-padding-inline: 1rem;
|
|
8
10
|
--dialog-close-color: gray;
|
|
9
11
|
--dialog-button-bg: transparent;
|
|
10
|
-
--dialog-button-border: transparent
|
|
12
|
+
--dialog-button-border: transparent thin solid;
|
|
11
13
|
--dialog-button-hover-bg: whitesmoke;
|
|
12
14
|
--dialog-display: flex;
|
|
13
15
|
--dialog-flex-direction: column;
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
dialog {
|
|
17
|
-
|
|
19
|
+
width: var(--dialog-min-w);
|
|
20
|
+
min-width: var(--min-w);
|
|
18
21
|
gap: var(--dialog-gap);
|
|
19
|
-
border
|
|
22
|
+
border: var(--dialog-border-color) var(--dialog-border-width) solid;
|
|
20
23
|
border-radius: var(--dialog-border-radius);
|
|
21
24
|
padding: var(--dialog-padding);
|
|
22
|
-
padding-inline: var(--dialog-padding-inline);
|
|
23
25
|
padding-block-start: calc(var(--dialog-padding) - 0rem);
|
|
24
26
|
}
|
|
25
27
|
dialog[open] {
|
|
@@ -27,13 +29,22 @@ dialog[open] {
|
|
|
27
29
|
flex-direction: var(--dialog-flex-direction);
|
|
28
30
|
gap: var(--dialog-gap);
|
|
29
31
|
}
|
|
32
|
+
dialog section {
|
|
33
|
+
width: 100%;
|
|
34
|
+
display: flex;
|
|
35
|
+
justify-content: start;
|
|
36
|
+
gap: var(--dialog-gap);
|
|
37
|
+
flex-direction: var(--dialog-flex-direction);
|
|
38
|
+
margin-block-start: 0;
|
|
39
|
+
--sect-y: 0;
|
|
40
|
+
}
|
|
30
41
|
|
|
31
42
|
.dialog-header {
|
|
32
43
|
display: flex;
|
|
33
44
|
justify-content: space-between;
|
|
34
45
|
align-items: center;
|
|
35
46
|
width: 100%;
|
|
36
|
-
min-width:
|
|
47
|
+
min-width: 100%;
|
|
37
48
|
}
|
|
38
49
|
.dialog-header h3 {
|
|
39
50
|
margin-block-start: 0;
|
|
@@ -48,14 +59,18 @@ dialog[open] {
|
|
|
48
59
|
cursor: pointer;
|
|
49
60
|
}
|
|
50
61
|
.dialog-header button[type=button]:hover, .dialog-header button[type=button]:focus {
|
|
51
|
-
border-color:
|
|
62
|
+
border-color: var(--dialog-close-color);
|
|
52
63
|
background-color: var(--dialog-button-hover-bg);
|
|
53
64
|
}
|
|
54
65
|
|
|
55
|
-
.alert-dialog-actions
|
|
66
|
+
.alert-dialog-actions,
|
|
67
|
+
.dialog-footer {
|
|
56
68
|
display: flex;
|
|
57
|
-
|
|
58
|
-
|
|
69
|
+
flex-direction: row;
|
|
70
|
+
flex-wrap: wrap;
|
|
71
|
+
justify-content: var(--dialog-footer-justify, flex-end);
|
|
72
|
+
gap: var(--dialog-gap);
|
|
73
|
+
width: 100%;
|
|
59
74
|
}
|
|
60
75
|
|
|
61
76
|
/*# sourceMappingURL=dialog.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../components/dialog/dialog.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;;AAIJ;EACE;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;;AAEF;EACE;;AAEF;EACE;EACA;EACA;;AACA;EAEE;EACA;;;AAKN;
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../components/dialog/dialog.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAIJ;EACE;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;;AAEF;EACE;;AAEF;EACE;EACA;EACA;;AACA;EAEE;EACA;;;AAKN;AAAA;EAEE;EACA;EACA;EACA;EACA;EACA","file":"dialog.css"}
|