@owlmeans/web-panel 0.1.18-rc.74 → 0.1.18-rc.76
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 +89 -7
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/web-panel/SKILL.md +207 -7
- package/build/@/components/ui/popover.d.ts +8 -0
- package/build/@/components/ui/popover.d.ts.map +1 -0
- package/build/@/components/ui/popover.js +17 -0
- package/build/@/components/ui/popover.js.map +1 -0
- package/build/components/picker/color-picker.d.ts +9 -0
- package/build/components/picker/color-picker.d.ts.map +1 -0
- package/build/components/picker/color-picker.js +9 -0
- package/build/components/picker/color-picker.js.map +1 -0
- package/build/components/picker/consts.local.d.ts +76 -0
- package/build/components/picker/consts.local.d.ts.map +1 -0
- package/build/components/picker/consts.local.js +213 -0
- package/build/components/picker/consts.local.js.map +1 -0
- package/build/components/picker/dot.d.ts +8 -0
- package/build/components/picker/dot.d.ts.map +1 -0
- package/build/components/picker/dot.js +10 -0
- package/build/components/picker/dot.js.map +1 -0
- package/build/components/picker/grid.d.ts +17 -0
- package/build/components/picker/grid.d.ts.map +1 -0
- package/build/components/picker/grid.js +73 -0
- package/build/components/picker/grid.js.map +1 -0
- package/build/components/picker/i18n/be.json +60 -0
- package/build/components/picker/i18n/de.json +60 -0
- package/build/components/picker/i18n/en.json +60 -0
- package/build/components/picker/i18n/es.json +60 -0
- package/build/components/picker/i18n/fr.json +60 -0
- package/build/components/picker/i18n/pl.json +60 -0
- package/build/components/picker/i18n/ru.json +60 -0
- package/build/components/picker/i18n/uk.json +60 -0
- package/build/components/picker/i18n.d.ts +2 -0
- package/build/components/picker/i18n.d.ts.map +1 -0
- package/build/components/picker/i18n.js +18 -0
- package/build/components/picker/i18n.js.map +1 -0
- package/build/components/picker/icon-color-picker.d.ts +14 -0
- package/build/components/picker/icon-color-picker.d.ts.map +1 -0
- package/build/components/picker/icon-color-picker.js +15 -0
- package/build/components/picker/icon-color-picker.js.map +1 -0
- package/build/components/picker/icon-picker.d.ts +8 -0
- package/build/components/picker/icon-picker.d.ts.map +1 -0
- package/build/components/picker/icon-picker.js +8 -0
- package/build/components/picker/icon-picker.js.map +1 -0
- package/build/components/picker/index.d.ts +11 -0
- package/build/components/picker/index.d.ts.map +1 -0
- package/build/components/picker/index.js +10 -0
- package/build/components/picker/index.js.map +1 -0
- package/build/components/picker/panel.d.ts +9 -0
- package/build/components/picker/panel.d.ts.map +1 -0
- package/build/components/picker/panel.js +23 -0
- package/build/components/picker/panel.js.map +1 -0
- package/build/components/picker/root.d.ts +13 -0
- package/build/components/picker/root.d.ts.map +1 -0
- package/build/components/picker/root.js +55 -0
- package/build/components/picker/root.js.map +1 -0
- package/build/components/picker/roving.d.ts +8 -0
- package/build/components/picker/roving.d.ts.map +1 -0
- package/build/components/picker/roving.js +62 -0
- package/build/components/picker/roving.js.map +1 -0
- package/build/components/picker/surface.d.ts +18 -0
- package/build/components/picker/surface.d.ts.map +1 -0
- package/build/components/picker/surface.js +36 -0
- package/build/components/picker/surface.js.map +1 -0
- package/build/components/picker/swatches/custom.d.ts +10 -0
- package/build/components/picker/swatches/custom.d.ts.map +1 -0
- package/build/components/picker/swatches/custom.js +65 -0
- package/build/components/picker/swatches/custom.js.map +1 -0
- package/build/components/picker/swatches.d.ts +16 -0
- package/build/components/picker/swatches.d.ts.map +1 -0
- package/build/components/picker/swatches.js +35 -0
- package/build/components/picker/swatches.js.map +1 -0
- package/build/components/picker/text.d.ts +5 -0
- package/build/components/picker/text.d.ts.map +1 -0
- package/build/components/picker/text.js +29 -0
- package/build/components/picker/text.js.map +1 -0
- package/build/components/picker/tile.d.ts +11 -0
- package/build/components/picker/tile.d.ts.map +1 -0
- package/build/components/picker/tile.js +19 -0
- package/build/components/picker/tile.js.map +1 -0
- package/build/components/picker/translate.d.ts +9 -0
- package/build/components/picker/translate.d.ts.map +1 -0
- package/build/components/picker/translate.js +13 -0
- package/build/components/picker/translate.js.map +1 -0
- package/build/components/picker/trigger.d.ts +12 -0
- package/build/components/picker/trigger.d.ts.map +1 -0
- package/build/components/picker/trigger.js +29 -0
- package/build/components/picker/trigger.js.map +1 -0
- package/build/components/picker/types.d.ts +114 -0
- package/build/components/picker/types.d.ts.map +1 -0
- package/build/components/picker/types.js +2 -0
- package/build/components/picker/types.js.map +1 -0
- package/build/components/picker/types.local.d.ts +143 -0
- package/build/components/picker/types.local.d.ts.map +1 -0
- package/build/components/picker/types.local.js +2 -0
- package/build/components/picker/types.local.js.map +1 -0
- package/build/picker/icons/consts.d.ts +9 -0
- package/build/picker/icons/consts.d.ts.map +1 -0
- package/build/picker/icons/consts.js +264 -0
- package/build/picker/icons/consts.js.map +1 -0
- package/build/picker/icons/types.d.ts +18 -0
- package/build/picker/icons/types.d.ts.map +1 -0
- package/build/picker/icons/types.js +2 -0
- package/build/picker/icons/types.js.map +1 -0
- package/build/picker/icons.d.ts +4 -0
- package/build/picker/icons.d.ts.map +1 -0
- package/build/picker/icons.js +54 -0
- package/build/picker/icons.js.map +1 -0
- package/build/picker/index.d.ts +11 -0
- package/build/picker/index.d.ts.map +1 -0
- package/build/picker/index.js +10 -0
- package/build/picker/index.js.map +1 -0
- package/build/picker/utils/color/types.d.ts +35 -0
- package/build/picker/utils/color/types.d.ts.map +1 -0
- package/build/picker/utils/color/types.js +2 -0
- package/build/picker/utils/color/types.js.map +1 -0
- package/build/picker/utils/color.d.ts +4 -0
- package/build/picker/utils/color.d.ts.map +1 -0
- package/build/picker/utils/color.js +96 -0
- package/build/picker/utils/color.js.map +1 -0
- package/build/picker/vocabulary/consts.d.ts +26 -0
- package/build/picker/vocabulary/consts.d.ts.map +1 -0
- package/build/picker/vocabulary/consts.js +336 -0
- package/build/picker/vocabulary/consts.js.map +1 -0
- package/build/picker/vocabulary/types.d.ts +67 -0
- package/build/picker/vocabulary/types.d.ts.map +1 -0
- package/build/picker/vocabulary/types.js +2 -0
- package/build/picker/vocabulary/types.js.map +1 -0
- package/build/picker/vocabulary.d.ts +11 -0
- package/build/picker/vocabulary.d.ts.map +1 -0
- package/build/picker/vocabulary.js +83 -0
- package/build/picker/vocabulary.js.map +1 -0
- package/package.json +37 -20
- package/src/@/components/ui/popover.tsx +47 -0
- package/src/components/picker/color-picker.tsx +15 -0
- package/src/components/picker/consts.local.ts +266 -0
- package/src/components/picker/dot.tsx +21 -0
- package/src/components/picker/grid.tsx +138 -0
- package/src/components/picker/i18n/be.json +60 -0
- package/src/components/picker/i18n/de.json +60 -0
- package/src/components/picker/i18n/en.json +60 -0
- package/src/components/picker/i18n/es.json +60 -0
- package/src/components/picker/i18n/fr.json +60 -0
- package/src/components/picker/i18n/pl.json +60 -0
- package/src/components/picker/i18n/ru.json +60 -0
- package/src/components/picker/i18n/uk.json +60 -0
- package/src/components/picker/i18n.ts +19 -0
- package/src/components/picker/icon-color-picker.tsx +25 -0
- package/src/components/picker/icon-picker.tsx +13 -0
- package/src/components/picker/index.ts +11 -0
- package/src/components/picker/panel.tsx +61 -0
- package/src/components/picker/root.tsx +81 -0
- package/src/components/picker/roving.ts +70 -0
- package/src/components/picker/surface.tsx +62 -0
- package/src/components/picker/swatches/custom.tsx +110 -0
- package/src/components/picker/swatches.tsx +67 -0
- package/src/components/picker/text.ts +46 -0
- package/src/components/picker/tile.tsx +35 -0
- package/src/components/picker/translate.ts +15 -0
- package/src/components/picker/trigger.tsx +54 -0
- package/src/components/picker/types.local.ts +154 -0
- package/src/components/picker/types.ts +125 -0
- package/src/picker/icons/consts.ts +309 -0
- package/src/picker/icons/types.ts +18 -0
- package/src/picker/icons.ts +70 -0
- package/src/picker/index.ts +11 -0
- package/src/picker/utils/color/types.ts +37 -0
- package/src/picker/utils/color.ts +119 -0
- package/src/picker/vocabulary/consts.ts +347 -0
- package/src/picker/vocabulary/types.ts +72 -0
- package/src/picker/vocabulary.ts +111 -0
- package/tests/context.ts +1 -1
- package/tests/harness/index.html +1 -0
- package/tests/harness/mount.tsx +13 -2
- package/tests/harness/picker.tsx +110 -0
- package/tests/picker-shots.spec.ts +174 -0
- package/tests/picker-vocabulary.spec.ts +217 -0
- package/tests/picker.spec.ts +333 -0
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/** From this width up `surface="auto"` opens a popover; below it, a bottom sheet. */
|
|
2
|
+
export const POPOVER_QUERY = '(min-width: 768px)';
|
|
3
|
+
/** A mouse or trackpad — the search field may take focus on open without raising a keyboard. */
|
|
4
|
+
export const FINE_POINTER_QUERY = '(pointer: fine)';
|
|
5
|
+
/**
|
|
6
|
+
* The current mode's ink and ground, read from the five custom properties `styleOf` sets.
|
|
7
|
+
*
|
|
8
|
+
* Dark follows web-panel's colour-scheme contract — `.dark` on the document element, or the
|
|
9
|
+
* operating system's dark unless `.light` is there — through explicit arbitrary variants. Never the
|
|
10
|
+
* consumer's `dark:`: an application may define it any way it likes, or not at all. Every part that
|
|
11
|
+
* carries a colour's style puts this on the same element; children read `--pick-fg` / `--pick-bg`.
|
|
12
|
+
*/
|
|
13
|
+
export const PICK_SCOPE = [
|
|
14
|
+
'[--pick-fg:var(--pick-ink)] [--pick-bg:var(--pick-soft)]',
|
|
15
|
+
'[.dark_&]:[--pick-fg:var(--pick-ink-dark)] [.dark_&]:[--pick-bg:var(--pick-soft-dark)]',
|
|
16
|
+
'[@media(prefers-color-scheme:dark)]:[:root:not(.light)_&]:[--pick-fg:var(--pick-ink-dark)]',
|
|
17
|
+
'[@media(prefers-color-scheme:dark)]:[:root:not(.light)_&]:[--pick-bg:var(--pick-soft-dark)]',
|
|
18
|
+
].join(' ');
|
|
19
|
+
/** A hairline inside a swatch, so a dark swatch keeps an edge on a dark surface and a pale one on a light. */
|
|
20
|
+
export const HAIRLINE = [
|
|
21
|
+
'shadow-[inset_0_0_0_1px_rgb(0_0_0/0.14)]',
|
|
22
|
+
'[.dark_&]:shadow-[inset_0_0_0_1px_rgb(255_255_255/0.24)]',
|
|
23
|
+
'[@media(prefers-color-scheme:dark)]:[:root:not(.light)_&]:shadow-[inset_0_0_0_1px_rgb(255_255_255/0.24)]',
|
|
24
|
+
].join(' ');
|
|
25
|
+
export const TILE = 'inline-flex shrink-0 items-center justify-center bg-(--pick-bg) text-(--pick-fg)';
|
|
26
|
+
export const TILE_SIZE = {
|
|
27
|
+
xs: 'size-5 rounded-[5px] [&>svg]:size-3',
|
|
28
|
+
sm: 'size-7 rounded-md [&>svg]:size-4',
|
|
29
|
+
md: 'size-9 rounded-lg [&>svg]:size-5',
|
|
30
|
+
lg: 'size-12 rounded-xl [&>svg]:size-6',
|
|
31
|
+
};
|
|
32
|
+
export const PLAIN = 'inline-flex shrink-0 items-center justify-center text-(--pick-fg)';
|
|
33
|
+
export const PLAIN_SIZE = {
|
|
34
|
+
xs: '[&>svg]:size-3',
|
|
35
|
+
sm: '[&>svg]:size-4',
|
|
36
|
+
md: '[&>svg]:size-5',
|
|
37
|
+
lg: '[&>svg]:size-6',
|
|
38
|
+
};
|
|
39
|
+
export const DOT = 'inline-block shrink-0 rounded-full bg-(--pick-fg)';
|
|
40
|
+
export const DOT_SIZE = {
|
|
41
|
+
xs: 'size-2',
|
|
42
|
+
sm: 'size-2.5',
|
|
43
|
+
md: 'size-3.5',
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Focus on a cell is an outline, so it never fights the ring that marks the selected one. Tailwind
|
|
47
|
+
* v4's `outline-none` would pin the style to `none` under the focus width — `outline-hidden` plus an
|
|
48
|
+
* explicit `outline-solid` is what shows it.
|
|
49
|
+
*/
|
|
50
|
+
const CELL_FOCUS = [
|
|
51
|
+
'outline-hidden focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-offset-1',
|
|
52
|
+
'focus-visible:outline-ring',
|
|
53
|
+
].join(' ');
|
|
54
|
+
/** Below 768px and on a coarse pointer every control is at least 44px. */
|
|
55
|
+
const TOUCH_HEIGHT = 'max-md:h-11 pointer-coarse:h-11';
|
|
56
|
+
export const TRIGGER_BUTTON = [
|
|
57
|
+
'group/picker inline-flex h-9 w-full min-w-0 cursor-pointer items-center gap-2 rounded-md border border-input',
|
|
58
|
+
'bg-transparent py-1 pr-2.5 pl-1 text-left text-sm shadow-xs outline-none',
|
|
59
|
+
'transition-[color,box-shadow,background-color] hover:bg-accent/60 motion-reduce:transition-none',
|
|
60
|
+
'focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50',
|
|
61
|
+
'aria-expanded:border-ring aria-expanded:ring-[3px] aria-expanded:ring-ring/30',
|
|
62
|
+
'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',
|
|
63
|
+
'max-md:h-11 max-md:pl-2 pointer-coarse:h-11 pointer-coarse:pl-2',
|
|
64
|
+
].join(' ');
|
|
65
|
+
export const TRIGGER_COMPACT = [
|
|
66
|
+
'inline-flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-lg outline-none',
|
|
67
|
+
'transition-shadow motion-reduce:transition-none',
|
|
68
|
+
'focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-expanded:ring-[3px] aria-expanded:ring-ring/30',
|
|
69
|
+
'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',
|
|
70
|
+
'max-md:size-11 pointer-coarse:size-11',
|
|
71
|
+
].join(' ');
|
|
72
|
+
export const TRIGGER_DOT = 'rounded-full border border-input bg-transparent hover:bg-accent/60';
|
|
73
|
+
/** The empty tile of a trigger while nothing is chosen. */
|
|
74
|
+
export const TRIGGER_EMPTY = [
|
|
75
|
+
'inline-flex size-7 shrink-0 items-center justify-center rounded-md border border-dashed',
|
|
76
|
+
'border-muted-foreground/40 text-muted-foreground [&>svg]:size-4',
|
|
77
|
+
].join(' ');
|
|
78
|
+
export const CHEVRON = [
|
|
79
|
+
'ml-auto size-4 shrink-0 text-muted-foreground transition-transform motion-reduce:transition-none',
|
|
80
|
+
'group-aria-expanded/picker:rotate-180',
|
|
81
|
+
].join(' ');
|
|
82
|
+
export const POPOVER = [
|
|
83
|
+
'flex w-[23rem] max-w-[calc(100vw-1.5rem)] flex-col overflow-hidden rounded-xl border border-border p-0 shadow-lg',
|
|
84
|
+
'bg-popover text-popover-foreground',
|
|
85
|
+
'max-h-[min(34rem,var(--radix-popover-content-available-height))]',
|
|
86
|
+
'pointer-coarse:w-[26rem] motion-reduce:animate-none',
|
|
87
|
+
].join(' ');
|
|
88
|
+
export const SHEET = [
|
|
89
|
+
'mx-auto max-h-[88dvh] w-full gap-0 overflow-hidden rounded-t-2xl border-t border-border p-0',
|
|
90
|
+
'bg-popover text-popover-foreground pb-[env(safe-area-inset-bottom)]',
|
|
91
|
+
'sm:max-w-xl sm:border-x motion-reduce:animate-none',
|
|
92
|
+
].join(' ');
|
|
93
|
+
/** With an icon grid the surface keeps one height, so filtering never makes it jump. */
|
|
94
|
+
export const TALL = {
|
|
95
|
+
popover: 'h-[min(34rem,var(--radix-popover-content-available-height))]',
|
|
96
|
+
sheet: 'h-[88dvh]',
|
|
97
|
+
};
|
|
98
|
+
/** The trigger's swatch disc for a colour-only picker — the colour as it was picked. */
|
|
99
|
+
export const TRIGGER_DISC = 'block size-4 shrink-0 rounded-full bg-(--pick-swatch)';
|
|
100
|
+
export const GRAB = 'mx-auto mt-2 mb-1 h-1.5 w-10 shrink-0 rounded-full bg-muted-foreground/30';
|
|
101
|
+
export const HEADER = {
|
|
102
|
+
popover: 'flex shrink-0 items-center gap-3 border-b border-border px-3 py-2.5',
|
|
103
|
+
sheet: 'flex shrink-0 items-center gap-3 border-b border-border px-4 pt-1 pb-3',
|
|
104
|
+
};
|
|
105
|
+
export const HEADER_TITLE = 'truncate text-sm font-semibold leading-5';
|
|
106
|
+
export const HEADER_SUMMARY = 'truncate text-xs leading-4 text-muted-foreground';
|
|
107
|
+
export const DONE = [
|
|
108
|
+
'inline-flex h-11 min-w-16 shrink-0 cursor-pointer items-center justify-center rounded-lg px-4',
|
|
109
|
+
'bg-primary text-sm font-medium text-primary-foreground outline-none hover:bg-primary/90',
|
|
110
|
+
'focus-visible:ring-[3px] focus-visible:ring-ring/50',
|
|
111
|
+
].join(' ');
|
|
112
|
+
export const BODY = 'min-h-0 flex-1 overflow-y-auto overscroll-contain';
|
|
113
|
+
export const SECTION = {
|
|
114
|
+
popover: 'px-3 pt-3',
|
|
115
|
+
sheet: 'px-4 pt-4',
|
|
116
|
+
};
|
|
117
|
+
export const SECTION_TITLE = 'mb-2 text-xs font-medium text-muted-foreground';
|
|
118
|
+
export const SWATCHES = {
|
|
119
|
+
popover: [
|
|
120
|
+
'grid grid-cols-12 gap-1',
|
|
121
|
+
'max-md:grid-cols-[repeat(auto-fill,minmax(44px,1fr))] pointer-coarse:grid-cols-[repeat(auto-fill,minmax(44px,1fr))]',
|
|
122
|
+
].join(' '),
|
|
123
|
+
sheet: 'grid grid-cols-[repeat(auto-fill,minmax(44px,1fr))] gap-1.5',
|
|
124
|
+
inline: [
|
|
125
|
+
'grid grid-cols-[repeat(auto-fill,minmax(44px,1fr))] gap-1.5',
|
|
126
|
+
'md:pointer-fine:grid-cols-[repeat(12,minmax(0,2rem))] md:pointer-fine:gap-1',
|
|
127
|
+
].join(' '),
|
|
128
|
+
};
|
|
129
|
+
export const SWATCH = [
|
|
130
|
+
'group/swatch inline-flex aspect-square w-full min-w-0 cursor-pointer items-center justify-center rounded-full',
|
|
131
|
+
CELL_FOCUS,
|
|
132
|
+
].join(' ');
|
|
133
|
+
export const SWATCH_DISC = [
|
|
134
|
+
'pointer-events-none block size-[76%] max-h-9 max-w-9 rounded-full bg-(--pick-swatch)',
|
|
135
|
+
'transition-transform group-hover/swatch:scale-110 motion-reduce:transition-none motion-reduce:group-hover/swatch:scale-100',
|
|
136
|
+
HAIRLINE,
|
|
137
|
+
].join(' ');
|
|
138
|
+
export const SWATCH_SELECTED = 'ring-2 ring-foreground ring-offset-2 ring-offset-popover';
|
|
139
|
+
export const CUSTOM_ROW = [
|
|
140
|
+
'mt-2 flex h-8 w-full cursor-pointer items-center gap-2 rounded-md px-1.5 text-left text-sm',
|
|
141
|
+
'hover:bg-accent hover:text-accent-foreground',
|
|
142
|
+
'outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50',
|
|
143
|
+
TOUCH_HEIGHT,
|
|
144
|
+
].join(' ');
|
|
145
|
+
export const CUSTOM_DISC = 'block size-5 shrink-0 rounded-full';
|
|
146
|
+
/** The colour wheel's mark while no custom colour is chosen. */
|
|
147
|
+
export const RAINBOW = 'bg-[conic-gradient(from_180deg,#ef4444,#f59e0b,#eab308,#22c55e,#06b6d4,#3b82f6,#8b5cf6,#ec4899,#ef4444)]';
|
|
148
|
+
export const CUSTOM_PANEL = 'mt-2 flex flex-col gap-2';
|
|
149
|
+
/** A full six-digit value — committed while typing; a three-digit one waits for Enter or blur. */
|
|
150
|
+
export const FULL_HEX = /^#?[0-9a-f]{6}$/i;
|
|
151
|
+
/** The wheel's colour while nothing custom is chosen yet — also the hex field's placeholder. */
|
|
152
|
+
export const CUSTOM_START = '#3b82f6';
|
|
153
|
+
/** react-colorful sizes itself with a stylesheet it injects; an inline size is the one that always wins. */
|
|
154
|
+
export const WHEEL_STYLE = { width: '100%', height: 148 };
|
|
155
|
+
export const FIELD = [
|
|
156
|
+
'h-8 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 text-sm shadow-xs outline-none',
|
|
157
|
+
'placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50',
|
|
158
|
+
'aria-invalid:border-destructive aria-invalid:ring-destructive/20',
|
|
159
|
+
TOUCH_HEIGHT,
|
|
160
|
+
].join(' ');
|
|
161
|
+
export const HEX_FIELD = 'font-mono';
|
|
162
|
+
export const FIELD_ERROR = 'text-xs text-destructive';
|
|
163
|
+
/** The search field and the chips stay in view while the grid scrolls under them. */
|
|
164
|
+
export const ICON_TOOLS = {
|
|
165
|
+
popover: 'sticky top-0 z-10 -mx-3 bg-popover px-3 pb-2',
|
|
166
|
+
sheet: 'sticky top-0 z-10 -mx-4 bg-popover px-4 pb-2',
|
|
167
|
+
inline: 'pb-2',
|
|
168
|
+
};
|
|
169
|
+
export const SEARCH_WRAP = 'relative';
|
|
170
|
+
export const SEARCH_ICON = 'pointer-events-none absolute top-1/2 left-2.5 size-4 -translate-y-1/2 text-muted-foreground';
|
|
171
|
+
export const SEARCH = 'pl-8 [&::-webkit-search-cancel-button]:cursor-pointer';
|
|
172
|
+
/** One scrolling row of category chips, running to the surface's edges rather than its padding. */
|
|
173
|
+
export const CHIPS = {
|
|
174
|
+
popover: 'mt-2 -mx-3 flex gap-1.5 overflow-x-auto px-3 pb-0.5 scroll-px-3 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden',
|
|
175
|
+
sheet: 'mt-2 -mx-4 flex gap-1.5 overflow-x-auto px-4 pb-0.5 scroll-px-4 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden',
|
|
176
|
+
inline: 'mt-2 flex gap-1.5 overflow-x-auto pb-0.5 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden',
|
|
177
|
+
};
|
|
178
|
+
export const CHIP = [
|
|
179
|
+
'inline-flex h-7 shrink-0 cursor-pointer items-center rounded-full border border-input px-2.5',
|
|
180
|
+
'text-xs font-medium text-muted-foreground transition-colors motion-reduce:transition-none',
|
|
181
|
+
'hover:bg-accent hover:text-accent-foreground',
|
|
182
|
+
'aria-pressed:border-transparent aria-pressed:bg-primary aria-pressed:text-primary-foreground',
|
|
183
|
+
CELL_FOCUS,
|
|
184
|
+
'max-md:h-11 max-md:px-4 max-md:text-sm pointer-coarse:h-11 pointer-coarse:px-4 pointer-coarse:text-sm',
|
|
185
|
+
].join(' ');
|
|
186
|
+
export const ICONS = {
|
|
187
|
+
popover: [
|
|
188
|
+
'grid grid-cols-9 gap-0.5',
|
|
189
|
+
'max-md:grid-cols-[repeat(auto-fill,minmax(44px,1fr))] pointer-coarse:grid-cols-[repeat(auto-fill,minmax(44px,1fr))]',
|
|
190
|
+
].join(' '),
|
|
191
|
+
sheet: 'grid grid-cols-[repeat(auto-fill,minmax(44px,1fr))] gap-1',
|
|
192
|
+
inline: [
|
|
193
|
+
'grid grid-cols-[repeat(auto-fill,minmax(44px,1fr))] gap-1',
|
|
194
|
+
'md:pointer-fine:grid-cols-[repeat(auto-fill,minmax(36px,1fr))] md:pointer-fine:gap-0.5',
|
|
195
|
+
].join(' '),
|
|
196
|
+
};
|
|
197
|
+
export const ICON_CELL = [
|
|
198
|
+
'inline-flex aspect-square w-full min-w-0 cursor-pointer items-center justify-center rounded-md text-(--pick-fg)',
|
|
199
|
+
'transition-colors hover:bg-accent motion-reduce:transition-none [&>svg]:size-5',
|
|
200
|
+
'aria-pressed:bg-(--pick-bg) aria-pressed:ring-2 aria-pressed:ring-(--pick-fg) aria-pressed:ring-inset',
|
|
201
|
+
CELL_FOCUS,
|
|
202
|
+
].join(' ');
|
|
203
|
+
export const ICON_GRID_PAD = {
|
|
204
|
+
popover: 'pb-3',
|
|
205
|
+
sheet: 'pb-4',
|
|
206
|
+
inline: '',
|
|
207
|
+
};
|
|
208
|
+
export const EMPTY = 'flex flex-col items-center gap-2 px-4 py-8 text-center text-sm text-muted-foreground';
|
|
209
|
+
export const LINK_BUTTON = [
|
|
210
|
+
'cursor-pointer rounded-sm text-sm font-medium text-foreground underline underline-offset-4',
|
|
211
|
+
'outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50',
|
|
212
|
+
].join(' ');
|
|
213
|
+
//# sourceMappingURL=consts.local.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.local.js","sourceRoot":"","sources":["../../../src/components/picker/consts.local.ts"],"names":[],"mappings":"AAIA,qFAAqF;AACrF,MAAM,CAAC,MAAM,aAAa,GAAG,oBAAoB,CAAA;AAEjD,gGAAgG;AAChG,MAAM,CAAC,MAAM,kBAAkB,GAAG,iBAAiB,CAAA;AAEnD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,0DAA0D;IAC1D,wFAAwF;IACxF,4FAA4F;IAC5F,6FAA6F;CAC9F,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAEX,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AAM,KAAK,GAAG,sFAAsF,CAAA;AAE3G,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,4FAA4F;IAC5F,kEAAkE;CACnE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import type { ColorDotProps } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* A stored colour as a dot, in the colour's ink — the ink keeps 3:1 on the page in both schemes,
|
|
5
|
+
* which a dot (a graphic) needs; the brighter swatch does not. Unknown → slate.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ColorDot: FC<ColorDotProps>;
|
|
8
|
+
//# sourceMappingURL=dot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dot.d.ts","sourceRoot":"","sources":["../../../src/components/picker/dot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAG/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAG/C;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAUnC,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from '../../@/lib/utils.js';
|
|
3
|
+
import { pickerColorHelper } from '../../picker/vocabulary.js';
|
|
4
|
+
import { DOT, DOT_SIZE, PICK_SCOPE } from './consts.local.js';
|
|
5
|
+
/**
|
|
6
|
+
* A stored colour as a dot, in the colour's ink — the ink keeps 3:1 on the page in both schemes,
|
|
7
|
+
* which a dot (a graphic) needs; the brighter swatch does not. Unknown → slate.
|
|
8
|
+
*/
|
|
9
|
+
export const ColorDot = ({ color, colors, size = 'sm', label, className }) => _jsx("span", { "data-color-dot": true, "data-color": pickerColorHelper.resolve(color, colors)?.key, role: label != null ? 'img' : undefined, "aria-label": label, "aria-hidden": label != null ? undefined : true, title: label, style: pickerColorHelper.styleOf(color, colors), className: cn(PICK_SCOPE, DOT, DOT_SIZE[size], className) });
|
|
10
|
+
//# sourceMappingURL=dot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dot.js","sourceRoot":"","sources":["../../../src/components/picker/dot.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,sBAAsB,CAAA;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAE9D,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAE7D;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAsB,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,GAAG,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,CAC9F,qDAEc,iBAAiB,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,GAAG,EACzD,IAAI,EAAE,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,gBAC3B,KAAK,iBACJ,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,EAC7C,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,iBAAiB,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,EAC/C,SAAS,EAAE,EAAE,CAAC,UAAU,EAAE,GAAG,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,GACzD,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import type { IconGridProps } from './types.js';
|
|
3
|
+
import type { IconBrowserProps } from './types.local.js';
|
|
4
|
+
/**
|
|
5
|
+
* The searchable icon grid every picker shares: a search field, category chips and the icons,
|
|
6
|
+
* tinted in the chosen colour. The search field and the chips stay put while the grid scrolls;
|
|
7
|
+
* ArrowDown (or Enter) moves from the field into the grid, ArrowUp from the grid's first row back.
|
|
8
|
+
* An empty result says so and offers to clear; the result count is announced politely.
|
|
9
|
+
*/
|
|
10
|
+
export declare const IconBrowser: FC<IconBrowserProps>;
|
|
11
|
+
/**
|
|
12
|
+
* The searchable icon grid inline — for a dialog or sheet the application already owns. Commits
|
|
13
|
+
* on click; `color` tints it, `icons` narrows (and orders) the catalogue. Strings through
|
|
14
|
+
* `translate` (English without it — never an implicit i18n read).
|
|
15
|
+
*/
|
|
16
|
+
export declare const IconGrid: FC<IconGridProps>;
|
|
17
|
+
//# sourceMappingURL=grid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../../src/components/picker/grid.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAiB,MAAM,OAAO,CAAA;AAO9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAOxD;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAmG5C,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAStC,CAAA"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, useRef, useState } from 'react';
|
|
3
|
+
import { SearchIcon, SearchXIcon } from 'lucide-react';
|
|
4
|
+
import { cn } from '../../@/lib/utils.js';
|
|
5
|
+
import { pickerIconHelper } from '../../picker/icons.js';
|
|
6
|
+
import { pickerColorHelper } from '../../picker/vocabulary.js';
|
|
7
|
+
import { PICKER_COLORS, PICKER_ICON_CATEGORIES } from '../../picker/vocabulary/consts.js';
|
|
8
|
+
import { useRovingGrid } from './roving.js';
|
|
9
|
+
import { makePickerText } from './text.js';
|
|
10
|
+
import { CHIP, CHIPS, EMPTY, FIELD, ICON_CELL, ICON_TOOLS, ICONS, LINK_BUTTON, PICK_SCOPE, SEARCH, SEARCH_ICON, SEARCH_WRAP, } from './consts.local.js';
|
|
11
|
+
/**
|
|
12
|
+
* The searchable icon grid every picker shares: a search field, category chips and the icons,
|
|
13
|
+
* tinted in the chosen colour. The search field and the chips stay put while the grid scrolls;
|
|
14
|
+
* ArrowDown (or Enter) moves from the field into the grid, ArrowUp from the grid's first row back.
|
|
15
|
+
* An empty result says so and offers to clear; the result count is announced politely.
|
|
16
|
+
*/
|
|
17
|
+
export const IconBrowser = ({ value, onChange, color, colors, icons, text, layout, label, searchRef, className }) => {
|
|
18
|
+
const [query, setQuery] = useState('');
|
|
19
|
+
const [category, setCategory] = useState(null);
|
|
20
|
+
const search = useRef(null);
|
|
21
|
+
const categories = useMemo(() => {
|
|
22
|
+
const scope = pickerIconHelper.search('', icons);
|
|
23
|
+
return PICKER_ICON_CATEGORIES.filter(candidate => scope.some(entry => entry.category === candidate));
|
|
24
|
+
}, [icons]);
|
|
25
|
+
const results = useMemo(() => pickerIconHelper.search(query, icons).filter(entry => category == null || entry.category === category), [query, icons, category]);
|
|
26
|
+
const grid = useRovingGrid({
|
|
27
|
+
count: results.length,
|
|
28
|
+
selected: results.findIndex(entry => entry.name === value),
|
|
29
|
+
onExitUp: () => search.current?.focus(),
|
|
30
|
+
});
|
|
31
|
+
const chips = useRovingGrid({
|
|
32
|
+
count: categories.length + 1,
|
|
33
|
+
selected: category == null ? 0 : categories.indexOf(category) + 1,
|
|
34
|
+
grid: false,
|
|
35
|
+
});
|
|
36
|
+
const bindSearch = (node) => {
|
|
37
|
+
search.current = node;
|
|
38
|
+
if (typeof searchRef === 'function') {
|
|
39
|
+
searchRef(node);
|
|
40
|
+
}
|
|
41
|
+
else if (searchRef != null) {
|
|
42
|
+
searchRef.current = node;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
const onSearchKey = (event) => {
|
|
46
|
+
if (event.key === 'ArrowDown' || event.key === 'Enter') {
|
|
47
|
+
// Enter must never submit the form the grid sits in.
|
|
48
|
+
event.preventDefault();
|
|
49
|
+
grid.focusCurrent();
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
const filtered = query.trim() !== '' || category != null;
|
|
53
|
+
return _jsxs("div", { "data-picker-icons": true, style: pickerColorHelper.styleOf(color, colors), className: cn(PICK_SCOPE, className), children: [_jsxs("div", { className: ICON_TOOLS[layout], children: [_jsxs("div", { className: SEARCH_WRAP, children: [_jsx(SearchIcon, { "aria-hidden": "true", className: SEARCH_ICON }), _jsx("input", { ref: bindSearch, type: "search", "data-picker-search": true, autoComplete: "off", spellCheck: false, enterKeyHint: "search", "aria-label": text.text('search', 'Search icons'), placeholder: text.text('searchPlaceholder', 'Search icons…'), value: query, onChange: event => setQuery(event.target.value), onKeyDown: onSearchKey, className: cn(FIELD, SEARCH) })] }), categories.length > 1 && _jsx("div", { ref: chips.ref, role: "group", "aria-label": text.text('categoriesLabel', 'Categories'), onKeyDown: chips.onKeyDown, className: CHIPS[layout], children: [null, ...categories].map((candidate, index) => {
|
|
54
|
+
const name = candidate == null ? text.text('all', 'All') : text.category(candidate);
|
|
55
|
+
return _jsx("button", { type: "button", "data-roving-item": true, "data-picker-category": candidate ?? 'all', "aria-label": name, "aria-pressed": category === candidate, tabIndex: chips.tabIndexOf(index), onFocus: () => chips.setCurrent(index), onClick: () => setCategory(candidate), className: CHIP, children: name }, candidate ?? 'all');
|
|
56
|
+
}) })] }), _jsx("p", { className: "sr-only", "aria-live": "polite", children: filtered ? text.count(results.length) : '' }), results.length > 0
|
|
57
|
+
? _jsx("div", { ref: grid.ref, role: "group", "aria-label": label, onKeyDown: grid.onKeyDown, className: ICONS[layout], children: results.map((entry, index) => {
|
|
58
|
+
const Icon = pickerIconHelper.iconOf(entry.name);
|
|
59
|
+
const name = text.icon(entry.name);
|
|
60
|
+
return _jsx("button", { type: "button", "data-roving-item": true, "data-picker-icon": entry.name, "aria-label": name, "aria-pressed": entry.name === value, title: name, tabIndex: grid.tabIndexOf(index), onFocus: () => grid.setCurrent(index), onClick: () => onChange(entry.name), className: ICON_CELL, children: _jsx(Icon, { "aria-hidden": "true" }) }, entry.name);
|
|
61
|
+
}) })
|
|
62
|
+
: _jsxs("div", { "data-picker-empty": true, className: EMPTY, children: [_jsx(SearchXIcon, { "aria-hidden": "true", className: "size-6" }), _jsx("p", { children: text.empty(query.trim()) }), _jsx("button", { type: "button", "aria-label": text.text('clear', 'Clear search'), className: LINK_BUTTON, onClick: () => { setQuery(''); setCategory(null); search.current?.focus(); }, children: text.text('clear', 'Clear search') })] })] });
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* The searchable icon grid inline — for a dialog or sheet the application already owns. Commits
|
|
66
|
+
* on click; `color` tints it, `icons` narrows (and orders) the catalogue. Strings through
|
|
67
|
+
* `translate` (English without it — never an implicit i18n read).
|
|
68
|
+
*/
|
|
69
|
+
export const IconGrid = ({ value, onChange, color, colors = PICKER_COLORS, icons, translate, label, className }) => {
|
|
70
|
+
const text = useMemo(() => makePickerText(translate), [translate]);
|
|
71
|
+
return _jsx(IconBrowser, { value: value, onChange: onChange, color: color, colors: colors, icons: icons, text: text, layout: "inline", label: label ?? text.text('icon', 'Icon'), className: className });
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=grid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid.js","sourceRoot":"","sources":["../../../src/components/picker/grid.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEjD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AACtD,OAAO,EAAE,EAAE,EAAE,MAAM,sBAAsB,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAu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AAA;IAElE,OAAO,KAAC,WAAW,IACjB,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAC,QAAQ,EACzG,KAAK,EAAE,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,SAAS,EAAE,SAAS,GAC/D,CAAA;AACJ,CAAC,CAAA"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"label": "Значок і колер",
|
|
3
|
+
"icon": "Значок",
|
|
4
|
+
"color": "Колер",
|
|
5
|
+
"placeholder": {
|
|
6
|
+
"both": "Выберыце значок і колер",
|
|
7
|
+
"icon": "Выберыце значок",
|
|
8
|
+
"color": "Выберыце колер"
|
|
9
|
+
},
|
|
10
|
+
"nothing": "Нічога не выбрана",
|
|
11
|
+
"done": "Гатова",
|
|
12
|
+
"search": "Пошук значкоў",
|
|
13
|
+
"searchPlaceholder": "Пошук значкоў…",
|
|
14
|
+
"categoriesLabel": "Катэгорыі",
|
|
15
|
+
"all": "Усе",
|
|
16
|
+
"results": "Знойдзена значкоў: {count}",
|
|
17
|
+
"empty": "Няма значкоў па запыце «{query}»",
|
|
18
|
+
"clear": "Ачысціць пошук",
|
|
19
|
+
"custom": "Свой колер",
|
|
20
|
+
"hex": "Колер у фармаце HEX",
|
|
21
|
+
"invalidHex": "Увядзіце колер, напрыклад #3b82f6",
|
|
22
|
+
"colors": {
|
|
23
|
+
"red": "Чырвоны",
|
|
24
|
+
"orange": "Аранжавы",
|
|
25
|
+
"amber": "Бурштынавы",
|
|
26
|
+
"yellow": "Жоўты",
|
|
27
|
+
"lime": "Лаймавы",
|
|
28
|
+
"green": "Зялёны",
|
|
29
|
+
"emerald": "Смарагдавы",
|
|
30
|
+
"teal": "Бірузовы",
|
|
31
|
+
"cyan": "Цыян",
|
|
32
|
+
"sky": "Нябесны",
|
|
33
|
+
"blue": "Сіні",
|
|
34
|
+
"indigo": "Індыга",
|
|
35
|
+
"violet": "Фіялетавы",
|
|
36
|
+
"purple": "Пурпурны",
|
|
37
|
+
"fuchsia": "Фуксія",
|
|
38
|
+
"pink": "Ружовы",
|
|
39
|
+
"rose": "Малінавы",
|
|
40
|
+
"maroon": "Бардовы",
|
|
41
|
+
"brown": "Карычневы",
|
|
42
|
+
"olive": "Аліўкавы",
|
|
43
|
+
"navy": "Цёмна-сіні",
|
|
44
|
+
"slate": "Сланцавы",
|
|
45
|
+
"stone": "Каменны",
|
|
46
|
+
"graphite": "Графітавы"
|
|
47
|
+
},
|
|
48
|
+
"categories": {
|
|
49
|
+
"work": "Праца",
|
|
50
|
+
"people": "Людзі",
|
|
51
|
+
"communication": "Зносіны",
|
|
52
|
+
"commerce": "Гандаль",
|
|
53
|
+
"operations": "Аперацыі",
|
|
54
|
+
"places": "Месцы",
|
|
55
|
+
"tech": "Тэхналогіі",
|
|
56
|
+
"status": "Статусы",
|
|
57
|
+
"objects": "Прадметы",
|
|
58
|
+
"nature": "Прырода"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"label": "Symbol und Farbe",
|
|
3
|
+
"icon": "Symbol",
|
|
4
|
+
"color": "Farbe",
|
|
5
|
+
"placeholder": {
|
|
6
|
+
"both": "Symbol und Farbe wählen",
|
|
7
|
+
"icon": "Symbol wählen",
|
|
8
|
+
"color": "Farbe wählen"
|
|
9
|
+
},
|
|
10
|
+
"nothing": "Noch nichts gewählt",
|
|
11
|
+
"done": "Fertig",
|
|
12
|
+
"search": "Symbole suchen",
|
|
13
|
+
"searchPlaceholder": "Symbole suchen…",
|
|
14
|
+
"categoriesLabel": "Kategorien",
|
|
15
|
+
"all": "Alle",
|
|
16
|
+
"results": "Gefundene Symbole: {count}",
|
|
17
|
+
"empty": "Keine Symbole passen zu „{query}“",
|
|
18
|
+
"clear": "Suche löschen",
|
|
19
|
+
"custom": "Eigene Farbe",
|
|
20
|
+
"hex": "Hex-Farbe",
|
|
21
|
+
"invalidHex": "Gib eine Farbe wie #3b82f6 ein",
|
|
22
|
+
"colors": {
|
|
23
|
+
"red": "Rot",
|
|
24
|
+
"orange": "Orange",
|
|
25
|
+
"amber": "Bernstein",
|
|
26
|
+
"yellow": "Gelb",
|
|
27
|
+
"lime": "Limette",
|
|
28
|
+
"green": "Grün",
|
|
29
|
+
"emerald": "Smaragd",
|
|
30
|
+
"teal": "Petrol",
|
|
31
|
+
"cyan": "Cyan",
|
|
32
|
+
"sky": "Himmelblau",
|
|
33
|
+
"blue": "Blau",
|
|
34
|
+
"indigo": "Indigo",
|
|
35
|
+
"violet": "Violett",
|
|
36
|
+
"purple": "Lila",
|
|
37
|
+
"fuchsia": "Fuchsia",
|
|
38
|
+
"pink": "Rosa",
|
|
39
|
+
"rose": "Himbeere",
|
|
40
|
+
"maroon": "Weinrot",
|
|
41
|
+
"brown": "Braun",
|
|
42
|
+
"olive": "Oliv",
|
|
43
|
+
"navy": "Marineblau",
|
|
44
|
+
"slate": "Schiefer",
|
|
45
|
+
"stone": "Stein",
|
|
46
|
+
"graphite": "Graphit"
|
|
47
|
+
},
|
|
48
|
+
"categories": {
|
|
49
|
+
"work": "Arbeit",
|
|
50
|
+
"people": "Personen",
|
|
51
|
+
"communication": "Kommunikation",
|
|
52
|
+
"commerce": "Handel",
|
|
53
|
+
"operations": "Betrieb",
|
|
54
|
+
"places": "Orte",
|
|
55
|
+
"tech": "Technik",
|
|
56
|
+
"status": "Status",
|
|
57
|
+
"objects": "Gegenstände",
|
|
58
|
+
"nature": "Natur"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"label": "Icon and colour",
|
|
3
|
+
"icon": "Icon",
|
|
4
|
+
"color": "Colour",
|
|
5
|
+
"placeholder": {
|
|
6
|
+
"both": "Choose icon and colour",
|
|
7
|
+
"icon": "Choose an icon",
|
|
8
|
+
"color": "Choose a colour"
|
|
9
|
+
},
|
|
10
|
+
"nothing": "Nothing chosen yet",
|
|
11
|
+
"done": "Done",
|
|
12
|
+
"search": "Search icons",
|
|
13
|
+
"searchPlaceholder": "Search icons…",
|
|
14
|
+
"categoriesLabel": "Categories",
|
|
15
|
+
"all": "All",
|
|
16
|
+
"results": "Icons found: {count}",
|
|
17
|
+
"empty": "No icons match “{query}”",
|
|
18
|
+
"clear": "Clear search",
|
|
19
|
+
"custom": "Custom colour",
|
|
20
|
+
"hex": "Hex colour",
|
|
21
|
+
"invalidHex": "Enter a colour like #3b82f6",
|
|
22
|
+
"colors": {
|
|
23
|
+
"red": "Red",
|
|
24
|
+
"orange": "Orange",
|
|
25
|
+
"amber": "Amber",
|
|
26
|
+
"yellow": "Yellow",
|
|
27
|
+
"lime": "Lime",
|
|
28
|
+
"green": "Green",
|
|
29
|
+
"emerald": "Emerald",
|
|
30
|
+
"teal": "Teal",
|
|
31
|
+
"cyan": "Cyan",
|
|
32
|
+
"sky": "Sky",
|
|
33
|
+
"blue": "Blue",
|
|
34
|
+
"indigo": "Indigo",
|
|
35
|
+
"violet": "Violet",
|
|
36
|
+
"purple": "Purple",
|
|
37
|
+
"fuchsia": "Fuchsia",
|
|
38
|
+
"pink": "Pink",
|
|
39
|
+
"rose": "Rose",
|
|
40
|
+
"maroon": "Maroon",
|
|
41
|
+
"brown": "Brown",
|
|
42
|
+
"olive": "Olive",
|
|
43
|
+
"navy": "Navy",
|
|
44
|
+
"slate": "Slate",
|
|
45
|
+
"stone": "Stone",
|
|
46
|
+
"graphite": "Graphite"
|
|
47
|
+
},
|
|
48
|
+
"categories": {
|
|
49
|
+
"work": "Work",
|
|
50
|
+
"people": "People",
|
|
51
|
+
"communication": "Communication",
|
|
52
|
+
"commerce": "Commerce",
|
|
53
|
+
"operations": "Operations",
|
|
54
|
+
"places": "Places",
|
|
55
|
+
"tech": "Tech",
|
|
56
|
+
"status": "Status",
|
|
57
|
+
"objects": "Objects",
|
|
58
|
+
"nature": "Nature"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"label": "Icono y color",
|
|
3
|
+
"icon": "Icono",
|
|
4
|
+
"color": "Color",
|
|
5
|
+
"placeholder": {
|
|
6
|
+
"both": "Elige icono y color",
|
|
7
|
+
"icon": "Elige un icono",
|
|
8
|
+
"color": "Elige un color"
|
|
9
|
+
},
|
|
10
|
+
"nothing": "Nada elegido todavía",
|
|
11
|
+
"done": "Listo",
|
|
12
|
+
"search": "Buscar iconos",
|
|
13
|
+
"searchPlaceholder": "Buscar iconos…",
|
|
14
|
+
"categoriesLabel": "Categorías",
|
|
15
|
+
"all": "Todos",
|
|
16
|
+
"results": "Iconos encontrados: {count}",
|
|
17
|
+
"empty": "Ningún icono coincide con «{query}»",
|
|
18
|
+
"clear": "Borrar búsqueda",
|
|
19
|
+
"custom": "Color personalizado",
|
|
20
|
+
"hex": "Color hexadecimal",
|
|
21
|
+
"invalidHex": "Escribe un color como #3b82f6",
|
|
22
|
+
"colors": {
|
|
23
|
+
"red": "Rojo",
|
|
24
|
+
"orange": "Naranja",
|
|
25
|
+
"amber": "Ámbar",
|
|
26
|
+
"yellow": "Amarillo",
|
|
27
|
+
"lime": "Lima",
|
|
28
|
+
"green": "Verde",
|
|
29
|
+
"emerald": "Esmeralda",
|
|
30
|
+
"teal": "Verde azulado",
|
|
31
|
+
"cyan": "Cian",
|
|
32
|
+
"sky": "Celeste",
|
|
33
|
+
"blue": "Azul",
|
|
34
|
+
"indigo": "Índigo",
|
|
35
|
+
"violet": "Violeta",
|
|
36
|
+
"purple": "Púrpura",
|
|
37
|
+
"fuchsia": "Fucsia",
|
|
38
|
+
"pink": "Rosa",
|
|
39
|
+
"rose": "Frambuesa",
|
|
40
|
+
"maroon": "Granate",
|
|
41
|
+
"brown": "Marrón",
|
|
42
|
+
"olive": "Oliva",
|
|
43
|
+
"navy": "Azul marino",
|
|
44
|
+
"slate": "Pizarra",
|
|
45
|
+
"stone": "Piedra",
|
|
46
|
+
"graphite": "Grafito"
|
|
47
|
+
},
|
|
48
|
+
"categories": {
|
|
49
|
+
"work": "Trabajo",
|
|
50
|
+
"people": "Personas",
|
|
51
|
+
"communication": "Comunicación",
|
|
52
|
+
"commerce": "Comercio",
|
|
53
|
+
"operations": "Operaciones",
|
|
54
|
+
"places": "Lugares",
|
|
55
|
+
"tech": "Tecnología",
|
|
56
|
+
"status": "Estados",
|
|
57
|
+
"objects": "Objetos",
|
|
58
|
+
"nature": "Naturaleza"
|
|
59
|
+
}
|
|
60
|
+
}
|