This brings the long-untracked @limitless/ui source tree under version
control. Until now /srv/k8s/templates/limitless-ui has been a plain
file: dependency consumed by gscChronos / gscCRM / gscAdmin, with
copies scattered across web/gsc{Portal,WWW,Aether,Register}/ and
apps/gsc{Meet,Share}/. None were git-tracked.
Treating /srv/k8s/templates/limitless-ui as the canonical going
forward; secondary copies should be replaced with this version
in their consumers' Dockerfiles when they next get touched.
Changes in this initial commit beyond the snapshot:
- Add src/layout/AppShell.tsx — runtime-loaded chrome (header,
sidebar, footer) backed by gsc-shell-api. Public surface:
AppShell, ShellProvider, useShell, ShellConfig types
Framework-agnostic (no Next.js dep). Apps pass appKey + apiUrl +
getToken; AppShell composes the existing PageShell / Navbar /
Sidebar / Footer primitives with API data.
- Re-export AppShell from src/index.ts.
- Fix build script: `tsc -p tsconfig.json --noEmit false`. The bare
`tsc` command was a no-op because tsconfig.json sets noEmit:true
for typecheck speed. Existing dist/ only existed because of an
earlier emit; clean rebuilds were silently broken.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
32 lines
1010 B
TypeScript
32 lines
1010 B
TypeScript
import React from 'react';
|
|
import Select, { Props as SelectProps, GroupBase } from 'react-select';
|
|
import Creatable from 'react-select/creatable';
|
|
import Async from 'react-select/async';
|
|
|
|
export type Option = { label: string; value: string };
|
|
|
|
export type SelectSingleProps = SelectProps<Option, false, GroupBase<Option>>;
|
|
export type SelectMultiProps = SelectProps<Option, true, GroupBase<Option>>;
|
|
|
|
export function SelectSingle(props: SelectSingleProps) {
|
|
return <Select {...props} isMulti={false} />;
|
|
}
|
|
|
|
export function MultiSelect(props: SelectMultiProps) {
|
|
return <Select {...props} isMulti />;
|
|
}
|
|
|
|
export type CreatableSelectProps = SelectProps<Option, true, GroupBase<Option>>;
|
|
|
|
export function TagsSelect(props: CreatableSelectProps) {
|
|
return <Creatable {...props} isMulti />;
|
|
}
|
|
|
|
export type AsyncSelectProps = React.ComponentProps<typeof Async<Option, false, GroupBase<Option>>> & {
|
|
isMulti?: boolean;
|
|
};
|
|
|
|
export function AsyncSelect(props: AsyncSelectProps) {
|
|
return <Async {...props} />;
|
|
}
|