@inglorious/ui 1.0.1 → 2.0.0
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 +11 -9
- package/src/controls/button/button.stories.js +2 -2
- package/src/controls/button/index.js +1 -1
- package/src/controls/button/template.js +2 -2
- package/src/controls/button-group/button-group.stories.js +2 -2
- package/src/controls/button-group/index.js +1 -1
- package/src/controls/button-group/template.js +4 -4
- package/src/controls/checkbox/checkbox.stories.js +2 -2
- package/src/controls/checkbox/index.js +1 -1
- package/src/controls/checkbox/template.js +2 -2
- package/src/controls/combobox/combobox.stories.js +3 -3
- package/src/controls/combobox/index.js +2 -2
- package/src/controls/combobox/template.js +35 -14
- package/src/controls/fab/fab.stories.js +2 -2
- package/src/controls/fab/index.js +1 -1
- package/src/controls/fab/template.js +4 -4
- package/src/controls/icon-button/icon-button.stories.js +2 -2
- package/src/controls/icon-button/index.js +1 -1
- package/src/controls/icon-button/template.js +4 -4
- package/src/controls/input/index.js +1 -1
- package/src/controls/input/input.stories.js +2 -2
- package/src/controls/input/template.js +2 -2
- package/src/controls/radio-group/index.js +1 -1
- package/src/controls/radio-group/radio-group.stories.js +2 -2
- package/src/controls/radio-group/template.js +2 -2
- package/src/controls/rating/index.js +1 -1
- package/src/controls/rating/rating.stories.js +2 -2
- package/src/controls/rating/template.js +2 -2
- package/src/controls/select/index.js +1 -1
- package/src/controls/select/select.stories.js +2 -2
- package/src/controls/select/template.js +2 -2
- package/src/controls/slider/index.js +1 -1
- package/src/controls/slider/slider.stories.js +2 -2
- package/src/controls/slider/template.js +2 -2
- package/src/controls/switch/index.js +1 -1
- package/src/controls/switch/switch.stories.js +2 -2
- package/src/controls/switch/template.js +2 -2
- package/src/data-display/avatar/avatar.stories.js +2 -2
- package/src/data-display/avatar/index.js +1 -1
- package/src/data-display/avatar/template.js +2 -1
- package/src/data-display/badge/badge.stories.js +2 -2
- package/src/data-display/badge/index.js +1 -1
- package/src/data-display/badge/template.js +7 -0
- package/src/data-display/chip/chip.stories.js +2 -2
- package/src/data-display/chip/index.js +1 -1
- package/src/data-display/chip/template.js +7 -0
- package/src/data-display/data-grid/data-grid.stories.js +4 -4
- package/src/data-display/data-grid/filters/index.js +10 -10
- package/src/data-display/data-grid/filters/input.js +3 -3
- package/src/data-display/data-grid/filters/range.js +4 -4
- package/src/data-display/data-grid/filters/select.js +3 -3
- package/src/data-display/data-grid/index.js +2 -2
- package/src/data-display/data-grid/template.js +40 -28
- package/src/data-display/divider/divider.stories.js +2 -2
- package/src/data-display/divider/index.js +1 -1
- package/src/data-display/divider/template.js +7 -0
- package/src/data-display/icon/icon-implementations.mdx +4 -4
- package/src/data-display/icon/icon-utf8.stories.js +9 -9
- package/src/data-display/icon/icon.stories.js +2 -2
- package/src/data-display/icon/index.js +1 -1
- package/src/data-display/icon/template.js +7 -0
- package/src/data-display/list/index.js +2 -2
- package/src/data-display/list/list.stories.js +2 -2
- package/src/data-display/list/template.js +22 -13
- package/src/data-display/material-icon/index.js +1 -1
- package/src/data-display/material-icon/material-icon.stories.js +2 -2
- package/src/data-display/material-icon/template.js +7 -0
- package/src/data-display/table/index.js +1 -1
- package/src/data-display/table/table.stories.js +2 -2
- package/src/data-display/table/template.js +19 -1
- package/src/data-display/tooltip/index.js +1 -1
- package/src/data-display/tooltip/template.js +2 -0
- package/src/data-display/tooltip/tooltip.stories.js +2 -2
- package/src/data-display/typography/index.js +1 -1
- package/src/data-display/typography/template.js +2 -0
- package/src/data-display/typography/typography.stories.js +2 -2
- package/src/data-display/virtual-list/index.js +1 -1
- package/src/data-display/virtual-list/template.js +4 -2
- package/src/examples/dashboard/app-drawer.js +15 -15
- package/src/examples/dashboard/app-header.js +33 -33
- package/src/examples/dashboard/dashboard-jsx.jsx +76 -0
- package/src/examples/dashboard/dashboard-vue.vue +68 -0
- package/src/examples/dashboard/dashboard.js +43 -42
- package/src/examples/dashboard/dashboard.stories.js +46 -16
- package/src/examples/dashboard/mode.js +1 -1
- package/src/examples/dashboard/primitive-content.js +248 -248
- package/src/examples/dashboard/primitive-section.js +25 -25
- package/src/examples/dashboard/router.js +1 -1
- package/src/examples/dashboard/social-card.js +14 -14
- package/src/examples/dashboard/stat-card.js +12 -12
- package/src/examples/dashboard/theme.js +1 -1
- package/src/examples/dashboard/traffic-card.js +22 -22
- package/src/examples/dashboard/traffic-sales-card.js +39 -39
- package/src/feedback/alert/alert.stories.js +2 -2
- package/src/feedback/alert/index.js +2 -2
- package/src/feedback/alert/template.js +2 -0
- package/src/feedback/backdrop/backdrop.stories.js +2 -2
- package/src/feedback/backdrop/index.js +2 -2
- package/src/feedback/backdrop/template.js +2 -0
- package/src/feedback/dialog/dialog.stories.js +2 -2
- package/src/feedback/dialog/index.js +2 -2
- package/src/feedback/dialog/template.js +2 -0
- package/src/feedback/progress/index.js +1 -1
- package/src/feedback/progress/progress.stories.js +2 -2
- package/src/feedback/progress/template.js +3 -1
- package/src/feedback/skeleton/index.js +2 -2
- package/src/feedback/skeleton/skeleton.stories.js +2 -2
- package/src/feedback/skeleton/template.js +2 -0
- package/src/feedback/snackbar/index.js +2 -2
- package/src/feedback/snackbar/snackbar.stories.js +2 -2
- package/src/feedback/snackbar/template.js +2 -0
- package/src/index.js +45 -45
- package/src/layout/container/container.stories.js +3 -3
- package/src/layout/container/index.js +1 -1
- package/src/layout/container/template.js +2 -0
- package/src/layout/flex/flex.stories.js +2 -2
- package/src/layout/flex/index.js +1 -1
- package/src/layout/flex/template.js +2 -3
- package/src/layout/grid/grid.stories.js +2 -2
- package/src/layout/grid/index.js +1 -1
- package/src/layout/grid/template.js +2 -3
- package/src/navigation/bottom-navigation/bottom-navigation.stories.js +2 -2
- package/src/navigation/bottom-navigation/index.js +1 -1
- package/src/navigation/bottom-navigation/template.js +16 -2
- package/src/navigation/breadcrumbs/breadcrumbs.stories.js +2 -2
- package/src/navigation/breadcrumbs/index.js +1 -1
- package/src/navigation/breadcrumbs/template.js +16 -2
- package/src/navigation/drawer/drawer.stories.js +2 -2
- package/src/navigation/drawer/index.js +1 -1
- package/src/navigation/drawer/template.js +15 -13
- package/src/navigation/link/index.js +2 -2
- package/src/navigation/link/link.stories.js +2 -2
- package/src/navigation/link/template.js +2 -0
- package/src/navigation/menu/index.js +1 -1
- package/src/navigation/menu/menu.stories.js +2 -2
- package/src/navigation/menu/template.js +15 -1
- package/src/navigation/pagination/index.js +1 -1
- package/src/navigation/pagination/pagination.stories.js +2 -2
- package/src/navigation/pagination/template.js +20 -4
- package/src/navigation/speed-dial/index.js +1 -1
- package/src/navigation/speed-dial/speed-dial.stories.js +2 -2
- package/src/navigation/speed-dial/template.js +15 -1
- package/src/navigation/stepper/index.js +1 -1
- package/src/navigation/stepper/stepper.stories.js +2 -2
- package/src/navigation/stepper/template.js +15 -1
- package/src/navigation/tabs/index.js +1 -1
- package/src/navigation/tabs/tabs.stories.js +2 -2
- package/src/navigation/tabs/template.js +17 -1
- package/src/surfaces/accordion/accordion.stories.js +2 -2
- package/src/surfaces/accordion/index.js +1 -1
- package/src/surfaces/accordion/template.js +15 -1
- package/src/surfaces/app-bar/app-bar.stories.js +2 -2
- package/src/surfaces/app-bar/index.js +1 -1
- package/src/surfaces/app-bar/template.js +2 -0
- package/src/surfaces/card/card.stories.js +2 -2
- package/src/surfaces/card/index.js +1 -1
- package/src/surfaces/card/template.js +19 -1
- package/src/surfaces/paper/index.js +2 -2
- package/src/surfaces/paper/paper.stories.js +3 -3
- package/src/surfaces/paper/template.js +2 -0
- package/types/controls/button-group.d.ts +1 -1
- package/types/controls/button.d.ts +2 -2
- package/types/controls/checkbox.d.ts +1 -1
- package/types/controls/combobox.d.ts +2 -1
- package/types/controls/fab.d.ts +1 -1
- package/types/controls/icon-button.d.ts +1 -1
- package/types/controls/input.d.ts +1 -1
- package/types/controls/radio-group.d.ts +1 -1
- package/types/controls/rating.d.ts +1 -1
- package/types/controls/select.d.ts +1 -1
- package/types/controls/slider.d.ts +1 -1
- package/types/controls/switch.d.ts +1 -1
- package/types/data-display/avatar.d.ts +1 -1
- package/types/data-display/badge.d.ts +1 -1
- package/types/data-display/chip.d.ts +1 -1
- package/types/data-display/data-grid.d.ts +2 -1
- package/types/data-display/divider.d.ts +1 -1
- package/types/data-display/icon.d.ts +1 -1
- package/types/data-display/list.d.ts +2 -1
- package/types/data-display/material-icon.d.ts +1 -1
- package/types/data-display/table.d.ts +2 -1
- package/types/data-display/tooltip.d.ts +1 -1
- package/types/data-display/typography.d.ts +1 -1
- package/types/data-display/virtual-list.d.ts +1 -1
- package/types/feedback/alert.d.ts +1 -1
- package/types/feedback/backdrop.d.ts +1 -1
- package/types/feedback/dialog.d.ts +1 -1
- package/types/feedback/progress.d.ts +1 -1
- package/types/feedback/skeleton.d.ts +1 -1
- package/types/feedback/snackbar.d.ts +1 -1
- package/types/layout/container.d.ts +1 -1
- package/types/layout/flex.d.ts +1 -1
- package/types/layout/grid.d.ts +1 -1
- package/types/navigation/bottom-navigation.d.ts +2 -1
- package/types/navigation/breadcrumbs.d.ts +2 -1
- package/types/navigation/drawer.d.ts +1 -1
- package/types/navigation/link.d.ts +1 -1
- package/types/navigation/menu.d.ts +2 -1
- package/types/navigation/pagination.d.ts +2 -1
- package/types/navigation/speed-dial.d.ts +2 -1
- package/types/navigation/stepper.d.ts +2 -1
- package/types/navigation/tabs.d.ts +2 -1
- package/types/surfaces/accordion.d.ts +2 -1
- package/types/surfaces/app-bar.d.ts +1 -1
- package/types/surfaces/card.d.ts +2 -1
- package/types/surfaces/paper.d.ts +1 -1
|
@@ -8,12 +8,24 @@ import { classMap, html, ref } from "@inglorious/web"
|
|
|
8
8
|
|
|
9
9
|
import { applyElementProps } from "../../shared/applyElementProps.js"
|
|
10
10
|
|
|
11
|
-
export const
|
|
11
|
+
export const Menu = {
|
|
12
12
|
/**
|
|
13
|
+
* Main entrypoint for a menu list. Delegates to the base renderer for overrides.
|
|
14
|
+
* Menus render selectable items and optional dividers.
|
|
13
15
|
* @param {MenuProps} props
|
|
14
16
|
* @returns {TemplateResult | null}
|
|
15
17
|
*/
|
|
16
18
|
render(props) {
|
|
19
|
+
return this.renderMenu(props)
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Renders the menu container and iterates items when open.
|
|
24
|
+
* Each item is delegated to `renderItem`.
|
|
25
|
+
* @param {MenuProps} props
|
|
26
|
+
* @returns {TemplateResult | null}
|
|
27
|
+
*/
|
|
28
|
+
renderMenu(props) {
|
|
17
29
|
const {
|
|
18
30
|
type, // eslint-disable-line no-unused-vars
|
|
19
31
|
isOpen = false,
|
|
@@ -46,6 +58,8 @@ export const menu = {
|
|
|
46
58
|
},
|
|
47
59
|
|
|
48
60
|
/**
|
|
61
|
+
* Renders a single menu item or divider.
|
|
62
|
+
* Handles selection, disabled state, and click callbacks.
|
|
49
63
|
* @param {MenuItem} item
|
|
50
64
|
* @param {number} index
|
|
51
65
|
* @param {MenuProps} props
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Pagination } from "./template.js"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRender } from "../../stories/notifyStory.js"
|
|
2
|
-
import {
|
|
2
|
+
import { Pagination } from "."
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Navigation/Pagination",
|
|
6
6
|
tags: ["autodocs"],
|
|
7
|
-
render: createRender(
|
|
7
|
+
render: createRender(Pagination),
|
|
8
8
|
argTypes: {
|
|
9
9
|
page: { control: "number", description: "Current page (1-based)." },
|
|
10
10
|
count: { control: "number", description: "Total number of pages." },
|
|
@@ -7,16 +7,28 @@
|
|
|
7
7
|
|
|
8
8
|
import { classMap, html } from "@inglorious/web"
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { Button } from "../../controls/button/index.js"
|
|
11
11
|
|
|
12
12
|
const PRETTY_PAGE = 1
|
|
13
13
|
|
|
14
|
-
export const
|
|
14
|
+
export const Pagination = {
|
|
15
15
|
/**
|
|
16
|
+
* Main entrypoint for pagination controls. Delegates to the base renderer for overrides.
|
|
17
|
+
* Supports sibling ranges, first/last buttons, and disabled state.
|
|
16
18
|
* @param {PaginationProps} props
|
|
17
19
|
* @returns {TemplateResult}
|
|
18
20
|
*/
|
|
19
21
|
render(props) {
|
|
22
|
+
return this.renderPagination(props)
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Renders the pagination container and page/control items.
|
|
27
|
+
* Items are delegated to `renderItem` and `renderControl`.
|
|
28
|
+
* @param {PaginationProps} props
|
|
29
|
+
* @returns {TemplateResult}
|
|
30
|
+
*/
|
|
31
|
+
renderPagination(props) {
|
|
20
32
|
const {
|
|
21
33
|
page = 1,
|
|
22
34
|
count = 1,
|
|
@@ -68,6 +80,8 @@ export const pagination = {
|
|
|
68
80
|
},
|
|
69
81
|
|
|
70
82
|
/**
|
|
83
|
+
* Renders a single page number item or ellipsis.
|
|
84
|
+
* Uses the button primitive for interactive pages.
|
|
71
85
|
* @param {PaginationProps} props
|
|
72
86
|
* @param {PaginationItemRenderProps} payload
|
|
73
87
|
* @returns {TemplateResult}
|
|
@@ -78,7 +92,7 @@ export const pagination = {
|
|
|
78
92
|
}
|
|
79
93
|
|
|
80
94
|
const isCurrent = item === props.page
|
|
81
|
-
return
|
|
95
|
+
return Button.render({
|
|
82
96
|
variant: isCurrent ? "default" : props.buttonVariant,
|
|
83
97
|
color: isCurrent ? "primary" : props.buttonColor,
|
|
84
98
|
size: props.buttonSize,
|
|
@@ -97,6 +111,8 @@ export const pagination = {
|
|
|
97
111
|
},
|
|
98
112
|
|
|
99
113
|
/**
|
|
114
|
+
* Renders a navigation control (first/prev/next/last).
|
|
115
|
+
* Uses the button primitive and wires change events.
|
|
100
116
|
* @param {PaginationProps} props
|
|
101
117
|
* @param {PaginationControlRenderProps} payload
|
|
102
118
|
* @returns {TemplateResult}
|
|
@@ -105,7 +121,7 @@ export const pagination = {
|
|
|
105
121
|
props,
|
|
106
122
|
{ label, target, isDisabled = false, onChange = props.onChange },
|
|
107
123
|
) {
|
|
108
|
-
return
|
|
124
|
+
return Button.render({
|
|
109
125
|
variant: props.buttonVariant,
|
|
110
126
|
color: props.buttonColor,
|
|
111
127
|
size: props.buttonSize,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { SpeedDial } from "./template.js"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRender } from "../../stories/notifyStory.js"
|
|
2
|
-
import {
|
|
2
|
+
import { SpeedDial } from "."
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Navigation/Speed Dial",
|
|
6
6
|
tags: ["autodocs"],
|
|
7
|
-
render: createRender(
|
|
7
|
+
render: createRender(SpeedDial),
|
|
8
8
|
argTypes: {
|
|
9
9
|
isOpen: {
|
|
10
10
|
control: "boolean",
|
|
@@ -6,12 +6,24 @@
|
|
|
6
6
|
|
|
7
7
|
import { classMap, html } from "@inglorious/web"
|
|
8
8
|
|
|
9
|
-
export const
|
|
9
|
+
export const SpeedDial = {
|
|
10
10
|
/**
|
|
11
|
+
* Main entrypoint for the speed dial. Delegates to the base renderer for overrides.
|
|
12
|
+
* Shows a trigger button and an expandable list of actions.
|
|
11
13
|
* @param {SpeedDialProps} props
|
|
12
14
|
* @returns {TemplateResult}
|
|
13
15
|
*/
|
|
14
16
|
render(props) {
|
|
17
|
+
return this.renderSpeedDial(props)
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Renders the speed dial container, trigger, and optional actions list.
|
|
22
|
+
* Actions are delegated to `renderAction`.
|
|
23
|
+
* @param {SpeedDialProps} props
|
|
24
|
+
* @returns {TemplateResult}
|
|
25
|
+
*/
|
|
26
|
+
renderSpeedDial(props) {
|
|
15
27
|
const {
|
|
16
28
|
isOpen = false,
|
|
17
29
|
direction = "up",
|
|
@@ -46,6 +58,8 @@ export const speedDial = {
|
|
|
46
58
|
},
|
|
47
59
|
|
|
48
60
|
/**
|
|
61
|
+
* Renders a single speed dial action button.
|
|
62
|
+
* Handles click callbacks and disabled state.
|
|
49
63
|
* @param {SpeedDialAction} action
|
|
50
64
|
* @param {number} index
|
|
51
65
|
* @param {SpeedDialProps} props
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Stepper } from "./template.js"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRender } from "../../stories/notifyStory.js"
|
|
2
|
-
import {
|
|
2
|
+
import { Stepper } from "."
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Navigation/Stepper",
|
|
6
6
|
tags: ["autodocs"],
|
|
7
|
-
render: createRender(
|
|
7
|
+
render: createRender(Stepper),
|
|
8
8
|
argTypes: {
|
|
9
9
|
steps: { control: "object", description: "Ordered step definitions." },
|
|
10
10
|
activeStep: {
|
|
@@ -6,12 +6,24 @@
|
|
|
6
6
|
|
|
7
7
|
import { classMap, html } from "@inglorious/web"
|
|
8
8
|
|
|
9
|
-
export const
|
|
9
|
+
export const Stepper = {
|
|
10
10
|
/**
|
|
11
|
+
* Main entrypoint for the stepper component. Delegates to the base renderer for overrides.
|
|
12
|
+
* Steppers render a sequence of steps with completion states.
|
|
11
13
|
* @param {StepperProps} props
|
|
12
14
|
* @returns {TemplateResult}
|
|
13
15
|
*/
|
|
14
16
|
render(props) {
|
|
17
|
+
return this.renderStepper(props)
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Renders the ordered list of steps with orientation styling.
|
|
22
|
+
* Each step is delegated to `renderStep`.
|
|
23
|
+
* @param {StepperProps} props
|
|
24
|
+
* @returns {TemplateResult}
|
|
25
|
+
*/
|
|
26
|
+
renderStepper(props) {
|
|
15
27
|
const {
|
|
16
28
|
steps = [],
|
|
17
29
|
activeStep = 0,
|
|
@@ -33,6 +45,8 @@ export const stepper = {
|
|
|
33
45
|
},
|
|
34
46
|
|
|
35
47
|
/**
|
|
48
|
+
* Renders a single step with label, optional text, and completion state.
|
|
49
|
+
* Calculates active/completed styling based on the current step.
|
|
36
50
|
* @param {Step} step
|
|
37
51
|
* @param {number} index
|
|
38
52
|
* @param {StepperProps} props
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Tabs } from "./template.js"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRender } from "../../stories/notifyStory.js"
|
|
2
|
-
import {
|
|
2
|
+
import { Tabs } from "."
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Navigation/Tabs",
|
|
6
6
|
tags: ["autodocs"],
|
|
7
|
-
render: createRender(
|
|
7
|
+
render: createRender(Tabs),
|
|
8
8
|
argTypes: {
|
|
9
9
|
items: {
|
|
10
10
|
control: "object",
|
|
@@ -6,12 +6,24 @@
|
|
|
6
6
|
|
|
7
7
|
import { classMap, html } from "@inglorious/web"
|
|
8
8
|
|
|
9
|
-
export const
|
|
9
|
+
export const Tabs = {
|
|
10
10
|
/**
|
|
11
|
+
* Main entrypoint for tabbed navigation. Delegates to the base renderer for overrides.
|
|
12
|
+
* Renders tab labels and the active panel.
|
|
11
13
|
* @param {TabsProps} props
|
|
12
14
|
* @returns {TemplateResult}
|
|
13
15
|
*/
|
|
14
16
|
render(props) {
|
|
17
|
+
return this.renderTabs(props)
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Renders the tabs list and the active panel container.
|
|
22
|
+
* Individual tabs are delegated to `renderTab`.
|
|
23
|
+
* @param {TabsProps} props
|
|
24
|
+
* @returns {TemplateResult}
|
|
25
|
+
*/
|
|
26
|
+
renderTabs(props) {
|
|
15
27
|
const {
|
|
16
28
|
items = [],
|
|
17
29
|
value = items[0]?.value ?? 0,
|
|
@@ -40,6 +52,8 @@ export const tabs = {
|
|
|
40
52
|
},
|
|
41
53
|
|
|
42
54
|
/**
|
|
55
|
+
* Renders a single tab button with selected/disabled states.
|
|
56
|
+
* Wires click events to update the active tab.
|
|
43
57
|
* @param {TabItem} item
|
|
44
58
|
* @param {number} index
|
|
45
59
|
* @param {TabsProps} props
|
|
@@ -69,6 +83,8 @@ export const tabs = {
|
|
|
69
83
|
},
|
|
70
84
|
|
|
71
85
|
/**
|
|
86
|
+
* Renders the active tab panel content.
|
|
87
|
+
* Returns `null` when the active item has no panel.
|
|
72
88
|
* @param {TabItem | null} item
|
|
73
89
|
* @returns {TemplateResult | null}
|
|
74
90
|
*/
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { html } from "@inglorious/web"
|
|
2
2
|
|
|
3
3
|
import { createRender } from "../../stories/notifyStory.js"
|
|
4
|
-
import {
|
|
4
|
+
import { Accordion } from "."
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
title: "Surfaces/Accordion",
|
|
8
8
|
tags: ["autodocs"],
|
|
9
|
-
render: createRender(
|
|
9
|
+
render: createRender(Accordion),
|
|
10
10
|
argTypes: {
|
|
11
11
|
items: {
|
|
12
12
|
control: "object",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Accordion } from "./template.js"
|
|
@@ -8,12 +8,24 @@ import { classMap, html, ref } from "@inglorious/web"
|
|
|
8
8
|
|
|
9
9
|
import { applyElementProps } from "../../shared/applyElementProps.js"
|
|
10
10
|
|
|
11
|
-
export const
|
|
11
|
+
export const Accordion = {
|
|
12
12
|
/**
|
|
13
|
+
* Main entrypoint for the accordion component. Delegates to the base accordion renderer for overrides.
|
|
14
|
+
* Accordions render a list of collapsible items with optional icons.
|
|
13
15
|
* @param {AccordionProps} props
|
|
14
16
|
* @returns {TemplateResult}
|
|
15
17
|
*/
|
|
16
18
|
render(props) {
|
|
19
|
+
return this.renderAccordion(props)
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Renders the accordion container and iterates items.
|
|
24
|
+
* Each item is delegated to `renderItem`.
|
|
25
|
+
* @param {AccordionProps} props
|
|
26
|
+
* @returns {TemplateResult}
|
|
27
|
+
*/
|
|
28
|
+
renderAccordion(props) {
|
|
17
29
|
const {
|
|
18
30
|
type, // eslint-disable-line no-unused-vars
|
|
19
31
|
items = [],
|
|
@@ -40,6 +52,8 @@ export const accordion = {
|
|
|
40
52
|
},
|
|
41
53
|
|
|
42
54
|
/**
|
|
55
|
+
* Renders a single accordion item with trigger and panel content.
|
|
56
|
+
* Handles expand/collapse behavior and item-level callbacks.
|
|
43
57
|
* @param {AccordionItem} item
|
|
44
58
|
* @param {number} index
|
|
45
59
|
* @param {AccordionProps} props
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { html } from "@inglorious/web"
|
|
2
2
|
|
|
3
3
|
import { createRender } from "../../stories/notifyStory.js"
|
|
4
|
-
import {
|
|
4
|
+
import { AppBar } from "."
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
title: "Surfaces/App Bar",
|
|
8
8
|
tags: ["autodocs"],
|
|
9
|
-
render: createRender(
|
|
9
|
+
render: createRender(AppBar),
|
|
10
10
|
argTypes: {
|
|
11
11
|
title: {
|
|
12
12
|
control: "text",
|
|
@@ -8,6 +8,8 @@ import { classMap, html, ref, when } from "@inglorious/web"
|
|
|
8
8
|
import { applyElementProps } from "../../shared/applyElementProps.js"
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
+
* Renders a top app bar with optional leading/trailing content and title metadata.
|
|
12
|
+
* Supports variants, density, color, and positioning modes.
|
|
11
13
|
* @param {AppBarProps} props
|
|
12
14
|
* @returns {TemplateResult}
|
|
13
15
|
*/
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { html } from "@inglorious/web"
|
|
2
2
|
|
|
3
3
|
import { createRender } from "../../stories/notifyStory.js"
|
|
4
|
-
import {
|
|
4
|
+
import { Card } from "."
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
title: "Surfaces/Card",
|
|
8
8
|
tags: ["autodocs"],
|
|
9
|
-
render: createRender(
|
|
9
|
+
render: createRender(Card),
|
|
10
10
|
argTypes: {
|
|
11
11
|
title: {
|
|
12
12
|
control: "text",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Card } from "./template.js"
|
|
@@ -7,12 +7,24 @@ import { classMap, html, ref } from "@inglorious/web"
|
|
|
7
7
|
|
|
8
8
|
import { applyElementProps } from "../../shared/applyElementProps.js"
|
|
9
9
|
|
|
10
|
-
export const
|
|
10
|
+
export const Card = {
|
|
11
11
|
/**
|
|
12
|
+
* Main entrypoint for the card component. Delegates to the base card renderer for easy overrides.
|
|
13
|
+
* Cards support header, body, and footer slots with optional click behavior.
|
|
12
14
|
* @param {CardProps} props
|
|
13
15
|
* @returns {TemplateResult}
|
|
14
16
|
*/
|
|
15
17
|
render(props) {
|
|
18
|
+
return this.renderCard(props)
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Renders the card container and composes header, body, and footer sub-sections.
|
|
23
|
+
* Uses `element` to control the semantic tag.
|
|
24
|
+
* @param {CardProps} props
|
|
25
|
+
* @returns {TemplateResult}
|
|
26
|
+
*/
|
|
27
|
+
renderCard(props) {
|
|
16
28
|
const {
|
|
17
29
|
type, // eslint-disable-line no-unused-vars
|
|
18
30
|
element = "article",
|
|
@@ -52,6 +64,8 @@ export const card = {
|
|
|
52
64
|
},
|
|
53
65
|
|
|
54
66
|
/**
|
|
67
|
+
* Renders the optional card header area (title, subtitle, or custom header content).
|
|
68
|
+
* Returns `null` when no header content is provided.
|
|
55
69
|
* @param {CardProps} props
|
|
56
70
|
* @returns {TemplateResult | null}
|
|
57
71
|
*/
|
|
@@ -83,6 +97,8 @@ export const card = {
|
|
|
83
97
|
},
|
|
84
98
|
|
|
85
99
|
/**
|
|
100
|
+
* Renders the main card content area.
|
|
101
|
+
* Returns `null` when there is no body or children content.
|
|
86
102
|
* @param {CardProps} props
|
|
87
103
|
* @returns {TemplateResult | null}
|
|
88
104
|
*/
|
|
@@ -103,6 +119,8 @@ export const card = {
|
|
|
103
119
|
},
|
|
104
120
|
|
|
105
121
|
/**
|
|
122
|
+
* Renders the optional card footer area, typically for actions.
|
|
123
|
+
* Returns `null` when no footer content is provided.
|
|
106
124
|
* @param {CardProps} props
|
|
107
125
|
* @returns {TemplateResult | null}
|
|
108
126
|
*/
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as renderers from "./template.js"
|
|
2
2
|
|
|
3
|
-
export const
|
|
3
|
+
export const Paper = { ...renderers }
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { html } from "@inglorious/web"
|
|
2
2
|
|
|
3
3
|
import { createRender } from "../../stories/notifyStory.js"
|
|
4
|
-
import {
|
|
4
|
+
import { Paper } from "."
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
title: "Surfaces/Paper",
|
|
8
8
|
tags: ["autodocs"],
|
|
9
|
-
render: createRender(
|
|
9
|
+
render: createRender(Paper),
|
|
10
10
|
argTypes: {
|
|
11
11
|
variant: {
|
|
12
12
|
control: "select",
|
|
@@ -85,7 +85,7 @@ export const AllElevations = {
|
|
|
85
85
|
${[0, 1, 2, 3, 4].map(
|
|
86
86
|
(level) =>
|
|
87
87
|
html`<div>
|
|
88
|
-
${
|
|
88
|
+
${Paper.render({
|
|
89
89
|
variant: "elevated",
|
|
90
90
|
elevation: level,
|
|
91
91
|
padding: "md",
|
|
@@ -8,6 +8,8 @@ import { classMap, html, ref } from "@inglorious/web"
|
|
|
8
8
|
import { applyElementProps } from "../../shared/applyElementProps.js"
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
+
* Renders a surface container with elevation, radius, and padding options.
|
|
12
|
+
* Use it as a generic surface for grouping content.
|
|
11
13
|
* @param {PaperProps} props
|
|
12
14
|
* @returns {TemplateResult}
|
|
13
15
|
*/
|
|
@@ -2,7 +2,7 @@ import type { TemplateResult } from "@inglorious/web"
|
|
|
2
2
|
|
|
3
3
|
export interface ButtonProps {
|
|
4
4
|
id?: string
|
|
5
|
-
type: "
|
|
5
|
+
type: "Button"
|
|
6
6
|
children?: TemplateResult | string | number
|
|
7
7
|
variant?: "default" | "outline" | "ghost"
|
|
8
8
|
color?: "primary" | "secondary" | "success" | "warning" | "error" | "info"
|
|
@@ -23,4 +23,4 @@ export interface ButtonType {
|
|
|
23
23
|
render(props: ButtonProps): TemplateResult
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
export declare const
|
|
26
|
+
export declare const Button: ButtonType
|
|
@@ -51,6 +51,7 @@ export interface ComboboxProps {
|
|
|
51
51
|
export interface ComboboxType {
|
|
52
52
|
create(entity: ComboboxProps): void
|
|
53
53
|
render(entity: ComboboxProps, api: Api): TemplateResult
|
|
54
|
+
renderCombobox(props: ComboboxProps): TemplateResult
|
|
54
55
|
open(entity: ComboboxProps): void
|
|
55
56
|
close(entity: ComboboxProps): void
|
|
56
57
|
toggle(entity: ComboboxProps): void
|
|
@@ -63,4 +64,4 @@ export interface ComboboxType {
|
|
|
63
64
|
focusLast(entity: ComboboxProps): void
|
|
64
65
|
}
|
|
65
66
|
|
|
66
|
-
export declare const
|
|
67
|
+
export declare const Combobox: ComboboxType
|
package/types/controls/fab.d.ts
CHANGED
|
@@ -122,9 +122,10 @@ export interface DataGridType {
|
|
|
122
122
|
rowsToggleAll(entity: DataGridProps): void
|
|
123
123
|
rowsSelectAll(entity: DataGridProps): void
|
|
124
124
|
selectionClear(entity: DataGridProps): void
|
|
125
|
-
virtualScroll(entity: DataGridProps, containerEl: HTMLElement): void
|
|
126
125
|
virtualMount(entity: DataGridProps, containerEl: HTMLElement): void
|
|
126
|
+
virtualScroll(entity: DataGridProps, containerEl: HTMLElement): void
|
|
127
127
|
render(entity: DataGridProps, api: Api): TemplateResult
|
|
128
|
+
renderDataGrid(entity: DataGridProps, api: Api): TemplateResult
|
|
128
129
|
renderHeader(entity: DataGridProps, api: Api): TemplateResult
|
|
129
130
|
renderToolbar(entity: DataGridProps, api: Api): TemplateResult
|
|
130
131
|
renderHeaderColumn(
|
|
@@ -39,6 +39,7 @@ export interface ListProps {
|
|
|
39
39
|
|
|
40
40
|
export interface ListType {
|
|
41
41
|
render(props: ListProps): TemplateResult
|
|
42
|
+
renderList(props: ListProps): TemplateResult
|
|
42
43
|
renderItem(
|
|
43
44
|
props: ListProps,
|
|
44
45
|
payload: {
|
|
@@ -63,4 +64,4 @@ export interface ListType {
|
|
|
63
64
|
): TemplateResult
|
|
64
65
|
}
|
|
65
66
|
|
|
66
|
-
export declare const
|
|
67
|
+
export declare const List: ListType
|