@stealthscale/component-screen 0.2.1 → 0.2.3

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.
Files changed (44) hide show
  1. package/dist/cyclonedx/bom.json +1 -1
  2. package/dist/index.d.ts +3 -3
  3. package/dist/index.js +1 -8216
  4. package/dist/pages/action-bar/action-bar.js +471 -0
  5. package/dist/pages/action-bar/action-bar.props.js +3 -0
  6. package/dist/pages/app-shell/app-shell.js +4899 -0
  7. package/dist/pages/app-shell/app-shell.props.js +3 -0
  8. package/dist/pages/floating-panel/floating-panel.js +995 -0
  9. package/dist/pages/floating-panel/floating-panel.props.js +3 -0
  10. package/dist/pages/locale-switcher/locale-switcher.js +180 -0
  11. package/dist/pages/locale-switcher/locale-switcher.props.js +3 -0
  12. package/dist/pages/page/page.js +2308 -0
  13. package/dist/pages/page/page.props.js +3 -0
  14. package/dist/pages/pages.json +123 -0
  15. package/dist/pages/section/section.js +1241 -0
  16. package/dist/pages/section/section.props.js +3 -0
  17. package/dist/pages/sidebar/sidebar.js +1743 -0
  18. package/dist/pages/sidebar/sidebar.props.js +3 -0
  19. package/dist/pages/splitter/splitter.js +1563 -0
  20. package/dist/pages/splitter/splitter.props.js +3 -0
  21. package/dist/pages/switcher/switcher.js +900 -0
  22. package/dist/pages/switcher/switcher.props.js +3 -0
  23. package/dist/pages/theme-switcher/theme-switcher.js +180 -0
  24. package/dist/pages/theme-switcher/theme-switcher.props.js +3 -0
  25. package/dist/pages/toolbar/toolbar.js +1045 -0
  26. package/dist/pages/toolbar/toolbar.props.js +3 -0
  27. package/dist/{recipe-sZAQY6Kq.js → recipes-Cmy1leBm.js} +312 -30
  28. package/dist/shared-DxlFabHA.js +9547 -0
  29. package/dist/shell.js +1 -165
  30. package/dist/theme.js +3 -4
  31. package/locales/en/specimen/action-bar.json +46 -0
  32. package/locales/en/specimen/app-shell.json +288 -0
  33. package/locales/en/specimen/floating-panel.json +70 -0
  34. package/locales/en/specimen/locale-switcher.json +15 -0
  35. package/locales/en/specimen/page.json +198 -0
  36. package/locales/en/specimen/section.json +91 -0
  37. package/locales/en/specimen/sidebar.json +87 -0
  38. package/locales/en/specimen/splitter.json +93 -0
  39. package/locales/en/specimen/switcher.json +61 -0
  40. package/locales/en/specimen/theme-switcher.json +15 -0
  41. package/locales/en/specimen/toolbar.json +80 -0
  42. package/package.json +25 -24
  43. package/dist/recipe-DRMsitrw.js +0 -283
  44. package/dist/root-qEh4u7y5.js +0 -1182
@@ -0,0 +1,3 @@
1
+ export const dropped = {"BodyProps": {"conditions": 284, "foreign": 1041}, "CloseTriggerProps": {"conditions": 284, "foreign": 1048}, "ContentProps": {"conditions": 284, "foreign": 1040}, "ControlProps": {"conditions": 284, "foreign": 1041}, "DragTriggerProps": {"conditions": 284, "foreign": 1041}, "HeaderProps": {"conditions": 284, "foreign": 1041}, "PositionerProps": {"conditions": 284, "foreign": 1041}, "ResizeTriggerProps": {"conditions": 284, "foreign": 1041}, "ResizeTriggersProps": {"conditions": 284, "foreign": 1041}, "RootProps": {"conditions": 284, "foreign": 1037}, "StageTriggerProps": {"conditions": 284, "foreign": 1048}, "TitleProps": {"conditions": 284, "foreign": 1041}, "TriggerProps": {"conditions": 284, "foreign": 1051}};
2
+ export const parts = {"BodyProps": [], "CloseTriggerProps": [{"accepts": "\"glow\" | \"pulse\"", "fallback": "", "kind": "variant", "name": "effect", "refers": [], "required": false, "says": "The halo around the button, in the palette's solid at half opacity."}, {"accepts": "Lift", "fallback": "", "kind": "variant", "name": "elevation", "refers": ["kit.Lift"], "required": false, "says": ""}, {"accepts": "string", "fallback": "", "kind": "option", "name": "label", "refers": [], "required": false, "says": "Accessible name of the button. Defaults to \"Close\"."}, {"accepts": "\"accent\" | \"error\" | \"info\" | \"neutral\" | \"primary\" | \"secondary\" | \"success\" | \"warning\"", "fallback": "", "kind": "variant", "name": "palette", "refers": [], "required": false, "says": "Palette of every look. The base sets `primary`."}, {"accepts": "\"square\"", "fallback": "", "kind": "variant", "name": "shape", "refers": [], "required": false, "says": ""}, {"accepts": "Scale", "fallback": "", "kind": "variant", "name": "size", "refers": ["kit.Scale"], "required": false, "says": ""}, {"accepts": "\"ghost\" | \"glass\" | \"outline\" | \"plain\" | \"solid\" | \"subtle\" | \"surface\"", "fallback": "", "kind": "variant", "name": "variant", "refers": [], "required": false, "says": ""}], "ContentProps": [], "ControlProps": [], "DragTriggerProps": [], "HeaderProps": [], "PositionerProps": [], "ResizeTriggerProps": [{"accepts": "ResizeTriggerAxis", "fallback": "", "kind": "option", "name": "axis", "refers": ["floating-panel.ResizeTriggerAxis"], "required": true, "says": "Edge or corner the trigger resizes from: `n`, `e`, `s` or `w`, or `ne`, `nw`, `se` or `sw`."}], "ResizeTriggersProps": [{"accepts": "readonly ResizeTriggerAxis[]", "fallback": "", "kind": "option", "name": "axes", "refers": ["floating-panel.ResizeTriggerAxis"], "required": false, "says": "Edges and corners to render a trigger for. Defaults to all eight."}], "RootProps": [{"accepts": "boolean", "fallback": "true", "kind": "option", "name": "allowOverflow", "refers": [], "required": false, "says": "Whether the panel should be strictly contained within the boundary when dragging"}, {"accepts": "boolean", "fallback": "", "kind": "option", "name": "closeOnEscape", "refers": [], "required": false, "says": "Whether the panel should close when the escape key is pressed"}, {"accepts": "boolean", "fallback": "false", "kind": "option", "name": "defaultOpen", "refers": [], "required": false, "says": "The initial open state of the panel when rendered. Use when you don't need to control the open state of the panel."}, {"accepts": "Point", "fallback": "", "kind": "option", "name": "defaultPosition", "refers": ["rect-utils.Point"], "required": false, "says": "The initial position of the panel when rendered. Use when you don't need to control the position of the panel."}, {"accepts": "Size", "fallback": "", "kind": "option", "name": "defaultSize", "refers": ["rect-utils.Size"], "required": false, "says": "The default size of the panel"}, {"accepts": "\"ltr\" | \"rtl\"", "fallback": "\"ltr\"", "kind": "option", "name": "dir", "refers": [], "required": false, "says": "The document's text/writing direction."}, {"accepts": "boolean", "fallback": "", "kind": "option", "name": "disabled", "refers": [], "required": false, "says": "Whether the panel is disabled"}, {"accepts": "boolean", "fallback": "true", "kind": "option", "name": "draggable", "refers": [], "required": false, "says": "Whether the panel is draggable"}, {"accepts": "(() => HTMLElement | null)", "fallback": "", "kind": "option", "name": "finalFocusEl", "refers": [], "required": false, "says": "Element to receive focus when the panel is closed. By default, the trigger element is focused."}, {"accepts": "((details: AnchorPositionDetails) => Point)", "fallback": "", "kind": "option", "name": "getAnchorPosition", "refers": ["floating-panel.AnchorPositionDetails"], "required": false, "says": "Function that returns the initial position of the panel when it is opened. If provided, will be used instead of the default position."}, {"accepts": "(() => HTMLElement | null)", "fallback": "", "kind": "option", "name": "getBoundaryEl", "refers": [], "required": false, "says": "The boundary of the panel. Useful for recalculating the boundary rect when the it is resized."}, {"accepts": "(() => Document | Node | ShadowRoot)", "fallback": "", "kind": "option", "name": "getRootNode", "refers": [], "required": false, "says": "A root node to correctly resolve document in custom environments. E.x.: Iframes, Electron."}, {"accepts": "number", "fallback": "1", "kind": "option", "name": "gridSize", "refers": [], "required": false, "says": "The snap grid for the panel"}, {"accepts": "string", "fallback": "", "kind": "option", "name": "id", "refers": [], "required": false, "says": "The unique identifier of the machine."}, {"accepts": "ElementIds", "fallback": "", "kind": "option", "name": "ids", "refers": ["floating-panel.ElementIds"], "required": false, "says": "The ids of the elements in the floating panel. Useful for composition."}, {"accepts": "(() => false | HTMLElement | null)", "fallback": "", "kind": "option", "name": "initialFocusEl", "refers": [], "required": false, "says": "Element to receive focus when the panel is opened. Defaults to the panel content. Return `false` to skip moving focus, or `null` to use the default."}, {"accepts": "boolean", "fallback": "true", "kind": "option", "name": "lazyMount", "refers": [], "required": false, "says": "When true, the overlay renders no content until it first opens."}, {"accepts": "boolean", "fallback": "", "kind": "option", "name": "lockAspectRatio", "refers": [], "required": false, "says": "Whether the panel is locked to its aspect ratio"}, {"accepts": "Size", "fallback": "", "kind": "option", "name": "maxSize", "refers": ["rect-utils.Size"], "required": false, "says": "The maximum size of the panel"}, {"accepts": "Size", "fallback": "", "kind": "option", "name": "minSize", "refers": ["rect-utils.Size"], "required": false, "says": "The minimum size of the panel"}, {"accepts": "(() => void)", "fallback": "", "kind": "option", "name": "onExitComplete", "refers": [], "required": false, "says": "Runs once the content's exit animation ends."}, {"accepts": "((details: OpenChangeDetails) => void)", "fallback": "", "kind": "option", "name": "onOpenChange", "refers": ["floating-panel.OpenChangeDetails"], "required": false, "says": "Function called when the panel is opened or closed"}, {"accepts": "((details: PositionChangeDetails) => void)", "fallback": "", "kind": "option", "name": "onPositionChange", "refers": ["floating-panel.PositionChangeDetails", "rect-utils.Point"], "required": false, "says": "Function called when the position of the panel changes via dragging"}, {"accepts": "((details: PositionChangeDetails) => void)", "fallback": "", "kind": "option", "name": "onPositionChangeEnd", "refers": ["floating-panel.PositionChangeDetails"], "required": false, "says": "Function called when the position of the panel changes via dragging ends"}, {"accepts": "((details: SizeChangeDetails) => void)", "fallback": "", "kind": "option", "name": "onSizeChange", "refers": ["floating-panel.SizeChangeDetails", "rect-utils.Size"], "required": false, "says": "Function called when the size of the panel changes via resizing"}, {"accepts": "((details: SizeChangeDetails) => void)", "fallback": "", "kind": "option", "name": "onSizeChangeEnd", "refers": ["floating-panel.SizeChangeDetails"], "required": false, "says": "Function called when the size of the panel changes via resizing ends"}, {"accepts": "((details: StageChangeDetails) => void)", "fallback": "", "kind": "option", "name": "onStageChange", "refers": ["floating-panel.Stage", "floating-panel.StageChangeDetails"], "required": false, "says": "Function called when the stage of the panel changes"}, {"accepts": "boolean", "fallback": "", "kind": "option", "name": "open", "refers": [], "required": false, "says": "The controlled open state of the panel"}, {"accepts": "boolean", "fallback": "", "kind": "option", "name": "persistRect", "refers": [], "required": false, "says": "Whether the panel size and position should be preserved when it is closed"}, {"accepts": "Point", "fallback": "", "kind": "option", "name": "position", "refers": ["rect-utils.Point"], "required": false, "says": "The controlled position of the panel"}, {"accepts": "boolean", "fallback": "true", "kind": "option", "name": "resizable", "refers": [], "required": false, "says": "Whether the panel is resizable"}, {"accepts": "boolean", "fallback": "true", "kind": "option", "name": "restoreFocus", "refers": [], "required": false, "says": "Whether to restore focus to the trigger when the panel is closed."}, {"accepts": "Size", "fallback": "", "kind": "option", "name": "size", "refers": ["rect-utils.Size"], "required": false, "says": "The size of the panel"}, {"accepts": "boolean", "fallback": "", "kind": "option", "name": "skipAnimationOnMount", "refers": [], "required": false, "says": "When true, content that is open on mount plays no entry animation."}, {"accepts": "boolean", "fallback": "true", "kind": "option", "name": "unmountOnExit", "refers": [], "required": false, "says": "When true, the overlay removes its content once the exit animation ends."}], "StageTriggerProps": [{"accepts": "\"glow\" | \"pulse\"", "fallback": "", "kind": "variant", "name": "effect", "refers": [], "required": false, "says": "The halo around the button, in the palette's solid at half opacity."}, {"accepts": "Lift", "fallback": "", "kind": "variant", "name": "elevation", "refers": ["kit.Lift"], "required": false, "says": ""}, {"accepts": "string", "fallback": "", "kind": "option", "name": "label", "refers": [], "required": false, "says": "Accessible name of the button. Defaults to \"Minimize\", \"Maximize\" or \"Restore\" by `stage`."}, {"accepts": "\"accent\" | \"error\" | \"info\" | \"neutral\" | \"primary\" | \"secondary\" | \"success\" | \"warning\"", "fallback": "", "kind": "variant", "name": "palette", "refers": [], "required": false, "says": "Palette of every look. The base sets `primary`."}, {"accepts": "\"square\"", "fallback": "", "kind": "variant", "name": "shape", "refers": [], "required": false, "says": ""}, {"accepts": "Scale", "fallback": "", "kind": "variant", "name": "size", "refers": ["kit.Scale"], "required": false, "says": ""}, {"accepts": "Stage", "fallback": "", "kind": "option", "name": "stage", "refers": ["floating-panel.Stage"], "required": true, "says": "Stage a press sets: `minimized`, `maximized`, or `default`, which restores the panel."}, {"accepts": "\"ghost\" | \"glass\" | \"outline\" | \"plain\" | \"solid\" | \"subtle\" | \"surface\"", "fallback": "", "kind": "variant", "name": "variant", "refers": [], "required": false, "says": ""}], "TitleProps": [], "TriggerProps": []};
3
+ export const shapes = {"kit.Lift": [{"accepts": "", "name": "\"floating\"", "says": ""}, {"accepts": "", "name": "\"raised\"", "says": ""}], "kit.Scale": [{"accepts": "", "name": "\"2xl\"", "says": ""}, {"accepts": "", "name": "\"3xl\"", "says": ""}, {"accepts": "", "name": "\"4xl\"", "says": ""}, {"accepts": "", "name": "\"lg\"", "says": ""}, {"accepts": "", "name": "\"md\"", "says": ""}, {"accepts": "", "name": "\"sm\"", "says": ""}, {"accepts": "", "name": "\"xl\"", "says": ""}, {"accepts": "", "name": "\"xs\"", "says": ""}], "floating-panel.ResizeTriggerAxis": [{"accepts": "", "name": "\"e\"", "says": ""}, {"accepts": "", "name": "\"n\"", "says": ""}, {"accepts": "", "name": "\"ne\"", "says": ""}, {"accepts": "", "name": "\"nw\"", "says": ""}, {"accepts": "", "name": "\"s\"", "says": ""}, {"accepts": "", "name": "\"se\"", "says": ""}, {"accepts": "", "name": "\"sw\"", "says": ""}, {"accepts": "", "name": "\"w\"", "says": ""}], "floating-panel.ElementIds": [{"accepts": "string", "name": "trigger", "says": ""}, {"accepts": "string", "name": "positioner", "says": ""}, {"accepts": "string", "name": "content", "says": ""}, {"accepts": "string", "name": "title", "says": ""}, {"accepts": "string", "name": "header", "says": ""}], "rect-utils.Size": [{"accepts": "number", "name": "width", "says": ""}, {"accepts": "number", "name": "height", "says": ""}], "rect-utils.Point": [{"accepts": "number", "name": "x", "says": ""}, {"accepts": "number", "name": "y", "says": ""}], "floating-panel.AnchorPositionDetails": [{"accepts": "DOMRect | null", "name": "triggerRect", "says": ""}, {"accepts": "DOMRect | null", "name": "boundaryRect", "says": ""}], "floating-panel.PositionChangeDetails": [{"accepts": "Point", "name": "position", "says": ""}], "floating-panel.OpenChangeDetails": [{"accepts": "boolean", "name": "open", "says": ""}], "floating-panel.SizeChangeDetails": [{"accepts": "Size", "name": "size", "says": ""}], "floating-panel.StageChangeDetails": [{"accepts": "Stage", "name": "stage", "says": ""}], "floating-panel.Stage": [{"accepts": "", "name": "\"default\"", "says": ""}, {"accepts": "", "name": "\"maximized\"", "says": ""}, {"accepts": "", "name": "\"minimized\"", "says": ""}]};
@@ -0,0 +1,180 @@
1
+ import { t as __exportAll } from "../../rolldown-runtime-D7D4PA-g.js";
2
+ import { a as Start, c as Root, d as End, n as LocaleSwitcher } from "../../shared-DxlFabHA.js";
3
+ import { c } from "react/compiler-runtime";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { Matrix, Sample, specimen, useWords } from "@stealthscale/specimen";
6
+ import { CheckIcon, ChevronsUpDownIcon } from "lucide-react";
7
+ import { Text } from "@stealthscale/component-typography";
8
+ //#region src/locale-switcher/examples/bar.example.tsx
9
+ var bar_example_exports = /* @__PURE__ */ __exportAll({
10
+ Bar: () => Bar,
11
+ source: () => source$1
12
+ });
13
+ function Bar() {
14
+ const $ = c(16);
15
+ const { t } = useWords("locale-switcher");
16
+ let t0;
17
+ if ($[0] !== t) {
18
+ t0 = t("application");
19
+ $[0] = t;
20
+ $[1] = t0;
21
+ } else t0 = $[1];
22
+ let t1;
23
+ if ($[2] !== t) {
24
+ t1 = t("product");
25
+ $[2] = t;
26
+ $[3] = t1;
27
+ } else t1 = $[3];
28
+ let t2;
29
+ if ($[4] !== t1) {
30
+ t2 = /* @__PURE__ */ jsx(Start, { children: /* @__PURE__ */ jsx(Text, {
31
+ as: "span",
32
+ size: "sm",
33
+ weight: "semibold",
34
+ children: t1
35
+ }) });
36
+ $[4] = t1;
37
+ $[5] = t2;
38
+ } else t2 = $[5];
39
+ let t3;
40
+ let t4;
41
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
42
+ t3 = /* @__PURE__ */ jsx(CheckIcon, { size: "1em" });
43
+ t4 = /* @__PURE__ */ jsx(ChevronsUpDownIcon, { size: "1em" });
44
+ $[6] = t3;
45
+ $[7] = t4;
46
+ } else {
47
+ t3 = $[6];
48
+ t4 = $[7];
49
+ }
50
+ let t5;
51
+ if ($[8] !== t) {
52
+ t5 = t("label");
53
+ $[8] = t;
54
+ $[9] = t5;
55
+ } else t5 = $[9];
56
+ let t6;
57
+ if ($[10] !== t5) {
58
+ t6 = /* @__PURE__ */ jsx(End, { children: /* @__PURE__ */ jsx(LocaleSwitcher, {
59
+ checkIcon: t3,
60
+ indicator: t4,
61
+ label: t5
62
+ }) });
63
+ $[10] = t5;
64
+ $[11] = t6;
65
+ } else t6 = $[11];
66
+ let t7;
67
+ if ($[12] !== t0 || $[13] !== t2 || $[14] !== t6) {
68
+ t7 = /* @__PURE__ */ jsxs(Root, {
69
+ "aria-label": t0,
70
+ size: "sm",
71
+ children: [t2, t6]
72
+ });
73
+ $[12] = t0;
74
+ $[13] = t2;
75
+ $[14] = t6;
76
+ $[15] = t7;
77
+ } else t7 = $[15];
78
+ return t7;
79
+ }
80
+ const source$1 = "import { type ReactElement } from \"react\";\n\nimport { CheckIcon, ChevronsUpDownIcon } from \"lucide-react\";\n\nimport { Text } from \"@stealthscale/component-typography\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { LocaleSwitcher, Toolbar } from \"@stealthscale/component-screen\";\n\nexport function Bar(): ReactElement {\n const { t } = useWords(\"locale-switcher\");\n\n return (\n <Toolbar.Root aria-label={t(\"application\")} size=\"sm\">\n <Toolbar.Start>\n <Text as=\"span\" size=\"sm\" weight=\"semibold\">\n {t(\"product\")}\n </Text>\n </Toolbar.Start>\n <Toolbar.End>\n <LocaleSwitcher\n checkIcon={<CheckIcon size=\"1em\" />}\n indicator={<ChevronsUpDownIcon size=\"1em\" />}\n label={t(\"label\")}\n />\n </Toolbar.End>\n </Toolbar.Root>\n );\n}\n";
81
+ //#endregion
82
+ //#region src/locale-switcher/examples/looks.example.tsx
83
+ var looks_example_exports = /* @__PURE__ */ __exportAll({
84
+ Looks: () => Looks,
85
+ source: () => source
86
+ });
87
+ function Looks(props) {
88
+ const $ = c(7);
89
+ const { t } = useWords("locale-switcher");
90
+ let t0;
91
+ let t1;
92
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
93
+ t0 = /* @__PURE__ */ jsx(CheckIcon, { size: "1em" });
94
+ t1 = /* @__PURE__ */ jsx(ChevronsUpDownIcon, { size: "1em" });
95
+ $[0] = t0;
96
+ $[1] = t1;
97
+ } else {
98
+ t0 = $[0];
99
+ t1 = $[1];
100
+ }
101
+ let t2;
102
+ if ($[2] !== t) {
103
+ t2 = t("label");
104
+ $[2] = t;
105
+ $[3] = t2;
106
+ } else t2 = $[3];
107
+ let t3;
108
+ if ($[4] !== props || $[5] !== t2) {
109
+ t3 = /* @__PURE__ */ jsx(LocaleSwitcher, {
110
+ checkIcon: t0,
111
+ indicator: t1,
112
+ label: t2,
113
+ ...props
114
+ });
115
+ $[4] = props;
116
+ $[5] = t2;
117
+ $[6] = t3;
118
+ } else t3 = $[6];
119
+ return t3;
120
+ }
121
+ const source = "import { type ReactElement } from \"react\";\n\nimport { CheckIcon, ChevronsUpDownIcon } from \"lucide-react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { LocaleSwitcher, LocaleSwitcherProps } from \"@stealthscale/component-screen\";\n\nexport function Looks(props: Partial<LocaleSwitcherProps>): ReactElement {\n const { t } = useWords(\"locale-switcher\");\n\n return (\n <LocaleSwitcher\n checkIcon={<CheckIcon size=\"1em\" />}\n indicator={<ChevronsUpDownIcon size=\"1em\" />}\n label={t(\"label\")}\n {...props}\n />\n );\n}\n";
122
+ //#endregion
123
+ //#region src/locale-switcher/locale-switcher.specimen.tsx
124
+ /**
125
+ * Catalogue page for the locale switcher.
126
+ *
127
+ * @remarks
128
+ * The switcher has no recipe of its own: it renders `Switcher.Root`, so every scene is
129
+ * hand-written. Each switcher changes the catalogue's own locale, because the catalogue renders
130
+ * inside a locale provider that offers nine locales. The toolbar scene shows the switcher at the
131
+ * end of an application's bar, and the looks scene turns the switcher's `variant`. The examples
132
+ * come through their barrel, and the switcher's own barrel is imported as a type, so the props
133
+ * band reads the switcher alone and not the toolbar an example renders it in. The words are keys
134
+ * under `locale-switcher` in `locales/en/specimen/locale-switcher.json`.
135
+ */
136
+ /**
137
+ * Looks of the looks scene: the switcher's looks for a control in a bar, in reading order.
138
+ */
139
+ const LOOKS = [
140
+ "ghost",
141
+ "outline",
142
+ "subtle",
143
+ "surface"
144
+ ];
145
+ /**
146
+ * Hand-written scene for the switcher at the end of an application's bar.
147
+ */
148
+ const inToolbar = {
149
+ about: "locale-switcher.toolbar.about",
150
+ draw: () => /* @__PURE__ */ jsx(Sample, {
151
+ place: "stretch",
152
+ variant: "outline",
153
+ children: /* @__PURE__ */ jsx(Bar, {})
154
+ }),
155
+ example: bar_example_exports,
156
+ title: "locale-switcher.toolbar.title"
157
+ };
158
+ /**
159
+ * Hand-written scene for the looks the switcher takes from `Switcher.Root`.
160
+ */
161
+ const looked = {
162
+ about: "locale-switcher.looks.about",
163
+ draw: () => /* @__PURE__ */ jsx(Matrix, {
164
+ knob: "variant",
165
+ of: LOOKS,
166
+ children: (variant) => /* @__PURE__ */ jsx(Looks, { variant })
167
+ }),
168
+ example: looks_example_exports,
169
+ props: { variant: "ghost" },
170
+ title: "locale-switcher.looks.title"
171
+ };
172
+ var locale_switcher_specimen_default = specimen({
173
+ about: "locale-switcher.about",
174
+ id: "components/screen/locale-switcher",
175
+ imports: "import { LocaleSwitcher } from \"@stealthscale/component-screen/shell\";",
176
+ scenes: [inToolbar, looked],
177
+ title: "locale-switcher.title"
178
+ });
179
+ //#endregion
180
+ export { locale_switcher_specimen_default as default, inToolbar, looked };
@@ -0,0 +1,3 @@
1
+ export const dropped = {"LocaleSwitcherProps": {"conditions": 284, "foreign": 1063}};
2
+ export const parts = {"LocaleSwitcherProps": [{"accepts": "ReactNode", "fallback": "", "kind": "option", "name": "checkIcon", "refers": ["react.ReactElement", "react.ReactPortal"], "required": false, "says": "Glyph that marks the current choice's row in the menu."}, {"accepts": "\"ltr\" | \"rtl\"", "fallback": "\"ltr\"", "kind": "option", "name": "dir", "refers": [], "required": false, "says": "The document's text/writing direction."}, {"accepts": "(() => Document | Node | ShadowRoot)", "fallback": "", "kind": "option", "name": "getRootNode", "refers": [], "required": false, "says": "A root node to correctly resolve document in custom environments. E.x.: Iframes, Electron."}, {"accepts": "Highlight", "fallback": "", "kind": "variant", "name": "highlight", "refers": ["kit.Highlight"], "required": false, "says": "Look of the highlighted row."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "id", "refers": [], "required": false, "says": "The unique identifier of the machine."}, {"accepts": "ReactNode", "fallback": "", "kind": "option", "name": "indicator", "refers": ["react.ReactElement", "react.ReactPortal"], "required": false, "says": "Glyph at the end of the trigger."}, {"accepts": "boolean", "fallback": "", "kind": "variant", "name": "inset", "refers": [], "required": false, "says": "Whether a row without a leading icon or mark starts its text after the gutter an icon takes, for a menu where some rows lead with an icon."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "label", "refers": [], "required": false, "says": "Name of the control, which a screen reader announces before the current language. \"Language\" unless the caller passes another."}, {"accepts": "\"accent\" | \"error\" | \"info\" | \"neutral\" | \"primary\" | \"secondary\" | \"success\" | \"warning\"", "fallback": "", "kind": "variant", "name": "palette", "refers": [], "required": false, "says": "The palette of the look and the mark."}, {"accepts": "Placement", "fallback": "", "kind": "option", "name": "placement", "refers": ["kit.Placement"], "required": false, "says": "Where the switcher renders. Read from the sidebar or the toolbar around it when absent."}, {"accepts": "SwitcherSize", "fallback": "", "kind": "option", "name": "size", "refers": ["kit.SwitcherSize"], "required": false, "says": "Size of the switcher. The sidebar's or the toolbar's size when absent, and `md` alone."}, {"accepts": "Look", "fallback": "", "kind": "variant", "name": "variant", "refers": ["kit.Look"], "required": false, "says": "The button's six looks, each one of the theme's layer styles."}]};
3
+ export const shapes = {"kit.Highlight": [{"accepts": "", "name": "\"bar\"", "says": ""}, {"accepts": "", "name": "\"fill\"", "says": ""}, {"accepts": "", "name": "\"tint\"", "says": ""}], "kit.Look": [{"accepts": "", "name": "\"ghost\"", "says": ""}, {"accepts": "", "name": "\"outline\"", "says": ""}, {"accepts": "", "name": "\"plain\"", "says": ""}, {"accepts": "", "name": "\"solid\"", "says": ""}, {"accepts": "", "name": "\"subtle\"", "says": ""}, {"accepts": "", "name": "\"surface\"", "says": ""}], "react.ReactElement": [{"accepts": "string | JSXElementConstructor<any>", "name": "type", "says": ""}, {"accepts": "unknown", "name": "props", "says": ""}, {"accepts": "string | null", "name": "key", "says": ""}], "react.ReactPortal": [{"accepts": "ReactNode", "name": "children", "says": ""}, {"accepts": "string | JSXElementConstructor<any>", "name": "type", "says": ""}, {"accepts": "unknown", "name": "props", "says": ""}, {"accepts": "string | null", "name": "key", "says": ""}], "kit.Placement": [{"accepts": "", "name": "\"alone\"", "says": ""}, {"accepts": "", "name": "\"sidebar\"", "says": ""}, {"accepts": "", "name": "\"toolbar\"", "says": ""}], "kit.SwitcherSize": [{"accepts": "", "name": "\"lg\"", "says": ""}, {"accepts": "", "name": "\"md\"", "says": ""}, {"accepts": "", "name": "\"sm\"", "says": ""}]};