@cityofportland/components-react 1.0.0-alpha.4 → 1.0.0-alpha.5
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/dist/alert/alert.css +1 -1
- package/dist/alert/alert.d.ts +95 -11
- package/dist/alert/alert.es.js +70 -3455
- package/dist/box/box.css +1 -0
- package/dist/box/box.d.ts +89 -51
- package/dist/box/box.es.js +54 -2
- package/dist/button/button.css +1 -1
- package/dist/button/button.d.ts +128 -9
- package/dist/button/button.es.js +32 -26
- package/dist/card/card.css +1 -0
- package/dist/card/card.d.ts +66 -0
- package/dist/card/card.es.js +75 -0
- package/dist/city-seal/city-seal.css +1 -1
- package/dist/city-seal/city-seal.d.ts +39 -18
- package/dist/city-seal/city-seal.es.js +15 -20
- package/dist/footer/footer.d.ts +63 -19
- package/dist/footer/footer.es.js +1 -1
- package/dist/header/header.css +1 -1
- package/dist/header/header.d.ts +85 -19
- package/dist/header/header.es.js +14 -13
- package/dist/icon/icon.css +1 -0
- package/dist/icon/icon.d.ts +31 -0
- package/dist/icon/icon.es.js +31 -0
- package/dist/tag/tag.css +1 -1
- package/dist/tag/tag.d.ts +28 -7
- package/dist/tag/tag.es.js +3 -2
- package/dist/utilities/utilities.css +1 -0
- package/dist/utils-DpTd6iI4.js +7 -0
- package/package.json +5 -4
- package/dist/alert/index.d.ts +0 -1
- package/dist/box/index.d.ts +0 -1
- package/dist/button/index.d.ts +0 -1
- package/dist/city-seal/index.d.ts +0 -1
- package/dist/footer/footer.test.d.ts +0 -1
- package/dist/footer/index.d.ts +0 -1
- package/dist/header/index.d.ts +0 -1
- package/dist/index/index.css +0 -1
- package/dist/index-C4cFhgXK.js +0 -68
- package/dist/tag/index.d.ts +0 -1
- package/dist/utils.d.ts +0 -3
package/dist/box/box.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer components{.box{background-color:var(--box-background-color);color:var(--box-text-color);border-color:var(--box-border-color);outline-color:var(--box-outline-color);--tw-ring-color:var(--box-ring-color);--tw-inset-ring-color:var(--box-ring-color)}.box.box--default.box--subtle{--box-background-color:var(--background-color-standard-default-subtle,#fff);--box-text-color:var(--text-color-standard-default-strong,#070708);--box-border-color:var(--border-color-standard-default-subtle,#dfe1e2);--box-outline-color:var(--outline-color-standard-default-subtle,#dfe1e2);--box-ring-color:var(--ring-color-standard-default-subtle,#dfe1e2)}.box.box--default.box--moderate{--box-background-color:var(--background-color-standard-default-moderate,#f7f9fa);--box-text-color:var(--text-color-standard-default-strong,#070708);--box-border-color:var(--border-color-standard-default-subtle,#dfe1e2);--box-outline-color:var(--outline-color-standard-default-subtle,#dfe1e2);--box-ring-color:var(--ring-color-standard-default-subtle,#dfe1e2)}.box.box--default.box--emphasis{--box-background-color:var(--background-color-standard-default-emphasis,#dfe1e2);--box-text-color:var(--text-color-standard-default-strong,#070708);--box-border-color:var(--border-color-standard-default-emphasis,#71767a);--box-outline-color:var(--outline-color-standard-default-emphasis,#71767a);--box-ring-color:var(--ring-color-standard-default-emphasis,#71767a)}.box.box--default.box--strong{--box-background-color:var(--background-color-standard-default-strong,#a9aeb1);--box-text-color:var(--text-color-standard-default-strong,#070708);--box-border-color:var(--border-color-standard-default-emphasis,#71767a);--box-outline-color:var(--outline-color-standard-default-emphasis,#71767a);--box-ring-color:var(--ring-color-standard-default-emphasis,#71767a)}.box.box--inverse.box--subtle{--box-background-color:var(--background-color-standard-inverse-subtle,#070708);--box-text-color:var(--text-color-standard-inverse-subtle,#fff);--box-border-color:var(--border-color-standard-inverse-subtle,#71767a);--box-outline-color:var(--outline-color-standard-inverse-subtle,#71767a);--box-ring-color:var(--ring-color-standard-inverse-subtle,#71767a)}.box.box--inverse.box--moderate{--box-background-color:var(--background-color-standard-inverse-moderate,#1c1d1f);--box-text-color:var(--text-color-standard-inverse-subtle,#fff);--box-border-color:var(--border-color-standard-inverse-subtle,#71767a);--box-outline-color:var(--outline-color-standard-inverse-subtle,#71767a);--box-ring-color:var(--ring-color-standard-inverse-subtle,#71767a)}.box.box--inverse.box--emphasis{--box-background-color:var(--background-color-standard-inverse-emphasis,#565c65);--box-text-color:var(--text-color-standard-inverse-subtle,#fff);--box-border-color:var(--border-color-standard-inverse-emphasis,#1c1d1f);--box-outline-color:var(--outline-color-standard-inverse-emphasis,#1c1d1f);--box-ring-color:var(--ring-color-standard-inverse-emphasis,#1c1d1f)}.box.box--inverse.box--strong{--box-background-color:var(--background-color-standard-inverse-strong,#a9aeb1);--box-text-color:var(--text-color-standard-default-strong,#070708);--box-border-color:var(--border-color-standard-inverse-emphasis,#1c1d1f);--box-outline-color:var(--outline-color-standard-inverse-emphasis,#1c1d1f);--box-ring-color:var(--ring-color-standard-inverse-emphasis,#1c1d1f)}.box.box--primary.box--subtle{--box-background-color:var(--background-color-primary-subtle,#d9e8f6);--box-text-color:var(--text-color-standard-default-strong,#070708);--box-border-color:var(--border-color-primary-subtle,#aacdec);--box-outline-color:var(--outline-color-primary-subtle,#aacdec);--box-ring-color:var(--ring-color-primary-subtle,#aacdec)}.box.box--primary.box--moderate{--box-background-color:var(--background-color-primary-moderate,#005ea2);--box-text-color:var(--text-color-standard-inverse-subtle,#fff);--box-border-color:var(--border-color-primary-subtle,#aacdec);--box-outline-color:var(--outline-color-primary-subtle,#aacdec);--box-ring-color:var(--ring-color-primary-subtle,#aacdec)}.box.box--primary.box--emphasis{--box-background-color:var(--background-color-primary-emphasis,#274863);--box-text-color:var(--text-color-standard-inverse-subtle,#fff);--box-border-color:var(--border-color-primary-strong,#1f303e);--box-outline-color:var(--outline-color-primary-strong,#1f303e);--box-ring-color:var(--ring-color-primary-strong,#1f303e)}.box.box--primary.box--strong{--box-background-color:var(--background-color-primary-strong,#1f303e);--box-text-color:var(--text-color-standard-inverse-subtle,#fff);--box-border-color:var(--border-color-primary-emphasis,#274863);--box-outline-color:var(--outline-color-primary-emphasis,#274863);--box-ring-color:var(--ring-color-primary-emphasis,#274863)}.box.box--secondary.box--subtle{--box-background-color:var(--background-color-secondary-subtle,#f7f9fa);--box-text-color:var(--text-color-standard-default-strong,#070708);--box-border-color:var(--border-color-secondary-subtle,#a9aeb1);--box-outline-color:var(--outline-color-secondary-subtle,#a9aeb1);--box-ring-color:var(--ring-color-secondary-subtle,#a9aeb1)}.box.box--secondary.box--moderate{--box-background-color:var(--background-color-secondary-moderate,#dfe1e2);--box-text-color:var(--text-color-standard-default-strong,#070708);--box-border-color:var(--border-color-secondary-subtle,#a9aeb1);--box-outline-color:var(--outline-color-secondary-subtle,#a9aeb1);--box-ring-color:var(--ring-color-secondary-subtle,#a9aeb1)}.box.box--secondary.box--emphasis{--box-background-color:var(--background-color-secondary-emphasis,#a9aeb1);--box-text-color:var(--text-color-standard-default-strong,#070708);--box-border-color:var(--border-color-secondary-emphasis,#3d4551);--box-outline-color:var(--outline-color-secondary-emphasis,#3d4551);--box-ring-color:var(--ring-color-secondary-emphasis,#3d4551)}.box.box--secondary.box--strong{--box-background-color:var(--background-color-secondary-strong,#71767a);--box-text-color:var(--text-color-standard-fixed-light,#fff);--box-border-color:var(--border-color-secondary-emphasis,#3d4551);--box-outline-color:var(--outline-color-secondary-emphasis,#3d4551);--box-ring-color:var(--ring-color-secondary-emphasis,#3d4551)}.box.box--success.box--subtle{--box-background-color:var(--background-color-success-subtle,#eaf4dd);--box-text-color:var(--text-color-standard-default-strong,#070708);--box-border-color:var(--border-color-success-subtle,#b8d293);--box-outline-color:var(--outline-color-success-subtle,#b8d293);--box-ring-color:var(--ring-color-success-subtle,#b8d293)}.box.box--success.box--moderate{--box-background-color:var(--background-color-success-moderate,#b8d293);--box-text-color:var(--text-color-standard-fixed-dark,#070708);--box-border-color:var(--border-color-success-moderate,#719f2a);--box-outline-color:var(--outline-color-success-moderate,#719f2a);--box-ring-color:var(--ring-color-success-moderate,#719f2a)}.box.box--success.box--emphasis{--box-background-color:var(--background-color-success-emphasis,#719f2a);--box-text-color:var(--text-color-standard-fixed-dark,#070708);--box-border-color:var(--border-color-success-emphasis,#466c04);--box-outline-color:var(--outline-color-success-emphasis,#466c04);--box-ring-color:var(--ring-color-success-emphasis,#466c04)}.box.box--success.box--strong{--box-background-color:var(--background-color-success-strong,#466c04);--box-text-color:var(--text-color-standard-inverse-subtle,#fff);--box-border-color:var(--border-color-success-strong,#243413);--box-outline-color:var(--outline-color-success-strong,#243413);--box-ring-color:var(--ring-color-success-strong,#243413)}.box.box--danger.box--subtle{--box-background-color:var(--background-color-danger-subtle,#f3e1e4);--box-text-color:var(--text-color-standard-default-strong,#070708);--box-border-color:var(--border-color-danger-subtle,#fd8ba0);--box-outline-color:var(--outline-color-danger-subtle,#fd8ba0);--box-ring-color:var(--ring-color-danger-subtle,#fd8ba0)}.box.box--danger.box--moderate{--box-background-color:var(--background-color-danger-moderate,#fd8ba0);--box-text-color:var(--text-color-standard-default-strong,#070708);--box-border-color:var(--border-color-danger-moderate,#b41d39);--box-outline-color:var(--outline-color-danger-moderate,#b41d39);--box-ring-color:var(--ring-color-danger-moderate,#b41d39)}.box.box--danger.box--emphasis{--box-background-color:var(--background-color-danger-emphasis,#b41d39);--box-text-color:var(--text-color-standard-fixed-light,#fff);--box-border-color:var(--border-color-danger-emphasis,#832133);--box-outline-color:var(--outline-color-danger-emphasis,#832133);--box-ring-color:var(--ring-color-danger-emphasis,#832133)}.box.box--danger.box--strong{--box-background-color:var(--background-color-danger-strong,#4f1c24);--box-text-color:var(--text-color-standard-inverse-subtle,#fff);--box-border-color:var(--border-color-danger-strong,#832133);--box-outline-color:var(--outline-color-danger-strong,#832133);--box-ring-color:var(--ring-color-danger-strong,#832133)}.box.box--warning.box--subtle{--box-background-color:var(--background-color-warning-subtle,#fef0c8);--box-text-color:var(--text-color-standard-default-strong,#070708);--box-border-color:var(--border-color-warning-moderate,#ffbe2e);--box-outline-color:var(--outline-color-warning-moderate,#ffbe2e);--box-ring-color:var(--ring-color-warning-moderate,#ffbe2e)}.box.box--warning.box--moderate{--box-background-color:var(--background-color-warning-moderate,#ffe396);--box-text-color:var(--text-color-standard-fixed-dark,#070708);--box-border-color:var(--border-color-warning-moderate,#ffbe2e);--box-outline-color:var(--outline-color-warning-moderate,#ffbe2e);--box-ring-color:var(--ring-color-warning-moderate,#ffbe2e)}.box.box--warning.box--emphasis{--box-background-color:var(--background-color-warning-emphasis,#ffbe2e);--box-text-color:var(--text-color-standard-fixed-dark,#070708);--box-border-color:var(--border-color-warning-emphasis,#c2850c);--box-outline-color:var(--outline-color-warning-emphasis,#c2850c);--box-ring-color:var(--ring-color-warning-emphasis,#c2850c)}.box.box--warning.box--strong{--box-background-color:var(--background-color-warning-strong,#3b2b15);--box-text-color:var(--text-color-standard-inverse-subtle,#fff);--box-border-color:var(--border-color-warning-strong,#7a591a);--box-outline-color:var(--outline-color-warning-strong,#7a591a);--box-ring-color:var(--ring-color-warning-strong,#7a591a)}.box.box--info.box--subtle{--box-background-color:var(--background-color-info-subtle,#e7f6f8);--box-text-color:var(--text-color-standard-default-strong,#070708);--box-border-color:var(--border-color-info-subtle,#99deea);--box-outline-color:var(--outline-color-info-subtle,#99deea);--box-ring-color:var(--ring-color-info-subtle,#99deea)}.box.box--info.box--moderate{--box-background-color:var(--background-color-info-moderate,#99deea);--box-text-color:var(--text-color-standard-fixed-dark,#070708);--box-border-color:var(--border-color-info-emphasis,#449dac);--box-outline-color:var(--outline-color-info-emphasis,#449dac);--box-ring-color:var(--ring-color-info-emphasis,#449dac)}.box.box--info.box--emphasis{--box-background-color:var(--background-color-info-emphasis,#5dc0d1);--box-text-color:var(--text-color-standard-fixed-dark,#070708);--box-border-color:var(--border-color-info-emphasis,#449dac);--box-outline-color:var(--outline-color-info-emphasis,#449dac);--box-ring-color:var(--ring-color-info-emphasis,#449dac)}.box.box--info.box--strong{--box-background-color:var(--background-color-info-strong,#168092);--box-text-color:var(--text-color-standard-inverse-subtle,#fff);--box-border-color:var(--border-color-info-moderate,#5dc0d1);--box-outline-color:var(--outline-color-info-moderate,#5dc0d1);--box-ring-color:var(--ring-color-info-moderate,#5dc0d1)}.box.box--disabled.box--subtle{--box-background-color:var(--background-color-disabled-subtle,#f7f9fa);--box-text-color:var(--text-color-disabled-strong,#2d2e2f);--box-border-color:var(--border-color-disabled-subtle,#dfe1e2);--box-outline-color:var(--outline-color-disabled-subtle,#dfe1e2);--box-ring-color:var(--ring-color-disabled-subtle,#dfe1e2)}.box.box--disabled.box--moderate{--box-background-color:var(--background-color-disabled-moderate,#dfe1e2);--box-text-color:var(--text-color-disabled-strong,#2d2e2f);--box-border-color:var(--border-color-disabled-moderate,#a9aeb1);--box-outline-color:var(--outline-color-disabled-moderate,#a9aeb1);--box-ring-color:var(--ring-color-disabled-moderate,#a9aeb1)}.box.box--disabled.box--emphasis{--box-background-color:var(--background-color-disabled-emphasis,#a9aeb1);--box-text-color:var(--text-color-disabled-strong,#2d2e2f);--box-border-color:var(--border-color-disabled-emphasis,#8d9297);--box-outline-color:var(--outline-color-disabled-emphasis,#8d9297);--box-ring-color:var(--ring-color-disabled-emphasis,#8d9297)}.box.box--disabled.box--strong{--box-background-color:var(--background-color-disabled-strong,#565c65);--box-text-color:var(--text-color-disabled-subtle,#dfe1e2);--box-border-color:var(--border-color-disabled-emphasis,#8d9297);--box-outline-color:var(--outline-color-disabled-emphasis,#8d9297);--box-ring-color:var(--ring-color-disabled-emphasis,#8d9297)}.box.box--fixed.box--light{--box-background-color:var(--background-color-fixed-light,#fff);--box-text-color:var(--text-color-standard-fixed-dark,#070708);--box-border-color:var(--border-color-fixed-light,#fff);--box-outline-color:var(--outline-color-fixed-light,#fff);--box-ring-color:var(--ring-color-fixed-light,#fff)}.box.box--fixed.box--dark{--box-background-color:var(--background-color-fixed-dark,#070708);--box-text-color:var(--text-color-standard-fixed-light,#fff);--box-border-color:var(--border-color-fixed-dark,#070708);--box-outline-color:var(--outline-color-fixed-dark,#070708);--box-ring-color:var(--ring-color-fixed-dark,#070708)}}
|
package/dist/box/box.d.ts
CHANGED
|
@@ -1,51 +1,89 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
*
|
|
24
|
-
*/
|
|
25
|
-
export
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
*
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
*
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A polymorphic Box component that allows users to customize the element tag
|
|
5
|
+
* and apply design token-based color schemes and variations.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* // Default div with primary color scheme
|
|
9
|
+
* <Box color="primary" variant="subtle">
|
|
10
|
+
* Content here
|
|
11
|
+
* </Box>
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* // As a section element
|
|
15
|
+
* <Box as="section" color="info">
|
|
16
|
+
* Section content
|
|
17
|
+
* </Box>
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* // With generic type for custom components
|
|
21
|
+
* <Box as={MyCustomComponent} color="success" myProp="value">
|
|
22
|
+
* Custom component content
|
|
23
|
+
* </Box>
|
|
24
|
+
*/
|
|
25
|
+
export declare const Box: BoxComponent;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Available color schemes based on design system color tokens
|
|
29
|
+
*/
|
|
30
|
+
declare const BOX_COLORS: readonly ["default", "inverse", "primary", "secondary", "success", "danger", "warning", "info", "fixed", "disabled", "fixed"];
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Available color variations based on design system tokens
|
|
34
|
+
*/
|
|
35
|
+
declare const BOX_VARIANTS: readonly ["subtle", "moderate", "emphasis", "strong", "light", "dark"];
|
|
36
|
+
|
|
37
|
+
declare type BoxColorScheme = (typeof BOX_COLORS)[number];
|
|
38
|
+
|
|
39
|
+
declare type BoxColorVariation = (typeof BOX_VARIANTS)[number];
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Generic Box component type for use with forwardRef
|
|
43
|
+
*/
|
|
44
|
+
export declare type BoxComponent = <E extends default_2.ElementType = DefaultElementType>(props: ReactBoxProps<E> & {
|
|
45
|
+
ref?: default_2.Ref<HTMLElement> | undefined;
|
|
46
|
+
}) => default_2.ReactNode;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Core box properties shared across all framework implementations
|
|
50
|
+
*/
|
|
51
|
+
declare interface BoxProps {
|
|
52
|
+
/**
|
|
53
|
+
* HTML element type to render the Box as. Defaults to 'div'.
|
|
54
|
+
* @default "div"
|
|
55
|
+
*/
|
|
56
|
+
as?: keyof HTMLElementTagNameMap;
|
|
57
|
+
/**
|
|
58
|
+
* Color scheme for background and content colors
|
|
59
|
+
*/
|
|
60
|
+
color?: BoxColorScheme;
|
|
61
|
+
/**
|
|
62
|
+
* Color variation within the chosen color scheme
|
|
63
|
+
*/
|
|
64
|
+
variant?: BoxColorVariation;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Default HTML element type for the Box component
|
|
69
|
+
*/
|
|
70
|
+
declare type DefaultElementType = "div";
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Props that are specific to the React implementation
|
|
74
|
+
*/
|
|
75
|
+
declare type ReactBoxOwnProps<E extends default_2.ElementType = DefaultElementType> = Omit<BoxProps, "as"> & {
|
|
76
|
+
/**
|
|
77
|
+
* The HTML element or React component to render as
|
|
78
|
+
* @default "div"
|
|
79
|
+
*/
|
|
80
|
+
as?: E;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Polymorphic Box props that merge own props with the element's native props
|
|
85
|
+
* Omits props that are defined in our own props to avoid conflicts
|
|
86
|
+
*/
|
|
87
|
+
export declare type ReactBoxProps<E extends default_2.ElementType = DefaultElementType> = ReactBoxOwnProps<E> & Omit<default_2.ComponentPropsWithoutRef<E>, keyof ReactBoxOwnProps<E>>;
|
|
88
|
+
|
|
89
|
+
export { }
|
package/dist/box/box.es.js
CHANGED
|
@@ -1,4 +1,56 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { R as c, j as m } from "../index-IqW719eK.js";
|
|
2
|
+
import { m as x } from "../utils-DpTd6iI4.js";
|
|
3
|
+
const t = [
|
|
4
|
+
"subtle",
|
|
5
|
+
"moderate",
|
|
6
|
+
"emphasis",
|
|
7
|
+
"strong"
|
|
8
|
+
], o = /* @__PURE__ */ new Map([
|
|
9
|
+
["default", t],
|
|
10
|
+
["inverse", t],
|
|
11
|
+
["primary", t],
|
|
12
|
+
["secondary", t],
|
|
13
|
+
["success", t],
|
|
14
|
+
["danger", t],
|
|
15
|
+
["warning", t],
|
|
16
|
+
["info", t],
|
|
17
|
+
["disabled", t],
|
|
18
|
+
["fixed", ["dark", "light"]]
|
|
19
|
+
]), l = (e, s) => {
|
|
20
|
+
const n = [e, s];
|
|
21
|
+
return !e || !s ? [void 0, void 0] : o.has(e) ? o.get(e)?.includes(s) ? n : (console.error(`[Box component] '${s}' is not a valid variant for color '${e}'.`), [void 0, void 0]) : (console.error(`[Box component] '${e}' is not a valid box color.`), [void 0, void 0]);
|
|
22
|
+
};
|
|
23
|
+
function p({
|
|
24
|
+
className: e = "",
|
|
25
|
+
color: s,
|
|
26
|
+
variant: n
|
|
27
|
+
}) {
|
|
28
|
+
const d = ["box"];
|
|
29
|
+
return s && n && d.push(
|
|
30
|
+
s ? `box--${s}` : "",
|
|
31
|
+
n ? `box--${n}` : ""
|
|
32
|
+
), x(...d, e);
|
|
33
|
+
}
|
|
34
|
+
const R = c.forwardRef(
|
|
35
|
+
({ as: e, children: s, color: n, variant: d, className: r, ...u }, f) => {
|
|
36
|
+
const a = e || "div";
|
|
37
|
+
[n, d] = l(n, d);
|
|
38
|
+
const i = p({
|
|
39
|
+
className: r,
|
|
40
|
+
color: n,
|
|
41
|
+
variant: d
|
|
42
|
+
});
|
|
43
|
+
return /* @__PURE__ */ m.jsx(
|
|
44
|
+
a,
|
|
45
|
+
{
|
|
46
|
+
ref: f,
|
|
47
|
+
className: i.length ? i : void 0,
|
|
48
|
+
...u,
|
|
49
|
+
children: s
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
);
|
|
2
54
|
export {
|
|
3
|
-
|
|
55
|
+
R as Box
|
|
4
56
|
};
|
package/dist/button/button.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after{--tw-duration:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid}::backdrop{--tw-duration:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid}}}@layer components{.button{--button-action-factor:.85}@media(prefers-color-scheme:dark){.button{--button-action-factor:1.15}}.button{--button-action-color:oklch(from var(--box-background-color) calc(l * var(--button-action-factor)) calc(c * var(--button-action-factor)) h);justify-content:center;align-items:center;gap:var(--spacing-xs,.5rem);overflow-wrap:anywhere;cursor:pointer;max-width:100%;transition-property:background-color,box-shadow,--tw-ring-offset-color,--tw-ring-offset-width;transition-timing-function:var(--tw-ease,ease);transition-duration:var(--tw-duration,0s);--tw-duration:.2s;--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-offset-color:var(--box-background-color);transition-duration:.2s;display:inline-flex}.button:focus{outline-style:var(--tw-outline-style);outline-width:var(--outline-width-lg,.25rem);outline-offset:var(--outline-offset-2xs,.25rem)}.button:focus-visible{outline-style:var(--tw-outline-style);outline-width:var(--outline-width-lg,.25rem);outline-offset:var(--outline-offset-2xs,.25rem)}.button.button--disabled,.button:disabled{background-color:var(--background-color-disabled-moderate,#dfe1e2);color:var(--text-color-disabled-emphasis,#a9aeb1);cursor:not-allowed}.button:not(:-webkit-any(.button--disabled,:disabled)):active{--tw-ring-offset-width:var(--ring-offset-width-2xs,.25rem);--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-offset-color:var(--button-action-color)}.button:not(:-moz-any(.button--disabled,:disabled)):active{--tw-ring-offset-width:var(--ring-offset-width-2xs,.25rem);--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-offset-color:var(--button-action-color)}.button:not(:is(.button--disabled,:disabled)):active{--tw-ring-offset-width:var(--ring-offset-width-2xs,.25rem);--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-offset-color:var(--button-action-color)}@media(hover:hover){.button:not(:-webkit-any(.button--disabled,:disabled)):hover{--tw-ring-offset-width:var(--ring-offset-width-3xs,.125rem);--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-offset-color:var(--button-action-color)}.button:not(:-moz-any(.button--disabled,:disabled)):hover{--tw-ring-offset-width:var(--ring-offset-width-3xs,.125rem);--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-offset-color:var(--button-action-color)}.button:not(:is(.button--disabled,:disabled)):hover{--tw-ring-offset-width:var(--ring-offset-width-3xs,.125rem);--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-offset-color:var(--button-action-color)}.button:not(:-webkit-any(.button--disabled,:disabled)):hover:active{--tw-ring-offset-width:var(--ring-offset-width-2xs,.25rem);--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.button:not(:-moz-any(.button--disabled,:disabled)):hover:active{--tw-ring-offset-width:var(--ring-offset-width-2xs,.25rem);--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.button:not(:is(.button--disabled,:disabled)):hover:active{--tw-ring-offset-width:var(--ring-offset-width-2xs,.25rem);--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}}.button:not(:-webkit-any(.button--disabled,:disabled)):not(.button--outline){--tw-ring-color:var(--button-action-color)}.button:not(:-moz-any(.button--disabled,:disabled)):not(.button--outline){--tw-ring-color:var(--button-action-color)}.button:not(:is(.button--disabled,:disabled)):not(.button--outline){--tw-ring-color:var(--button-action-color)}.button:not(:-webkit-any(.button--disabled,:disabled)):not(.button--outline):active{background-color:var(--button-action-color)}.button:not(:-moz-any(.button--disabled,:disabled)):not(.button--outline):active{background-color:var(--button-action-color)}.button:not(:is(.button--disabled,:disabled)):not(.button--outline):active{background-color:var(--button-action-color)}@media(hover:hover){.button:not(:-webkit-any(.button--disabled,:disabled)):not(.button--outline):hover,.button:not(:-webkit-any(.button--disabled,:disabled)):not(.button--outline):hover:active{background-color:var(--button-action-color)}.button:not(:-moz-any(.button--disabled,:disabled)):not(.button--outline):hover,.button:not(:-moz-any(.button--disabled,:disabled)):not(.button--outline):hover:active{background-color:var(--button-action-color)}.button:not(:is(.button--disabled,:disabled)):not(.button--outline):hover,.button:not(:is(.button--disabled,:disabled)):not(.button--outline):hover:active{background-color:var(--button-action-color)}}.button.button--outline{color:inherit;--tw-inset-ring-color:var(--box-background-color);--tw-ring-offset-color:var(--box-background-color);background-color:#0000}.button.button--outline:active{--tw-ring-offset-width:var(--ring-offset-width-3xs,.125rem);--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-inset-ring-color:var(--button-action-color)}.button.button--outline.button--disabled,.button.button--outline:disabled{background-color:var(--background-color-disabled-moderate,#dfe1e2);color:var(--text-color-disabled-emphasis,#a9aeb1);cursor:not-allowed}.button.button--outline:not(:-webkit-any(.button--disabled,:disabled)){--tw-inset-ring-shadow:inset 0 0 0 var(--ring-width-md,.125rem) var(--tw-inset-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.button.button--outline:not(:-moz-any(.button--disabled,:disabled)){--tw-inset-ring-shadow:inset 0 0 0 var(--ring-width-md,.125rem) var(--tw-inset-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.button.button--outline:not(:is(.button--disabled,:disabled)){--tw-inset-ring-shadow:inset 0 0 0 var(--ring-width-md,.125rem) var(--tw-inset-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}@media(hover:hover){.button.button--outline:not(:-webkit-any(.button--disabled,:disabled)):hover{--tw-inset-ring-color:var(--button-action-color)}.button.button--outline:not(:-moz-any(.button--disabled,:disabled)):hover{--tw-inset-ring-color:var(--button-action-color)}.button.button--outline:not(:is(.button--disabled,:disabled)):hover{--tw-inset-ring-color:var(--button-action-color)}.button.button--outline:not(:-webkit-any(.button--disabled,:disabled)):hover:active{--tw-ring-offset-width:var(--ring-offset-width-2xs,.25rem);--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.button.button--outline:not(:-moz-any(.button--disabled,:disabled)):hover:active{--tw-ring-offset-width:var(--ring-offset-width-2xs,.25rem);--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.button.button--outline:not(:is(.button--disabled,:disabled)):hover:active{--tw-ring-offset-width:var(--ring-offset-width-2xs,.25rem);--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}}.button.button--3xs{padding-inline:var(--spacing-3xs,.125rem)}.button.button--2xs{padding-inline:var(--spacing-2xs,.25rem)}.button.button--xs{padding-inline:var(--spacing-xs,.5rem);padding-block:var(--spacing-3xs,.125rem)}.button.button--sm{padding-inline:var(--spacing-sm,.75rem);padding-block:var(--spacing-2xs,.25rem)}.button.button--md{padding-inline:var(--spacing-md,1rem);padding-block:var(--spacing-xs,.5rem)}.button.button--lg{padding-inline:var(--spacing-lg,1.25rem);padding-block:var(--spacing-sm,.75rem)}.button.button--xl{padding-inline:var(--spacing-xl,1.5rem);padding-block:var(--spacing-md,1rem)}.button.button--2xl{padding-inline:var(--spacing-2xl,2rem);padding-block:var(--spacing-lg,1.25rem)}.button.button--3xl{padding-inline:var(--spacing-3xl,2.5rem);padding-block:var(--spacing-xl,1.5rem)}.button.button--4xl{padding-inline:var(--spacing-4xl,3.5rem);padding-block:var(--spacing-2xl,2rem)}.button.button--5xl{padding-inline:var(--spacing-5xl,4rem);padding-block:var(--spacing-3xl,2.5rem)}}@property --tw-duration{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}
|
|
1
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after{--tw-duration:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid}::backdrop{--tw-duration:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid}}}@layer components{.button{--button-action-factor:.85}@media(prefers-color-scheme:dark){.button{--button-action-factor:1.15}}.button{--button-action-color:oklch(from var(--box-background-color) calc(l * var(--button-action-factor)) calc(c * var(--button-action-factor)) h);justify-content:center;align-items:center;gap:var(--spacing-xs,.5rem);overflow-wrap:anywhere;vertical-align:bottom;cursor:pointer;max-width:100%;transition-property:background-color,box-shadow,--tw-ring-offset-color,--tw-ring-offset-width;transition-timing-function:var(--tw-ease,ease);transition-duration:var(--tw-duration,0s);--tw-duration:.2s;--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-offset-color:var(--box-background-color);transition-duration:.2s;display:inline-flex}.button:focus{outline-style:var(--tw-outline-style);outline-width:var(--outline-width-lg,.25rem);outline-offset:var(--outline-offset-2xs,.25rem)}.button:focus-visible{outline-style:var(--tw-outline-style);outline-width:var(--outline-width-lg,.25rem);outline-offset:var(--outline-offset-2xs,.25rem)}.button.button--disabled,.button:disabled{background-color:var(--background-color-disabled-moderate,#dfe1e2);color:var(--text-color-disabled-emphasis,#a9aeb1);cursor:not-allowed}.button:not(:-webkit-any(.button--disabled,:disabled)):active{--tw-ring-offset-width:var(--ring-offset-width-2xs,.25rem);--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-offset-color:var(--button-action-color)}.button:not(:-moz-any(.button--disabled,:disabled)):active{--tw-ring-offset-width:var(--ring-offset-width-2xs,.25rem);--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-offset-color:var(--button-action-color)}.button:not(:is(.button--disabled,:disabled)):active{--tw-ring-offset-width:var(--ring-offset-width-2xs,.25rem);--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-offset-color:var(--button-action-color)}@media(hover:hover){.button:not(:-webkit-any(.button--disabled,:disabled)):hover{--tw-ring-offset-width:var(--ring-offset-width-3xs,.125rem);--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-offset-color:var(--button-action-color)}.button:not(:-moz-any(.button--disabled,:disabled)):hover{--tw-ring-offset-width:var(--ring-offset-width-3xs,.125rem);--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-offset-color:var(--button-action-color)}.button:not(:is(.button--disabled,:disabled)):hover{--tw-ring-offset-width:var(--ring-offset-width-3xs,.125rem);--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-offset-color:var(--button-action-color)}.button:not(:-webkit-any(.button--disabled,:disabled)):hover:active{--tw-ring-offset-width:var(--ring-offset-width-2xs,.25rem);--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.button:not(:-moz-any(.button--disabled,:disabled)):hover:active{--tw-ring-offset-width:var(--ring-offset-width-2xs,.25rem);--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.button:not(:is(.button--disabled,:disabled)):hover:active{--tw-ring-offset-width:var(--ring-offset-width-2xs,.25rem);--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}}.button:not(:-webkit-any(.button--disabled,:disabled)):not(.button--outline){--tw-ring-color:var(--button-action-color)}.button:not(:-moz-any(.button--disabled,:disabled)):not(.button--outline){--tw-ring-color:var(--button-action-color)}.button:not(:is(.button--disabled,:disabled)):not(.button--outline){--tw-ring-color:var(--button-action-color)}.button:not(:-webkit-any(.button--disabled,:disabled)):not(.button--outline):active{background-color:var(--button-action-color)}.button:not(:-moz-any(.button--disabled,:disabled)):not(.button--outline):active{background-color:var(--button-action-color)}.button:not(:is(.button--disabled,:disabled)):not(.button--outline):active{background-color:var(--button-action-color)}@media(hover:hover){.button:not(:-webkit-any(.button--disabled,:disabled)):not(.button--outline):hover,.button:not(:-webkit-any(.button--disabled,:disabled)):not(.button--outline):hover:active{background-color:var(--button-action-color)}.button:not(:-moz-any(.button--disabled,:disabled)):not(.button--outline):hover,.button:not(:-moz-any(.button--disabled,:disabled)):not(.button--outline):hover:active{background-color:var(--button-action-color)}.button:not(:is(.button--disabled,:disabled)):not(.button--outline):hover,.button:not(:is(.button--disabled,:disabled)):not(.button--outline):hover:active{background-color:var(--button-action-color)}}.button.button--outline{color:inherit;--tw-inset-ring-color:var(--box-background-color);--tw-ring-offset-color:var(--box-background-color);background-color:#0000}.button.button--outline:active{--tw-ring-offset-width:var(--ring-offset-width-3xs,.125rem);--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-inset-ring-color:var(--button-action-color)}.button.button--outline.button--disabled,.button.button--outline:disabled{background-color:var(--background-color-disabled-moderate,#dfe1e2);color:var(--text-color-disabled-emphasis,#a9aeb1);cursor:not-allowed}.button.button--outline:not(:-webkit-any(.button--disabled,:disabled)){--tw-inset-ring-shadow:inset 0 0 0 var(--ring-width-md,.125rem) var(--tw-inset-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.button.button--outline:not(:-moz-any(.button--disabled,:disabled)){--tw-inset-ring-shadow:inset 0 0 0 var(--ring-width-md,.125rem) var(--tw-inset-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.button.button--outline:not(:is(.button--disabled,:disabled)){--tw-inset-ring-shadow:inset 0 0 0 var(--ring-width-md,.125rem) var(--tw-inset-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}@media(hover:hover){.button.button--outline:not(:-webkit-any(.button--disabled,:disabled)):hover{--tw-inset-ring-color:var(--button-action-color)}.button.button--outline:not(:-moz-any(.button--disabled,:disabled)):hover{--tw-inset-ring-color:var(--button-action-color)}.button.button--outline:not(:is(.button--disabled,:disabled)):hover{--tw-inset-ring-color:var(--button-action-color)}.button.button--outline:not(:-webkit-any(.button--disabled,:disabled)):hover:active{--tw-ring-offset-width:var(--ring-offset-width-2xs,.25rem);--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.button.button--outline:not(:-moz-any(.button--disabled,:disabled)):hover:active{--tw-ring-offset-width:var(--ring-offset-width-2xs,.25rem);--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.button.button--outline:not(:is(.button--disabled,:disabled)):hover:active{--tw-ring-offset-width:var(--ring-offset-width-2xs,.25rem);--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}}.button.button--3xs{padding-inline:var(--spacing-3xs,.125rem)}.button.button--2xs{padding-inline:var(--spacing-2xs,.25rem)}.button.button--xs{padding-inline:var(--spacing-xs,.5rem);padding-block:var(--spacing-3xs,.125rem)}.button.button--sm{padding-inline:var(--spacing-sm,.75rem);padding-block:var(--spacing-2xs,.25rem)}.button.button--md{padding-inline:var(--spacing-md,1rem);padding-block:var(--spacing-xs,.5rem)}.button.button--lg{padding-inline:var(--spacing-lg,1.25rem);padding-block:var(--spacing-sm,.75rem)}.button.button--xl{padding-inline:var(--spacing-xl,1.5rem);padding-block:var(--spacing-md,1rem)}.button.button--2xl{padding-inline:var(--spacing-2xl,2rem);padding-block:var(--spacing-lg,1.25rem)}.button.button--3xl{padding-inline:var(--spacing-3xl,2.5rem);padding-block:var(--spacing-xl,1.5rem)}.button.button--4xl{padding-inline:var(--spacing-4xl,3.5rem);padding-block:var(--spacing-2xl,2rem)}.button.button--5xl{padding-inline:var(--spacing-5xl,4rem);padding-block:var(--spacing-3xl,2.5rem)}}@property --tw-duration{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}
|
package/dist/button/button.d.ts
CHANGED
|
@@ -1,9 +1,128 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Available color schemes based on design system color tokens
|
|
5
|
+
*/
|
|
6
|
+
declare const BOX_COLORS: readonly ["default", "inverse", "primary", "secondary", "success", "danger", "warning", "info", "fixed", "disabled", "fixed"];
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Available color schemes based on design system color tokens
|
|
10
|
+
*/
|
|
11
|
+
declare const BOX_COLORS_2: readonly ["default", "inverse", "primary", "secondary", "success", "danger", "warning", "info", "fixed", "disabled", "fixed"];
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Available color variations based on design system tokens
|
|
15
|
+
*/
|
|
16
|
+
declare const BOX_VARIANTS: readonly ["subtle", "moderate", "emphasis", "strong", "light", "dark"];
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Available color variations based on design system tokens
|
|
20
|
+
*/
|
|
21
|
+
declare const BOX_VARIANTS_2: readonly ["subtle", "moderate", "emphasis", "strong", "light", "dark"];
|
|
22
|
+
|
|
23
|
+
declare type BoxColorScheme = (typeof BOX_COLORS)[number];
|
|
24
|
+
|
|
25
|
+
declare type BoxColorScheme_2 = (typeof BOX_COLORS_2)[number];
|
|
26
|
+
|
|
27
|
+
declare type BoxColorVariation = (typeof BOX_VARIANTS)[number];
|
|
28
|
+
|
|
29
|
+
declare type BoxColorVariation_2 = (typeof BOX_VARIANTS_2)[number];
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Core box properties shared across all framework implementations
|
|
33
|
+
*/
|
|
34
|
+
declare interface BoxProps {
|
|
35
|
+
/**
|
|
36
|
+
* HTML element type to render the Box as. Defaults to 'div'.
|
|
37
|
+
* @default "div"
|
|
38
|
+
*/
|
|
39
|
+
as?: keyof HTMLElementTagNameMap;
|
|
40
|
+
/**
|
|
41
|
+
* Color scheme for background and content colors
|
|
42
|
+
*/
|
|
43
|
+
color?: BoxColorScheme;
|
|
44
|
+
/**
|
|
45
|
+
* Color variation within the chosen color scheme
|
|
46
|
+
*/
|
|
47
|
+
variant?: BoxColorVariation;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Core box properties shared across all framework implementations
|
|
52
|
+
*/
|
|
53
|
+
declare interface BoxProps_2 {
|
|
54
|
+
/**
|
|
55
|
+
* HTML element type to render the Box as. Defaults to 'div'.
|
|
56
|
+
* @default "div"
|
|
57
|
+
*/
|
|
58
|
+
as?: keyof HTMLElementTagNameMap;
|
|
59
|
+
/**
|
|
60
|
+
* Color scheme for background and content colors
|
|
61
|
+
*/
|
|
62
|
+
color?: BoxColorScheme_2;
|
|
63
|
+
/**
|
|
64
|
+
* Color variation within the chosen color scheme
|
|
65
|
+
*/
|
|
66
|
+
variant?: BoxColorVariation_2;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export declare const Button: <T extends ButtonElementType = typeof DefaultElementType>({ as, children, size, outline, disabled, className, ...props }: ReactButtonProps<T>) => default_2.JSX.Element;
|
|
70
|
+
|
|
71
|
+
declare type ButtonElementType = "button" | "a";
|
|
72
|
+
|
|
73
|
+
declare type ButtonOwnProps = Omit<ButtonProps, keyof ReactBoxProps>;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Core button properties shared across all framework implementations
|
|
77
|
+
*/
|
|
78
|
+
declare interface ButtonProps extends BoxProps {
|
|
79
|
+
/**
|
|
80
|
+
* Size of the button
|
|
81
|
+
* @default "md"
|
|
82
|
+
*/
|
|
83
|
+
size?: ButtonSize;
|
|
84
|
+
/**
|
|
85
|
+
* Whether the button should have an outline style
|
|
86
|
+
* @default false
|
|
87
|
+
*/
|
|
88
|
+
outline?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Whether the button is disabled
|
|
91
|
+
* @default false
|
|
92
|
+
*/
|
|
93
|
+
disabled?: boolean;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
declare type ButtonSize = Spacing;
|
|
97
|
+
|
|
98
|
+
declare const DefaultElementType: ButtonElementType;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Default HTML element type for the Box component
|
|
102
|
+
*/
|
|
103
|
+
declare type DefaultElementType_2 = "div";
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Props that are specific to the React implementation
|
|
107
|
+
*/
|
|
108
|
+
declare type ReactBoxOwnProps<E extends default_2.ElementType = DefaultElementType_2> = Omit<BoxProps_2, "as"> & {
|
|
109
|
+
/**
|
|
110
|
+
* The HTML element or React component to render as
|
|
111
|
+
* @default "div"
|
|
112
|
+
*/
|
|
113
|
+
as?: E;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Polymorphic Box props that merge own props with the element's native props
|
|
118
|
+
* Omits props that are defined in our own props to avoid conflicts
|
|
119
|
+
*/
|
|
120
|
+
declare type ReactBoxProps<E extends default_2.ElementType = DefaultElementType_2> = ReactBoxOwnProps<E> & Omit<default_2.ComponentPropsWithoutRef<E>, keyof ReactBoxOwnProps<E>>;
|
|
121
|
+
|
|
122
|
+
export declare type ReactButtonProps<T extends ButtonElementType = typeof DefaultElementType> = default_2.PropsWithChildren<ButtonOwnProps & ReactBoxProps<T>>;
|
|
123
|
+
|
|
124
|
+
declare const SPACING: readonly ["3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "4xl", "5xl"];
|
|
125
|
+
|
|
126
|
+
declare type Spacing = (typeof SPACING)[number];
|
|
127
|
+
|
|
128
|
+
export { }
|
package/dist/button/button.es.js
CHANGED
|
@@ -1,32 +1,38 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { j as l } from "../index-IqW719eK.js";
|
|
2
|
+
import { m } from "../utils-DpTd6iI4.js";
|
|
3
|
+
import { Box as f } from "../box/box.es.js";
|
|
4
|
+
const b = "button", c = ({
|
|
5
|
+
as: e,
|
|
6
|
+
children: n = null,
|
|
7
|
+
size: o,
|
|
8
|
+
outline: s = !1,
|
|
8
9
|
disabled: t = !1,
|
|
9
|
-
className:
|
|
10
|
+
className: r,
|
|
10
11
|
...u
|
|
11
12
|
}) => {
|
|
12
|
-
const
|
|
13
|
-
return
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
13
|
+
const a = e ?? b;
|
|
14
|
+
return (
|
|
15
|
+
//@ts-expect-error Impossible to dynamically determine the set of valid properties.
|
|
16
|
+
// Would need to know what the "as" property is at type checking time.
|
|
17
|
+
// Users of this component will get valid type-checking
|
|
18
|
+
/* @__PURE__ */ l.jsx(
|
|
19
|
+
f,
|
|
20
|
+
{
|
|
21
|
+
as: a,
|
|
22
|
+
className: m(
|
|
23
|
+
"button",
|
|
24
|
+
o && `button--${o}`,
|
|
25
|
+
t && "button--disabled",
|
|
26
|
+
s && "button--outline",
|
|
27
|
+
r
|
|
28
|
+
),
|
|
29
|
+
disabled: t,
|
|
30
|
+
"aria-disabled": t ? "true" : "false",
|
|
31
|
+
role: "button",
|
|
32
|
+
...u,
|
|
33
|
+
children: n
|
|
34
|
+
}
|
|
35
|
+
)
|
|
30
36
|
);
|
|
31
37
|
};
|
|
32
38
|
export {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial}::backdrop{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial}}}@layer components{.card{border-radius:var(--radius-lg,.5rem);gap:var(--spacing-lg,1.25rem);flex-direction:column;display:flex}.card.card--bordered{--tw-inset-ring-shadow:inset 0 0 0 var(--ring-width-md,.125rem) var(--tw-inset-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);padding:var(--spacing-md,1rem)}.card:not(.card--bordered){--box-background-color:revert!important;--box-text-color:revert!important;--box-border-color:revert!important;--box-outline-color:revert!important;--box-ring-color:revert!important}.card .card__body{gap:var(--spacing-sm,.75rem);flex-direction:column;flex-grow:1;align-self:stretch;display:flex}.card .card__body .card__description{flex:auto}.card .card__body .card__footer{margin-top:auto}.card .card__body .card__title{font-size:var(--text-heading-md,.976875rem);--tw-leading:var(--leading-heading-md,1.5rem);line-height:var(--leading-heading-md,1.5rem);--tw-font-weight:var(--font-weight-bold,700);font-weight:var(--font-weight-bold,700);--tw-tracking:0%;letter-spacing:0%}.card .card__media{flex:none;display:flex}.card .card__media>img,.card .card__media video{border-radius:var(--radius-lg,.5rem);object-fit:cover;object-position:center;aspect-ratio:2;width:100%;max-width:100%;height:auto;max-height:100%}@container (width>=30rem){.card.card--horizontal{flex-direction:row;align-items:flex-start}.card.card--horizontal:not(.card--bordered) .card__body{padding-top:var(--spacing-xs,.5rem)}.card.card--horizontal:not(.card--bordered):has(.card__media--left) .card__body{padding-left:var(--spacing-none,0)}.card.card--horizontal:not(.card--bordered):has(.card__media--right) .card__body{padding-right:var(--spacing-none,0)}.card.card--horizontal .card__media{max-width:33.3333%}.card.card--horizontal .card__media>img,.card.card--horizontal .card__media>video{aspect-ratio:4/3}.card.card--horizontal .card__media.card__media--left{order:-9999}.card.card--horizontal .card__media.card__media--right{order:9999}}.card.card--vertical{flex-direction:column}.card.card--vertical .card__media>img,.card.card--vertical .card__media video{aspect-ratio:2}}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Available color schemes based on design system color tokens
|
|
5
|
+
*/
|
|
6
|
+
declare const BOX_COLORS: readonly ["default", "inverse", "primary", "secondary", "success", "danger", "warning", "info", "fixed", "disabled", "fixed"];
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Available color variations based on design system tokens
|
|
10
|
+
*/
|
|
11
|
+
declare const BOX_VARIANTS: readonly ["subtle", "moderate", "emphasis", "strong", "light", "dark"];
|
|
12
|
+
|
|
13
|
+
declare type BoxColorScheme = (typeof BOX_COLORS)[number];
|
|
14
|
+
|
|
15
|
+
declare type BoxColorVariation = (typeof BOX_VARIANTS)[number];
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Core box properties shared across all framework implementations
|
|
19
|
+
*/
|
|
20
|
+
declare interface BoxProps {
|
|
21
|
+
/**
|
|
22
|
+
* HTML element type to render the Box as. Defaults to 'div'.
|
|
23
|
+
* @default "div"
|
|
24
|
+
*/
|
|
25
|
+
as?: keyof HTMLElementTagNameMap;
|
|
26
|
+
/**
|
|
27
|
+
* Color scheme for background and content colors
|
|
28
|
+
*/
|
|
29
|
+
color?: BoxColorScheme;
|
|
30
|
+
/**
|
|
31
|
+
* Color variation within the chosen color scheme
|
|
32
|
+
*/
|
|
33
|
+
variant?: BoxColorVariation;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export declare const Card: ({ as, layout, border, children, className, ...props }: ReactCardProps) => default_2.JSX.Element;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Available card layouts based on design system layout options
|
|
40
|
+
*/
|
|
41
|
+
declare const CARD_LAYOUTS: readonly ["horizontal", "vertical"];
|
|
42
|
+
|
|
43
|
+
declare type CardLayout = (typeof CARD_LAYOUTS)[number];
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Core card properties shared across all framework implementations
|
|
47
|
+
*/
|
|
48
|
+
declare interface CardProps extends BoxProps {
|
|
49
|
+
/**
|
|
50
|
+
* Whether the card has a border or not
|
|
51
|
+
* @default true
|
|
52
|
+
*/
|
|
53
|
+
border?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Layout of the card
|
|
56
|
+
* @default "vertical"
|
|
57
|
+
*/
|
|
58
|
+
layout?: CardLayout;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export declare type ReactCardProps = CardProps & {
|
|
62
|
+
children: default_2.ReactNode;
|
|
63
|
+
className?: string;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export { }
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { j as e } from "../index-IqW719eK.js";
|
|
2
|
+
import { Box as o } from "../box/box.es.js";
|
|
3
|
+
import { m as c } from "../utils-DpTd6iI4.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
const j = ({
|
|
6
|
+
as: a = "article",
|
|
7
|
+
layout: r = "vertical",
|
|
8
|
+
border: s = !0,
|
|
9
|
+
children: t = null,
|
|
10
|
+
className: d,
|
|
11
|
+
...i
|
|
12
|
+
}) => {
|
|
13
|
+
const m = c(
|
|
14
|
+
"card",
|
|
15
|
+
`card--${r}`,
|
|
16
|
+
s && "card--bordered",
|
|
17
|
+
d
|
|
18
|
+
);
|
|
19
|
+
return /* @__PURE__ */ e.jsx(o, { as: a, className: m, ...i, children: t });
|
|
20
|
+
}, p = ({
|
|
21
|
+
children: a,
|
|
22
|
+
className: r,
|
|
23
|
+
position: s,
|
|
24
|
+
...t
|
|
25
|
+
}) => /* @__PURE__ */ e.jsx(
|
|
26
|
+
o,
|
|
27
|
+
{
|
|
28
|
+
...t,
|
|
29
|
+
as: "figure",
|
|
30
|
+
className: c(
|
|
31
|
+
"card__media",
|
|
32
|
+
`card__media--${s}`,
|
|
33
|
+
r
|
|
34
|
+
),
|
|
35
|
+
children: a
|
|
36
|
+
}
|
|
37
|
+
), C = ({
|
|
38
|
+
children: a,
|
|
39
|
+
className: r,
|
|
40
|
+
...s
|
|
41
|
+
}) => /* @__PURE__ */ e.jsx(o, { className: c("card__body", r), ...s, children: a }), f = ({
|
|
42
|
+
children: a,
|
|
43
|
+
className: r,
|
|
44
|
+
...s
|
|
45
|
+
}) => /* @__PURE__ */ e.jsx(
|
|
46
|
+
o,
|
|
47
|
+
{
|
|
48
|
+
className: c("card__title", "heading-md", r),
|
|
49
|
+
...s,
|
|
50
|
+
children: a
|
|
51
|
+
}
|
|
52
|
+
), N = ({
|
|
53
|
+
children: a,
|
|
54
|
+
className: r,
|
|
55
|
+
...s
|
|
56
|
+
}) => /* @__PURE__ */ e.jsx(o, { className: c("card__description", r), ...s, children: a }), u = ({
|
|
57
|
+
children: a,
|
|
58
|
+
className: r,
|
|
59
|
+
...s
|
|
60
|
+
}) => /* @__PURE__ */ e.jsx(
|
|
61
|
+
o,
|
|
62
|
+
{
|
|
63
|
+
className: ["card__footer", r].filter(Boolean).join(" "),
|
|
64
|
+
...s,
|
|
65
|
+
children: a
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
export {
|
|
69
|
+
j as Card,
|
|
70
|
+
C as CardBody,
|
|
71
|
+
N as CardDescription,
|
|
72
|
+
u as CardFooter,
|
|
73
|
+
p as CardMedia,
|
|
74
|
+
f as CardTitle
|
|
75
|
+
};
|