@logosphere-ui/core 0.0.0-alpha.33 → 0.0.0-alpha.35
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/atoms/Button/button.d.ts +5 -3
- package/dist/atoms/Slider/index.d.ts +1 -0
- package/dist/atoms/Slider/slider.d.ts +54 -0
- package/dist/index.cjs +287 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +844 -49
- package/dist/index.umd.js +453 -167
- package/dist/molecules/Accordion/accordion.d.ts +42 -0
- package/dist/molecules/Accordion/index.d.ts +2 -0
- package/dist/molecules/Collapse/collapse.d.ts +42 -0
- package/dist/molecules/Collapse/index.d.ts +2 -0
- package/dist/molecules/SplitButton/index.d.ts +2 -0
- package/dist/molecules/SplitButton/split-button.d.ts +53 -0
- package/dist/molecules/Stepper/index.d.ts +2 -0
- package/dist/molecules/Stepper/stepper.d.ts +34 -0
- package/dist/shared/types/button.types.d.ts +7 -0
- package/package.json +26 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import type { CollapseIconPosition, CollapseBorder, CollapseSize } from "../Collapse/collapse.js";
|
|
3
|
+
import "../Collapse/collapse.js";
|
|
4
|
+
export type { CollapseIconPosition, CollapseBorder, CollapseSize };
|
|
5
|
+
export interface AccordionItem {
|
|
6
|
+
title: string;
|
|
7
|
+
content: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare class Accordion extends LitElement {
|
|
11
|
+
static styles: import("lit").CSSResult[];
|
|
12
|
+
/**
|
|
13
|
+
* Built-in item list. When provided, renders managed Collapse components.
|
|
14
|
+
* Leave empty and use the default slot for custom content.
|
|
15
|
+
*/
|
|
16
|
+
items: AccordionItem[];
|
|
17
|
+
/** Allow multiple panels to be open simultaneously */
|
|
18
|
+
multiple: boolean;
|
|
19
|
+
/** Index(es) of initially open panel(s) */
|
|
20
|
+
defaultOpen: number | number[];
|
|
21
|
+
/** Border style applied to each panel */
|
|
22
|
+
border: CollapseBorder;
|
|
23
|
+
/** Icon position applied to each panel */
|
|
24
|
+
iconPosition: CollapseIconPosition;
|
|
25
|
+
/** Size applied to each panel */
|
|
26
|
+
size: CollapseSize;
|
|
27
|
+
private _openSet;
|
|
28
|
+
connectedCallback(): void;
|
|
29
|
+
disconnectedCallback(): void;
|
|
30
|
+
/**
|
|
31
|
+
* When consumers slot in their own logosphere-collapse elements, this
|
|
32
|
+
* handler intercepts the toggle event and enforces single-open behaviour.
|
|
33
|
+
*/
|
|
34
|
+
private _onSlottedToggle;
|
|
35
|
+
private _toggle;
|
|
36
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
37
|
+
}
|
|
38
|
+
declare global {
|
|
39
|
+
interface HTMLElementTagNameMap {
|
|
40
|
+
"logosphere-accordion": Accordion;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import "../../shared/icons/ui-icon";
|
|
3
|
+
export type CollapseIconPosition = "left" | "right";
|
|
4
|
+
export type CollapseBorder = "full" | "bottom";
|
|
5
|
+
export type CollapseSize = "default" | "small";
|
|
6
|
+
export declare class Collapse extends LitElement {
|
|
7
|
+
static styles: import("lit").CSSResult[];
|
|
8
|
+
/** Header title text */
|
|
9
|
+
title: string;
|
|
10
|
+
/** Whether the panel is expanded */
|
|
11
|
+
expanded: boolean;
|
|
12
|
+
/** Disabled state — prevents toggling */
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
/** Arrow icon position */
|
|
15
|
+
iconPosition: CollapseIconPosition;
|
|
16
|
+
/**
|
|
17
|
+
* Border style:
|
|
18
|
+
* - "full" → rounded border around the whole component
|
|
19
|
+
* - "bottom" → only a bottom border under the header (flat / accordion style)
|
|
20
|
+
*/
|
|
21
|
+
border: CollapseBorder;
|
|
22
|
+
/** Size variant */
|
|
23
|
+
size: CollapseSize;
|
|
24
|
+
private _inner?;
|
|
25
|
+
private _body?;
|
|
26
|
+
private _toggle;
|
|
27
|
+
private _onKeydown;
|
|
28
|
+
/**
|
|
29
|
+
* CLOSING: Called inside willUpdate — BEFORE Lit re-renders — so we can
|
|
30
|
+
* capture and lock the current height before the CSS class is removed.
|
|
31
|
+
*/
|
|
32
|
+
private _lockHeightForClose;
|
|
33
|
+
willUpdate(changed: Map<PropertyKey, unknown>): void;
|
|
34
|
+
updated(changed: Map<PropertyKey, unknown>): void;
|
|
35
|
+
private _renderIcon;
|
|
36
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
37
|
+
}
|
|
38
|
+
declare global {
|
|
39
|
+
interface HTMLElementTagNameMap {
|
|
40
|
+
"logosphere-collapse": Collapse;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import type { ButtonSize, ButtonTheme } from "../../shared/types/button.types.js";
|
|
3
|
+
import "../../shared/icons/ui-icon";
|
|
4
|
+
export type { ButtonSize, ButtonTheme };
|
|
5
|
+
export interface SplitButtonItem {
|
|
6
|
+
label: string;
|
|
7
|
+
value: string;
|
|
8
|
+
icon?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
/** Renders a separator line BEFORE this item */
|
|
11
|
+
divider?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare class SplitButton extends LitElement {
|
|
14
|
+
static styles: import("lit").CSSResult[];
|
|
15
|
+
/** Main action button label */
|
|
16
|
+
label: string;
|
|
17
|
+
/** Size — shared with Button */
|
|
18
|
+
size: ButtonSize;
|
|
19
|
+
/** Color theme — shared with Button */
|
|
20
|
+
theme: ButtonTheme;
|
|
21
|
+
/** Disable the entire component */
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
/** Disable only the dropdown arrow, leaving the main action active */
|
|
24
|
+
dropdownDisabled: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Built-in item list. When provided, SplitButton renders its own dropdown.
|
|
27
|
+
* If omitted, consumers should use slot="dropdown" for custom content.
|
|
28
|
+
*/
|
|
29
|
+
items: SplitButtonItem[];
|
|
30
|
+
private _open;
|
|
31
|
+
private _dropdownBtn;
|
|
32
|
+
private _panel?;
|
|
33
|
+
private _popper?;
|
|
34
|
+
connectedCallback(): void;
|
|
35
|
+
disconnectedCallback(): void;
|
|
36
|
+
updated(changed: Map<string, unknown>): void;
|
|
37
|
+
private _initPopper;
|
|
38
|
+
private _destroyPopper;
|
|
39
|
+
private _onDocClick;
|
|
40
|
+
private _onDocKeydown;
|
|
41
|
+
private _setOpen;
|
|
42
|
+
private _onActionClick;
|
|
43
|
+
private _onDropdownClick;
|
|
44
|
+
private _onItemClick;
|
|
45
|
+
private _onKeydown;
|
|
46
|
+
private _renderPanel;
|
|
47
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
48
|
+
}
|
|
49
|
+
declare global {
|
|
50
|
+
interface HTMLElementTagNameMap {
|
|
51
|
+
"logosphere-split-button": SplitButton;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import "../../shared/icons/ui-icon";
|
|
3
|
+
export type StepState = "completed" | "current" | "upcoming" | "disabled";
|
|
4
|
+
export type StepperOrientation = "horizontal" | "vertical";
|
|
5
|
+
export interface StepItem {
|
|
6
|
+
title: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
state?: StepState;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare class Stepper extends LitElement {
|
|
12
|
+
static styles: import("lit").CSSResult[];
|
|
13
|
+
/** Array of step definitions */
|
|
14
|
+
steps: StepItem[];
|
|
15
|
+
/** Index of the currently active step (0-based). Used when steps have no explicit state. */
|
|
16
|
+
activeStep: number;
|
|
17
|
+
/** Layout direction */
|
|
18
|
+
orientation: StepperOrientation;
|
|
19
|
+
/** Allow clicking on steps to navigate */
|
|
20
|
+
clickable: boolean;
|
|
21
|
+
private _resolveState;
|
|
22
|
+
private _onStepClick;
|
|
23
|
+
private _onStepKeydown;
|
|
24
|
+
private _focusStep;
|
|
25
|
+
private _renderIndicator;
|
|
26
|
+
private _renderConnector;
|
|
27
|
+
private _renderStep;
|
|
28
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
29
|
+
}
|
|
30
|
+
declare global {
|
|
31
|
+
interface HTMLElementTagNameMap {
|
|
32
|
+
"logosphere-stepper": Stepper;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Button Types
|
|
3
|
+
* Used by Button, SplitButton, and any other component that needs button-like sizing/theming.
|
|
4
|
+
*/
|
|
5
|
+
export type ButtonVariant = "solid" | "outline" | "text";
|
|
6
|
+
export type ButtonSize = "sm" | "md" | "lg";
|
|
7
|
+
export type ButtonTheme = "primary" | "secondary" | "success" | "danger" | "info" | "warning" | "light" | "dark";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logosphere-ui/core",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.35",
|
|
4
4
|
"description": "A modern, framework-agnostic UI component library built with Lit and Web Components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -91,6 +91,31 @@
|
|
|
91
91
|
"import": "./dist/combobox.js",
|
|
92
92
|
"require": "./dist/combobox.cjs"
|
|
93
93
|
},
|
|
94
|
+
"./slider": {
|
|
95
|
+
"types": "./dist/atoms/Slider/index.d.ts",
|
|
96
|
+
"import": "./dist/slider.js",
|
|
97
|
+
"require": "./dist/slider.cjs"
|
|
98
|
+
},
|
|
99
|
+
"./stepper": {
|
|
100
|
+
"types": "./dist/molecules/Stepper/index.d.ts",
|
|
101
|
+
"import": "./dist/stepper.js",
|
|
102
|
+
"require": "./dist/stepper.cjs"
|
|
103
|
+
},
|
|
104
|
+
"./split-button": {
|
|
105
|
+
"types": "./dist/molecules/SplitButton/index.d.ts",
|
|
106
|
+
"import": "./dist/split-button.js",
|
|
107
|
+
"require": "./dist/split-button.cjs"
|
|
108
|
+
},
|
|
109
|
+
"./collapse": {
|
|
110
|
+
"types": "./dist/molecules/Collapse/index.d.ts",
|
|
111
|
+
"import": "./dist/collapse.js",
|
|
112
|
+
"require": "./dist/collapse.cjs"
|
|
113
|
+
},
|
|
114
|
+
"./accordion": {
|
|
115
|
+
"types": "./dist/molecules/Accordion/index.d.ts",
|
|
116
|
+
"import": "./dist/accordion.js",
|
|
117
|
+
"require": "./dist/accordion.cjs"
|
|
118
|
+
},
|
|
94
119
|
"./textarea": {
|
|
95
120
|
"types": "./dist/molecules/Textarea/index.d.ts",
|
|
96
121
|
"import": "./dist/textarea.js",
|