@fpkit/acss 0.5.4 → 0.5.6
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-2f29127c.d.ts → icons-31ace3de.d.ts} +87 -81
- 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 +42 -42
- package/libs/index.cjs.map +1 -1
- package/libs/index.d.cts +59 -29
- package/libs/index.d.ts +59 -29
- 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 +132 -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/badge/badge.stories.tsx +21 -23
- package/src/components/breadcrumbs/breadcrumb.scss +2 -2
- package/src/components/breadcrumbs/breadcrumb.stories.tsx +42 -47
- package/src/components/buttons/button.scss +41 -15
- package/src/components/buttons/button.stories.tsx +8 -1
- package/src/components/buttons/button.test.tsx +72 -72
- package/src/components/cards/card.stories.tsx +15 -15
- package/src/components/details/details.scss +26 -6
- package/src/components/details/details.stories.tsx +33 -30
- package/src/components/details/details.tsx +17 -17
- 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 +76 -0
- package/src/components/dialog/dialog.stories.tsx +116 -0
- package/src/components/dialog/dialog.tsx +128 -0
- 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/views/dialog-header.stories.tsx +42 -0
- package/src/components/dialog/views/dialog-header.tsx +61 -0
- package/src/components/form/form.stories.tsx +16 -16
- package/src/components/form/input.stories.tsx +62 -62
- package/src/components/form/select.stories.tsx +22 -15
- package/src/components/heading/heading.stories.tsx +32 -33
- package/src/components/heading/heading.tsx +1 -1
- 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/svg.tsx +0 -1
- package/src/components/icons/components/warn-solid.tsx +36 -0
- package/src/components/icons/icon.scss +1 -3
- package/src/components/icons/icon.stories.tsx +87 -78
- package/src/components/icons/icon.tsx +57 -52
- package/src/components/icons/index.ts +36 -29
- package/src/components/icons/types.ts +1 -1
- package/src/components/images/figure.stories.tsx +13 -13
- package/src/components/images/img.stories.tsx +12 -12
- package/src/components/link/link.stories.tsx +32 -35
- package/src/components/link/link.tsx +27 -14
- package/src/components/list/list.stories.tsx +16 -16
- package/src/components/modal/dialog.tsx +13 -12
- package/src/components/modal/modal.tsx +28 -30
- package/src/components/nav/nav.stories.tsx +25 -24
- package/src/components/popover/popover.stories.tsx +17 -18
- package/src/components/progress/progress.stories.tsx +14 -20
- package/src/components/tag/tag.stories.tsx +17 -18
- package/src/components/text/text.stories.tsx +28 -29
- package/src/components/text-to-speech/TextToSpeech.stories.tsx +100 -101
- 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/index.ts +31 -30
- package/src/patterns/page/page-header.stories.tsx +17 -21
- package/src/sass/_globals.scss +14 -32
- package/src/sass/_styles.scss +2 -1
- package/src/sass/styles/_colors.scss +13 -0
- 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/breadcrumbs/breadcrumb.css +1 -1
- package/src/styles/buttons/button.css +25 -2
- package/src/styles/buttons/button.css.map +1 -1
- package/src/styles/details/details.css +19 -4
- package/src/styles/details/details.css.map +1 -1
- package/src/styles/dialog/dialog.css +76 -0
- package/src/styles/dialog/dialog.css.map +1 -0
- package/src/styles/icons/icon.css +1 -3
- package/src/styles/icons/icon.css.map +1 -1
- package/src/styles/index.css +213 -60
- package/src/styles/index.css.map +1 -1
- package/libs/chunk-TBM2QIVT.js +0 -8
- package/libs/chunk-TBM2QIVT.js.map +0 -1
- package/libs/chunk-VAH6X2DZ.cjs +0 -31
- package/libs/chunk-VAH6X2DZ.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/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/readme.stories.mdx +0 -7
|
@@ -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/index.ts
CHANGED
|
@@ -1,35 +1,36 @@
|
|
|
1
|
-
import { TextToSpeech } from
|
|
1
|
+
// import { TextToSpeech } from "./components/text-to-speech/TextToSpeech";
|
|
2
2
|
// import { Popover } from './hooks/popover/popover'
|
|
3
3
|
// export { Textarea } from './components/form/textarea';
|
|
4
|
+
// export { ModalDialog as Dialog } from "./components/modal/dialog";
|
|
4
5
|
|
|
5
|
-
export { Button } from
|
|
6
|
-
export { Card } from
|
|
7
|
-
export {
|
|
8
|
-
export
|
|
9
|
-
export * from
|
|
10
|
-
export
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export {
|
|
19
|
-
export
|
|
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
|
|
29
|
-
export { TextToSpeech } from
|
|
6
|
+
export { Button } from "./components/buttons/button";
|
|
7
|
+
export { Card } from "./components/cards/card";
|
|
8
|
+
export { Field } from "./components/form/fields";
|
|
9
|
+
export * from "./components/layout/landmarks";
|
|
10
|
+
export * from "./components/layout/landmarks";
|
|
11
|
+
export { Icon } from "./components/icons/icon";
|
|
12
|
+
export { Img } from "./components/images/img";
|
|
13
|
+
export { Input } from "./components/form/inputs";
|
|
14
|
+
export { Link } from "./components/link/link";
|
|
15
|
+
export { List } from "./components/list/list";
|
|
16
|
+
export { Modal } from "./components/modal/modal";
|
|
17
|
+
export * from "./components/nav/nav";
|
|
18
|
+
export { Popover } from "./components/popover/popover";
|
|
19
|
+
export { RenderTable as TBL } from "./components/tables/table";
|
|
20
|
+
export * from "./components/tag/tag";
|
|
21
|
+
export * from "./components/tables/table-elements";
|
|
22
|
+
export * from "./components/details/details";
|
|
23
|
+
export * from "./components/text/text";
|
|
24
|
+
export * from "./components/form/textarea";
|
|
25
|
+
export * from "./components/nav/nav";
|
|
26
|
+
export * from "./components/heading/heading";
|
|
27
|
+
export * from "./components/breadcrumbs/breadcrumb";
|
|
28
|
+
export * from "./components/text-to-speech/TextToSpeech";
|
|
29
|
+
export { Dialog } from "./components/dialog/dialog";
|
|
30
|
+
export { TextToSpeech } from "./components/text-to-speech/TextToSpeech";
|
|
30
31
|
|
|
31
|
-
export { default as To } from
|
|
32
|
-
export { default as FP } from
|
|
33
|
-
export { default as Box } from
|
|
32
|
+
export { default as To } from "./components/link/link";
|
|
33
|
+
export { default as FP } from "./components/fp";
|
|
34
|
+
export { default as Box } from "./components/fp";
|
|
34
35
|
|
|
35
|
-
export * from
|
|
36
|
+
export * from "./components/ui";
|
|
@@ -1,44 +1,40 @@
|
|
|
1
|
-
import { StoryObj, Meta } from
|
|
2
|
-
import { within, userEvent, screen } from
|
|
1
|
+
import { StoryObj, Meta } from "@storybook/react";
|
|
2
|
+
// import { within, userEvent, screen } from "@storybook/test";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
import { Img } from '#components/images/img'
|
|
4
|
+
import PageHeader, { HeaderVariants } from "./page-header.js";
|
|
5
|
+
import { Img } from "#components/images/img";
|
|
7
6
|
|
|
8
7
|
const meta: Meta<typeof PageHeader> = {
|
|
9
|
-
title:
|
|
8
|
+
title: "FP.React Patterns/PageHeader",
|
|
10
9
|
component: PageHeader,
|
|
10
|
+
tags: ["alpha"],
|
|
11
11
|
args: {
|
|
12
|
-
headerTitle:
|
|
13
|
-
headerSubtitle:
|
|
12
|
+
headerTitle: "Page Header",
|
|
13
|
+
headerSubtitle: "Place your cool elevator pitch here...",
|
|
14
14
|
headerBackground: <Img src="https://picsum.photos/2400/600" alt="" />,
|
|
15
15
|
},
|
|
16
|
-
} as Meta
|
|
16
|
+
} as Meta;
|
|
17
17
|
|
|
18
|
-
export default meta
|
|
19
|
-
type Story = StoryObj<typeof PageHeader
|
|
18
|
+
export default meta;
|
|
19
|
+
type Story = StoryObj<typeof PageHeader>;
|
|
20
20
|
|
|
21
21
|
export const PageHeaderComponent: Story = {
|
|
22
22
|
args: {},
|
|
23
|
-
name:
|
|
24
|
-
|
|
25
|
-
const canvas = within(canvasElement)
|
|
26
|
-
//expect(canvas).toBeInTheDocument()
|
|
27
|
-
},
|
|
28
|
-
}
|
|
23
|
+
name: "Page Header",
|
|
24
|
+
};
|
|
29
25
|
|
|
30
26
|
export const Cover: Story = {
|
|
31
27
|
args: {
|
|
32
28
|
...PageHeaderComponent.args,
|
|
33
29
|
variant: HeaderVariants.Cover,
|
|
34
30
|
},
|
|
35
|
-
name:
|
|
36
|
-
} as Story
|
|
31
|
+
name: "Cover Style",
|
|
32
|
+
} as Story;
|
|
37
33
|
|
|
38
34
|
export const Banner: Story = {
|
|
39
35
|
args: {
|
|
40
36
|
...PageHeaderComponent.args,
|
|
41
37
|
variant: HeaderVariants.Banner,
|
|
42
38
|
},
|
|
43
|
-
name:
|
|
44
|
-
} as Story
|
|
39
|
+
name: "Banner Style",
|
|
40
|
+
} as Story;
|
package/src/sass/_globals.scss
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--font-family: -apple-system, BlinkMacSystemFont,
|
|
3
|
-
Arial,
|
|
4
|
-
|
|
2
|
+
--font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
|
|
3
|
+
Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
|
|
4
|
+
"Segoe UI Symbol", "Noto Color Emoji";
|
|
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 {
|
|
@@ -23,7 +26,7 @@ body {
|
|
|
23
26
|
flex-grow: 1;
|
|
24
27
|
}
|
|
25
28
|
|
|
26
|
-
> a[href^=
|
|
29
|
+
> a[href^="#"] {
|
|
27
30
|
position: absolute;
|
|
28
31
|
top: -4rem;
|
|
29
32
|
left: 0;
|
|
@@ -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,14 +93,14 @@ 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-
|
|
91
|
-
&[role=
|
|
92
|
-
&[data-list~=
|
|
96
|
+
padding-inline-start: var(--li-ps, var(--spc-3));
|
|
97
|
+
&[role="list"],
|
|
98
|
+
&[data-list~="unstyled"] {
|
|
93
99
|
list-style: var(--li-style, none);
|
|
94
100
|
margin-block-end: var(--li-my, 0);
|
|
95
101
|
margin-block-start: var(--li-mx, 0);
|
|
96
102
|
}
|
|
97
|
-
&[data-list~=
|
|
103
|
+
&[data-list~="inline"] {
|
|
98
104
|
--li-direction: row;
|
|
99
105
|
--li-gap: 1rem;
|
|
100
106
|
--li-wrap: wrap;
|
|
@@ -129,30 +135,6 @@ h6 {
|
|
|
129
135
|
line-height: 1.2;
|
|
130
136
|
}
|
|
131
137
|
|
|
132
|
-
h1 {
|
|
133
|
-
font-size: var(--h1, var(--fs-6));
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
h2 {
|
|
137
|
-
font-size: var(--h2, var(--fs-5));
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
h3 {
|
|
141
|
-
font-size: var(--h3, var(--fs-4));
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
h4 {
|
|
145
|
-
font-size: var(--h4, var(--fs-3));
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
h5 {
|
|
149
|
-
font-size: var(--h5, var(--fs-2));
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
h6 {
|
|
153
|
-
font-size: var(--h6, var(--fs-1));
|
|
154
|
-
}
|
|
155
|
-
|
|
156
138
|
hr {
|
|
157
139
|
--hr-h: 0.0625rem;
|
|
158
140
|
--hr-color: lightgray;
|
package/src/sass/_styles.scss
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
@use
|
|
1
|
+
@use "./styles/shadows";
|
|
2
|
+
@use "./styles/colors";
|
|
@@ -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,6 +1,7 @@
|
|
|
1
1
|
button {
|
|
2
|
-
--btn-
|
|
3
|
-
--btn-
|
|
2
|
+
--btn-xs: 0.6rem;
|
|
3
|
+
--btn-sm: 0.7rem;
|
|
4
|
+
--btn-md: 0.85rem;
|
|
4
5
|
--btn-lg: calc(21rem / 16);
|
|
5
6
|
--btn-pill: 100rem;
|
|
6
7
|
--btn-height: 2.5rem;
|
|
@@ -27,6 +28,9 @@ button {
|
|
|
27
28
|
background-color: var(--btn-bg, var(--btn));
|
|
28
29
|
outline: none;
|
|
29
30
|
width: var(--btn-width);
|
|
31
|
+
display: inline-flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
line-height: 0cap;
|
|
30
34
|
}
|
|
31
35
|
button[type] {
|
|
32
36
|
background-color: var(--btn-bg, var(--neutral-300));
|
|
@@ -66,14 +70,33 @@ button[type=submit] {
|
|
|
66
70
|
button[data-fp-btn~=pill], button[data-btn~=pill], button[data-style~=pill] {
|
|
67
71
|
border-radius: var(--btn-pill, 100rem);
|
|
68
72
|
}
|
|
73
|
+
button[data-btn~=xs] {
|
|
74
|
+
padding-inline: var(--btn-xs);
|
|
75
|
+
--btn-fs: var(--btn-xs);
|
|
76
|
+
--btn-height: 1.5rem;
|
|
77
|
+
text-transform: uppercase;
|
|
78
|
+
}
|
|
69
79
|
button[data-btn~=sm] {
|
|
70
80
|
--btn-fs: var(--btn-sm);
|
|
81
|
+
--btn-height: 1.75rem;
|
|
71
82
|
}
|
|
72
83
|
button[data-btn~=md] {
|
|
73
84
|
--btn-fs: var(--btn-md);
|
|
85
|
+
--btn-height: 2rem;
|
|
74
86
|
}
|
|
75
87
|
button[data-btn~=lg] {
|
|
76
88
|
--btn-fs: var(--btn-lg);
|
|
89
|
+
--btn-height: 2.5rem;
|
|
90
|
+
}
|
|
91
|
+
button[data-btn~=icon] {
|
|
92
|
+
padding: unset;
|
|
93
|
+
height: unset;
|
|
94
|
+
min-width: 1.5rem;
|
|
95
|
+
min-height: 1.5rem;
|
|
96
|
+
text-align: center;
|
|
97
|
+
display: inline-flex;
|
|
98
|
+
align-items: center;
|
|
99
|
+
justify-content: center;
|
|
77
100
|
}
|
|
78
101
|
button[data-btn~=text] {
|
|
79
102
|
--btn-bg: transparent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../components/buttons/button.scss"],"names":[],"mappings":"AAAA;EACE;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;;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;;AAGF;EACE;;AAGF;EACE;;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;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA","file":"button.css"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
details {
|
|
2
2
|
--details-w: 100%;
|
|
3
|
-
--details-h:
|
|
3
|
+
--details-h: max-content;
|
|
4
4
|
--details-border: 1px solid #dfdfdf;
|
|
5
5
|
--details-display: flex;
|
|
6
6
|
--details-justify: flex-start;
|
|
@@ -8,15 +8,16 @@ 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
|
-
--summary-transitions: all 0.75s
|
|
13
|
+
--summary-transitions: all 0.75s ease-in-out;
|
|
14
14
|
--summary-display: flex;
|
|
15
15
|
--summary-justify: flex-start;
|
|
16
16
|
--summary-align: center;
|
|
17
17
|
--summary-gap: 0.5rem;
|
|
18
18
|
--max-h-closed: 6.25rem;
|
|
19
19
|
--max-h-open: 50rem;
|
|
20
|
+
interpolate-size: allow-keywords;
|
|
20
21
|
display: var(--details-display);
|
|
21
22
|
flex-direction: var(--details-direction);
|
|
22
23
|
justify-content: var(--details-justify);
|
|
@@ -28,6 +29,19 @@ details {
|
|
|
28
29
|
overflow: clip;
|
|
29
30
|
border-radius: var(--details-radius);
|
|
30
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
|
+
}
|
|
31
45
|
details::marker {
|
|
32
46
|
content: none;
|
|
33
47
|
}
|
|
@@ -41,6 +55,7 @@ details summary {
|
|
|
41
55
|
list-style: none;
|
|
42
56
|
border-top-left-radius: var(--details-radius);
|
|
43
57
|
border-top-right-radius: var(--details-radius);
|
|
58
|
+
transition: var(--summary-transitions);
|
|
44
59
|
/* This ensures no bullet points are shown */
|
|
45
60
|
}
|
|
46
61
|
details summary::-webkit-details-marker {
|
|
@@ -64,7 +79,7 @@ details > section {
|
|
|
64
79
|
border: 1px transparent solid;
|
|
65
80
|
}
|
|
66
81
|
details[open] {
|
|
67
|
-
max-height:
|
|
82
|
+
max-height: max-content;
|
|
68
83
|
transition: var(--summary-transitions);
|
|
69
84
|
}
|
|
70
85
|
details[open] > summary {
|
|
@@ -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;;
|
|
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"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--dialog-min-w: max(20rem, 80%);
|
|
3
|
+
--dialog-gap: 0.625rem;
|
|
4
|
+
--dialog-border-color: lightgray;
|
|
5
|
+
--dialog-border-width: thin;
|
|
6
|
+
--dialog-border-style: solid;
|
|
7
|
+
--dialog-border-radius: var(--border-radius);
|
|
8
|
+
--dialog-padding: 1.5rem;
|
|
9
|
+
--dialog-padding-inline: 1rem;
|
|
10
|
+
--dialog-close-color: gray;
|
|
11
|
+
--dialog-button-bg: transparent;
|
|
12
|
+
--dialog-button-border: transparent thin solid;
|
|
13
|
+
--dialog-button-hover-bg: whitesmoke;
|
|
14
|
+
--dialog-display: flex;
|
|
15
|
+
--dialog-flex-direction: column;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
dialog {
|
|
19
|
+
width: var(--dialog-min-w);
|
|
20
|
+
min-width: var(--min-w);
|
|
21
|
+
gap: var(--dialog-gap);
|
|
22
|
+
border: var(--dialog-border-color) var(--dialog-border-width) solid;
|
|
23
|
+
border-radius: var(--dialog-border-radius);
|
|
24
|
+
padding: var(--dialog-padding);
|
|
25
|
+
padding-block-start: calc(var(--dialog-padding) - 0rem);
|
|
26
|
+
}
|
|
27
|
+
dialog[open] {
|
|
28
|
+
display: var(--dialog-display);
|
|
29
|
+
flex-direction: var(--dialog-flex-direction);
|
|
30
|
+
gap: var(--dialog-gap);
|
|
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
|
+
}
|
|
41
|
+
|
|
42
|
+
.dialog-header {
|
|
43
|
+
display: flex;
|
|
44
|
+
justify-content: space-between;
|
|
45
|
+
align-items: center;
|
|
46
|
+
width: 100%;
|
|
47
|
+
min-width: 100%;
|
|
48
|
+
}
|
|
49
|
+
.dialog-header h3 {
|
|
50
|
+
margin-block-start: 0;
|
|
51
|
+
margin-block-end: 0;
|
|
52
|
+
}
|
|
53
|
+
.dialog-header .dialog-close {
|
|
54
|
+
margin-block-end: 0;
|
|
55
|
+
}
|
|
56
|
+
.dialog-header button[type=button] {
|
|
57
|
+
background-color: var(--dialog-button-bg);
|
|
58
|
+
border: var(--dialog-button-border);
|
|
59
|
+
cursor: pointer;
|
|
60
|
+
}
|
|
61
|
+
.dialog-header button[type=button]:hover, .dialog-header button[type=button]:focus {
|
|
62
|
+
border-color: var(--dialog-close-color);
|
|
63
|
+
background-color: var(--dialog-button-hover-bg);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.alert-dialog-actions,
|
|
67
|
+
.dialog-footer {
|
|
68
|
+
display: flex;
|
|
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%;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/*# sourceMappingURL=dialog.css.map */
|
|
@@ -0,0 +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;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"}
|
|
@@ -5,14 +5,12 @@
|
|
|
5
5
|
--icon-width: max-content;
|
|
6
6
|
--icon-gap: 0.2rem;
|
|
7
7
|
--icon-height: max-content;
|
|
8
|
-
--icon-fs: inherit;
|
|
9
8
|
display: var(--icon-display);
|
|
10
9
|
flex-direction: var(--icon-direction);
|
|
11
10
|
gap: var(--icon-gap);
|
|
12
|
-
|
|
11
|
+
place-items: var(--icons-placement);
|
|
13
12
|
width: var(--icon-width);
|
|
14
13
|
height: var(--icon-height);
|
|
15
|
-
font-size: var(--icon-fs);
|
|
16
14
|
}
|
|
17
15
|
|
|
18
16
|
/*# sourceMappingURL=icon.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../components/icons/icon.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../components/icons/icon.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA","file":"icon.css"}
|