@fibery/ui-kit 9.0.2 → 9.1.1
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/lib/a11y-color.js +12 -10
- package/lib/actions-menu/actions-menu-props.d.ts +2 -0
- package/lib/actions-menu/actions-menu-sub-command-menu.js +5 -4
- package/lib/actions-menu/actions-menu.d.ts +1 -1
- package/lib/actions-menu/actions-menu.js +2 -1
- package/lib/actions-menu/contexts/actions-menu-context.js +12 -11
- package/lib/ai/max-tokens.js +6 -5
- package/lib/antd/ant-modal.d.ts +1 -1
- package/lib/antd/ant-modal.js +28 -1
- package/lib/antd/ant-upload.d.ts +1 -1
- package/lib/antd/ant-upload.js +23 -18
- package/lib/antd/input.js +5 -4
- package/lib/antd/utils.js +2 -1
- package/lib/avatar-colors.js +1 -1
- package/lib/avatar.d.ts +1 -10
- package/lib/avatar.js +48 -38
- package/lib/avatar.wyw-in-js.css +1 -1
- package/lib/banner/banner-action.js +2 -1
- package/lib/button/button.js +1 -1
- package/lib/button/icon-button.js +1 -1
- package/lib/canvas-colors.js +2 -2
- package/lib/card-container.d.ts +2 -6
- package/lib/card-container.js +4 -4
- package/lib/color-filter.js +2 -2
- package/lib/color-inspect.js +1 -1
- package/lib/color-picker/color-picker-or-loader.d.ts +2 -2
- package/lib/color-utils.js +1 -1
- package/lib/comment.d.ts +2 -1
- package/lib/comment.js +44 -27
- package/lib/comment.wyw-in-js.css +11 -8
- package/lib/context-menu/index.js +1 -0
- package/lib/context-menu/index.wyw-in-js.css +1 -1
- package/lib/date-picker/autocomplete.js +12 -10
- package/lib/date-picker/date-range-input.js +8 -6
- package/lib/date-picker/day-with-start-end-buttons.js +0 -2
- package/lib/date-picker/get-weekends-for-month.js +4 -2
- package/lib/date-picker/single-date-input.js +8 -6
- package/lib/day-select/day-select.js +2 -1
- package/lib/day-select/week-day-select.d.ts +2 -2
- package/lib/day-select/week-day-select.js +4 -3
- package/lib/design-system/alpha.js +5 -7
- package/lib/design-system/colors-charts.d.ts +4 -0
- package/lib/design-system/colors-charts.js +14 -0
- package/lib/design-system/colors-js.d.ts +2 -4
- package/lib/design-system/colors-js.js +8 -10
- package/lib/design-system/fns.enum.js +7 -4
- package/lib/design-system/fns.icon.js +1 -1
- package/lib/design-system/fns.js +7 -4
- package/lib/design-system/theme.d.ts +7 -7
- package/lib/design-system/theme.js +7 -12
- package/lib/design-system/vars.js +1 -2
- package/lib/design-system.d.ts +3 -2
- package/lib/design-system.js +3 -2
- package/lib/emoji-picker/primitives/content.js +10 -9
- package/lib/emoji-picker/primitives/emoji.js +22 -14
- package/lib/emoji-picker/primitives/emoji.wyw-in-js.css +4 -3
- package/lib/emoji-picker/primitives/grid.js +0 -1
- package/lib/emoji-picker/primitives/preview-provider.js +4 -3
- package/lib/emoji-picker/primitives/root.js +10 -9
- package/lib/emoji-picker/primitives/skin-provider.js +5 -4
- package/lib/emoji-picker/stores/emoji-data-store.d.ts +2 -2
- package/lib/emoji-picker/stores/emoji-data-store.js +8 -8
- package/lib/emoji-picker/stores/static-emoji-data-store.js +2 -1
- package/lib/emoji.js +5 -2
- package/lib/fibermoji-placeholder.js +5 -7
- package/lib/field-type-icon.js +2 -1
- package/lib/file-item/file-icon.js +2 -1
- package/lib/file-item.js +3 -10
- package/lib/highlight-colors.js +2 -1
- package/lib/hotkey-scope.js +2 -1
- package/lib/icons/ast/index.d.ts +1 -4
- package/lib/icons/ast/index.js +2 -5
- package/lib/icons/ast/spinner.js +1 -14
- package/lib/icons/icon.js +4 -3
- package/lib/icons/react/index.d.ts +1 -4
- package/lib/icons/react/index.js +2 -5
- package/lib/images-gallery/get-gallery-src.js +1 -1
- package/lib/images-gallery/slide-buttons.js +8 -4
- package/lib/images-gallery/thumbnails-mime-types-white-list.js +1 -1
- package/lib/integration-compact-info-button.js +1 -1
- package/lib/loading-sausage.js +7 -6
- package/lib/mobile-drawer.d.ts +2 -1
- package/lib/mobile-drawer.js +24 -12
- package/lib/mobile-drawer.wyw-in-js.css +3 -2
- package/lib/mobile-keyboard-aware-popup.js +6 -5
- package/lib/modal-menu/contexts/modal-menu-context.d.ts +1 -0
- package/lib/modal-menu/modal-menu-content.d.ts +1 -1
- package/lib/modal-menu/modal-menu-content.js +16 -6
- package/lib/modal-menu/modal-menu-drawer-content.d.ts +7 -0
- package/lib/modal-menu/modal-menu-drawer-content.js +13 -0
- package/lib/modal-menu/modal-menu-root.d.ts +2 -1
- package/lib/modal-menu/modal-menu-root.js +24 -21
- package/lib/modal-menu/modal-submenu.js +10 -9
- package/lib/nested-menu-item.d.ts +1 -1
- package/lib/number-input/number-input-inline-with-autosize.d.ts +1 -2
- package/lib/number-input/number-input-inline-with-autosize.js +9 -6
- package/lib/number-input/number-input-inline-with-autosize.wyw-in-js.css +0 -1
- package/lib/number-input/number-input.js +13 -11
- package/lib/number-input/styles.d.ts +1 -9
- package/lib/number-input/styles.js +3 -9
- package/lib/number-input/styles.wyw-in-js.css +2 -3
- package/lib/number-input/text-area-auto-sized.d.ts +1 -2
- package/lib/number-input/text-area-auto-sized.js +2 -2
- package/lib/number-input/text-input-auto-sized.d.ts +1 -2
- package/lib/number-input/text-input-auto-sized.js +2 -2
- package/lib/online-users.js +2 -2
- package/lib/open-popover-tracker.js +7 -6
- package/lib/palettes/neutral.js +1 -1
- package/lib/palettes/warm.js +1 -1
- package/lib/phone.js +1 -1
- package/lib/popover/index.d.ts +4 -2
- package/lib/popover/index.js +61 -59
- package/lib/popover/mobile-popover-context.js +12 -11
- package/lib/popover/mobile-popover.js +16 -15
- package/lib/popover/modifiers.js +4 -4
- package/lib/preference-setting.js +6 -8
- package/lib/reactions/reaction-button.js +36 -25
- package/lib/reactions/reaction-button.wyw-in-js.css +16 -16
- package/lib/reactions/reaction-picker.js +22 -10
- package/lib/reactions/reaction-picker.wyw-in-js.css +1 -0
- package/lib/reactions/tootltip.js +2 -1
- package/lib/select/components/option.js +2 -1
- package/lib/select/index.d.ts +2 -1
- package/lib/select/select-trigger.d.ts +4 -0
- package/lib/select/select-trigger.js +25 -0
- package/lib/select/select-trigger.wyw-in-js.css +1 -0
- package/lib/select/select.d.ts +6 -2
- package/lib/select/select.js +10 -5
- package/lib/spinner.d.ts +2 -6
- package/lib/spinner.js +11 -7
- package/lib/spinner.wyw-in-js.css +1 -0
- package/lib/tab-nav/tab-nav.d.ts +4 -2
- package/lib/tab-nav/tab-nav.js +2 -2
- package/lib/thematic.js +322 -321
- package/lib/theme-provider.d.ts +1 -3
- package/lib/toast/toast-action.js +2 -1
- package/lib/toast/toast-provider.d.ts +1 -2
- package/lib/toast/toast-queue.d.ts +1 -2
- package/lib/toast/toast-queue.js +7 -8
- package/lib/toast/toast.js +7 -6
- package/lib/toggle.js +3 -3
- package/lib/tooltip-if-overflown.js +2 -1
- package/lib/tooltip.js +1 -1
- package/lib/type-badge.d.ts +8 -28
- package/lib/type-badge.js +39 -50
- package/lib/type-badge.wyw-in-js.css +11 -10
- package/lib/unit/container.d.ts +12 -0
- package/lib/unit/container.js +50 -0
- package/lib/unit/context.d.ts +29 -0
- package/lib/unit/context.js +9 -0
- package/lib/unit/index.d.ts +4 -2
- package/lib/unit/index.js +2 -1
- package/lib/unit/nav-button.d.ts +12 -0
- package/lib/unit/nav-button.js +18 -0
- package/lib/unit/styles.d.ts +6 -9
- package/lib/unit/styles.js +13 -16
- package/lib/unit/styles.wyw-in-js.css +10 -16
- package/lib/unit/unit-content-layout.d.ts +4 -3
- package/lib/unit/unit-content-layout.js +9 -9
- package/lib/unit/unit-content.d.ts +6 -5
- package/lib/unit/unit-content.js +83 -18
- package/lib/unit/unit-content.wyw-in-js.css +6 -2
- package/lib/unit/unit.d.ts +38 -5
- package/lib/unit/unit.js +43 -12
- package/lib/workflow-progress-icon.js +2 -2
- package/package.json +6 -6
- package/lib/features.d.ts +0 -8
- package/lib/features.js +0 -15
- package/lib/flags.d.ts +0 -4
- package/lib/flags.js +0 -7
- package/lib/icons/ast/alert-triangle.d.ts +0 -5
- package/lib/icons/ast/alert-triangle.js +0 -25
- package/lib/icons/ast/field-units-large.d.ts +0 -5
- package/lib/icons/ast/field-units-large.js +0 -25
- package/lib/icons/ast/plus.d.ts +0 -5
- package/lib/icons/ast/plus.js +0 -25
- package/lib/icons/react/alert-triangle.d.ts +0 -15
- package/lib/icons/react/alert-triangle.js +0 -21
- package/lib/icons/react/field-units-large.d.ts +0 -15
- package/lib/icons/react/field-units-large.js +0 -21
- package/lib/icons/react/plus.d.ts +0 -15
- package/lib/icons/react/plus.js +0 -21
- package/lib/unit/primitive.d.ts +0 -5
- package/lib/unit/primitive.js +0 -108
- package/lib/unit/primitive.wyw-in-js.css +0 -3
- package/lib/unit/types.d.ts +0 -34
- package/lib/unit/types.js +0 -0
- package/lib/unit/unit-button-group.d.ts +0 -13
- package/lib/unit/unit-button-group.js +0 -23
package/lib/thematic.js
CHANGED
|
@@ -170,354 +170,355 @@ function Thematic() {
|
|
|
170
170
|
canvasCol(sections, "section", "section")
|
|
171
171
|
];
|
|
172
172
|
};
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
173
|
+
const panel = /* @__PURE__ */ jsx("div", {
|
|
174
|
+
className: panelCss,
|
|
175
|
+
onMouseEnter: () => setHovered(true),
|
|
176
|
+
onMouseLeave: () => {
|
|
177
|
+
setHovered(false);
|
|
178
|
+
state.setPreviewPalette(void 0);
|
|
179
|
+
},
|
|
180
|
+
children: !expanded ? /* @__PURE__ */ jsx(ColorCoding, {}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
181
|
+
/* @__PURE__ */ jsx(ScaleGrid, {
|
|
182
|
+
isAltPressed: state.isAltPressed,
|
|
183
|
+
inspectChannel,
|
|
184
|
+
scales: makeScales()
|
|
185
|
+
}),
|
|
186
|
+
/* @__PURE__ */ jsx("div", {
|
|
187
|
+
className: highlightRowCss,
|
|
188
|
+
children: highlightHueNames.map((hue) => {
|
|
189
|
+
const bg = theme.colors[bgKeyFrom(hue)];
|
|
190
|
+
const fg = theme.colors[fgOnBgKeyFrom(hue)];
|
|
191
|
+
return /* @__PURE__ */ jsx("div", {
|
|
192
|
+
className: highlightSwatchCss,
|
|
193
|
+
style: {
|
|
194
|
+
background: bg,
|
|
195
|
+
color: fg
|
|
196
|
+
},
|
|
197
|
+
title: hue,
|
|
198
|
+
children: "Aa"
|
|
199
|
+
}, hue);
|
|
200
|
+
})
|
|
201
|
+
}),
|
|
202
|
+
/* @__PURE__ */ jsxs("div", {
|
|
203
|
+
style: {
|
|
204
|
+
display: "flex",
|
|
205
|
+
alignItems: "center",
|
|
206
|
+
gap: space.s8,
|
|
207
|
+
minHeight: 28
|
|
208
|
+
},
|
|
209
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
205
210
|
style: {
|
|
206
211
|
display: "flex",
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
minHeight: 28
|
|
212
|
+
gap: space.s2,
|
|
213
|
+
flexShrink: 0
|
|
210
214
|
},
|
|
211
|
-
children: [/* @__PURE__ */
|
|
215
|
+
children: [/* @__PURE__ */ jsx(IconButton, {
|
|
216
|
+
size: "small",
|
|
217
|
+
variant: "ghost",
|
|
218
|
+
color: "neutral",
|
|
219
|
+
onClick: handleExport,
|
|
220
|
+
title: "Export",
|
|
221
|
+
children: /* @__PURE__ */ jsx(FileDownload, {})
|
|
222
|
+
}), /* @__PURE__ */ jsx(IconButton, {
|
|
223
|
+
size: "small",
|
|
224
|
+
variant: "ghost",
|
|
225
|
+
color: "neutral",
|
|
226
|
+
onClick: handleImport,
|
|
227
|
+
title: "Import",
|
|
228
|
+
children: /* @__PURE__ */ jsx(FileUpload, {})
|
|
229
|
+
})]
|
|
230
|
+
}), state.hoveredInfo && (() => {
|
|
231
|
+
const [hex, hsl, oklch] = inspectColor(state.hoveredInfo.color, { separator: " " }).split(" ");
|
|
232
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
212
233
|
style: {
|
|
213
|
-
display: "
|
|
214
|
-
|
|
215
|
-
|
|
234
|
+
display: "grid",
|
|
235
|
+
gridTemplateColumns: "auto 1fr",
|
|
236
|
+
columnGap: space.s8,
|
|
237
|
+
fontFamily: "monospace",
|
|
238
|
+
fontSize: 11,
|
|
239
|
+
lineHeight: "14px",
|
|
240
|
+
color: themeVars.colorTextSecondary
|
|
216
241
|
},
|
|
217
|
-
children: [
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
children: [
|
|
245
|
-
/* @__PURE__ */ jsx("span", { children: hsl }),
|
|
246
|
-
/* @__PURE__ */ jsx("span", { children: hex }),
|
|
247
|
-
/* @__PURE__ */ jsx("span", { children: oklch?.replace("oklch", "lch") })
|
|
248
|
-
]
|
|
249
|
-
});
|
|
250
|
-
})()]
|
|
251
|
-
}),
|
|
252
|
-
/* @__PURE__ */ jsxs("div", {
|
|
253
|
-
className: slidersCss,
|
|
254
|
-
children: [
|
|
255
|
-
/* @__PURE__ */ jsx("div", { className: sectionSeparatorCss }),
|
|
256
|
-
/* @__PURE__ */ jsx("div", {
|
|
257
|
-
className: sectionLabelCss,
|
|
258
|
-
style: { fontWeight: 700 },
|
|
259
|
-
children: "palette"
|
|
260
|
-
}),
|
|
261
|
-
/* @__PURE__ */ jsxs("div", {
|
|
262
|
-
className: sectionLabelCss,
|
|
263
|
-
children: ["base", state.prefs ? " *" : ""]
|
|
264
|
-
}),
|
|
265
|
-
/* @__PURE__ */ jsx("div", {
|
|
266
|
-
className: controlRowCss,
|
|
267
|
-
children: /* @__PURE__ */ jsx(ArrayEditor, {
|
|
268
|
-
label: "L",
|
|
269
|
-
values: state.baseCurves.lightness,
|
|
270
|
-
onChange: (L) => state.setBaseCurves({
|
|
271
|
-
...state.baseCurves,
|
|
272
|
-
lightness: L
|
|
273
|
-
}),
|
|
274
|
-
onLabelHover: inspL,
|
|
275
|
-
onLabelLeave: inspOff
|
|
276
|
-
})
|
|
277
|
-
}),
|
|
278
|
-
/* @__PURE__ */ jsx(ArraySlider, {
|
|
279
|
-
label: state.prefs?.baseChroma !== void 0 ? "C *" : "C",
|
|
280
|
-
values: state.baseCurves.chroma,
|
|
281
|
-
onValuesChange: (C) => state.setBaseCurves({
|
|
242
|
+
children: [
|
|
243
|
+
/* @__PURE__ */ jsx("span", { children: hsl }),
|
|
244
|
+
/* @__PURE__ */ jsx("span", { children: hex }),
|
|
245
|
+
/* @__PURE__ */ jsx("span", { children: oklch?.replace("oklch", "lch") })
|
|
246
|
+
]
|
|
247
|
+
});
|
|
248
|
+
})()]
|
|
249
|
+
}),
|
|
250
|
+
/* @__PURE__ */ jsxs("div", {
|
|
251
|
+
className: slidersCss,
|
|
252
|
+
children: [
|
|
253
|
+
/* @__PURE__ */ jsx("div", { className: sectionSeparatorCss }),
|
|
254
|
+
/* @__PURE__ */ jsx("div", {
|
|
255
|
+
className: sectionLabelCss,
|
|
256
|
+
style: { fontWeight: 700 },
|
|
257
|
+
children: "palette"
|
|
258
|
+
}),
|
|
259
|
+
/* @__PURE__ */ jsxs("div", {
|
|
260
|
+
className: sectionLabelCss,
|
|
261
|
+
children: ["base", state.prefs ? " *" : ""]
|
|
262
|
+
}),
|
|
263
|
+
/* @__PURE__ */ jsx("div", {
|
|
264
|
+
className: controlRowCss,
|
|
265
|
+
children: /* @__PURE__ */ jsx(ArrayEditor, {
|
|
266
|
+
label: "L",
|
|
267
|
+
values: state.baseCurves.lightness,
|
|
268
|
+
onChange: (L) => state.setBaseCurves({
|
|
282
269
|
...state.baseCurves,
|
|
283
|
-
|
|
270
|
+
lightness: L
|
|
284
271
|
}),
|
|
285
|
-
|
|
286
|
-
onSliderChange: (v) => state.update({ baseChroma: v }),
|
|
287
|
-
min: 0,
|
|
288
|
-
max: .25,
|
|
289
|
-
step: .001,
|
|
290
|
-
gradient: chromaGradient(state.prefsPresent.baseHue ?? 0, .25),
|
|
291
|
-
color: oklchColor(state.prefsPresent.baseHue ?? 0, state.prefsPresent.baseChroma ?? 0),
|
|
292
|
-
onLabelHover: inspC,
|
|
272
|
+
onLabelHover: inspL,
|
|
293
273
|
onLabelLeave: inspOff
|
|
274
|
+
})
|
|
275
|
+
}),
|
|
276
|
+
/* @__PURE__ */ jsx(ArraySlider, {
|
|
277
|
+
label: state.prefs?.baseChroma !== void 0 ? "C *" : "C",
|
|
278
|
+
values: state.baseCurves.chroma,
|
|
279
|
+
onValuesChange: (C) => state.setBaseCurves({
|
|
280
|
+
...state.baseCurves,
|
|
281
|
+
chroma: C
|
|
294
282
|
}),
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
onValuesChange: (C) => state.setAccentCurves({
|
|
283
|
+
sliderValue: state.prefsPresent.baseChroma ?? 0,
|
|
284
|
+
onSliderChange: (v) => state.update({ baseChroma: v }),
|
|
285
|
+
min: 0,
|
|
286
|
+
max: .25,
|
|
287
|
+
step: .001,
|
|
288
|
+
gradient: chromaGradient(state.prefsPresent.baseHue ?? 0, .25),
|
|
289
|
+
color: oklchColor(state.prefsPresent.baseHue ?? 0, state.prefsPresent.baseChroma ?? 0),
|
|
290
|
+
onLabelHover: inspC,
|
|
291
|
+
onLabelLeave: inspOff
|
|
292
|
+
}),
|
|
293
|
+
/* @__PURE__ */ jsx(Slider, {
|
|
294
|
+
label: state.prefs?.baseHue !== void 0 ? "H *" : "H",
|
|
295
|
+
value: state.prefsPresent.baseHue ?? 0,
|
|
296
|
+
min: 0,
|
|
297
|
+
max: 360,
|
|
298
|
+
step: 1,
|
|
299
|
+
onChange: (v) => state.update({ baseHue: v }),
|
|
300
|
+
gradient: hueGradient(state.prefsPresent.baseChroma ?? 0),
|
|
301
|
+
color: oklchColor(state.prefsPresent.baseHue ?? 0, state.prefsPresent.baseChroma ?? 0),
|
|
302
|
+
onLabelHover: inspH,
|
|
303
|
+
onLabelLeave: inspOff
|
|
304
|
+
}),
|
|
305
|
+
/* @__PURE__ */ jsxs("div", {
|
|
306
|
+
className: sectionLabelCss,
|
|
307
|
+
children: ["accent", state.prefs ? " *" : ""]
|
|
308
|
+
}),
|
|
309
|
+
/* @__PURE__ */ jsx("div", {
|
|
310
|
+
className: controlRowCss,
|
|
311
|
+
children: /* @__PURE__ */ jsx(ArrayEditor, {
|
|
312
|
+
label: "L",
|
|
313
|
+
values: state.accentCurves.lightness,
|
|
314
|
+
onChange: (L) => state.setAccentCurves({
|
|
328
315
|
...state.accentCurves,
|
|
329
|
-
|
|
316
|
+
lightness: L
|
|
330
317
|
}),
|
|
331
|
-
|
|
332
|
-
onSliderChange: (v) => state.update({ accentChroma: v }),
|
|
333
|
-
min: .05,
|
|
334
|
-
max: .25,
|
|
335
|
-
step: .001,
|
|
336
|
-
gradient: chromaGradient(state.prefsPresent.accentHue, .25),
|
|
337
|
-
color: oklchColor(state.prefsPresent.accentHue, state.prefsPresent.accentChroma),
|
|
338
|
-
onLabelHover: inspC,
|
|
339
|
-
onLabelLeave: inspOff
|
|
340
|
-
}),
|
|
341
|
-
/* @__PURE__ */ jsx(Slider, {
|
|
342
|
-
label: state.prefs?.accentHue !== void 0 ? "H *" : "H",
|
|
343
|
-
value: state.prefsPresent.accentHue,
|
|
344
|
-
min: 0,
|
|
345
|
-
max: 360,
|
|
346
|
-
step: 1,
|
|
347
|
-
onChange: (v) => state.update({ accentHue: v }),
|
|
348
|
-
gradient: hueGradient(state.prefsPresent.accentChroma),
|
|
349
|
-
color: oklchColor(state.prefsPresent.accentHue, state.prefsPresent.accentChroma),
|
|
350
|
-
onLabelHover: inspH,
|
|
318
|
+
onLabelHover: inspL,
|
|
351
319
|
onLabelLeave: inspOff
|
|
320
|
+
})
|
|
321
|
+
}),
|
|
322
|
+
/* @__PURE__ */ jsx(ArraySlider, {
|
|
323
|
+
label: state.prefs?.accentChroma !== void 0 ? "C *" : "C",
|
|
324
|
+
values: state.accentCurves.chroma,
|
|
325
|
+
onValuesChange: (C) => state.setAccentCurves({
|
|
326
|
+
...state.accentCurves,
|
|
327
|
+
chroma: C
|
|
352
328
|
}),
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
}),
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
}),
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
329
|
+
sliderValue: state.prefsPresent.accentChroma,
|
|
330
|
+
onSliderChange: (v) => state.update({ accentChroma: v }),
|
|
331
|
+
min: .05,
|
|
332
|
+
max: .25,
|
|
333
|
+
step: .001,
|
|
334
|
+
gradient: chromaGradient(state.prefsPresent.accentHue, .25),
|
|
335
|
+
color: oklchColor(state.prefsPresent.accentHue, state.prefsPresent.accentChroma),
|
|
336
|
+
onLabelHover: inspC,
|
|
337
|
+
onLabelLeave: inspOff
|
|
338
|
+
}),
|
|
339
|
+
/* @__PURE__ */ jsx(Slider, {
|
|
340
|
+
label: state.prefs?.accentHue !== void 0 ? "H *" : "H",
|
|
341
|
+
value: state.prefsPresent.accentHue,
|
|
342
|
+
min: 0,
|
|
343
|
+
max: 360,
|
|
344
|
+
step: 1,
|
|
345
|
+
onChange: (v) => state.update({ accentHue: v }),
|
|
346
|
+
gradient: hueGradient(state.prefsPresent.accentChroma),
|
|
347
|
+
color: oklchColor(state.prefsPresent.accentHue, state.prefsPresent.accentChroma),
|
|
348
|
+
onLabelHover: inspH,
|
|
349
|
+
onLabelLeave: inspOff
|
|
350
|
+
}),
|
|
351
|
+
/* @__PURE__ */ jsxs("div", {
|
|
352
|
+
className: sectionLabelCss,
|
|
353
|
+
children: ["hue shift", state.prefs?.hueShiftTargetHue !== void 0 || state.prefs?.hueShiftAmount !== void 0 ? " *" : ""]
|
|
354
|
+
}),
|
|
355
|
+
/* @__PURE__ */ jsx(Slider, {
|
|
356
|
+
label: state.prefs?.hueShiftTargetHue !== void 0 ? "target H *" : "target H",
|
|
357
|
+
value: state.prefsPresent.hueShiftTargetHue ?? state.prefsPresent.baseHue ?? 0,
|
|
358
|
+
min: 0,
|
|
359
|
+
max: 360,
|
|
360
|
+
step: 1,
|
|
361
|
+
onChange: (v) => state.updateHueShift({ hueShiftTargetHue: v }),
|
|
362
|
+
gradient: hueGradient(.15),
|
|
363
|
+
color: oklchColor(state.prefsPresent.hueShiftTargetHue ?? state.prefsPresent.baseHue ?? 0, .15)
|
|
364
|
+
}),
|
|
365
|
+
/* @__PURE__ */ jsx(Slider, {
|
|
366
|
+
label: state.prefs?.hueShiftAmount !== void 0 ? "amount *" : "amount",
|
|
367
|
+
value: state.prefsPresent.hueShiftAmount ?? Math.min((state.prefsPresent.baseChroma ?? 0) * 2, .3),
|
|
368
|
+
min: 0,
|
|
369
|
+
max: 1,
|
|
370
|
+
step: .01,
|
|
371
|
+
onChange: (v) => state.updateHueShift({ hueShiftAmount: v })
|
|
372
|
+
}),
|
|
373
|
+
/* @__PURE__ */ jsx("div", { className: sectionSeparatorCss }),
|
|
374
|
+
/* @__PURE__ */ jsxs("div", {
|
|
375
|
+
className: sectionLabelCss,
|
|
376
|
+
style: { fontWeight: 700 },
|
|
377
|
+
children: [
|
|
378
|
+
"deneutralize (",
|
|
379
|
+
state.showDark ? "dark" : "light",
|
|
380
|
+
")",
|
|
381
|
+
state.prefs?.filter || state.customPalette?.deneutralize ? " *" : ""
|
|
382
|
+
]
|
|
383
|
+
}),
|
|
384
|
+
/* @__PURE__ */ jsx(Slider, {
|
|
385
|
+
label: "hue shift H",
|
|
386
|
+
value: deneutralizeSpec?.hueShift?.targetHue ?? 0,
|
|
387
|
+
min: 0,
|
|
388
|
+
max: 360,
|
|
389
|
+
step: 1,
|
|
390
|
+
onChange: (v) => state.updateFilter({ hueShift: {
|
|
391
|
+
targetHue: v,
|
|
392
|
+
amount: deneutralizeSpec?.hueShift?.amount ?? 0
|
|
393
|
+
} }),
|
|
394
|
+
gradient: hueGradient(.15),
|
|
395
|
+
color: oklchColor(deneutralizeSpec?.hueShift?.targetHue ?? 0, .15)
|
|
396
|
+
}),
|
|
397
|
+
/* @__PURE__ */ jsx(Slider, {
|
|
398
|
+
label: "hue shift amt",
|
|
399
|
+
value: deneutralizeSpec?.hueShift?.amount ?? 0,
|
|
400
|
+
min: 0,
|
|
401
|
+
max: 1,
|
|
402
|
+
step: .01,
|
|
403
|
+
onChange: (v) => state.updateFilter({ hueShift: {
|
|
404
|
+
targetHue: deneutralizeSpec?.hueShift?.targetHue ?? 0,
|
|
405
|
+
amount: v
|
|
406
|
+
} })
|
|
407
|
+
}),
|
|
408
|
+
/* @__PURE__ */ jsx(Slider, {
|
|
409
|
+
label: "oklch L",
|
|
410
|
+
value: deneutralizeSpec?.oklchL ?? 1,
|
|
411
|
+
min: 0,
|
|
412
|
+
max: 2,
|
|
413
|
+
step: .01,
|
|
414
|
+
onChange: (v) => state.updateFilter({ oklchL: v })
|
|
415
|
+
}),
|
|
416
|
+
/* @__PURE__ */ jsx(Slider, {
|
|
417
|
+
label: "oklch C",
|
|
418
|
+
value: deneutralizeSpec?.oklchC ?? 1,
|
|
419
|
+
min: 0,
|
|
420
|
+
max: 3,
|
|
421
|
+
step: .01,
|
|
422
|
+
onChange: (v) => state.updateFilter({ oklchC: v })
|
|
423
|
+
}),
|
|
424
|
+
/* @__PURE__ */ jsx(SwatchAdjustSection, { state }),
|
|
425
|
+
/* @__PURE__ */ jsx(CvdSection, { state }),
|
|
426
|
+
/* @__PURE__ */ jsx(HighlightSection, { state })
|
|
427
|
+
]
|
|
428
|
+
}),
|
|
429
|
+
/* @__PURE__ */ jsx("div", { className: sectionSeparatorCss }),
|
|
430
|
+
/* @__PURE__ */ jsxs("div", {
|
|
431
|
+
className: buttonsCss,
|
|
432
|
+
style: { justifyContent: "space-between" },
|
|
433
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
434
|
+
style: {
|
|
435
|
+
display: "flex",
|
|
436
|
+
gap: space.s4
|
|
437
|
+
},
|
|
438
|
+
children: /* @__PURE__ */ jsx(IconButton, {
|
|
439
|
+
size: "small",
|
|
440
|
+
variant: state.pinned && !state.isAltPressed ? "soft" : "ghost",
|
|
441
|
+
color: "neutral",
|
|
442
|
+
onClick: () => state.isAltPressed ? state.setVisible(false) : state.setPinned(!state.pinned),
|
|
443
|
+
title: state.isAltPressed ? "Close" : state.pinned ? "Unpin" : "Pin",
|
|
444
|
+
children: state.isAltPressed ? /* @__PURE__ */ jsx(Close, {}) : state.pinned ? /* @__PURE__ */ jsx(PinFilled, {}) : /* @__PURE__ */ jsx(Pin, {})
|
|
445
|
+
})
|
|
446
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
447
|
+
style: {
|
|
448
|
+
display: "flex",
|
|
449
|
+
gap: space.s4
|
|
450
|
+
},
|
|
451
|
+
children: [state.isAltPressed ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(IconButton, {
|
|
452
|
+
size: "small",
|
|
453
|
+
variant: state.staticPalette ? "solid" : "soft",
|
|
454
|
+
color: "error",
|
|
455
|
+
onClick: state.cycleStaticPalettes,
|
|
456
|
+
title: "Static palettes",
|
|
457
|
+
children: /* @__PURE__ */ jsx(Lab, {})
|
|
458
|
+
}), /* @__PURE__ */ jsx(IconButton, {
|
|
459
|
+
size: "small",
|
|
460
|
+
variant: "soft",
|
|
461
|
+
color: "accent",
|
|
462
|
+
onClick: state.randomize,
|
|
463
|
+
title: "Randomize",
|
|
464
|
+
children: /* @__PURE__ */ jsx(Refresh, {})
|
|
465
|
+
})] }) : /* @__PURE__ */ jsxs("div", {
|
|
436
466
|
style: {
|
|
437
467
|
display: "flex",
|
|
438
468
|
gap: space.s4
|
|
439
469
|
},
|
|
440
|
-
|
|
470
|
+
onMouseLeave: () => state.setPreviewPalette(void 0),
|
|
471
|
+
children: [state.isModified ? /* @__PURE__ */ jsx(IconButton, {
|
|
441
472
|
size: "small",
|
|
442
|
-
variant:
|
|
473
|
+
variant: "ghost",
|
|
443
474
|
color: "neutral",
|
|
444
|
-
onClick: () =>
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
})
|
|
448
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
449
|
-
style: {
|
|
450
|
-
display: "flex",
|
|
451
|
-
gap: space.s4
|
|
452
|
-
},
|
|
453
|
-
children: [state.isAltPressed ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(IconButton, {
|
|
454
|
-
size: "small",
|
|
455
|
-
variant: state.staticPalette ? "solid" : "soft",
|
|
456
|
-
color: "error",
|
|
457
|
-
onClick: state.cycleStaticPalettes,
|
|
458
|
-
title: "Static palettes",
|
|
459
|
-
children: /* @__PURE__ */ jsx(Lab, {})
|
|
460
|
-
}), /* @__PURE__ */ jsx(IconButton, {
|
|
461
|
-
size: "small",
|
|
462
|
-
variant: "soft",
|
|
463
|
-
color: "accent",
|
|
464
|
-
onClick: state.randomize,
|
|
465
|
-
title: "Randomize",
|
|
466
|
-
children: /* @__PURE__ */ jsx(Refresh, {})
|
|
467
|
-
})] }) : /* @__PURE__ */ jsxs("div", {
|
|
468
|
-
style: {
|
|
469
|
-
display: "flex",
|
|
470
|
-
gap: space.s4
|
|
475
|
+
onClick: () => {
|
|
476
|
+
state.setPreviewPalette(void 0);
|
|
477
|
+
state.reset();
|
|
471
478
|
},
|
|
472
|
-
|
|
473
|
-
|
|
479
|
+
onMouseEnter: () => state.setPreviewPalette(null),
|
|
480
|
+
title: "Defaults",
|
|
481
|
+
children: /* @__PURE__ */ jsx(Undo, {})
|
|
482
|
+
}) : null, (() => {
|
|
483
|
+
const shown = Boolean(state.previewPalette) ? !warm : warm;
|
|
484
|
+
return /* @__PURE__ */ jsx(IconButton, {
|
|
474
485
|
size: "small",
|
|
475
|
-
variant: "ghost",
|
|
486
|
+
variant: shown ? "soft" : "ghost",
|
|
476
487
|
color: "neutral",
|
|
477
488
|
onClick: () => {
|
|
478
489
|
state.setPreviewPalette(void 0);
|
|
479
|
-
state.reset();
|
|
490
|
+
if (state.isModified) state.reset();
|
|
491
|
+
setWarm(!warm);
|
|
480
492
|
},
|
|
481
|
-
onMouseEnter: () => state.setPreviewPalette(
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
onClick: () => {
|
|
491
|
-
state.setPreviewPalette(void 0);
|
|
492
|
-
if (state.isModified) state.reset();
|
|
493
|
-
setWarm(!warm);
|
|
493
|
+
onMouseEnter: () => state.setPreviewPalette(selectPalette({
|
|
494
|
+
warmLook: !warm,
|
|
495
|
+
isArchitect: state.providerPalette.key.includes("arch")
|
|
496
|
+
})),
|
|
497
|
+
title: warm ? "warm → neutral" : "neutral → warm",
|
|
498
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
499
|
+
style: {
|
|
500
|
+
fontSize: 11,
|
|
501
|
+
fontWeight: 600
|
|
494
502
|
},
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
})
|
|
507
|
-
});
|
|
508
|
-
})()]
|
|
509
|
-
}), /* @__PURE__ */ jsx(IconButton, {
|
|
510
|
-
size: "small",
|
|
511
|
-
variant: "ghost",
|
|
512
|
-
color: "neutral",
|
|
513
|
-
onClick: state.cycleTheme,
|
|
514
|
-
title: state.isAltPressed ? "auto" : state.themePref,
|
|
515
|
-
children: themeIcons[state.isAltPressed ? "auto" : state.themePref]
|
|
516
|
-
})]
|
|
503
|
+
children: shown ? "W" : "N"
|
|
504
|
+
})
|
|
505
|
+
});
|
|
506
|
+
})()]
|
|
507
|
+
}), /* @__PURE__ */ jsx(IconButton, {
|
|
508
|
+
size: "small",
|
|
509
|
+
variant: "ghost",
|
|
510
|
+
color: "neutral",
|
|
511
|
+
onClick: state.cycleTheme,
|
|
512
|
+
title: state.isAltPressed ? "auto" : state.themePref,
|
|
513
|
+
children: themeIcons[state.isAltPressed ? "auto" : state.themePref]
|
|
517
514
|
})]
|
|
518
|
-
})
|
|
519
|
-
|
|
520
|
-
})
|
|
515
|
+
})]
|
|
516
|
+
})
|
|
517
|
+
] })
|
|
518
|
+
});
|
|
519
|
+
return createPortal(/* @__PURE__ */ jsx(ThemeProvider, {
|
|
520
|
+
portal: true,
|
|
521
|
+
children: panel
|
|
521
522
|
}), document.body);
|
|
522
523
|
}
|
|
523
524
|
//#endregion
|