@inglorious/ui 9.8.0 → 9.8.1
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/package.json +5 -5
- package/src/controls/button/style.css +0 -2
- package/src/controls/button/template.js +2 -3
- package/src/controls/checkbox/style.css +0 -1
- package/src/controls/checkbox/template.js +0 -2
- package/src/controls/combobox/style.css +0 -14
- package/src/controls/combobox/template.js +0 -13
- package/src/controls/file-upload/template.js +1 -1
- package/src/controls/image-cropper/helpers.js +0 -2
- package/src/controls/image-cropper/image.js +0 -2
- package/src/controls/image-cropper/style.css +0 -6
- package/src/controls/image-cropper/template.js +3 -5
- package/src/controls/input/style.css +0 -1
- package/src/controls/radio-group/style.css +0 -2
- package/src/controls/rating/style.css +0 -3
- package/src/controls/select/style.css +0 -6
- package/src/controls/slider/style.css +0 -5
- package/src/controls/slider/template.js +0 -1
- package/src/controls/switch/style.css +0 -1
- package/src/controls/switch/template.js +0 -2
- package/src/controls/textarea/style.css +0 -2
- package/src/data-display/before-after/style.css +0 -4
- package/src/data-display/before-after/template.js +3 -3
- package/src/data-display/carousel/carousel.stories.js +0 -2
- package/src/data-display/carousel/handlers.js +0 -2
- package/src/data-display/carousel/style.css +0 -18
- package/src/data-display/carousel/template.js +0 -15
- package/src/data-display/chat/index.js +0 -1
- package/src/data-display/chat/style.css +0 -2
- package/src/data-display/chat/template.js +0 -1
- package/src/data-display/chip/template.js +0 -1
- package/src/data-display/data-grid/base.css +0 -2
- package/src/data-display/data-grid/handlers.js +1 -8
- package/src/data-display/data-grid/helpers.js +0 -5
- package/src/data-display/data-grid/template.js +0 -1
- package/src/data-display/data-grid/theme.css +0 -1
- package/src/data-display/icon/style.css +0 -7
- package/src/data-display/icon/template.js +2 -2
- package/src/data-display/table/style.css +0 -2
- package/src/data-display/tooltip/style.css +0 -3
- package/src/data-display/virtual-list/handlers.js +0 -2
- package/src/data-display/virtual-list/template.js +2 -4
- package/src/examples/dashboard/before-after-data.js +0 -3
- package/src/examples/dashboard/data.js +0 -1
- package/src/examples/dashboard/primitive-content.js +0 -2
- package/src/examples/dashboard/style.css +0 -3
- package/src/feedback/alert/style.css +0 -1
- package/src/feedback/dialog/dialog.stories.js +0 -4
- package/src/feedback/dialog/style.css +0 -10
- package/src/feedback/dialog/template.js +0 -5
- package/src/feedback/progress/style.css +0 -6
- package/src/feedback/progress/template.js +0 -3
- package/src/feedback/snackbar/snackbar.stories.js +0 -1
- package/src/feedback/snackbar/style.css +0 -10
- package/src/layout/flex/style.css +0 -2
- package/src/navigation/bottom-navigation/style.css +0 -7
- package/src/navigation/drawer/style.css +0 -21
- package/src/navigation/drawer/template.js +0 -2
- package/src/navigation/menu/menu.stories.js +0 -2
- package/src/navigation/menu/style.css +0 -4
- package/src/navigation/menu/template.js +0 -3
- package/src/navigation/speed-dial/style.css +0 -4
- package/src/navigation/speed-dial/template.js +0 -5
- package/src/navigation/tabs/template.js +0 -2
- package/src/navigation/view-transitions/index.js +0 -13
- package/src/navigation/view-transitions/style.css +0 -2
- package/src/shared/icons.js +0 -4
- package/src/styles/themes/bootstrap.css +0 -40
- package/src/styles/themes/inglorious.css +0 -21
- package/src/styles/themes/ios-18.css +0 -47
- package/src/styles/themes/ios-26.css +0 -55
- package/src/styles/themes/material-3.css +0 -52
- package/src/styles/themes/material-ui.css +0 -43
- package/src/styles/tokens.css +0 -40
- package/src/surfaces/accordion/style.css +0 -2
- package/src/surfaces/accordion/template.js +0 -4
- package/src/surfaces/app-bar/style.css +0 -3
- package/src/surfaces/card/style.css +0 -3
- package/types/controls/button-group.d.ts +5 -3
- package/types/controls/button.d.ts +3 -1
- package/types/controls/combobox.d.ts +13 -0
- package/types/controls/fab.d.ts +1 -1
- package/types/controls/icon-button.d.ts +7 -21
- package/types/controls/input.d.ts +2 -2
- package/types/data-display/avatar.d.ts +1 -1
- package/types/data-display/badge.d.ts +4 -2
- package/types/data-display/chip.d.ts +5 -3
- package/types/data-display/icon.d.ts +4 -2
- package/types/data-display/tooltip.d.ts +4 -2
- package/types/data-display/typography.d.ts +3 -1
- package/types/feedback/alert.d.ts +3 -1
- package/types/feedback/backdrop.d.ts +4 -2
- package/types/feedback/dialog.d.ts +3 -1
- package/types/index.d.ts +1 -0
- package/types/layout/container.d.ts +3 -1
- package/types/layout/flex.d.ts +9 -11
- package/types/layout/grid.d.ts +4 -2
- package/types/navigation/breadcrumbs.d.ts +1 -1
- package/types/navigation/drawer.d.ts +3 -1
- package/types/navigation/link.d.ts +4 -2
- package/types/shared/renderable.d.ts +12 -0
- package/types/surfaces/app-bar.d.ts +3 -1
- package/types/surfaces/card.d.ts +4 -2
- package/types/surfaces/paper.d.ts +3 -1
package/src/styles/tokens.css
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/* The writing direction as a number, for what moves sideways: a slide that
|
|
2
|
-
goes `translateX(calc(-100% * var(--iw-dir-sign)))` leaves to the left in
|
|
3
|
-
English and to the right in Arabic. Set again on any element with a `dir`,
|
|
4
|
-
so a subtree in the other direction gets its own. */
|
|
5
1
|
:root,
|
|
6
2
|
[dir="ltr"] {
|
|
7
3
|
--iw-dir-sign: 1;
|
|
@@ -12,13 +8,9 @@
|
|
|
12
8
|
}
|
|
13
9
|
|
|
14
10
|
:root {
|
|
15
|
-
/* ========================================
|
|
16
|
-
COLOR PALETTE - Primitive Colors
|
|
17
|
-
======================================== */
|
|
18
11
|
--iw-color-white: #ffffff;
|
|
19
12
|
--iw-color-black: #000000;
|
|
20
13
|
|
|
21
|
-
/* Brand Colors */
|
|
22
14
|
--iw-color-primary-50: #e6fff0;
|
|
23
15
|
--iw-color-primary-100: #b3ffd6;
|
|
24
16
|
--iw-color-primary-200: #80ffbd;
|
|
@@ -30,7 +22,6 @@
|
|
|
30
22
|
--iw-color-primary-800: #006637;
|
|
31
23
|
--iw-color-primary-900: #00331c;
|
|
32
24
|
|
|
33
|
-
/* Neutral Colors */
|
|
34
25
|
--iw-color-gray-50: #fafafa;
|
|
35
26
|
--iw-color-gray-100: #f4f4f5;
|
|
36
27
|
--iw-color-gray-200: #e4e4e7;
|
|
@@ -42,7 +33,6 @@
|
|
|
42
33
|
--iw-color-gray-800: #27272a;
|
|
43
34
|
--iw-color-gray-900: #18181b;
|
|
44
35
|
|
|
45
|
-
/* Semantic Colors */
|
|
46
36
|
--iw-color-success-light: #d1fae5;
|
|
47
37
|
--iw-color-success: #10b981;
|
|
48
38
|
--iw-color-success-dark: #065f46;
|
|
@@ -59,9 +49,6 @@
|
|
|
59
49
|
--iw-color-info: #3b82f6;
|
|
60
50
|
--iw-color-info-dark: #1e40af;
|
|
61
51
|
|
|
62
|
-
/* ========================================
|
|
63
|
-
SPACING SCALE
|
|
64
|
-
======================================== */
|
|
65
52
|
--iw-space-0: 0;
|
|
66
53
|
--iw-space-1: 0.25rem;
|
|
67
54
|
--iw-space-2: 0.5rem;
|
|
@@ -77,18 +64,12 @@
|
|
|
77
64
|
--iw-space-20: 5rem;
|
|
78
65
|
--iw-space-24: 6rem;
|
|
79
66
|
|
|
80
|
-
/* ========================================
|
|
81
|
-
BREAKPOINTS
|
|
82
|
-
======================================== */
|
|
83
67
|
--iw-breakpoint-xs: 20rem;
|
|
84
68
|
--iw-breakpoint-sm: 40rem;
|
|
85
69
|
--iw-breakpoint-md: 48rem;
|
|
86
70
|
--iw-breakpoint-lg: 64rem;
|
|
87
71
|
--iw-breakpoint-xl: 80rem;
|
|
88
72
|
|
|
89
|
-
/* ========================================
|
|
90
|
-
BORDER RADIUS
|
|
91
|
-
======================================== */
|
|
92
73
|
--iw-radius-none: 0;
|
|
93
74
|
--iw-radius-sm: 2px;
|
|
94
75
|
--iw-radius-md: 4px;
|
|
@@ -97,9 +78,6 @@
|
|
|
97
78
|
--iw-radius-2xl: 16px;
|
|
98
79
|
--iw-radius-full: 9999px;
|
|
99
80
|
|
|
100
|
-
/* ========================================
|
|
101
|
-
TYPOGRAPHY
|
|
102
|
-
======================================== */
|
|
103
81
|
--iw-font-family-sans:
|
|
104
82
|
system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
105
83
|
"Helvetica Neue", Arial, sans-serif;
|
|
@@ -125,14 +103,10 @@
|
|
|
125
103
|
--iw-line-height-normal: 1.5;
|
|
126
104
|
--iw-line-height-relaxed: 1.75;
|
|
127
105
|
|
|
128
|
-
/* Labels of buttons and tabs: a theme can set them in capitals. */
|
|
129
106
|
--iw-label-text-transform: none;
|
|
130
107
|
--iw-label-letter-spacing: normal;
|
|
131
108
|
--iw-label-font-weight: var(--iw-font-weight-normal);
|
|
132
109
|
|
|
133
|
-
/* ========================================
|
|
134
|
-
SHADOWS
|
|
135
|
-
======================================== */
|
|
136
110
|
--iw-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
|
137
111
|
--iw-shadow-md:
|
|
138
112
|
0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
|
@@ -141,12 +115,6 @@
|
|
|
141
115
|
--iw-shadow-xl:
|
|
142
116
|
0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
|
|
143
117
|
|
|
144
|
-
/* ========================================
|
|
145
|
-
TRANSITIONS
|
|
146
|
-
======================================== */
|
|
147
|
-
/* A duration and an easing, so that motion can pick one of each. Anything
|
|
148
|
-
that has to vary them separately — a page arriving is not eased the way a
|
|
149
|
-
page leaving is — composes them rather than reaching for the shorthands. */
|
|
150
118
|
--iw-duration-fast: 150ms;
|
|
151
119
|
--iw-duration-normal: 200ms;
|
|
152
120
|
--iw-duration-page: 250ms;
|
|
@@ -155,19 +123,11 @@
|
|
|
155
123
|
--iw-easing-accelerate: cubic-bezier(0.4, 0, 1, 1);
|
|
156
124
|
--iw-easing-decelerate: cubic-bezier(0, 0, 0.2, 1);
|
|
157
125
|
|
|
158
|
-
/* Shorthands for a plain `ease` at one of the durations above. These keep
|
|
159
|
-
working as they always have; reach for the tokens above instead when the
|
|
160
|
-
easing has to be anything other than `ease`. The page transitions in
|
|
161
|
-
`view-transitions` compose the two on purpose — a page arriving decelerates
|
|
162
|
-
and a page leaving accelerates — so they are not a shorthand case. */
|
|
163
126
|
--iw-transition-fast: var(--iw-duration-fast) ease;
|
|
164
127
|
--iw-transition-normal: var(--iw-duration-normal) ease;
|
|
165
128
|
--iw-transition-page: var(--iw-duration-page) ease;
|
|
166
129
|
--iw-transition-slow: var(--iw-duration-slow) ease;
|
|
167
130
|
|
|
168
|
-
/* ========================================
|
|
169
|
-
Z-INDEX SCALE
|
|
170
|
-
======================================== */
|
|
171
131
|
--iw-z-dropdown: 1000;
|
|
172
132
|
--iw-z-sticky: 1020;
|
|
173
133
|
--iw-z-fixed: 1030;
|
|
@@ -86,12 +86,9 @@ export const Accordion = {
|
|
|
86
86
|
name=${props.name || nothing}
|
|
87
87
|
.open=${isExpanded}
|
|
88
88
|
@toggle=${(event) => {
|
|
89
|
-
// newState is what the browser says; an environment whose toggle
|
|
90
|
-
// event lacks it, such as jsdom, still has the element's own state.
|
|
91
89
|
const isOpen = event.newState
|
|
92
90
|
? event.newState === "open"
|
|
93
91
|
: event.currentTarget.open
|
|
94
|
-
// Also fires when isExpanded opened it, which needs no report.
|
|
95
92
|
if (isOpen === isExpanded) return
|
|
96
93
|
onToggle?.(item, index, isOpen)
|
|
97
94
|
props.onItemToggle?.(item, index, isOpen)
|
|
@@ -101,7 +98,6 @@ export const Accordion = {
|
|
|
101
98
|
class="iw-accordion-trigger"
|
|
102
99
|
aria-disabled=${isDisabled ? "true" : nothing}
|
|
103
100
|
@click=${(event) => {
|
|
104
|
-
// A summary cannot be disabled, so its toggle is refused instead.
|
|
105
101
|
if (isDisabled) event.preventDefault()
|
|
106
102
|
}}
|
|
107
103
|
>
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
min-height: var(--iw-space-16);
|
|
5
|
-
/* gap: var(--iw-space-3); */
|
|
6
|
-
/* Room either side of the title and controls, so they do not touch the
|
|
7
|
-
edges of the screen. */
|
|
8
5
|
padding-inline: var(--iw-space-4);
|
|
9
6
|
background: var(--iw-app-bar-bg, var(--iw-color-surface));
|
|
10
7
|
color: var(--iw-color-text);
|
|
@@ -11,15 +11,12 @@
|
|
|
11
11
|
transform var(--iw-transition-normal);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
/* Set into the page rather than raised from it, for content grouped inside
|
|
15
|
-
another surface. */
|
|
16
14
|
.iw-card-sunk {
|
|
17
15
|
background-color: var(--iw-color-bg-secondary, var(--iw-card-bg));
|
|
18
16
|
border-color: transparent;
|
|
19
17
|
box-shadow: none;
|
|
20
18
|
}
|
|
21
19
|
|
|
22
|
-
/* Only the grouping: no surface at all. */
|
|
23
20
|
.iw-card-clear {
|
|
24
21
|
background-color: transparent;
|
|
25
22
|
border-color: transparent;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { TemplateResult } from "@inglorious/web"
|
|
2
2
|
|
|
3
|
+
import type { Renderable } from "../shared/renderable"
|
|
4
|
+
|
|
3
5
|
export interface ButtonGroupItem {
|
|
4
6
|
id?: string
|
|
5
7
|
value?: string
|
|
6
8
|
label: string
|
|
7
|
-
children?:
|
|
9
|
+
children?: Renderable
|
|
8
10
|
isDisabled?: boolean
|
|
9
11
|
variant?: "default" | "outline" | "ghost"
|
|
10
12
|
color?:
|
|
@@ -16,8 +18,8 @@ export interface ButtonGroupItem {
|
|
|
16
18
|
| "error"
|
|
17
19
|
| "info"
|
|
18
20
|
size?: "sm" | "md" | "lg"
|
|
19
|
-
icon?: string
|
|
20
|
-
iconAfter?: string
|
|
21
|
+
icon?: TemplateResult | string
|
|
22
|
+
iconAfter?: TemplateResult | string
|
|
21
23
|
[key: string]: unknown
|
|
22
24
|
}
|
|
23
25
|
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { TemplateResult } from "@inglorious/web"
|
|
2
2
|
|
|
3
|
+
import type { Renderable } from "../shared/renderable"
|
|
4
|
+
|
|
3
5
|
export interface ButtonProps {
|
|
4
6
|
id?: string
|
|
5
7
|
type?: string
|
|
6
|
-
children?:
|
|
8
|
+
children?: Renderable
|
|
7
9
|
variant?: "default" | "outline" | "ghost"
|
|
8
10
|
color?:
|
|
9
11
|
| "default"
|
|
@@ -70,3 +70,16 @@ export type ComboboxType = {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
export declare const Combobox: ComboboxType
|
|
73
|
+
|
|
74
|
+
export declare function getOptionValue(option: ComboboxOption): string | number
|
|
75
|
+
export declare function getOptionLabel(option: ComboboxOption): string
|
|
76
|
+
export declare function formatOption(option: ComboboxOption): ComboboxOption
|
|
77
|
+
export declare function isOptionSelected(
|
|
78
|
+
option: ComboboxOption,
|
|
79
|
+
selectedValue: ComboboxProps["selectedValue"],
|
|
80
|
+
isMulti?: boolean,
|
|
81
|
+
): boolean
|
|
82
|
+
export declare function filterOptions(
|
|
83
|
+
options: ComboboxOption[],
|
|
84
|
+
searchTerm: string,
|
|
85
|
+
): ComboboxOption[]
|
package/types/controls/fab.d.ts
CHANGED
|
@@ -1,27 +1,13 @@
|
|
|
1
1
|
import type { TemplateResult } from "@inglorious/web"
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
import type { ButtonProps } from "./button"
|
|
4
|
+
|
|
5
|
+
/** A Button, with its content given as icons and a label. */
|
|
6
|
+
export interface IconButtonProps extends ButtonProps {
|
|
7
|
+
icon?: TemplateResult | string
|
|
8
|
+
label?: TemplateResult | string | number
|
|
9
|
+
iconAfter?: TemplateResult | string
|
|
9
10
|
direction?: "row" | "column"
|
|
10
|
-
ariaLabel?: string
|
|
11
|
-
variant?: "default" | "outline" | "ghost"
|
|
12
|
-
color?:
|
|
13
|
-
| "default"
|
|
14
|
-
| "primary"
|
|
15
|
-
| "secondary"
|
|
16
|
-
| "success"
|
|
17
|
-
| "warning"
|
|
18
|
-
| "error"
|
|
19
|
-
| "info"
|
|
20
|
-
size?: "sm" | "md" | "lg"
|
|
21
|
-
isDisabled?: boolean
|
|
22
|
-
isFullWidth?: boolean
|
|
23
|
-
buttonType?: "button" | "submit" | "reset" | "menu"
|
|
24
|
-
onClick?: () => void
|
|
25
11
|
}
|
|
26
12
|
|
|
27
13
|
export type IconButtonType = {
|
|
@@ -29,8 +29,8 @@ export interface InputProps {
|
|
|
29
29
|
isReadOnly?: boolean
|
|
30
30
|
isRequired?: boolean
|
|
31
31
|
isFullWidth?: boolean
|
|
32
|
-
icon?: string
|
|
33
|
-
iconAfter?: string
|
|
32
|
+
icon?: TemplateResult | string
|
|
33
|
+
iconAfter?: TemplateResult | string
|
|
34
34
|
onChange?: (value: string) => void
|
|
35
35
|
onBlur?: () => void
|
|
36
36
|
onFocus?: () => void
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import type { TemplateResult } from "@inglorious/web"
|
|
2
2
|
|
|
3
|
+
import type { Renderable } from "../shared/renderable"
|
|
4
|
+
|
|
3
5
|
export interface BadgeProps {
|
|
4
6
|
id?: string
|
|
5
|
-
children?:
|
|
7
|
+
children?: Renderable
|
|
6
8
|
color?: "primary" | "secondary" | "success" | "warning" | "error" | "info"
|
|
7
9
|
variant?: "solid" | "outline"
|
|
8
10
|
size?: "sm" | "md" | "lg"
|
|
9
11
|
shape?: "rectangle" | "pill" | "circle" | "square"
|
|
10
12
|
ringWidth?: string
|
|
11
13
|
className?: string
|
|
12
|
-
onClick?: () => void
|
|
14
|
+
onClick?: (event: MouseEvent) => void
|
|
13
15
|
[key: string]: unknown
|
|
14
16
|
}
|
|
15
17
|
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { TemplateResult } from "@inglorious/web"
|
|
2
2
|
|
|
3
|
+
import type { Renderable } from "../shared/renderable"
|
|
4
|
+
|
|
3
5
|
export interface ChipProps {
|
|
4
6
|
id?: string
|
|
5
|
-
children?:
|
|
7
|
+
children?: Renderable
|
|
6
8
|
/** Shown before the label, such as an `Icon.render(...)`. Decorative. */
|
|
7
|
-
icon?: TemplateResult
|
|
9
|
+
icon?: TemplateResult | string
|
|
8
10
|
isRemovable?: boolean
|
|
9
11
|
color?:
|
|
10
12
|
| "default"
|
|
@@ -23,7 +25,7 @@ export interface ChipProps {
|
|
|
23
25
|
isSelected?: boolean
|
|
24
26
|
/** Only for a chip with `isSelected`. */
|
|
25
27
|
isDisabled?: boolean
|
|
26
|
-
onClick?: () => void
|
|
28
|
+
onClick?: (event: MouseEvent) => void
|
|
27
29
|
[key: string]: unknown
|
|
28
30
|
}
|
|
29
31
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { TemplateResult } from "@inglorious/web"
|
|
2
2
|
|
|
3
|
+
import type { Renderable } from "../shared/renderable"
|
|
4
|
+
|
|
3
5
|
/**
|
|
4
6
|
* An icon in the Iconify format, as every set on `@iconify-icons/*` exports
|
|
5
7
|
* it: `import arrowBack from "@iconify-icons/material-symbols/arrow-back"`.
|
|
@@ -19,7 +21,7 @@ export interface IconProps {
|
|
|
19
21
|
/** The icon to draw, as inline SVG at the size's font size. */
|
|
20
22
|
icon?: IconData
|
|
21
23
|
/** Shown when there is no `icon`: an emoji, a glyph, any markup. */
|
|
22
|
-
children?:
|
|
24
|
+
children?: Renderable
|
|
23
25
|
size?: "sm" | "md" | "lg"
|
|
24
26
|
color?: string
|
|
25
27
|
/**
|
|
@@ -30,7 +32,7 @@ export interface IconProps {
|
|
|
30
32
|
/** Names an icon that means something on its own. Without it the icon is decorative. */
|
|
31
33
|
label?: string
|
|
32
34
|
className?: string
|
|
33
|
-
onClick?: () => void
|
|
35
|
+
onClick?: (event: MouseEvent) => void
|
|
34
36
|
[key: string]: unknown
|
|
35
37
|
}
|
|
36
38
|
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import type { TemplateResult } from "@inglorious/web"
|
|
2
2
|
|
|
3
|
+
import type { Renderable } from "../shared/renderable"
|
|
4
|
+
|
|
3
5
|
export interface TooltipProps {
|
|
4
6
|
id?: string
|
|
5
|
-
children?:
|
|
7
|
+
children?: Renderable
|
|
6
8
|
content?: TemplateResult | string | number
|
|
7
9
|
position?: "top" | "right" | "bottom" | "left"
|
|
8
10
|
size?: "sm" | "md" | "lg"
|
|
9
11
|
isOpen?: boolean
|
|
10
12
|
maxWidth?: string
|
|
11
13
|
className?: string
|
|
12
|
-
onClick?: () => void
|
|
14
|
+
onClick?: (event: MouseEvent) => void
|
|
13
15
|
[key: string]: unknown
|
|
14
16
|
}
|
|
15
17
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { TemplateResult } from "@inglorious/web"
|
|
2
2
|
|
|
3
|
+
import type { Renderable } from "../shared/renderable"
|
|
4
|
+
|
|
3
5
|
export type TypographyVariant =
|
|
4
6
|
"body" | "h1" | "h2" | "h3" | "caption" | "overline"
|
|
5
7
|
|
|
6
8
|
export interface TypographyProps {
|
|
7
9
|
id?: string
|
|
8
|
-
children?:
|
|
10
|
+
children?: Renderable
|
|
9
11
|
variant?: TypographyVariant
|
|
10
12
|
align?: "left" | "center" | "right"
|
|
11
13
|
weight?: string | number
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { TemplateResult } from "@inglorious/web"
|
|
2
2
|
|
|
3
|
+
import type { Renderable } from "../shared/renderable"
|
|
4
|
+
|
|
3
5
|
export interface AlertProps {
|
|
4
6
|
id?: string
|
|
5
7
|
type?: string
|
|
6
8
|
title?: TemplateResult | string | number
|
|
7
9
|
description?: TemplateResult | string | number
|
|
8
|
-
children?:
|
|
10
|
+
children?: Renderable
|
|
9
11
|
severity?: "info" | "success" | "warning" | "error" | "neutral"
|
|
10
12
|
variant?: "filled" | "outlined"
|
|
11
13
|
icon?: TemplateResult | string | number
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { TemplateResult } from "@inglorious/web"
|
|
2
2
|
|
|
3
|
+
import type { Renderable } from "../shared/renderable"
|
|
4
|
+
|
|
3
5
|
export interface BackdropProps {
|
|
4
6
|
id?: string
|
|
5
7
|
type?: string
|
|
6
8
|
isOpen?: boolean
|
|
7
9
|
className?: string
|
|
8
|
-
children?:
|
|
9
|
-
onClick?: () => void
|
|
10
|
+
children?: Renderable
|
|
11
|
+
onClick?: (event: MouseEvent) => void
|
|
10
12
|
[key: string]: unknown
|
|
11
13
|
}
|
|
12
14
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { TemplateResult } from "@inglorious/web"
|
|
2
2
|
|
|
3
|
+
import type { Renderable } from "../shared/renderable"
|
|
4
|
+
|
|
3
5
|
export interface DialogProps {
|
|
4
6
|
id?: string
|
|
5
7
|
type?: string
|
|
@@ -16,7 +18,7 @@ export interface DialogProps {
|
|
|
16
18
|
variant?: "dialog" | "sheet"
|
|
17
19
|
title?: TemplateResult | string | number
|
|
18
20
|
description?: TemplateResult | string | number
|
|
19
|
-
children?:
|
|
21
|
+
children?: Renderable
|
|
20
22
|
actions?: TemplateResult | string | number
|
|
21
23
|
className?: string
|
|
22
24
|
/** The close button's accessible name, for the app's language. Defaults to `"Close"`. */
|
package/types/index.d.ts
CHANGED
|
@@ -80,6 +80,7 @@ export type { TextareaProps, TextareaType } from "./controls/textarea"
|
|
|
80
80
|
export type { FileUploadProps, FileUploadType } from "./controls/file-upload"
|
|
81
81
|
export type { ContainerProps, ContainerType } from "./layout/container"
|
|
82
82
|
export type { FlexProps, FlexType } from "./layout/flex"
|
|
83
|
+
export type { Renderable } from "./shared/renderable"
|
|
83
84
|
export type { GridProps, GridType } from "./layout/grid"
|
|
84
85
|
export type {
|
|
85
86
|
BottomNavigationProps,
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { TemplateResult } from "@inglorious/web"
|
|
2
2
|
|
|
3
|
+
import type { Renderable } from "../shared/renderable"
|
|
4
|
+
|
|
3
5
|
export interface ContainerProps {
|
|
4
6
|
id?: string
|
|
5
7
|
type?: string
|
|
@@ -12,7 +14,7 @@ export interface ContainerProps {
|
|
|
12
14
|
| "nav"
|
|
13
15
|
| "aside"
|
|
14
16
|
| "article"
|
|
15
|
-
children?:
|
|
17
|
+
children?: Renderable
|
|
16
18
|
maxWidth?: "xs" | "sm" | "md" | "lg" | "xl" | "none" | false | number | string
|
|
17
19
|
isFixed?: boolean
|
|
18
20
|
padding?: "none" | "sm" | "md" | "lg" | "xl"
|
package/types/layout/flex.d.ts
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
import type { TemplateResult } from "@inglorious/web"
|
|
2
2
|
|
|
3
|
+
import type { Renderable } from "../shared/renderable"
|
|
4
|
+
|
|
3
5
|
export interface FlexProps {
|
|
4
6
|
id?: string
|
|
5
7
|
type?: string
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
| "main"
|
|
10
|
-
| "header"
|
|
11
|
-
| "footer"
|
|
12
|
-
| "nav"
|
|
13
|
-
| "aside"
|
|
14
|
-
| "article"
|
|
8
|
+
/** The tag to render. Defaults to `"div"`. */
|
|
9
|
+
element?: keyof HTMLElementTagNameMap
|
|
10
|
+
className?: string
|
|
15
11
|
direction?: "row" | "column" | "row-reverse" | "column-reverse"
|
|
16
12
|
wrap?: "nowrap" | "wrap" | "wrap-reverse"
|
|
17
13
|
justify?: "start" | "center" | "end" | "between" | "around" | "evenly"
|
|
@@ -21,8 +17,10 @@ export interface FlexProps {
|
|
|
21
17
|
overflow?: "visible" | "hidden" | "clip" | "scroll" | "auto"
|
|
22
18
|
isInline?: boolean
|
|
23
19
|
isFullWidth?: boolean
|
|
24
|
-
children?:
|
|
25
|
-
onClick?: () => void
|
|
20
|
+
children?: Renderable
|
|
21
|
+
onClick?: (event: MouseEvent) => void
|
|
22
|
+
/** Any other property is set on the element, such as `style` or `data-*`. */
|
|
23
|
+
[key: string]: unknown
|
|
26
24
|
}
|
|
27
25
|
|
|
28
26
|
export type FlexType = {
|
package/types/layout/grid.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { TemplateResult } from "@inglorious/web"
|
|
2
2
|
|
|
3
|
+
import type { Renderable } from "../shared/renderable"
|
|
4
|
+
|
|
3
5
|
export interface GridProps {
|
|
4
6
|
id?: string
|
|
5
7
|
type?: string
|
|
@@ -19,8 +21,8 @@ export interface GridProps {
|
|
|
19
21
|
align?: "stretch" | "start" | "center" | "end"
|
|
20
22
|
justify?: "stretch" | "start" | "center" | "end"
|
|
21
23
|
isFullWidth?: boolean
|
|
22
|
-
children?:
|
|
23
|
-
onClick?: () => void
|
|
24
|
+
children?: Renderable
|
|
25
|
+
onClick?: (event: MouseEvent) => void
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
export type GridType = {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { TemplateResult } from "@inglorious/web"
|
|
2
2
|
|
|
3
|
+
import type { Renderable } from "../shared/renderable"
|
|
4
|
+
|
|
3
5
|
export interface DrawerProps {
|
|
4
6
|
id?: string
|
|
5
7
|
type?: string
|
|
@@ -13,7 +15,7 @@ export interface DrawerProps {
|
|
|
13
15
|
isHidden?: boolean
|
|
14
16
|
isCollapsed?: boolean
|
|
15
17
|
title?: TemplateResult | string | number
|
|
16
|
-
children?:
|
|
18
|
+
children?: Renderable
|
|
17
19
|
hasBackdrop?: boolean
|
|
18
20
|
className?: string
|
|
19
21
|
/** The close button's accessible name, for the app's language. Defaults to `"Close"`. */
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import type { TemplateResult } from "@inglorious/web"
|
|
2
2
|
|
|
3
|
+
import type { Renderable } from "../shared/renderable"
|
|
4
|
+
|
|
3
5
|
export interface LinkProps {
|
|
4
6
|
id?: string
|
|
5
7
|
type?: string
|
|
6
8
|
href?: string
|
|
7
9
|
label?: TemplateResult | string | number
|
|
8
|
-
children?:
|
|
10
|
+
children?: Renderable
|
|
9
11
|
underline?: "always" | "hover" | "none"
|
|
10
12
|
color?: "primary" | "secondary" | "inherit"
|
|
11
13
|
isMuted?: boolean
|
|
12
14
|
isExternal?: boolean
|
|
13
15
|
className?: string
|
|
14
|
-
onClick?: () => void
|
|
16
|
+
onClick?: (event: MouseEvent) => void
|
|
15
17
|
[key: string]: unknown
|
|
16
18
|
}
|
|
17
19
|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TemplateResult } from "@inglorious/web"
|
|
2
|
+
|
|
3
|
+
/** What a template can render, `nothing` and `when()`'s results included. */
|
|
4
|
+
export type Renderable =
|
|
5
|
+
| TemplateResult
|
|
6
|
+
| string
|
|
7
|
+
| number
|
|
8
|
+
| boolean
|
|
9
|
+
| symbol
|
|
10
|
+
| null
|
|
11
|
+
| undefined
|
|
12
|
+
| Renderable[]
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { TemplateResult } from "@inglorious/web"
|
|
2
2
|
|
|
3
|
+
import type { Renderable } from "../shared/renderable"
|
|
4
|
+
|
|
3
5
|
export interface AppBarProps {
|
|
4
6
|
id?: string
|
|
5
7
|
type?: string
|
|
@@ -7,7 +9,7 @@ export interface AppBarProps {
|
|
|
7
9
|
subtitle?: TemplateResult | string | number
|
|
8
10
|
leading?: TemplateResult | string | number
|
|
9
11
|
trailing?: TemplateResult | string | number
|
|
10
|
-
children?:
|
|
12
|
+
children?: Renderable
|
|
11
13
|
isDense?: boolean
|
|
12
14
|
variant?: "regular" | "dense" | "prominent"
|
|
13
15
|
color?: "default" | "primary" | "secondary" | "transparent" | "inherit"
|
package/types/surfaces/card.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { TemplateResult } from "@inglorious/web"
|
|
2
2
|
|
|
3
|
+
import type { Renderable } from "../shared/renderable"
|
|
4
|
+
|
|
3
5
|
export interface CardProps {
|
|
4
6
|
id?: string
|
|
5
7
|
type?: string
|
|
@@ -21,7 +23,7 @@ export interface CardProps {
|
|
|
21
23
|
subtitle?: TemplateResult | string | number
|
|
22
24
|
header?: TemplateResult | string | number
|
|
23
25
|
body?: TemplateResult | string | number
|
|
24
|
-
children?:
|
|
26
|
+
children?: Renderable
|
|
25
27
|
footer?: TemplateResult | string | number
|
|
26
28
|
headerPadding?: "none" | "sm" | "md" | "lg" | "xl"
|
|
27
29
|
bodyPadding?: "none" | "sm" | "md" | "lg" | "xl"
|
|
@@ -30,7 +32,7 @@ export interface CardProps {
|
|
|
30
32
|
isClickable?: boolean
|
|
31
33
|
isFullWidth?: boolean
|
|
32
34
|
className?: string
|
|
33
|
-
onClick?: () => void
|
|
35
|
+
onClick?: (event: MouseEvent) => void
|
|
34
36
|
[key: string]: unknown
|
|
35
37
|
}
|
|
36
38
|
|