@uxuissk/design-system-core 3.4.7 → 3.5.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/dist/main.d.ts CHANGED
@@ -179,6 +179,32 @@ export declare class AppShell extends LitElement {
179
179
 
180
180
  export declare type AppShellBrand = "sellsuki" | "patona" | "shipmunk" | "akita" | "sellsukipay" | "sukispace" | "oc2plus" | "ccs3";
181
181
 
182
+ /**
183
+ * Brand-friendly wrapper for product-level apps and vibe-code outputs.
184
+ *
185
+ * Accepts the eight Sellsuki product brand names (`sellsuki`, `patona`,
186
+ * `shipmunk`, `akita`, `sellsukipay`, `sukispace`, `oc2plus`, `ccs3`) and
187
+ * maps them to the three underlying DS 3.0 brands via {@link BRAND_MAP}, then
188
+ * calls {@link injectSemanticTokens} so descendants pick up the correct
189
+ * brand-tinted tokens. Also publishes the resolved brand via Lit context so
190
+ * `<ssk-logo>` and other brand-aware components can render the right asset.
191
+ *
192
+ * **When to use vs `<ssk-theme-provider>`:**
193
+ * - Use **`<ssk-app-shell-provider brand="...">`** for vibe-code outputs,
194
+ * product app shells, and anywhere you want to pass a friendly brand name.
195
+ * This is the wrapper validated by `runContract()` / `vibecode-contract`.
196
+ * - Use **`<ssk-theme-provider>`** when you need the full theme context
197
+ * (drives `themeContext` consumers like `<ssk-code-block>`, applies the
198
+ * default theme's CSS variables to `:host`, and brings in the global
199
+ * scrollbar / font-family base). Storybook stories wrap with this one.
200
+ * - The two are composable: `<ssk-theme-provider>` can wrap
201
+ * `<ssk-app-shell-provider>` if you want both the full theme context and
202
+ * friendly brand-name mapping in the same tree.
203
+ *
204
+ * Neither provider is deprecated. The earlier MCP `get_brand_rules` claim
205
+ * that "ssk-theme-provider is deprecated" was a catalog bug — see
206
+ * `DS3_VIBECODE_PRODUCTION_PLAN.md` §10.1 for the audit.
207
+ */
182
208
  export declare class AppShellProvider extends LitElement {
183
209
  static registeredName: string;
184
210
  brand: AppShellBrand;
@@ -752,6 +778,136 @@ export declare const defaultColorPallete: ColorPalette;
752
778
 
753
779
  export declare const defaultRadiusTokens: Record<string, string>;
754
780
 
781
+ /**
782
+ * Preset app shell that bundles `<ssk-app-shell-provider>` +
783
+ * `<ssk-app-shell>` + a default `<ssk-top-navbar>` + a default
784
+ * `<ssk-sidebar>` + a `<ssk-feature-page-scaffold>` body wrapper into a
785
+ * single high-level component. Pass menu data + branding props, slot in
786
+ * page content, and skip the layout wiring.
787
+ *
788
+ * This is the **preset** wrapper. If you need full control over layout
789
+ * — different navbar shape, custom sidebar tree, multi-region grids —
790
+ * compose `<ssk-app-shell>` directly with its named slots instead.
791
+ *
792
+ * ### Quick start
793
+ *
794
+ * ```html
795
+ * <ssk-default-shell
796
+ * brand="sellsuki"
797
+ * company-name="Sellsuki Co., Ltd."
798
+ * company-branch="สาขา รัชดาภิเษก"
799
+ * user-avatar="https://..."
800
+ * .menu=${[
801
+ * { key: "dashboard", label: "Dashboard", items: [
802
+ * { key: "overview", label: "ภาพรวม", icon: "outline-building-storefront" },
803
+ * { key: "orders", label: "ออเดอร์", icon: "outline-inbox-stack" },
804
+ * ]},
805
+ * { key: "product", label: "Product", items: [
806
+ * { key: "list", label: "รายการสินค้า", icon: "outline-shopping-bag" },
807
+ * ]},
808
+ * ]}
809
+ * .footerItems=${[
810
+ * { key: "support", label: "Support", icon: "outline-user-group" },
811
+ * { key: "setting", label: "Setting", icon: "outline-cog-8-tooth" },
812
+ * ]}
813
+ * selected-key="overview"
814
+ * @menu-select=${(e) => console.log("clicked", e.detail.key)}
815
+ * >
816
+ * <ssk-page-header slot="header" title="ภาพรวมร้าน"></ssk-page-header>
817
+ * <div>your page content</div>
818
+ * </ssk-default-shell>
819
+ * ```
820
+ *
821
+ * ### Slots (escape hatches)
822
+ *
823
+ * - `navbar-left`, `navbar-center`, `navbar-right` — replace the
824
+ * corresponding navbar region (hamburger+logo / search / bell+grid+user).
825
+ * - `sidebar-header` — replace the account-switcher block.
826
+ * - `sidebar-menu` — replace the prop-driven menu tree (ignores `.menu`).
827
+ * - `sidebar-footer` — replace the footer item list (ignores `.footerItems`).
828
+ * - default — page body, rendered inside `<ssk-feature-page-scaffold>`.
829
+ *
830
+ * ### Events
831
+ *
832
+ * | Event | `detail` | When |
833
+ * |----------------------|-----------------------|-----------------------------------|
834
+ * | `menu-select` | `{ key: string }` | Sidebar item clicked |
835
+ * | `sidebar-toggle` | `{ collapsed }` | Hamburger clicked |
836
+ * | `search-input` | `{ value: string }` | Search input typed |
837
+ * | `search-submit` | `{ value: string }` | Search input Enter pressed |
838
+ * | `notifications-click`| `void` | Bell icon clicked |
839
+ * | `appgrid-click` | `void` | App-grid icon clicked |
840
+ * | `user-click` | `void` | User avatar clicked |
841
+ */
842
+ export declare class DefaultShell extends LitElement {
843
+ static registeredName: string;
844
+ brand: AppShellBrand;
845
+ companyName: string;
846
+ companyBranch: string;
847
+ companyAvatar: string;
848
+ userAvatar: string;
849
+ userName: string;
850
+ logoSrc: string;
851
+ logoAlt: string;
852
+ logoNameSrc: string;
853
+ logoNameAlt: string;
854
+ showSearch: boolean;
855
+ searchPlaceholder: string;
856
+ searchValue: string;
857
+ showNotifications: boolean;
858
+ showAppGrid: boolean;
859
+ sidebarCollapsed: boolean;
860
+ sidebarWidth: string;
861
+ navbarHeight: string;
862
+ menu: DefaultShellMenuGroup[];
863
+ footerItems: DefaultShellMenuItem[];
864
+ selectedKey: string;
865
+ expandedGroups: string[];
866
+ render(): TemplateResult_2<1>;
867
+ private _renderNavbarLeft;
868
+ private _renderSearch;
869
+ private _renderNavbarRight;
870
+ private _renderSidebarHeader;
871
+ private _renderMenu;
872
+ private _renderSidebarFooter;
873
+ private _onToggleSidebar;
874
+ private _onSearchInput;
875
+ private _onSearchKeydown;
876
+ private _onNotificationsClick;
877
+ private _onAppGridClick;
878
+ private _onUserClick;
879
+ private _onMenuSelect;
880
+ private _onGroupToggle;
881
+ private _emit;
882
+ static styles: CSSResult;
883
+ }
884
+
885
+ /**
886
+ * Grouping for menu items — equivalent to one `<ssk-sidebar-group>`.
887
+ */
888
+ export declare type DefaultShellMenuGroup = {
889
+ /** Stable key (used as the `<ssk-sidebar-group key>`). */
890
+ key: string;
891
+ /** Group heading shown above the items. */
892
+ label: string;
893
+ /** Items inside the group. */
894
+ items: DefaultShellMenuItem[];
895
+ };
896
+
897
+ /**
898
+ * Single menu entry rendered inside the default sidebar.
899
+ */
900
+ export declare type DefaultShellMenuItem = {
901
+ /** Stable key, emitted in `menu-select` events. */
902
+ key: string;
903
+ /** Visible label. */
904
+ label: string;
905
+ /** Icon name (see ssk-icon catalog). Optional. */
906
+ icon?: string;
907
+ /** Disabled items render greyed-out and ignore clicks. */
908
+ disabled?: boolean;
909
+ };
910
+
755
911
  export declare const defaultSize: {
756
912
  [key in Size]: string;
757
913
  };
@@ -2459,6 +2615,30 @@ export declare type ThemeField = {
2459
2615
  };
2460
2616
  };
2461
2617
 
2618
+ /**
2619
+ * Core DS 3.0 theme provider. Wrap your application root with this to:
2620
+ * - publish a `Theme` object on Lit context (consumed by components like
2621
+ * `<ssk-code-block>`, `<ssk-button>`, etc.)
2622
+ * - apply the default theme's CSS variables to `:host`
2623
+ * - install the global scrollbar styles + `--ssk-font-family-sans`
2624
+ * - optionally inject semantic brand tokens (via the `brand` prop)
2625
+ *
2626
+ * **When to use vs `<ssk-app-shell-provider>`:**
2627
+ * - Use **`<ssk-theme-provider>`** when you need the full theme context and
2628
+ * only deal with strict `Brand` values (`"ccs3" | "patona" | "oc2plus"`).
2629
+ * This is the wrapper Storybook stories use internally.
2630
+ * - Use **`<ssk-app-shell-provider brand="...">`** for vibe-code outputs and
2631
+ * product app shells where you want to pass a friendly brand name like
2632
+ * `"shipmunk"` or `"sellsuki"`. See {@link AppShellProvider} for the
2633
+ * friendly-name → strict mapping.
2634
+ * - The two are composable: wrap `<ssk-app-shell-provider>` inside
2635
+ * `<ssk-theme-provider>` to get both the full theme context and the
2636
+ * friendly brand-name layer.
2637
+ *
2638
+ * Neither provider is deprecated. The earlier MCP `get_brand_rules` claim
2639
+ * that "ssk-theme-provider is deprecated" was a catalog bug — see
2640
+ * `DS3_VIBECODE_PRODUCTION_PLAN.md` §10.1 for the audit.
2641
+ */
2462
2642
  export declare class ThemeProvider extends LitElement {
2463
2643
  theme: Theme;
2464
2644
  brand?: Brand;
@@ -41,6 +41,7 @@ declare module "react" {
41
41
  "ssk-country-icon": SskJSXProps;
42
42
  "ssk-date-display": SskJSXProps;
43
43
  "ssk-date-picker": SskJSXProps;
44
+ "ssk-default-shell": SskJSXProps;
44
45
  "ssk-divider": SskJSXProps;
45
46
  "ssk-donut-chart": SskJSXProps;
46
47
  "ssk-download-file": SskJSXProps;