@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.
Files changed (40) hide show
  1. package/dist/alert/alert.css +1 -1
  2. package/dist/alert/alert.d.ts +95 -11
  3. package/dist/alert/alert.es.js +70 -3455
  4. package/dist/box/box.css +1 -0
  5. package/dist/box/box.d.ts +89 -51
  6. package/dist/box/box.es.js +54 -2
  7. package/dist/button/button.css +1 -1
  8. package/dist/button/button.d.ts +128 -9
  9. package/dist/button/button.es.js +32 -26
  10. package/dist/card/card.css +1 -0
  11. package/dist/card/card.d.ts +66 -0
  12. package/dist/card/card.es.js +75 -0
  13. package/dist/city-seal/city-seal.css +1 -1
  14. package/dist/city-seal/city-seal.d.ts +39 -18
  15. package/dist/city-seal/city-seal.es.js +15 -20
  16. package/dist/footer/footer.d.ts +63 -19
  17. package/dist/footer/footer.es.js +1 -1
  18. package/dist/header/header.css +1 -1
  19. package/dist/header/header.d.ts +85 -19
  20. package/dist/header/header.es.js +14 -13
  21. package/dist/icon/icon.css +1 -0
  22. package/dist/icon/icon.d.ts +31 -0
  23. package/dist/icon/icon.es.js +31 -0
  24. package/dist/tag/tag.css +1 -1
  25. package/dist/tag/tag.d.ts +28 -7
  26. package/dist/tag/tag.es.js +3 -2
  27. package/dist/utilities/utilities.css +1 -0
  28. package/dist/utils-DpTd6iI4.js +7 -0
  29. package/package.json +5 -4
  30. package/dist/alert/index.d.ts +0 -1
  31. package/dist/box/index.d.ts +0 -1
  32. package/dist/button/index.d.ts +0 -1
  33. package/dist/city-seal/index.d.ts +0 -1
  34. package/dist/footer/footer.test.d.ts +0 -1
  35. package/dist/footer/index.d.ts +0 -1
  36. package/dist/header/index.d.ts +0 -1
  37. package/dist/index/index.css +0 -1
  38. package/dist/index-C4cFhgXK.js +0 -68
  39. package/dist/tag/index.d.ts +0 -1
  40. package/dist/utils.d.ts +0 -3
@@ -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-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial}::backdrop{--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial}}}@layer components{.alert{border-left-style:var(--tw-border-style);border-left-width:var(--border-width-xl,.5rem);padding:var(--spacing-md,1rem);align-items:flex-start;gap:var(--spacing-md,1rem);display:flex}.alert.alert--slim{gap:var(--spacing-xs,.5rem);padding-inline:var(--spacing-md,1rem);padding-block:var(--spacing-xs,.5rem)}.alert .alert__icon{width:var(--spacing-3xl,2.5rem);height:var(--spacing-3xl,2.5rem);padding:var(--spacing-2xs,.25rem)}.alert--slim :is(.alert .alert__icon){width:var(--spacing-xl,1.5rem);height:var(--spacing-xl,1.5rem);padding:var(--spacing-3xs,.125rem)}.alert .alert__content{flex-grow:1}.alert .alert__heading{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%;margin-block:var(--spacing-none,0)}.alert--slim :is(.alert .alert__heading){display:none}.alert .alert__text{font-size:var(--text-body-md,.976875rem);--tw-leading:var(--leading-body-md,1.5rem);line-height:var(--leading-body-md,1.5rem);--tw-tracking:0%;letter-spacing:0%}.alert .alert__text p+p{margin-top:var(--spacing-sm,.75rem)}.alert .alert__close{padding:var(--spacing-3xs,.125rem);cursor:pointer;font-size:20px}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}
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-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial}::backdrop{--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial}}}@layer components{.alert{border-left-style:var(--tw-border-style);border-left-width:var(--border-width-xl,.5rem);width:100%;padding:var(--spacing-md,1rem);align-items:flex-start;gap:var(--spacing-md,1rem);display:flex}.alert.alert--slim{gap:var(--spacing-xs,.5rem);padding-inline:var(--spacing-md,1rem);padding-block:var(--spacing-xs,.5rem)}.alert.alert--slim .alert__icon img,.alert.alert--slim .alert__icon svg{height:var(--height-600,1.5rem)}.alert .alert__icon{flex-shrink:0;display:inline-flex}.alert .alert__icon img,.alert .alert__icon svg{height:var(--height-1000,2.5rem)}.alert .alert__heading{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%;margin-block:var(--spacing-none,0)}.alert--slim :is(.alert .alert__heading){display:none}.alert .alert__text{font-size:var(--text-body-md,.976875rem);--tw-leading:var(--leading-body-md,1.5rem);line-height:var(--leading-body-md,1.5rem);--tw-tracking:0%;letter-spacing:0%}.alert .alert__text p+p{margin-top:var(--spacing-sm,.75rem)}.alert .alert__close{cursor:pointer;margin-left:auto;display:inline-flex}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}
@@ -1,11 +1,95 @@
1
- import { AlertProps } from '@cityofportland/types/alert';
2
- import { default as React } from 'react';
3
- import { ReactBoxProps } from '../box/box';
4
- export type ReactAlertProps = React.PropsWithChildren<AlertProps & ReactBoxProps & {
5
- onDismiss: (element: Element) => void;
6
- }>;
7
- export declare const AlertContent: React.FC<React.PropsWithChildren<ReactBoxProps>>;
8
- export declare const AlertDescription: React.FC<React.PropsWithChildren<ReactBoxProps>>;
9
- export declare const AlertIcon: React.FC<React.PropsWithChildren<ReactBoxProps>>;
10
- export declare const AlertTitle: React.FC<React.PropsWithChildren<ReactBoxProps>>;
11
- export declare const Alert: React.FC<ReactAlertProps>;
1
+ import { default as default_2 } from 'react';
2
+
3
+ export declare const Alert: default_2.FC<ReactAlertProps>;
4
+
5
+ /**
6
+ * Available alert variants based on design system color tokens
7
+ */
8
+ declare const ALERT_SIZES: readonly ["default", "slim"];
9
+
10
+ export declare const AlertContent: default_2.FC<default_2.PropsWithChildren<ReactBoxProps>>;
11
+
12
+ export declare const AlertDescription: default_2.FC<default_2.PropsWithChildren<ReactBoxProps>>;
13
+
14
+ export declare const AlertIcon: default_2.FC<default_2.PropsWithChildren<ReactBoxProps>>;
15
+
16
+ /**
17
+ * Core alert properties shared across all framework implementations
18
+ */
19
+ declare interface AlertProps {
20
+ /**
21
+ * Visual style variant of the alert
22
+ * @default "default"
23
+ */
24
+ size?: AlertSize;
25
+ /**
26
+ * Is alert dismissible
27
+ * @default true
28
+ */
29
+ dismissible?: boolean;
30
+ }
31
+
32
+ declare type AlertSize = (typeof ALERT_SIZES)[number];
33
+
34
+ export declare const AlertTitle: default_2.FC<default_2.PropsWithChildren<ReactBoxProps>>;
35
+
36
+ /**
37
+ * Available color schemes based on design system color tokens
38
+ */
39
+ declare const BOX_COLORS: readonly ["default", "inverse", "primary", "secondary", "success", "danger", "warning", "info", "fixed", "disabled", "fixed"];
40
+
41
+ /**
42
+ * Available color variations based on design system tokens
43
+ */
44
+ declare const BOX_VARIANTS: readonly ["subtle", "moderate", "emphasis", "strong", "light", "dark"];
45
+
46
+ declare type BoxColorScheme = (typeof BOX_COLORS)[number];
47
+
48
+ declare type BoxColorVariation = (typeof BOX_VARIANTS)[number];
49
+
50
+ /**
51
+ * Core box properties shared across all framework implementations
52
+ */
53
+ declare interface BoxProps {
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;
63
+ /**
64
+ * Color variation within the chosen color scheme
65
+ */
66
+ variant?: BoxColorVariation;
67
+ }
68
+
69
+ /**
70
+ * Default HTML element type for the Box component
71
+ */
72
+ declare type DefaultElementType = "div";
73
+
74
+ export declare type ReactAlertProps = default_2.PropsWithChildren<AlertProps & ReactBoxProps & {
75
+ onDismiss: (element: Element) => void;
76
+ }>;
77
+
78
+ /**
79
+ * Props that are specific to the React implementation
80
+ */
81
+ declare type ReactBoxOwnProps<E extends default_2.ElementType = DefaultElementType> = Omit<BoxProps, "as"> & {
82
+ /**
83
+ * The HTML element or React component to render as
84
+ * @default "div"
85
+ */
86
+ as?: E;
87
+ };
88
+
89
+ /**
90
+ * Polymorphic Box props that merge own props with the element's native props
91
+ * Omits props that are defined in our own props to avoid conflicts
92
+ */
93
+ declare type ReactBoxProps<E extends default_2.ElementType = DefaultElementType> = ReactBoxOwnProps<E> & Omit<default_2.ComponentPropsWithoutRef<E>, keyof ReactBoxOwnProps<E>>;
94
+
95
+ export { }