@nordmanai/nif 0.2.3 → 0.2.4
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/dist/index.js +6598 -6372
- package/dist/styles.css +1 -1
- package/dist/ui/components/nm-field/nm-field.d.ts +2 -0
- package/dist/ui/components/nm-textarea/nm-textarea.d.ts +12 -2
- package/package.json +1 -1
- package/registry/index.json +179 -3
- package/registry/ui/components/nm-field/nm-field.tsx +6 -1
- package/registry/ui/components/nm-textarea/nm-textarea.css +200 -1
- package/registry/ui/components/nm-textarea/nm-textarea.tsx +417 -3
|
@@ -47,6 +47,8 @@ export type NmFieldProps = {
|
|
|
47
47
|
onKeyUp?: KeyboardEventHandler<HTMLInputElement>;
|
|
48
48
|
onFocus?: () => void;
|
|
49
49
|
onBlur?: () => void;
|
|
50
|
+
openInPanel?: boolean;
|
|
51
|
+
panelTitle?: string;
|
|
50
52
|
};
|
|
51
53
|
export declare const NmField: import("react").ForwardRefExoticComponent<NmFieldProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
52
54
|
export { NM_FIELD_KINDS, NM_FIELD_LAYOUT };
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
import type
|
|
2
|
-
export
|
|
1
|
+
import { type ComponentProps, type ReactNode } from 'react';
|
|
2
|
+
export type NmTextareaVariant = 'default' | 'panel';
|
|
3
|
+
export type NmTextareaProps = ComponentProps<'textarea'> & {
|
|
4
|
+
variant?: NmTextareaVariant;
|
|
5
|
+
openInPanel?: boolean;
|
|
6
|
+
panelTitle?: string;
|
|
7
|
+
panelButtonLabel?: string;
|
|
8
|
+
panelDefaultTab?: 'code' | 'preview';
|
|
9
|
+
renderMarkdown?: (markdown: string) => ReactNode;
|
|
10
|
+
};
|
|
11
|
+
export declare const NmTextarea: import("react").ForwardRefExoticComponent<Omit<NmTextareaProps, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
12
|
+
export declare function NmTextareaPanel(props: NmTextareaProps): import("react").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nordmanai/nif",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Nordman Interface Framework: the one UI and UX system for every Nordman product. Base UI, in the shadcn composition, styled by NIF tokens.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
package/registry/index.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.2.
|
|
2
|
+
"version": "0.2.4",
|
|
3
3
|
"versions": {
|
|
4
4
|
"@animate-ui/react": "^2.4.2",
|
|
5
5
|
"@base-ui/react": "^1.9.0",
|
|
@@ -1766,9 +1766,15 @@
|
|
|
1766
1766
|
"components/nm-input/nm-input.tsx",
|
|
1767
1767
|
"components/nm-popover/nm-popover.css",
|
|
1768
1768
|
"components/nm-popover/nm-popover.tsx",
|
|
1769
|
+
"components/nm-prose/nm-prose.css",
|
|
1770
|
+
"components/nm-prose/nm-prose.tsx",
|
|
1771
|
+
"components/nm-segmented/nm-segmented.css",
|
|
1772
|
+
"components/nm-segmented/nm-segmented.tsx",
|
|
1769
1773
|
"components/nm-select/nm-select.css",
|
|
1770
1774
|
"components/nm-select/nm-select.tsx",
|
|
1771
1775
|
"components/nm-small-icon-button/nm-small-icon-button.tsx",
|
|
1776
|
+
"components/nm-textarea/nm-textarea.css",
|
|
1777
|
+
"components/nm-textarea/nm-textarea.tsx",
|
|
1772
1778
|
"components/nordman-icon-button/nordman-icon-button.css",
|
|
1773
1779
|
"components/nordman-icon-button/nordman-icon-button.tsx",
|
|
1774
1780
|
"config/nm-collection.ts",
|
|
@@ -1777,6 +1783,7 @@
|
|
|
1777
1783
|
"config/nm-icon-button.ts",
|
|
1778
1784
|
"config/nm-icons-extended.ts",
|
|
1779
1785
|
"config/nm-icons.ts",
|
|
1786
|
+
"config/nm-segmented.ts",
|
|
1780
1787
|
"config/nm-small-icon-button.ts",
|
|
1781
1788
|
"config/nordman-chrome.ts",
|
|
1782
1789
|
"kit-logger.ts",
|
|
@@ -1803,8 +1810,11 @@
|
|
|
1803
1810
|
"icon-border",
|
|
1804
1811
|
"input",
|
|
1805
1812
|
"popover",
|
|
1813
|
+
"prose",
|
|
1814
|
+
"segmented",
|
|
1806
1815
|
"select",
|
|
1807
1816
|
"small-icon-button",
|
|
1817
|
+
"textarea",
|
|
1808
1818
|
"nordman-icon-button"
|
|
1809
1819
|
]
|
|
1810
1820
|
},
|
|
@@ -2953,8 +2963,14 @@
|
|
|
2953
2963
|
"components/nm-input/nm-input.tsx",
|
|
2954
2964
|
"components/nm-popover/nm-popover.css",
|
|
2955
2965
|
"components/nm-popover/nm-popover.tsx",
|
|
2966
|
+
"components/nm-prose/nm-prose.css",
|
|
2967
|
+
"components/nm-prose/nm-prose.tsx",
|
|
2968
|
+
"components/nm-segmented/nm-segmented.css",
|
|
2969
|
+
"components/nm-segmented/nm-segmented.tsx",
|
|
2956
2970
|
"components/nm-select/nm-select.css",
|
|
2957
2971
|
"components/nm-select/nm-select.tsx",
|
|
2972
|
+
"components/nm-textarea/nm-textarea.css",
|
|
2973
|
+
"components/nm-textarea/nm-textarea.tsx",
|
|
2958
2974
|
"components/nordman-icon-button/nordman-icon-button.css",
|
|
2959
2975
|
"components/nordman-icon-button/nordman-icon-button.tsx",
|
|
2960
2976
|
"config/nm-dropdown.ts",
|
|
@@ -2962,6 +2978,7 @@
|
|
|
2962
2978
|
"config/nm-icon-button.ts",
|
|
2963
2979
|
"config/nm-icons-extended.ts",
|
|
2964
2980
|
"config/nm-icons.ts",
|
|
2981
|
+
"config/nm-segmented.ts",
|
|
2965
2982
|
"config/nordman-chrome.ts",
|
|
2966
2983
|
"kit-logger.ts",
|
|
2967
2984
|
"lib/logger.ts",
|
|
@@ -2985,7 +3002,10 @@
|
|
|
2985
3002
|
"icon",
|
|
2986
3003
|
"input",
|
|
2987
3004
|
"popover",
|
|
3005
|
+
"prose",
|
|
3006
|
+
"segmented",
|
|
2988
3007
|
"select",
|
|
3008
|
+
"textarea",
|
|
2989
3009
|
"nordman-icon-button"
|
|
2990
3010
|
]
|
|
2991
3011
|
},
|
|
@@ -4226,10 +4246,16 @@
|
|
|
4226
4246
|
"components/nm-popover/nm-popover.tsx",
|
|
4227
4247
|
"components/nm-progress/nm-progress.css",
|
|
4228
4248
|
"components/nm-progress/nm-progress.tsx",
|
|
4249
|
+
"components/nm-prose/nm-prose.css",
|
|
4250
|
+
"components/nm-prose/nm-prose.tsx",
|
|
4229
4251
|
"components/nm-questionnaire/nm-questionnaire.css",
|
|
4230
4252
|
"components/nm-questionnaire/nm-questionnaire.tsx",
|
|
4253
|
+
"components/nm-segmented/nm-segmented.css",
|
|
4254
|
+
"components/nm-segmented/nm-segmented.tsx",
|
|
4231
4255
|
"components/nm-select/nm-select.css",
|
|
4232
4256
|
"components/nm-select/nm-select.tsx",
|
|
4257
|
+
"components/nm-textarea/nm-textarea.css",
|
|
4258
|
+
"components/nm-textarea/nm-textarea.tsx",
|
|
4233
4259
|
"components/nordman-icon-button/nordman-icon-button.css",
|
|
4234
4260
|
"components/nordman-icon-button/nordman-icon-button.tsx",
|
|
4235
4261
|
"config/nm-button.ts",
|
|
@@ -4239,6 +4265,7 @@
|
|
|
4239
4265
|
"config/nm-icons-extended.ts",
|
|
4240
4266
|
"config/nm-icons.ts",
|
|
4241
4267
|
"config/nm-questionnaire.ts",
|
|
4268
|
+
"config/nm-segmented.ts",
|
|
4242
4269
|
"config/nordman-chrome.ts",
|
|
4243
4270
|
"kit-logger.ts",
|
|
4244
4271
|
"lib/logger.ts",
|
|
@@ -4265,7 +4292,10 @@
|
|
|
4265
4292
|
"input",
|
|
4266
4293
|
"popover",
|
|
4267
4294
|
"progress",
|
|
4295
|
+
"prose",
|
|
4296
|
+
"segmented",
|
|
4268
4297
|
"select",
|
|
4298
|
+
"textarea",
|
|
4269
4299
|
"nordman-icon-button"
|
|
4270
4300
|
]
|
|
4271
4301
|
},
|
|
@@ -5290,12 +5320,158 @@
|
|
|
5290
5320
|
"textarea": {
|
|
5291
5321
|
"dir": "nm-textarea",
|
|
5292
5322
|
"files": [
|
|
5323
|
+
"components/nm-icon/animated/activity.tsx",
|
|
5324
|
+
"components/nm-icon/animated/archive.tsx",
|
|
5325
|
+
"components/nm-icon/animated/arrow-down.tsx",
|
|
5326
|
+
"components/nm-icon/animated/arrow-left.tsx",
|
|
5327
|
+
"components/nm-icon/animated/arrow-right.tsx",
|
|
5328
|
+
"components/nm-icon/animated/arrow-up-down.tsx",
|
|
5329
|
+
"components/nm-icon/animated/arrow-up.tsx",
|
|
5330
|
+
"components/nm-icon/animated/audio-lines.tsx",
|
|
5331
|
+
"components/nm-icon/animated/bookmark-plus.tsx",
|
|
5332
|
+
"components/nm-icon/animated/bookmark.tsx",
|
|
5333
|
+
"components/nm-icon/animated/bot.tsx",
|
|
5334
|
+
"components/nm-icon/animated/calendar-days.tsx",
|
|
5335
|
+
"components/nm-icon/animated/calendar.tsx",
|
|
5336
|
+
"components/nm-icon/animated/camera.tsx",
|
|
5337
|
+
"components/nm-icon/animated/chart-column-increasing.tsx",
|
|
5338
|
+
"components/nm-icon/animated/chart-column.tsx",
|
|
5339
|
+
"components/nm-icon/animated/chart-line.tsx",
|
|
5340
|
+
"components/nm-icon/animated/check-check.tsx",
|
|
5341
|
+
"components/nm-icon/animated/check.tsx",
|
|
5342
|
+
"components/nm-icon/animated/chevron-down.tsx",
|
|
5343
|
+
"components/nm-icon/animated/chevron-left.tsx",
|
|
5344
|
+
"components/nm-icon/animated/chevron-right.tsx",
|
|
5345
|
+
"components/nm-icon/animated/chevron-up.tsx",
|
|
5346
|
+
"components/nm-icon/animated/circle-alert.tsx",
|
|
5347
|
+
"components/nm-icon/animated/circle-check-big.tsx",
|
|
5348
|
+
"components/nm-icon/animated/circle-check.tsx",
|
|
5349
|
+
"components/nm-icon/animated/circle-plus.tsx",
|
|
5350
|
+
"components/nm-icon/animated/circle-question-mark.tsx",
|
|
5351
|
+
"components/nm-icon/animated/circle-x.tsx",
|
|
5352
|
+
"components/nm-icon/animated/clock-3.tsx",
|
|
5353
|
+
"components/nm-icon/animated/clock-4.tsx",
|
|
5354
|
+
"components/nm-icon/animated/clock.tsx",
|
|
5355
|
+
"components/nm-icon/animated/cloud-sun.tsx",
|
|
5356
|
+
"components/nm-icon/animated/cloud-upload.tsx",
|
|
5357
|
+
"components/nm-icon/animated/copy.tsx",
|
|
5358
|
+
"components/nm-icon/animated/download.tsx",
|
|
5359
|
+
"components/nm-icon/animated/ellipsis.tsx",
|
|
5360
|
+
"components/nm-icon/animated/external-link.tsx",
|
|
5361
|
+
"components/nm-icon/animated/eye-off.tsx",
|
|
5362
|
+
"components/nm-icon/animated/eye.tsx",
|
|
5363
|
+
"components/nm-icon/animated/fast-forward.tsx",
|
|
5364
|
+
"components/nm-icon/animated/file-clock.tsx",
|
|
5365
|
+
"components/nm-icon/animated/file-text.tsx",
|
|
5366
|
+
"components/nm-icon/animated/file.tsx",
|
|
5367
|
+
"components/nm-icon/animated/folder.tsx",
|
|
5368
|
+
"components/nm-icon/animated/gauge.tsx",
|
|
5369
|
+
"components/nm-icon/animated/globe.tsx",
|
|
5370
|
+
"components/nm-icon/animated/graduation-cap.tsx",
|
|
5371
|
+
"components/nm-icon/animated/headphones.tsx",
|
|
5372
|
+
"components/nm-icon/animated/image.tsx",
|
|
5373
|
+
"components/nm-icon/animated/index.ts",
|
|
5374
|
+
"components/nm-icon/animated/info.tsx",
|
|
5375
|
+
"components/nm-icon/animated/key-round.tsx",
|
|
5376
|
+
"components/nm-icon/animated/layers.tsx",
|
|
5377
|
+
"components/nm-icon/animated/layout-dashboard.tsx",
|
|
5378
|
+
"components/nm-icon/animated/library-big.tsx",
|
|
5379
|
+
"components/nm-icon/animated/lightbulb.tsx",
|
|
5380
|
+
"components/nm-icon/animated/link.tsx",
|
|
5381
|
+
"components/nm-icon/animated/list-filter.tsx",
|
|
5382
|
+
"components/nm-icon/animated/list.tsx",
|
|
5383
|
+
"components/nm-icon/animated/loader-circle.tsx",
|
|
5384
|
+
"components/nm-icon/animated/lock.tsx",
|
|
5385
|
+
"components/nm-icon/animated/log-out.tsx",
|
|
5386
|
+
"components/nm-icon/animated/mail.tsx",
|
|
5387
|
+
"components/nm-icon/animated/map-pin.tsx",
|
|
5388
|
+
"components/nm-icon/animated/menu.tsx",
|
|
5389
|
+
"components/nm-icon/animated/message-circle-dashed.tsx",
|
|
5390
|
+
"components/nm-icon/animated/message-circle.tsx",
|
|
5391
|
+
"components/nm-icon/animated/message-square-plus.tsx",
|
|
5392
|
+
"components/nm-icon/animated/message-square-text.tsx",
|
|
5393
|
+
"components/nm-icon/animated/message-square.tsx",
|
|
5394
|
+
"components/nm-icon/animated/mic-off.tsx",
|
|
5395
|
+
"components/nm-icon/animated/mic.tsx",
|
|
5396
|
+
"components/nm-icon/animated/minimize.tsx",
|
|
5397
|
+
"components/nm-icon/animated/minus.tsx",
|
|
5398
|
+
"components/nm-icon/animated/moon.tsx",
|
|
5399
|
+
"components/nm-icon/animated/music.tsx",
|
|
5400
|
+
"components/nm-icon/animated/notebook-pen.tsx",
|
|
5401
|
+
"components/nm-icon/animated/panel-left.tsx",
|
|
5402
|
+
"components/nm-icon/animated/panel-right.tsx",
|
|
5403
|
+
"components/nm-icon/animated/paperclip.tsx",
|
|
5404
|
+
"components/nm-icon/animated/pause.tsx",
|
|
5405
|
+
"components/nm-icon/animated/pencil.tsx",
|
|
5406
|
+
"components/nm-icon/animated/pin-off.tsx",
|
|
5407
|
+
"components/nm-icon/animated/pin.tsx",
|
|
5408
|
+
"components/nm-icon/animated/plane-takeoff.tsx",
|
|
5409
|
+
"components/nm-icon/animated/play.tsx",
|
|
5410
|
+
"components/nm-icon/animated/plug-zap.tsx",
|
|
5411
|
+
"components/nm-icon/animated/plus.tsx",
|
|
5412
|
+
"components/nm-icon/animated/radio.tsx",
|
|
5413
|
+
"components/nm-icon/animated/refresh-cw.tsx",
|
|
5414
|
+
"components/nm-icon/animated/rocket.tsx",
|
|
5415
|
+
"components/nm-icon/animated/rotate-ccw.tsx",
|
|
5416
|
+
"components/nm-icon/animated/rotate-cw.tsx",
|
|
5417
|
+
"components/nm-icon/animated/save.tsx",
|
|
5418
|
+
"components/nm-icon/animated/search.tsx",
|
|
5419
|
+
"components/nm-icon/animated/send.tsx",
|
|
5420
|
+
"components/nm-icon/animated/settings.tsx",
|
|
5421
|
+
"components/nm-icon/animated/share-2.tsx",
|
|
5422
|
+
"components/nm-icon/animated/share.tsx",
|
|
5423
|
+
"components/nm-icon/animated/shield-check.tsx",
|
|
5424
|
+
"components/nm-icon/animated/shopping-bag.tsx",
|
|
5425
|
+
"components/nm-icon/animated/sliders-horizontal.tsx",
|
|
5426
|
+
"components/nm-icon/animated/sparkles.tsx",
|
|
5427
|
+
"components/nm-icon/animated/star.tsx",
|
|
5428
|
+
"components/nm-icon/animated/sun.tsx",
|
|
5429
|
+
"components/nm-icon/animated/terminal.tsx",
|
|
5430
|
+
"components/nm-icon/animated/trash-2.tsx",
|
|
5431
|
+
"components/nm-icon/animated/trash.tsx",
|
|
5432
|
+
"components/nm-icon/animated/trending-up.tsx",
|
|
5433
|
+
"components/nm-icon/animated/triangle-alert.tsx",
|
|
5434
|
+
"components/nm-icon/animated/trophy.tsx",
|
|
5435
|
+
"components/nm-icon/animated/type.tsx",
|
|
5436
|
+
"components/nm-icon/animated/upload.tsx",
|
|
5437
|
+
"components/nm-icon/animated/user-round.tsx",
|
|
5438
|
+
"components/nm-icon/animated/user.tsx",
|
|
5439
|
+
"components/nm-icon/animated/users-round.tsx",
|
|
5440
|
+
"components/nm-icon/animated/users.tsx",
|
|
5441
|
+
"components/nm-icon/animated/volume-2.tsx",
|
|
5442
|
+
"components/nm-icon/animated/wand-sparkles.tsx",
|
|
5443
|
+
"components/nm-icon/animated/x.tsx",
|
|
5444
|
+
"components/nm-icon/animated/zap.tsx",
|
|
5445
|
+
"components/nm-icon/animated/zoom-in.tsx",
|
|
5446
|
+
"components/nm-icon/animated/zoom-out.tsx",
|
|
5447
|
+
"components/nm-icon/nm-icon.css",
|
|
5448
|
+
"components/nm-icon/nm-icon.tsx",
|
|
5449
|
+
"components/nm-icon/nm-lucide-extended.tsx",
|
|
5450
|
+
"components/nm-icon/nm-lucide.tsx",
|
|
5451
|
+
"components/nm-prose/nm-prose.css",
|
|
5452
|
+
"components/nm-prose/nm-prose.tsx",
|
|
5453
|
+
"components/nm-segmented/nm-segmented.css",
|
|
5454
|
+
"components/nm-segmented/nm-segmented.tsx",
|
|
5293
5455
|
"components/nm-textarea/nm-textarea.css",
|
|
5294
5456
|
"components/nm-textarea/nm-textarea.tsx",
|
|
5457
|
+
"config/nm-icon-button.ts",
|
|
5458
|
+
"config/nm-icons-extended.ts",
|
|
5459
|
+
"config/nm-icons.ts",
|
|
5460
|
+
"config/nm-segmented.ts",
|
|
5461
|
+
"kit-logger.ts",
|
|
5462
|
+
"lib/logger.ts",
|
|
5295
5463
|
"lib/nm-class.ts"
|
|
5296
5464
|
],
|
|
5297
|
-
"libs": [
|
|
5298
|
-
|
|
5465
|
+
"libs": [
|
|
5466
|
+
"@animate-ui/react",
|
|
5467
|
+
"lucide-react",
|
|
5468
|
+
"motion"
|
|
5469
|
+
],
|
|
5470
|
+
"uses": [
|
|
5471
|
+
"icon",
|
|
5472
|
+
"prose",
|
|
5473
|
+
"segmented"
|
|
5474
|
+
]
|
|
5299
5475
|
},
|
|
5300
5476
|
"toggle": {
|
|
5301
5477
|
"dir": "nm-toggle",
|
|
@@ -28,6 +28,7 @@ import { NmCombobox, NmComboboxContent, NmComboboxEmpty, NmComboboxInput, NmComb
|
|
|
28
28
|
import { NmSelect, NmSelectContent, NmSelectItem, NmSelectTrigger, NmSelectValue } from '../nm-select/nm-select.tsx';
|
|
29
29
|
import { NmColorSwatch } from '../nm-color-picker/nm-color-picker.tsx';
|
|
30
30
|
import { NmIcon } from '../nm-icon/nm-icon.tsx';
|
|
31
|
+
import { NmTextarea } from '../nm-textarea/nm-textarea.tsx';
|
|
31
32
|
|
|
32
33
|
const logger = createLogger('interface-nm-field');
|
|
33
34
|
|
|
@@ -76,6 +77,8 @@ export type NmFieldProps = {
|
|
|
76
77
|
onKeyUp?: KeyboardEventHandler<HTMLInputElement>;
|
|
77
78
|
onFocus?: () => void;
|
|
78
79
|
onBlur?: () => void;
|
|
80
|
+
openInPanel?: boolean;
|
|
81
|
+
panelTitle?: string;
|
|
79
82
|
};
|
|
80
83
|
|
|
81
84
|
function OptionSwatches(props: { colors?: readonly string[] }): ReactNode {
|
|
@@ -290,7 +293,9 @@ function StackControl(
|
|
|
290
293
|
);
|
|
291
294
|
} else if (props.kind === NM_FIELD_KINDS.area) {
|
|
292
295
|
editor = (
|
|
293
|
-
<
|
|
296
|
+
<NmTextarea
|
|
297
|
+
variant={props.openInPanel ? 'panel' : 'default'}
|
|
298
|
+
panelTitle={props.panelTitle ?? props.caption ?? props.label}
|
|
294
299
|
className={NM_FIELD_CLASSES.control}
|
|
295
300
|
id={props.controlId}
|
|
296
301
|
name={props.name}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
.nm-textarea {
|
|
3
2
|
box-sizing: border-box;
|
|
4
3
|
display: block;
|
|
@@ -40,3 +39,203 @@
|
|
|
40
39
|
.nm-textarea[aria-invalid='true'] {
|
|
41
40
|
border-color: var(--nm-destructive);
|
|
42
41
|
}
|
|
42
|
+
|
|
43
|
+
.nm-textarea-wrap {
|
|
44
|
+
position: relative;
|
|
45
|
+
display: block;
|
|
46
|
+
width: 100%;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.nm-textarea-wrap .nm-textarea {
|
|
50
|
+
padding-bottom: calc(var(--control-h) + var(--nm-space-4));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.nm-textarea__panel-trigger {
|
|
54
|
+
position: absolute;
|
|
55
|
+
right: var(--nm-space-8);
|
|
56
|
+
bottom: var(--nm-space-8);
|
|
57
|
+
display: inline-flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
justify-content: center;
|
|
60
|
+
width: var(--control-h);
|
|
61
|
+
height: var(--control-h);
|
|
62
|
+
padding: 0;
|
|
63
|
+
border: 0;
|
|
64
|
+
border-radius: var(--nm-control-r);
|
|
65
|
+
background: transparent;
|
|
66
|
+
color: var(--nm-fg-muted);
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
transition: color 0.15s, background-color 0.15s;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.nm-textarea__panel-trigger:hover {
|
|
72
|
+
background: var(--nm-panel);
|
|
73
|
+
color: var(--nm-fg);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.nm-textarea__panel-trigger:focus-visible {
|
|
77
|
+
outline: var(--nm-rule) solid var(--nm-fg);
|
|
78
|
+
outline-offset: var(--nm-rule);
|
|
79
|
+
color: var(--nm-fg);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.nm-textarea__panel-trigger .nm-icon {
|
|
83
|
+
width: var(--nm-space-16);
|
|
84
|
+
height: var(--nm-space-16);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.nm-textarea-panel__backdrop {
|
|
88
|
+
position: fixed;
|
|
89
|
+
inset: 0;
|
|
90
|
+
z-index: var(--nm-menu-z);
|
|
91
|
+
background: rgb(var(--nm-canvas-rgb) / 0.6);
|
|
92
|
+
backdrop-filter: blur(4px);
|
|
93
|
+
-webkit-backdrop-filter: blur(4px);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.nm-textarea-panel {
|
|
97
|
+
position: fixed;
|
|
98
|
+
top: 0;
|
|
99
|
+
right: 0;
|
|
100
|
+
bottom: 0;
|
|
101
|
+
z-index: calc(var(--nm-menu-z) + 1);
|
|
102
|
+
display: flex;
|
|
103
|
+
flex-direction: column;
|
|
104
|
+
width: min(var(--nm-width-dialog), 100%);
|
|
105
|
+
border-left: var(--nm-rule) solid var(--nm-line-strong);
|
|
106
|
+
background: var(--nm-panel);
|
|
107
|
+
color: var(--nm-fg);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.nm-textarea-panel__header {
|
|
111
|
+
display: flex;
|
|
112
|
+
align-items: center;
|
|
113
|
+
justify-content: space-between;
|
|
114
|
+
padding: var(--nm-space-12) var(--nm-space-16);
|
|
115
|
+
border-bottom: var(--nm-rule) solid var(--nm-line-strong);
|
|
116
|
+
gap: var(--nm-space-12);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.nm-textarea-panel__title-group {
|
|
120
|
+
display: flex;
|
|
121
|
+
align-items: center;
|
|
122
|
+
gap: var(--nm-space-12);
|
|
123
|
+
min-width: 0;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.nm-textarea-panel__title {
|
|
127
|
+
margin: 0;
|
|
128
|
+
font-size: var(--nm-type-ui);
|
|
129
|
+
font-weight: var(--nm-weight-semibold);
|
|
130
|
+
color: var(--nm-fg);
|
|
131
|
+
white-space: nowrap;
|
|
132
|
+
overflow: hidden;
|
|
133
|
+
text-overflow: ellipsis;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.nm-textarea-panel__actions {
|
|
137
|
+
display: flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
gap: var(--nm-space-4);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.nm-textarea-panel__action-btn {
|
|
143
|
+
display: inline-flex;
|
|
144
|
+
align-items: center;
|
|
145
|
+
justify-content: center;
|
|
146
|
+
width: var(--control-h);
|
|
147
|
+
height: var(--control-h);
|
|
148
|
+
padding: 0;
|
|
149
|
+
border: 0;
|
|
150
|
+
border-radius: var(--nm-control-r);
|
|
151
|
+
background: transparent;
|
|
152
|
+
color: var(--nm-fg-muted);
|
|
153
|
+
cursor: pointer;
|
|
154
|
+
transition: color 0.15s, background-color 0.15s;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.nm-textarea-panel__action-btn:hover {
|
|
158
|
+
background: var(--nm-raised);
|
|
159
|
+
color: var(--nm-fg);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.nm-textarea-panel__action-btn:focus-visible {
|
|
163
|
+
outline: var(--nm-rule) solid var(--nm-fg);
|
|
164
|
+
outline-offset: var(--nm-rule);
|
|
165
|
+
color: var(--nm-fg);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.nm-textarea-panel__body {
|
|
169
|
+
flex: 1;
|
|
170
|
+
display: flex;
|
|
171
|
+
flex-direction: column;
|
|
172
|
+
overflow: auto;
|
|
173
|
+
min-height: 0;
|
|
174
|
+
background: var(--nm-canvas);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.nm-textarea-panel__editor {
|
|
178
|
+
box-sizing: border-box;
|
|
179
|
+
flex: 1;
|
|
180
|
+
width: 100%;
|
|
181
|
+
height: 100%;
|
|
182
|
+
min-height: 100%;
|
|
183
|
+
padding: var(--nm-space-16);
|
|
184
|
+
border: 0;
|
|
185
|
+
outline: none;
|
|
186
|
+
resize: none;
|
|
187
|
+
background: var(--nm-raised);
|
|
188
|
+
color: var(--nm-fg);
|
|
189
|
+
font-family: var(--nm-font-mono);
|
|
190
|
+
font-size: var(--control-fs);
|
|
191
|
+
font-weight: var(--nm-weight-regular);
|
|
192
|
+
line-height: var(--nm-leading-relaxed);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.nm-textarea-panel__preview {
|
|
196
|
+
box-sizing: border-box;
|
|
197
|
+
flex: 1;
|
|
198
|
+
padding: var(--nm-space-16);
|
|
199
|
+
overflow-y: auto;
|
|
200
|
+
background: var(--nm-canvas);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.nm-textarea-panel__empty {
|
|
204
|
+
margin: 0;
|
|
205
|
+
color: var(--nm-fg-subtle);
|
|
206
|
+
font-size: var(--nm-type-ui-sm);
|
|
207
|
+
font-style: italic;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.nm-textarea-panel__footer {
|
|
211
|
+
display: flex;
|
|
212
|
+
align-items: center;
|
|
213
|
+
justify-content: space-between;
|
|
214
|
+
padding: var(--nm-space-8) var(--nm-space-16);
|
|
215
|
+
border-top: var(--nm-rule) solid var(--nm-line-strong);
|
|
216
|
+
background: var(--nm-panel);
|
|
217
|
+
font-size: var(--nm-type-ui-sm);
|
|
218
|
+
color: var(--nm-fg-subtle);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.nm-textarea-panel__done {
|
|
222
|
+
display: inline-flex;
|
|
223
|
+
align-items: center;
|
|
224
|
+
justify-content: center;
|
|
225
|
+
height: var(--control-h);
|
|
226
|
+
padding: 0 var(--control-px);
|
|
227
|
+
border: var(--nm-rule) solid var(--nm-line-strong);
|
|
228
|
+
border-radius: var(--nm-control-r);
|
|
229
|
+
background: var(--nm-raised);
|
|
230
|
+
color: var(--nm-fg);
|
|
231
|
+
font-family: var(--nm-font);
|
|
232
|
+
font-size: var(--nm-type-ui-sm);
|
|
233
|
+
font-weight: var(--nm-weight-medium);
|
|
234
|
+
cursor: pointer;
|
|
235
|
+
transition: background-color 0.15s, border-color 0.15s;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.nm-textarea-panel__done:hover {
|
|
239
|
+
background: var(--nm-panel);
|
|
240
|
+
border-color: var(--nm-stroke);
|
|
241
|
+
}
|