efficient-easel 0.105.1 → 1.0.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/README.md +103 -29
- package/dist/{LinkPicker-W2Rtxetz.d.ts → LinkPicker-hPEr1MJx.d.ts} +6 -4
- package/dist/autosave/index.d.ts +5 -5
- package/dist/chrome/chrome.css +50 -273
- package/dist/chrome/index.d.ts +61 -56
- package/dist/chrome/index.js +1 -1
- package/dist/chunk-2GVCAIPX.js +1 -0
- package/dist/chunk-4GNPKHV4.js +64 -0
- package/dist/chunk-5545A3PC.js +4 -0
- package/dist/chunk-7SQF6LZL.js +1 -0
- package/dist/chunk-BXMXTO36.js +1 -0
- package/dist/{chunk-NYKIQJT2.js → chunk-CKEPQNSQ.js} +1 -1
- package/dist/chunk-DJMMTWFP.js +1 -0
- package/dist/{chunk-PQXIFBDY.js → chunk-E2O2MRZR.js} +1 -1
- package/dist/chunk-EA2HTX37.js +5 -0
- package/dist/{chunk-SARZN4M7.js → chunk-FEK3S6HN.js} +1 -1
- package/dist/chunk-FPAVNX3Y.js +6 -0
- package/dist/chunk-HMJS344F.js +1 -0
- package/dist/chunk-JLTZQ4US.js +1 -0
- package/dist/chunk-JMGPPXNQ.js +24 -0
- package/dist/chunk-K56YDHYQ.js +1 -0
- package/dist/chunk-LOMEH6DG.js +1 -0
- package/dist/{chunk-V4LF7D4F.js → chunk-MAEXP3KE.js} +1 -1
- package/dist/chunk-MJM6SFD3.js +3 -0
- package/dist/chunk-NLRW4BGG.js +8 -0
- package/dist/chunk-OJAJVH7S.js +5 -0
- package/dist/chunk-ONRYLR2D.js +2 -0
- package/dist/chunk-ORR3Q4WV.js +1 -0
- package/dist/chunk-OTEXGJDU.js +5 -0
- package/dist/chunk-P2VEMZH5.js +1 -0
- package/dist/chunk-PT6V53OO.js +1 -0
- package/dist/chunk-PYCLHOSA.js +9 -0
- package/dist/chunk-Q27BB5ZC.js +14 -0
- package/dist/chunk-QLD57GBB.js +6 -0
- package/dist/{chunk-NWIW7AWH.js → chunk-QMNML7XH.js} +1 -1
- package/dist/chunk-QR4DLZ3P.js +5 -0
- package/dist/chunk-TJ7YIRWQ.js +21 -0
- package/dist/{chunk-3P6AMTOS.js → chunk-VPFNZ7TB.js} +1 -1
- package/dist/chunk-W3XX2CNW.js +16 -0
- package/dist/chunk-X6DQWK2C.js +1 -0
- package/dist/chunk-XWR5YVA7.js +9 -0
- package/dist/chunk-YABL4EWX.js +7 -0
- package/dist/chunk-ZNNATBDC.js +1 -0
- package/dist/chunk-ZP4G3X44.js +4 -0
- package/dist/copy/copy.css +66 -177
- package/dist/copy/index.d.ts +0 -2
- package/dist/copy/index.js +31 -32
- package/dist/drag/drag.css +31 -11
- package/dist/drag/index.d.ts +10 -0
- package/dist/drag/index.js +1 -1
- package/dist/easel/index.d.ts +10 -1
- package/dist/easel/index.js +1 -1
- package/dist/fields/fields.css +35 -304
- package/dist/fields/index.d.ts +87 -95
- package/dist/fields/index.js +1 -1
- package/dist/gold/gold.css +3 -3
- package/dist/gold/index.d.ts +6 -5
- package/dist/gold/index.js +1 -1
- package/dist/{host-BQ_b9Qzk.d.ts → host-CiuzZJXj.d.ts} +11 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/menu/index.d.ts +49 -93
- package/dist/menu/index.js +1 -1
- package/dist/menu/menu.css +37 -246
- package/dist/node-ops/index.d.ts +1 -1
- package/dist/panel/index.d.ts +46 -72
- package/dist/panel/index.js +17 -18
- package/dist/panel/panel.css +143 -372
- package/dist/pick/index.d.ts +52 -33
- package/dist/pick/index.js +7 -7
- package/dist/pick/pick.css +19 -150
- package/dist/rail/index.d.ts +48 -90
- package/dist/rail/index.js +1 -1
- package/dist/rail/rail.css +21 -108
- package/dist/screen/components/AddBlockRow.d.ts +8 -2
- package/dist/screen/components/AddBlockRow.js +1 -1
- package/dist/screen/components/AddChildRow.d.ts +4 -3
- package/dist/screen/components/AddChildRow.js +1 -1
- package/dist/screen/components/AddSidePanel.js +1 -1
- package/dist/screen/components/MediaSidePanel.d.ts +2 -2
- package/dist/screen/components/MediaSidePanel.js +1 -1
- package/dist/screen/components/NodeContextMenu.d.ts +31 -9
- package/dist/screen/components/NodeContextMenu.js +1 -1
- package/dist/screen/components/PageEditGuardNotices.js +1 -1
- package/dist/screen/components/ScreenChrome.js +1 -1
- package/dist/screen/components/ScreenDocumentContext.d.ts +2 -2
- package/dist/screen/components/ScreenDocumentContext.js +1 -1
- package/dist/screen/components/ScreenMount.d.ts +8 -8
- package/dist/screen/components/ScreenMount.js +1 -1
- package/dist/screen/components/ScreenStoreProvider.d.ts +8 -8
- package/dist/screen/components/ScreenStoreProvider.js +1 -1
- package/dist/screen/components/SectionScreenShell.js +16 -16
- package/dist/screen/components/SidePanelHead.d.ts +4 -2
- package/dist/screen/components/SidePanelHead.js +1 -1
- package/dist/screen/components/UiIcon.d.ts +10 -26
- package/dist/screen/components/UiIcon.js +2 -1
- package/dist/screen/components/panel-widths.d.ts +15 -1
- package/dist/screen/components/panel-widths.js +1 -1
- package/dist/screen/components/usePartBridge.d.ts +8 -8
- package/dist/screen/components/usePartBridge.js +1 -1
- package/dist/screen/index.d.ts +9 -9
- package/dist/screen/index.js +1 -1
- package/dist/screen/lib/admin-bridge.d.ts +1 -1
- package/dist/screen/lib/admin-bridge.js +1 -1
- package/dist/screen/lib/chrome-theme.d.ts +20 -12
- package/dist/screen/lib/chrome-theme.js +1 -1
- package/dist/screen/lib/document-addressing.d.ts +2 -2
- package/dist/screen/lib/host-chrome.d.ts +1 -1
- package/dist/screen/lib/host.d.ts +2 -2
- package/dist/screen/lib/key-scope.d.ts +31 -2
- package/dist/screen/lib/key-scope.js +1 -1
- package/dist/screen/lib/links/link-filters.d.ts +1 -1
- package/dist/screen/lib/media-panel.d.ts +2 -2
- package/dist/screen/lib/media-picker.d.ts +2 -2
- package/dist/screen/lib/page-lock.d.ts +1 -1
- package/dist/screen/lib/puck/section-doc.d.ts +5 -1
- package/dist/screen/lib/puck/section-doc.js +1 -1
- package/dist/screen/lib/puck/style-clipboard.d.ts +8 -8
- package/dist/screen/lib/puck/use-section-ops.js +1 -1
- package/dist/screen/lib/screen-parts.d.ts +47 -10
- package/dist/screen/lib/screen-parts.js +1 -1
- package/dist/screen/lib/section-templates.d.ts +1 -1
- package/dist/screen/lib/session-context.d.ts +1 -1
- package/dist/screen/lib/session.d.ts +1 -1
- package/dist/screen/screen.css +54 -206
- package/dist/screen/words.d.ts +17 -1
- package/dist/screen/words.js +1 -1
- package/dist/shell/index.d.ts +134 -118
- package/dist/shell/index.js +1 -1
- package/dist/shell/shell.css +130 -88
- package/dist/strings/catalogue.d.ts +5 -5
- package/dist/strings/catalogue.js +1 -1
- package/dist/strings/index.d.ts +5 -5
- package/dist/strings/index.js +1 -1
- package/dist/style-clipboard/index.d.ts +1 -1
- package/dist/text-styles/index.d.ts +12 -3
- package/dist/text-styles/index.js +33 -38
- package/dist/text-styles/text-styles.css +39 -71
- package/dist/tree/index.d.ts +49 -44
- package/dist/tree/index.js +1 -1
- package/dist/tree/tree.css +31 -653
- package/dist/{types-DJDBtdB2.d.ts → types-BqGnUVX5.d.ts} +32 -32
- package/dist/types-BsyPh6EW.d.ts +99 -0
- package/dist/{types-DWS-s9z-.d.ts → types-CsgMwHHa.d.ts} +14 -11
- package/dist/{types-CqY85foL.d.ts → types-Dt1CFR1S.d.ts} +4 -2
- package/dist/{wordFit-D4S36PvB.d.ts → wordFit-7XpmhcaW.d.ts} +3 -5
- package/dist/words-Cl9xMUYY.d.ts +41 -0
- package/dist/{words-D_Lnw1Gr.d.ts → words-CvFnwGSr.d.ts} +1 -1
- package/package.json +5 -1
- package/dist/chunk-2UX75JDP.js +0 -1
- package/dist/chunk-3EDSDPIP.js +0 -1
- package/dist/chunk-3QVB4AG2.js +0 -3
- package/dist/chunk-3WSPDAK2.js +0 -1
- package/dist/chunk-53G47SWO.js +0 -1
- package/dist/chunk-5MZ3RNQQ.js +0 -13
- package/dist/chunk-5ZBBXZPV.js +0 -6
- package/dist/chunk-7FBDZTUD.js +0 -2
- package/dist/chunk-7V5WZ46F.js +0 -2
- package/dist/chunk-BXZ6WLHC.js +0 -22
- package/dist/chunk-BZ5ASXOL.js +0 -1
- package/dist/chunk-EOJNJCMJ.js +0 -16
- package/dist/chunk-EWVJSRRY.js +0 -6
- package/dist/chunk-FMGFZNPW.js +0 -1
- package/dist/chunk-H24N5TMZ.js +0 -11
- package/dist/chunk-HLEET6NV.js +0 -65
- package/dist/chunk-IE4GFYKO.js +0 -1
- package/dist/chunk-KTVH2ZRL.js +0 -15
- package/dist/chunk-N7VRF7PR.js +0 -5
- package/dist/chunk-OWBO4WKA.js +0 -0
- package/dist/chunk-P67FP7PG.js +0 -9
- package/dist/chunk-P6O363EE.js +0 -6
- package/dist/chunk-Q4N7C6CT.js +0 -10
- package/dist/chunk-QH6LCNOX.js +0 -8
- package/dist/chunk-RW4XBUUW.js +0 -1
- package/dist/chunk-TTJ54QGG.js +0 -18
- package/dist/chunk-VSHV6KJQ.js +0 -5
- package/dist/chunk-VSOP4GUM.js +0 -1
- package/dist/chunk-WZ7TGAAT.js +0 -3
- package/dist/chunk-YC4TB3CJ.js +0 -25
- package/dist/chunk-ZFDCDJNZ.js +0 -16
- package/dist/chunk-ZNS7727Y.js +0 -12
- package/dist/chunk-ZTTWFAAC.js +0 -1
- package/dist/types-Djdq6Xkd.d.ts +0 -138
- package/dist/words-DgHcY5qB.d.ts +0 -33
package/dist/panel/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { W as WordFit } from '../wordFit-
|
|
3
|
+
import { W as WordFit } from '../wordFit-7XpmhcaW.js';
|
|
4
4
|
import { P as PanelWords } from '../words-BGrHZAJJ.js';
|
|
5
5
|
export { a as SETTINGS_BUCKETS, S as SettingsBucket } from '../buckets-CuLM47h9.js';
|
|
6
6
|
|
|
@@ -21,11 +21,12 @@ interface SettingsTabItem {
|
|
|
21
21
|
*
|
|
22
22
|
* Required, and a plain string, on purpose. Give the tab an `icon` and a
|
|
23
23
|
* narrow panel takes this word off the screen, but never out of the tab: it
|
|
24
|
-
* stays in the markup
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
24
|
+
* stays in the markup (clipped, never `display: none`) as the tab's
|
|
25
|
+
* accessible name at every width, and the shell's `Tooltip` says it on
|
|
26
|
+
* hover. An icon-only control with no name is the exact defect card 8801
|
|
27
|
+
* shipped and had to have caught in review, and a separate optional
|
|
28
|
+
* `ariaLabel` prop is how that happens again. Here it cannot — the name is
|
|
29
|
+
* the field the tab has always had, and it is not optional.
|
|
29
30
|
*/
|
|
30
31
|
label: string;
|
|
31
32
|
/**
|
|
@@ -63,6 +64,12 @@ interface SettingsTabsProps {
|
|
|
63
64
|
activeId: string;
|
|
64
65
|
onSelect: (id: string) => void;
|
|
65
66
|
ariaLabel?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Wires each tab to its panel, the shell's way: tab `tabButtonId(prefix, id)`,
|
|
69
|
+
* `aria-controls` → `tabPanelId(prefix, id)` (both from efficient-shell/ui).
|
|
70
|
+
* The host gives the panel it shows that id and names it with the tab's.
|
|
71
|
+
*/
|
|
72
|
+
idPrefix?: string;
|
|
66
73
|
className?: string;
|
|
67
74
|
}
|
|
68
75
|
/**
|
|
@@ -676,66 +683,18 @@ type SettingsActionNote = {
|
|
|
676
683
|
};
|
|
677
684
|
type SettingsActionProps = SettingsActionBaseProps & SettingsActionNote;
|
|
678
685
|
|
|
679
|
-
|
|
680
|
-
* The tab strip under the panel head.
|
|
681
|
-
*
|
|
682
|
-
* It replaces the old stack of fold headers a merchant had to open and hunt
|
|
683
|
-
* through: the buckets a section actually has become tabs, in one fixed order,
|
|
684
|
-
* so the panel keeps the same shape on every section. A section shows only the
|
|
685
|
-
* tabs it has — pass three items and three tabs render.
|
|
686
|
-
*
|
|
687
|
-
* Controlled: the host decides `activeId`. No hooks, no browser globals.
|
|
688
|
-
*
|
|
689
|
-
* A tab can be WIRED to what it shows (`panelId` / `htmlId` on the item). That
|
|
690
|
-
* is not decoration: `role="tab"` promises a panel, and a tab strip that names
|
|
691
|
-
* none announces "tab, 1 of 4, selected" over nothing. The shell cannot supply
|
|
692
|
-
* those ids — only the host knows the element the settings land in — but until
|
|
693
|
-
* card 8802.d it could not ACCEPT them either, so no host could fix it. A tab
|
|
694
|
-
* with nothing to point at renders no attribute at all; an empty
|
|
695
|
-
* `aria-controls` is worse than a missing one, because it names an element
|
|
696
|
-
* that does not exist instead of admitting there is none.
|
|
697
|
-
*
|
|
698
|
-
* A SEGMENTED CONTROL (card 66138). The strip is a grey track and the chosen
|
|
699
|
-
* bucket is a raised white chip on it. Lewis, looking at a real panel: the tab
|
|
700
|
-
* he is NOT on does not invite a click — it does not even look like a button.
|
|
701
|
-
* The track is the answer to that, because it makes every segment look
|
|
702
|
-
* pressable, where a mark under the chosen tab only ever made the chosen tab
|
|
703
|
-
* louder. It replaces the underline strip and card 8811's tint ground; see the
|
|
704
|
-
* long note on `.es-tab.is-active` in `panel.css`.
|
|
705
|
-
*
|
|
706
|
-
* A segment takes the width its OWN label needs and shares what is left over,
|
|
707
|
-
* rather than every segment taking the width of the widest label. Equal
|
|
708
|
-
* segments were measured and cost too much: three of them need a 267px track
|
|
709
|
-
* and four need 355px, against the 281px the shop's default panel gives.
|
|
710
|
-
*
|
|
711
|
-
* THE WORD DROPS WHERE IT STOPS FITTING. Natural widths fit two and three
|
|
712
|
-
* buckets across the whole panel-drag band; they do not fit four, where the
|
|
713
|
-
* last segment ends 39px past the panel edge. So given an `icon`, a segment can
|
|
714
|
-
* spend less width instead of more — the word goes and the glyph stays.
|
|
715
|
-
*
|
|
716
|
-
* Where that happens depends on HOW MANY buckets a section has, because with
|
|
717
|
-
* natural widths the question is about the sum of the labels:
|
|
718
|
-
*
|
|
719
|
-
* two buckets both words, at every width the panel drags to.
|
|
720
|
-
* three buckets words down to 240px, then glyph plus the chosen word.
|
|
721
|
-
* four buckets glyph plus the chosen word under 320px; glyphs under 200px.
|
|
722
|
-
*
|
|
723
|
-
* Which state is a CSS decision, taken against the PANEL's width — see the
|
|
724
|
-
* `@container` blocks in `panel.css`, and the wrapper below that gives them
|
|
725
|
-
* something to measure. React cannot know the answer at render time, and it
|
|
726
|
-
* does not need to: BOTH parts are always in the markup, and CSS shows the one
|
|
727
|
-
* that fits. The word is only ever hidden, never dropped, and the label rides
|
|
728
|
-
* along as `title` and `aria-label` on every tab in every state, so the glyph
|
|
729
|
-
* never has to speak for the tab.
|
|
730
|
-
*
|
|
731
|
-
* A tab with no icon is untouched at every width — it has nothing to fall back
|
|
732
|
-
* to, so it keeps its word.
|
|
733
|
-
*/
|
|
734
|
-
declare function SettingsTabs({ items, activeId, onSelect, ariaLabel, className, }: SettingsTabsProps): react.JSX.Element;
|
|
686
|
+
declare function SettingsTabs({ items, activeId, onSelect, ariaLabel, idPrefix, className, }: SettingsTabsProps): react.JSX.Element;
|
|
735
687
|
|
|
736
688
|
/**
|
|
737
689
|
* A segmented control: one row of chips, one of them pressed.
|
|
738
690
|
*
|
|
691
|
+
* THE SHELL'S `Segmented` (harness UI-24, efficient-easel#199 step 4): a
|
|
692
|
+
* button group (no `name`), its track, chips, pressed state and disabled look
|
|
693
|
+
* the kit's. What stays here is what the shell's has no prop for: a value of
|
|
694
|
+
* any type (the options are keyed by position), the word that drops where it
|
|
695
|
+
* stops fitting (below), and a name for a glyph — the shell's `Tooltip` around
|
|
696
|
+
* it, never a `title`.
|
|
697
|
+
*
|
|
739
698
|
* THE SAME CHIP AS `SettingsTabs`, AND A DIFFERENT PROMISE. Everything a
|
|
740
699
|
* merchant sees is shared — the grey track, the raised white chip for the one
|
|
741
700
|
* he is on, the glyph drawn at every width, the word that drops where it stops
|
|
@@ -919,11 +878,11 @@ declare function SettingsField({ label, labelId, icon, value, hint, changed, htm
|
|
|
919
878
|
* had to learn the control twice. Both now import this file, which is the only
|
|
920
879
|
* thing that stops them drifting apart again.
|
|
921
880
|
*
|
|
922
|
-
*
|
|
923
|
-
*
|
|
924
|
-
*
|
|
925
|
-
*
|
|
926
|
-
* `
|
|
881
|
+
* IT IS THE SHELL'S `Switch` (harness UI-24, efficient-easel#199 step 4): a
|
|
882
|
+
* real `<button role="switch">`, so Space and Enter are a click with no key
|
|
883
|
+
* handler of ours, and its look is the kit's, in both themes. This name stays
|
|
884
|
+
* because both editors' hosts import it, and `SettingsField` recognises it in
|
|
885
|
+
* its `action` slot; nothing here draws a switch any more.
|
|
927
886
|
*
|
|
928
887
|
* It cannot exist without a NAME. `SettingsSwitchProps` demands `ariaLabel` or
|
|
929
888
|
* `ariaLabelledBy` and forbids both at once, so an unnamed switch — which a
|
|
@@ -933,12 +892,13 @@ declare function SettingsField({ label, labelId, icon, value, hint, changed, htm
|
|
|
933
892
|
* ONE-WAY DEPENDENCY. `SettingsField` imports this module so it can recognise a
|
|
934
893
|
* switch in its `action` slot and hand it the field's label as a name. This
|
|
935
894
|
* module must NEVER import `SettingsField` back — that would close a cycle
|
|
936
|
-
* between two siblings in the same folder. It imports `./types` and
|
|
937
|
-
* else, and `tests/settings-switch.test.tsx` (o) keeps it
|
|
895
|
+
* between two siblings in the same folder. It imports `./types` and the
|
|
896
|
+
* shell's kit, nothing else, and `tests/settings-switch.test.tsx` (o) keeps it
|
|
897
|
+
* that way.
|
|
938
898
|
*
|
|
939
|
-
* CONTROLLED
|
|
940
|
-
*
|
|
941
|
-
*
|
|
899
|
+
* CONTROLLED: `checked` comes from the host and the switch only ever ASKS to
|
|
900
|
+
* be flipped. Hook-free and directive-free here; the shell's kit entry is a
|
|
901
|
+
* client boundary, so a Next-16 server component can still import this.
|
|
942
902
|
*/
|
|
943
903
|
declare function SettingsSwitch({ checked, onChange, disabled, id, ariaLabel, ariaLabelledBy, className, }: SettingsSwitchProps): react.JSX.Element;
|
|
944
904
|
|
|
@@ -1053,6 +1013,13 @@ declare function SettingsDrill({ name, preview, offPage, status, onOpen, id, cla
|
|
|
1053
1013
|
* or a grid anchor is the host's business, and keeping it that way is what lets
|
|
1054
1014
|
* one control answer both questions.
|
|
1055
1015
|
*
|
|
1016
|
+
* ── AN EDITOR'S COMPOSITE, OF THE SHELL'S PARTS (UI-24 §2) ─────────────────
|
|
1017
|
+
*
|
|
1018
|
+
* The shell has a `RadioGroup` of labelled rows and no grid of positions, so
|
|
1019
|
+
* this picture of nine squares stays the editor's — but every cell is the
|
|
1020
|
+
* shell's `IconButton` (a `role="radio"`), its name the shell's `Tooltip`,
|
|
1021
|
+
* and the sheet draws only the picture: the track, the dot, the chosen cell.
|
|
1022
|
+
*
|
|
1056
1023
|
* Controlled and hook-free, like every primitive here, so a Next server
|
|
1057
1024
|
* component can import this module.
|
|
1058
1025
|
*/
|
|
@@ -1106,6 +1073,13 @@ declare function SettingsPlacement({ label, value, points, onChange, id, classNa
|
|
|
1106
1073
|
* grid requires its value already resolved. A control that invented the default
|
|
1107
1074
|
* would be answering a question only the host can answer.
|
|
1108
1075
|
*
|
|
1076
|
+
* ── AN EDITOR'S COMPOSITE, OF THE SHELL'S PARTS (UI-24 §2) ─────────────────
|
|
1077
|
+
*
|
|
1078
|
+
* The shell's `Segmented` answers ONE of a set, and it has no set of toggles,
|
|
1079
|
+
* so the four corners stay the editor's picture — but every cell is the
|
|
1080
|
+
* shell's `IconButton` (`aria-pressed`), its name the shell's `Tooltip`, and
|
|
1081
|
+
* the sheet draws only the picture: the track, the frame and the marks.
|
|
1082
|
+
*
|
|
1109
1083
|
* Controlled and hook-free, like every primitive here, so a Next server
|
|
1110
1084
|
* component can import this module.
|
|
1111
1085
|
*/
|
package/dist/panel/index.js
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
export{SETTINGS_BUCKETS,SettingsField,SettingsGroup,SettingsTabs}from"../chunk-
|
|
2
|
-
return
|
|
3
|
-
return
|
|
4
|
-
return
|
|
5
|
-
return
|
|
6
|
-
|
|
7
|
-
/* @__PURE__ */s("span",{className:"es-drill-
|
|
8
|
-
/* @__PURE__ */
|
|
9
|
-
|
|
10
|
-
return
|
|
11
|
-
return
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return
|
|
15
|
-
|
|
16
|
-
/* @__PURE__ */s("
|
|
17
|
-
/* @__PURE__ */
|
|
18
|
-
/* @__PURE__ */l("span",{className:"es-action-live",role:"status","aria-live":"polite",children:t?u:null})]})}export{m as SettingsAction,p as SettingsCorners,t as SettingsDefaultReset,d as SettingsDrill,n as SettingsGroupHead,i as SettingsGroupSub,u as SettingsPlacement};
|
|
1
|
+
export{SETTINGS_BUCKETS,SettingsField,SettingsGroup,SettingsTabs}from"../chunk-Q27BB5ZC.js";import{DEFAULT_PANEL_WORDS as e}from"../chunk-QTLAVDJE.js";export{SettingsSegmented,SettingsSwitch}from"../chunk-QLD57GBB.js";import{withTip as a}from"../chunk-P2VEMZH5.js";import{RevertIcon as l}from"../chunk-L5KW4HG5.js";import{jsx as s,jsxs as i}from"react/jsx-runtime";import{Tooltip as n,IconButton as t}from"efficient-shell/ui";function r({title:e,level:a=3,id:l,className:i}){/* @__PURE__ */
|
|
2
|
+
return s(`h${a}`,{id:l,className:i?`es-group-head ${i}`:"es-group-head",children:e})}function c({title:e,level:a=4,id:l,className:i}){/* @__PURE__ */
|
|
3
|
+
return s(`h${a}`,{id:l,className:i?`es-group-sub ${i}`:"es-group-sub",children:e})}function d({label:i,changed:n,onReset:t,detail:r,disabled:c,defaultAction:d,words:p,className:h}){const b={...e,...p},f=["es-default-reset"];if(n&&f.push("is-changed"),h&&f.push(h),!n&&d)return f.push("is-pressable"),a(d.title,/* @__PURE__ */s("button",{type:"button",className:f.join(" "),"aria-label":d.title,disabled:c,onClick:d.onPress,children:d.icon}));if(!n)/* @__PURE__ */
|
|
4
|
+
return s("span",{className:f.join(" "),"aria-hidden":"true"});const v=b.resetName({label:i});return a(r?b.resetTitle({label:i,detail:r}):v,/* @__PURE__ */s("button",{type:"button",className:f.join(" "),"aria-label":v,"aria-description":r||void 0,disabled:c,onClick:e=>{t(),function(e){const a=e.currentTarget,l=a.closest(".es-field");let s=l?.querySelector(u(".es-field-ctl"))??l?.querySelector(u(".es-field-head"))??null,i=l?null:a.parentElement;for(let e=0;!s&&i&&e<m;e+=1,i=i.parentElement)s=[...i.querySelectorAll(o)].find(e=>e!==a)??null;s?.focus()}(e)},children:/* @__PURE__ */s(l,{size:15})}))}var o=['input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled]):not(.es-default-reset)",'[tabindex]:not([tabindex="-1"])'].join(", "),u=e=>o.split(", ").map(a=>`${e} ${a}`).join(", "),m=4;function p({name:e,preview:a,offPage:l,status:n,onOpen:t,id:r,className:c}){const d=null!=a;/* @__PURE__ */
|
|
5
|
+
return i("button",{type:"button",id:r,className:c?`es-drill ${c}`:"es-drill",onClick:t,children:[
|
|
6
|
+
/* @__PURE__ */i("span",{className:"es-drill-text",children:[
|
|
7
|
+
/* @__PURE__ */s("span",{className:"es-drill-name",children:e}),d?/* @__PURE__ */s("span",{className:l?"es-drill-preview is-offpage":"es-drill-preview",children:a}):null]}),n?/* @__PURE__ */s("span",{className:"es-drill-status",children:n}):null,
|
|
8
|
+
/* @__PURE__ */s("span",{className:"es-drill-chev","aria-hidden":"true"})]})}function h({label:e,value:a,points:l,onChange:r,id:c,className:d}){const o=c??`es-placement-${e.toLowerCase().replace(/[^a-z0-9]+/g,"-")}`;/* @__PURE__ */
|
|
9
|
+
return i("div",{id:c,className:"es-placement"+(d?` ${d}`:""),role:"radiogroup","aria-label":e,children:[l.map(e=>{const l=a===e.value,i=!0===e.disabled,c=i&&e.title?`${o}-${e.value}-why`:void 0;/* @__PURE__ */
|
|
10
|
+
return s(n,{content:e.title??e.label,children:/* @__PURE__ */s(t,{size:"sm",role:"radio","aria-checked":l,"aria-label":e.label,"aria-disabled":i||void 0,"aria-describedby":c,className:`es-placement-cell${l?" is-active":""}${i?" is-off":""}`,onClick:()=>{i||r(e.value)},children:e.icon?/* @__PURE__ */s("span",{className:"es-placement-icon","aria-hidden":"true",children:e.icon}):/* @__PURE__ */s("span",{className:"es-placement-dot"})})},e.value)}),l.map(e=>!0===e.disabled&&e.title?/* @__PURE__ */s("span",{id:`${o}-${e.value}-why`,className:"es-vh",children:e.title},`${e.value}-why`):null)]})}function b({label:e,value:a,corners:l,onChange:r,id:c,className:d}){const o=c??`es-corners-${e.toLowerCase().replace(/[^a-z0-9]+/g,"-")}`;/* @__PURE__ */
|
|
11
|
+
return i("div",{id:c,className:"es-corners"+(d?` ${d}`:""),role:"group","aria-label":e,children:[
|
|
12
|
+
/* @__PURE__ */s("span",{className:"es-corners-frame","aria-hidden":"true"}),l.map(e=>{const l=a.includes(e.value),i=!0===e.disabled,c=i&&e.title?`${o}-${e.value}-why`:void 0;/* @__PURE__ */
|
|
13
|
+
return s(n,{content:e.title??e.label,children:/* @__PURE__ */s(t,{size:"sm","aria-pressed":l,"aria-label":e.label,"aria-disabled":i||void 0,"aria-describedby":c,className:`es-corners-cell es-corners-${e.value}${l?" is-on":""}${i?" is-off":""}`,onClick:()=>{i||r(l?a.filter(a=>a!==e.value):[...a,e.value])},children:/* @__PURE__ */s("span",{className:"es-corners-mark","aria-hidden":"true"})})},e.value)}),l.map(e=>!0===e.disabled&&e.title?/* @__PURE__ */s("span",{id:`${o}-${e.value}-why`,className:"es-vh",children:e.title},`${e.value}-why`):null)]})}function f({label:e,onPress:a,disabled:l,note:n,done:t,doneLabel:r,icon:c,id:d,className:o}){const u=void 0===r?e:r,m=t?u:e,p=null!=n,h=p&&d?`${d}-note`:void 0;/* @__PURE__ */
|
|
14
|
+
return i("div",{className:o?`es-action-wrap ${o}`:"es-action-wrap",children:[
|
|
15
|
+
/* @__PURE__ */i("button",{type:"button",id:d,className:t?"es-action is-done":"es-action",disabled:l,"aria-describedby":h,onClick:a,children:[c?/* @__PURE__ */s("span",{className:"es-action-icon","aria-hidden":"true",children:c}):null,
|
|
16
|
+
/* @__PURE__ */s("span",{className:"es-action-label",children:m})]}),p?/* @__PURE__ */s("p",{id:h,className:"es-action-note",children:n}):null,
|
|
17
|
+
/* @__PURE__ */s("span",{className:"es-action-live",role:"status","aria-live":"polite",children:t?u:null})]})}export{f as SettingsAction,b as SettingsCorners,d as SettingsDefaultReset,p as SettingsDrill,r as SettingsGroupHead,c as SettingsGroupSub,h as SettingsPlacement};
|