@chenyqthu/omada-ui-kit 0.1.0 → 0.2.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.
@@ -0,0 +1,53 @@
1
+ import React from 'react';
2
+ export type SAclPolicy = 'Deny' | 'Permit';
3
+ export interface SAclObjectOption {
4
+ value: string;
5
+ label: string;
6
+ description?: string;
7
+ }
8
+ export interface SAclEndpointTypeOption {
9
+ value: string;
10
+ label: string;
11
+ /** Shows a footer `+ Create` button inside the endpoint card when active. */
12
+ creatable?: boolean;
13
+ }
14
+ export interface SAclEndpointValue {
15
+ type?: string;
16
+ items: string[];
17
+ }
18
+ export interface SAclRuleBuilderProps {
19
+ /** Traffic rule policy governing the visual center arrow (`Deny` vs `Permit`). */
20
+ policy: SAclPolicy;
21
+ /** Current Source card type + checked item values. */
22
+ source: SAclEndpointValue;
23
+ /** Callback invoked when Source type or checked items change. */
24
+ onSourceChange: (next: SAclEndpointValue) => void;
25
+ /** Current Destination card type + checked item values. */
26
+ destination: SAclEndpointValue;
27
+ /** Callback invoked when Destination type or checked item values change. */
28
+ onDestinationChange: (next: SAclEndpointValue) => void;
29
+ /** Selectable endpoint types for the Source card. */
30
+ sourceTypeOptions: SAclEndpointTypeOption[];
31
+ /** Selectable endpoint types for the Destination card. */
32
+ destinationTypeOptions: SAclEndpointTypeOption[];
33
+ /** Returns checklist items belonging to the chosen endpoint type. */
34
+ getItemsForType: (type: string, side: 'source' | 'destination') => SAclObjectOption[];
35
+ /** Optional tooltip shown next to the Source card heading (e.g., EAP ACL). */
36
+ sourceTooltip?: string;
37
+ /** Optional tooltip shown next to the Destination card heading. */
38
+ destinationTooltip?: string;
39
+ /** Marks Source type selector with validation error border when true. */
40
+ sourceError?: boolean;
41
+ /** Marks Destination type selector with validation error border when true. */
42
+ destinationError?: boolean;
43
+ /** Invoked when the per-row detail icon button is clicked inside either card. */
44
+ onInspectItem?: (type: string, item: SAclObjectOption, side: 'source' | 'destination') => void;
45
+ /** Invoked when `+ Create` in a card footer is clicked (for creatable Group types). */
46
+ onCreateGroup?: (type: string, side: 'source' | 'destination') => void;
47
+ className?: string;
48
+ }
49
+ /**
50
+ * Omada Controller v6.3 visual `Source → Policy Arrow → Destination` dual-card
51
+ * selector used in Gateway ACL, Switch ACL, and EAP ACL rule configuration.
52
+ */
53
+ export declare const SAclRuleBuilder: React.FC<SAclRuleBuilderProps>;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ export interface SExpandableSectionProps {
3
+ /** Section heading displayed next to the `[+]` / `[-]` toggle square. */
4
+ title: React.ReactNode;
5
+ /** Controlled expanded state. */
6
+ expanded?: boolean;
7
+ /** Initial uncontrolled expanded state (default `false`). */
8
+ defaultExpanded?: boolean;
9
+ /** Invoked when the section toggle is clicked. */
10
+ onExpandedChange?: (expanded: boolean) => void;
11
+ /** Optional trailing content rendered on the same row as the toggle header. */
12
+ extra?: React.ReactNode;
13
+ children: React.ReactNode;
14
+ className?: string;
15
+ }
16
+ /**
17
+ * Omada Controller v6.3 square `[+]` / `[-]` expandable settings section
18
+ * (used for `Advanced Settings`, `ACL Binding`, and progressive disclosure blocks).
19
+ */
20
+ export declare const SExpandableSection: React.FC<SExpandableSectionProps>;
@@ -11,3 +11,5 @@ export { DEFAULT_DEVICE_HEALTH_SUMMARY_ITEMS, SDeviceHealthSummary, type DeviceH
11
11
  export { LagGlyph, PortBadgeTile, PortStatusLegend, SDevicePortGraphic, SfpGlyph, resolveConnectedProductSlug, type DrawerPortItem, type PortBadgeTileProps, type SDevicePortGraphicProps, } from '../components/SDevicePortGraphic';
12
12
  export { SSettingsInfoBanner, SSettingsPageShell, SSettingsRow, SSettingsSection, type SSettingsInfoBannerProps, type SSettingsPageShellProps, type SSettingsRowProps, type SSettingsSectionProps, type SSettingsTabItem, } from '../components/SSettingsPageShell';
13
13
  export { STerminalConsole, type STerminalConsoleProps, type STerminalSessionItem, } from '../components/STerminalConsole';
14
+ export { SExpandableSection, type SExpandableSectionProps, } from '../components/SExpandableSection';
15
+ export { SAclRuleBuilder, type SAclEndpointTypeOption, type SAclEndpointValue, type SAclObjectOption, type SAclPolicy, type SAclRuleBuilderProps, } from '../components/SAclRuleBuilder';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chenyqthu/omada-ui-kit",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Omada Controller v6.3 React UI component library (Ant Design 6 + Design Tokens + Figma Assets + Single-file HTML standalone bundle)",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -154,7 +154,7 @@ node scripts/query-catalog.mjs recipes
154
154
  - **Theme & Layout**: `OmadaProvider`, `useOmadaTheme`, `SEmulatorShell`, `EMULATOR_NAV_GROUPS`, `SAppShell`, `SPageHeader`
155
155
  - **Data Display & Tables**: `SCard`, `SKpiCard`, `STable`, `STabs`, `STag`, `SCustomTag`, `SDeviceStatus`, `SDescriptions`, `SCollapse`, `SPortPanel`, `SDevicePortGraphic`, `STopologyCanvas`
156
156
  - **Charts & Health**: `SLineChart`, `SBarChart`, `SDonutChart`, `SSparkChart`, `SDonutSummaryCard`, `SHealthGauge`, `SHealthRadar`, `SHealthTrendBar`, `SApDistributionRuler`, `SChannelUtilization`, `SDeviceHealthSummary`, `SClientOverviewStrip`, `SCategoryKpiCarousel`
157
- - **Inputs & Settings**: `SButton`, `SInput`, `SSearchInput`, `SPasswordInput`, `SNumberInput`, `STextArea`, `SIpInput`, `SMacInput`, `SSelect`, `SSwitch`, `SSlider`, `SRadio`, `SCheckbox`, `SDatePicker`, `STimePicker`, `SSchedule`, `SForm`, `SFormSection`, `SFormItem`, `SSettingsPageShell`, `SSettingsSection`, `SSettingsRow`, `SSettingsInfoBanner`
157
+ - **Inputs & Settings**: `SButton`, `SInput`, `SSearchInput`, `SPasswordInput`, `SNumberInput`, `STextArea`, `SIpInput`, `SMacInput`, `SSelect`, `SSwitch`, `SSlider`, `SRadio`, `SCheckbox`, `SDatePicker`, `STimePicker`, `SSchedule`, `SForm`, `SFormSection`, `SFormItem`, `SSettingsPageShell`, `SSettingsSection`, `SSettingsRow`, `SSettingsInfoBanner`, `SExpandableSection`, `SAclRuleBuilder`
158
158
  - **Feedback & Diagnostics**: `SAlert`, `SModal`, `useOmadaConfirm`, `SDrawer`, `SEmpty`, `useOmadaFeedback`, `STerminalConsole`
159
159
  - **Bundled Figma Assets**: `SIcon`, `SProductImage`, `SIllustration`, `SClientIcon`, `SBrandAsset`, `SDeviceIcon`, `OmadaLogo`
160
160
  - **Ant Design 6 Re-exports**: `Row`, `Col`, `Space`, `Badge`, `Popover`, `Tooltip`, `Dropdown`, `Progress`, `Pagination`, `Divider`, `Switch`, `Select`, etc.
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-11-21T21:29:22.149Z",
3
+ "generatedAt": "2026-11-21T21:53:16.612Z",
4
4
  "package": {
5
5
  "name": "@chenyqthu/omada-ui-kit",
6
- "version": "0.1.0",
6
+ "version": "0.2.0",
7
7
  "description": "Omada Controller v6.3 React UI component library (Ant Design 6 + Design Tokens + Figma Assets + Single-file HTML standalone bundle)",
8
8
  "entries": {
9
9
  "import": "@chenyqthu/omada-ui-kit",
@@ -14,12 +14,12 @@
14
14
  "cdn": {
15
15
  "jsdelivrCss": "https://cdn.jsdelivr.net/npm/@chenyqthu/omada-ui-kit@latest/dist/style.css",
16
16
  "jsdelivrStandalone": "https://cdn.jsdelivr.net/npm/@chenyqthu/omada-ui-kit@latest/dist/standalone.js",
17
- "pinnedCss": "https://cdn.jsdelivr.net/npm/@chenyqthu/omada-ui-kit@0.1.0/dist/style.css",
18
- "pinnedStandalone": "https://cdn.jsdelivr.net/npm/@chenyqthu/omada-ui-kit@0.1.0/dist/standalone.js"
17
+ "pinnedCss": "https://cdn.jsdelivr.net/npm/@chenyqthu/omada-ui-kit@0.2.0/dist/style.css",
18
+ "pinnedStandalone": "https://cdn.jsdelivr.net/npm/@chenyqthu/omada-ui-kit@0.2.0/dist/standalone.js"
19
19
  }
20
20
  },
21
21
  "counts": {
22
- "components": 104,
22
+ "components": 106,
23
23
  "antdPrimitives": 27,
24
24
  "hooksAndHelpers": 24,
25
25
  "icons": 586,
@@ -1750,6 +1750,105 @@
1750
1750
  "sourcePath": "src/omada/components/SDevicePortGraphic.tsx",
1751
1751
  "description": "Resolves a valid `SProductImage` slug for a connected neighbor device."
1752
1752
  },
1753
+ {
1754
+ "name": "SAclRuleBuilder",
1755
+ "category": "emulator-v6",
1756
+ "kind": "component",
1757
+ "sourcePath": "src/omada/components/SAclRuleBuilder.tsx",
1758
+ "description": "Omada Controller v6.3 visual `Source → Policy Arrow → Destination` dual-card selector used in Gateway ACL, Switch ACL, and EAP ACL rule configuration.",
1759
+ "propsType": "SAclRuleBuilderProps",
1760
+ "props": [
1761
+ {
1762
+ "name": "policy",
1763
+ "type": "SAclPolicy",
1764
+ "optional": false,
1765
+ "description": "Traffic rule policy governing the visual center arrow (`Deny` vs `Permit`)."
1766
+ },
1767
+ {
1768
+ "name": "source",
1769
+ "type": "SAclEndpointValue",
1770
+ "optional": false,
1771
+ "description": "Current Source card type + checked item values."
1772
+ },
1773
+ {
1774
+ "name": "onSourceChange",
1775
+ "type": "(next: SAclEndpointValue) => void",
1776
+ "optional": false,
1777
+ "description": "Callback invoked when Source type or checked items change."
1778
+ },
1779
+ {
1780
+ "name": "destination",
1781
+ "type": "SAclEndpointValue",
1782
+ "optional": false,
1783
+ "description": "Current Destination card type + checked item values."
1784
+ },
1785
+ {
1786
+ "name": "onDestinationChange",
1787
+ "type": "(next: SAclEndpointValue) => void",
1788
+ "optional": false,
1789
+ "description": "Callback invoked when Destination type or checked item values change."
1790
+ },
1791
+ {
1792
+ "name": "sourceTypeOptions",
1793
+ "type": "SAclEndpointTypeOption[]",
1794
+ "optional": false,
1795
+ "description": "Selectable endpoint types for the Source card."
1796
+ },
1797
+ {
1798
+ "name": "destinationTypeOptions",
1799
+ "type": "SAclEndpointTypeOption[]",
1800
+ "optional": false,
1801
+ "description": "Selectable endpoint types for the Destination card."
1802
+ },
1803
+ {
1804
+ "name": "getItemsForType",
1805
+ "type": "(type: string, side: 'source' | 'destination') => SAclObjectOption[]",
1806
+ "optional": false,
1807
+ "description": "Returns checklist items belonging to the chosen endpoint type."
1808
+ },
1809
+ {
1810
+ "name": "sourceTooltip",
1811
+ "type": "string",
1812
+ "optional": true,
1813
+ "description": "Optional tooltip shown next to the Source card heading (e.g., EAP ACL)."
1814
+ },
1815
+ {
1816
+ "name": "destinationTooltip",
1817
+ "type": "string",
1818
+ "optional": true,
1819
+ "description": "Optional tooltip shown next to the Destination card heading."
1820
+ },
1821
+ {
1822
+ "name": "sourceError",
1823
+ "type": "boolean",
1824
+ "optional": true,
1825
+ "description": "Marks Source type selector with validation error border when true."
1826
+ },
1827
+ {
1828
+ "name": "destinationError",
1829
+ "type": "boolean",
1830
+ "optional": true,
1831
+ "description": "Marks Destination type selector with validation error border when true."
1832
+ },
1833
+ {
1834
+ "name": "onInspectItem",
1835
+ "type": "(type: string, item: SAclObjectOption, side: 'source' | 'destination') => void",
1836
+ "optional": true,
1837
+ "description": "Invoked when the per-row detail icon button is clicked inside either card."
1838
+ },
1839
+ {
1840
+ "name": "onCreateGroup",
1841
+ "type": "(type: string, side: 'source' | 'destination') => void",
1842
+ "optional": true,
1843
+ "description": "Invoked when `+ Create` in a card footer is clicked (for creatable Group types)."
1844
+ },
1845
+ {
1846
+ "name": "className",
1847
+ "type": "string",
1848
+ "optional": true
1849
+ }
1850
+ ]
1851
+ },
1753
1852
  {
1754
1853
  "name": "SApDistributionRuler",
1755
1854
  "category": "emulator-v6",
@@ -2251,6 +2350,56 @@
2251
2350
  }
2252
2351
  ]
2253
2352
  },
2353
+ {
2354
+ "name": "SExpandableSection",
2355
+ "category": "emulator-v6",
2356
+ "kind": "component",
2357
+ "sourcePath": "src/omada/components/SExpandableSection.tsx",
2358
+ "description": "Omada Controller v6.3 square `[+]` / `[-]` expandable settings section (used for `Advanced Settings`, `ACL Binding`, and progressive disclosure blocks).",
2359
+ "propsType": "SExpandableSectionProps",
2360
+ "props": [
2361
+ {
2362
+ "name": "title",
2363
+ "type": "React.ReactNode",
2364
+ "optional": false,
2365
+ "description": "Section heading displayed next to the `[+]` / `[-]` toggle square."
2366
+ },
2367
+ {
2368
+ "name": "expanded",
2369
+ "type": "boolean",
2370
+ "optional": true,
2371
+ "description": "Controlled expanded state."
2372
+ },
2373
+ {
2374
+ "name": "defaultExpanded",
2375
+ "type": "boolean",
2376
+ "optional": true,
2377
+ "description": "Initial uncontrolled expanded state (default `false`)."
2378
+ },
2379
+ {
2380
+ "name": "onExpandedChange",
2381
+ "type": "(expanded: boolean) => void",
2382
+ "optional": true,
2383
+ "description": "Invoked when the section toggle is clicked."
2384
+ },
2385
+ {
2386
+ "name": "extra",
2387
+ "type": "React.ReactNode",
2388
+ "optional": true,
2389
+ "description": "Optional trailing content rendered on the same row as the toggle header."
2390
+ },
2391
+ {
2392
+ "name": "children",
2393
+ "type": "React.ReactNode",
2394
+ "optional": false
2395
+ },
2396
+ {
2397
+ "name": "className",
2398
+ "type": "string",
2399
+ "optional": true
2400
+ }
2401
+ ]
2402
+ },
2254
2403
  {
2255
2404
  "name": "SfpGlyph",
2256
2405
  "category": "emulator-v6",
@@ -13299,8 +13448,8 @@
13299
13448
  "js": "https://cdn.jsdelivr.net/npm/@chenyqthu/omada-ui-kit@latest/dist/standalone.js"
13300
13449
  },
13301
13450
  "pinnedUrls": {
13302
- "css": "https://cdn.jsdelivr.net/npm/@chenyqthu/omada-ui-kit@0.1.0/dist/style.css",
13303
- "js": "https://cdn.jsdelivr.net/npm/@chenyqthu/omada-ui-kit@0.1.0/dist/standalone.js"
13451
+ "css": "https://cdn.jsdelivr.net/npm/@chenyqthu/omada-ui-kit@0.2.0/dist/style.css",
13452
+ "js": "https://cdn.jsdelivr.net/npm/@chenyqthu/omada-ui-kit@0.2.0/dist/standalone.js"
13304
13453
  }
13305
13454
  },
13306
13455
  {
@@ -13371,6 +13520,7 @@
13371
13520
  "SSettingsSection",
13372
13521
  "SSettingsRow",
13373
13522
  "SSettingsInfoBanner",
13523
+ "SExpandableSection",
13374
13524
  "SInput",
13375
13525
  "SIpInput",
13376
13526
  "SMacInput",
@@ -13379,6 +13529,20 @@
13379
13529
  "SButton"
13380
13530
  ]
13381
13531
  },
13532
+ {
13533
+ "id": "acl-rule-editor",
13534
+ "title": "ACL Security Rule Builder (Gateway / Switch / EAP ACL)",
13535
+ "summary": "Inline full-pane rule editor with multi-select Direction/Protocols, Source → Policy Arrow → Destination dual-card builder, ACL Binding, and Advanced Settings.",
13536
+ "components": [
13537
+ "SAclRuleBuilder",
13538
+ "SExpandableSection",
13539
+ "SInput",
13540
+ "SSelect",
13541
+ "SButton",
13542
+ "SModal",
13543
+ "SIcon"
13544
+ ]
13545
+ },
13382
13546
  {
13383
13547
  "id": "tools-terminal",
13384
13548
  "title": "Network Tools & Interactive Dark CLI Terminal",