@northlight/ui 2.42.4 → 2.43.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/dist/es/northlight.js +84 -43
- package/dist/es/northlight.js.map +1 -1
- package/dist/sandbox/index.cjs +10686 -0
- package/dist/sandbox/index.cjs.map +1 -0
- package/dist/sandbox/index.js +88 -45
- package/dist/sandbox/index.js.map +1 -1
- package/dist/umd/northlight.cjs +84 -43
- package/dist/umd/northlight.cjs.map +1 -1
- package/dist/umd/northlight.min.cjs +3 -3
- package/dist/umd/northlight.min.cjs.map +1 -1
- package/lib/theme/components/textarea/index.ts +82 -41
- package/package.json +4 -3
- package/sandbox/lib/run-scenarios.ts +4 -1
- package/sandbox/node_modules/.yarn-integrity +0 -38
- package/sandbox/node_modules/@originjs/vite-plugin-commonjs/LICENSE +0 -127
- package/sandbox/node_modules/@originjs/vite-plugin-commonjs/README.md +0 -50
- package/sandbox/node_modules/@originjs/vite-plugin-commonjs/lib/filter.d.ts +0 -2
- package/sandbox/node_modules/@originjs/vite-plugin-commonjs/lib/filter.js +0 -39
- package/sandbox/node_modules/@originjs/vite-plugin-commonjs/lib/filter.js.map +0 -1
- package/sandbox/node_modules/@originjs/vite-plugin-commonjs/lib/index.d.ts +0 -11
- package/sandbox/node_modules/@originjs/vite-plugin-commonjs/lib/index.js +0 -78
- package/sandbox/node_modules/@originjs/vite-plugin-commonjs/lib/index.js.map +0 -1
- package/sandbox/node_modules/@originjs/vite-plugin-commonjs/lib/lib.d.ts +0 -6
- package/sandbox/node_modules/@originjs/vite-plugin-commonjs/lib/lib.js +0 -79
- package/sandbox/node_modules/@originjs/vite-plugin-commonjs/lib/lib.js.map +0 -1
- package/sandbox/node_modules/@originjs/vite-plugin-commonjs/package.json +0 -34
- package/sandbox/node_modules/esbuild/LICENSE.md +0 -21
- package/sandbox/node_modules/esbuild/README.md +0 -3
- package/sandbox/node_modules/esbuild/bin/esbuild +0 -178
- package/sandbox/node_modules/esbuild/install.js +0 -244
- package/sandbox/node_modules/esbuild/lib/main.d.ts +0 -602
- package/sandbox/node_modules/esbuild/lib/main.js +0 -2332
- package/sandbox/node_modules/esbuild/package.json +0 -41
- package/sandbox/node_modules/esbuild-linux-64/README.md +0 -3
- package/sandbox/node_modules/esbuild-linux-64/bin/esbuild +0 -0
- package/sandbox/node_modules/esbuild-linux-64/package.json +0 -17
package/dist/sandbox/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { render, within, screen, cleanup } from '@testing-library/react';
|
|
2
|
-
import
|
|
2
|
+
import userEventImport from '@testing-library/user-event';
|
|
3
3
|
import { useRef, createContext, useContext, forwardRef as forwardRef$1, useImperativeHandle, useEffect, cloneElement, Children, isValidElement, memo, useMemo, useState, createElement, Component } from 'react';
|
|
4
4
|
import { useToken as useToken$1, extendTheme, forwardRef, useStyleConfig, Icon as Icon$2, Heading, Text, FormLabel as FormLabel$1, VisuallyHidden, Badge as Badge$1, Flex, Box, Spinner as Spinner$2, Button as Button$2, Checkbox as Checkbox$2, FormControl, Stack, FormErrorMessage, CheckboxGroup, IconButton as IconButton$1, useMultiStyleConfig, Popover as Popover$2, HStack, SlideFade, Table as Table$2, chakra, Thead, Tr, Tbody, Select as Select$2, PopoverAnchor, InputGroup, InputRightElement, PopoverContent, Link as Link$1, Spacer, Tooltip as Tooltip$2, VStack, Portal, RadioGroup as RadioGroup$1, Tag as Tag$2, TagLabel, TagRightIcon, useEditableControls, useEditableState, Editable, InputLeftElement, Input as Input$1, EditablePreview, EditableInput, Modal as Modal$2, ModalOverlay, ModalContent, ModalCloseButton, ModalBody as ModalBody$1, ModalHeader, Slider, SliderTrack, SliderFilledTrack, SliderThumb, ModalFooter, Progress as Progress$1, ChakraProvider, NumberInputStepper as NumberInputStepper$1, Center, Divider, NumberIncrementStepper, NumberDecrementStepper, NumberInput as NumberInput$2, NumberInputField, Switch as Switch$2, Textarea as Textarea$2, useClipboard } from '@chakra-ui/react';
|
|
5
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -1215,58 +1215,99 @@ const Tabs = {
|
|
|
1215
1215
|
|
|
1216
1216
|
const Textarea$1 = {
|
|
1217
1217
|
baseStyle: ({ theme: {
|
|
1218
|
-
|
|
1219
|
-
colors: color,
|
|
1220
|
-
borders: borderWidth,
|
|
1221
|
-
radii: borderRadius
|
|
1218
|
+
colors: color
|
|
1222
1219
|
} }) => ({
|
|
1223
|
-
paddingInlineStart: spacing["padding-inline"].textarea.default,
|
|
1224
|
-
paddingInlineEnd: spacing["padding-inline"].textarea.default,
|
|
1225
|
-
borderRadius: borderRadius.textarea.default,
|
|
1226
|
-
borderWidth: borderWidth.textarea.default,
|
|
1227
|
-
borderColor: color.border.textarea.default,
|
|
1228
1220
|
color: color.text.default,
|
|
1229
|
-
bgColor: color.background.textarea.default,
|
|
1230
|
-
_hover: {
|
|
1231
|
-
borderColor: color.border.textarea["default-hover"],
|
|
1232
|
-
bgColor: color.background.textarea.hover
|
|
1233
|
-
},
|
|
1234
|
-
_focusVisible: {
|
|
1235
|
-
borderColor: color.border.textarea.focus,
|
|
1236
|
-
boxShadow: `0 0 0 1px ${color.border.textarea.focus}`,
|
|
1237
|
-
bgColor: color.background.textarea.active
|
|
1238
|
-
},
|
|
1239
|
-
_invalid: {
|
|
1240
|
-
boxShadow: "none",
|
|
1241
|
-
borderColor: color.border.textarea.error,
|
|
1242
|
-
bgColor: color.background.textarea.error
|
|
1243
|
-
},
|
|
1244
|
-
_readOnly: {
|
|
1245
|
-
_focusVisible: {
|
|
1246
|
-
borderColor: color.border.textarea.readonly,
|
|
1247
|
-
bgColor: color.background.textarea.default
|
|
1248
|
-
},
|
|
1249
|
-
_hover: {
|
|
1250
|
-
borderColor: color.border.textarea.readonly
|
|
1251
|
-
}
|
|
1252
|
-
},
|
|
1253
|
-
_disabled: {
|
|
1254
|
-
bgColor: color.background.textarea.disabled,
|
|
1255
|
-
_hover: {
|
|
1256
|
-
borderColor: color.border.textarea.default
|
|
1257
|
-
}
|
|
1258
|
-
},
|
|
1259
1221
|
_placeholder: {
|
|
1260
1222
|
color: color.text.textarea.placeholder
|
|
1261
1223
|
}
|
|
1262
1224
|
}),
|
|
1263
1225
|
variants: {
|
|
1264
|
-
outline: {
|
|
1265
|
-
|
|
1226
|
+
outline: ({ theme: {
|
|
1227
|
+
space: spacing,
|
|
1228
|
+
colors: color,
|
|
1229
|
+
borders: borderWidth,
|
|
1230
|
+
radii: borderRadius
|
|
1231
|
+
} }) => ({
|
|
1232
|
+
paddingInlineStart: spacing["padding-inline"].textarea.default,
|
|
1233
|
+
paddingInlineEnd: spacing["padding-inline"].textarea.default,
|
|
1234
|
+
borderRadius: borderRadius.textarea.default,
|
|
1235
|
+
borderWidth: borderWidth.textarea.default,
|
|
1236
|
+
borderColor: color.border.textarea.default,
|
|
1237
|
+
bgColor: color.background.textarea.default,
|
|
1238
|
+
_hover: {
|
|
1239
|
+
borderColor: color.border.textarea["default-hover"],
|
|
1240
|
+
bgColor: color.background.textarea.hover
|
|
1241
|
+
},
|
|
1242
|
+
_focusVisible: {
|
|
1243
|
+
borderColor: color.border.textarea.focus,
|
|
1244
|
+
boxShadow: `0 0 0 1px ${color.border.textarea.focus}`,
|
|
1245
|
+
bgColor: color.background.textarea.active
|
|
1246
|
+
},
|
|
1247
|
+
_invalid: {
|
|
1248
|
+
boxShadow: "none",
|
|
1249
|
+
borderColor: color.border.textarea.error,
|
|
1250
|
+
bgColor: color.background.textarea.error
|
|
1251
|
+
},
|
|
1252
|
+
_readOnly: {
|
|
1253
|
+
_focusVisible: {
|
|
1254
|
+
borderColor: color.border.textarea.readonly,
|
|
1255
|
+
bgColor: color.background.textarea.default
|
|
1256
|
+
},
|
|
1257
|
+
_hover: {
|
|
1258
|
+
borderColor: color.border.textarea.readonly
|
|
1259
|
+
}
|
|
1260
|
+
},
|
|
1261
|
+
_disabled: {
|
|
1262
|
+
bgColor: color.background.textarea.disabled,
|
|
1263
|
+
_hover: {
|
|
1264
|
+
borderColor: color.border.textarea.default
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
}),
|
|
1268
|
+
ai: ({ theme: {
|
|
1269
|
+
space: spacing,
|
|
1270
|
+
colors: color,
|
|
1271
|
+
borders: borderWidth,
|
|
1272
|
+
radii: borderRadius
|
|
1273
|
+
} }) => ({
|
|
1274
|
+
paddingInlineStart: spacing["padding-inline"].textarea.default,
|
|
1275
|
+
paddingInlineEnd: spacing["padding-inline"].textarea.default,
|
|
1276
|
+
borderRadius: borderRadius.textarea.default,
|
|
1277
|
+
borderWidth: borderWidth.textarea.default,
|
|
1278
|
+
borderColor: color.border.textarea.default,
|
|
1279
|
+
bgColor: color.background.textarea.default,
|
|
1280
|
+
_hover: {
|
|
1281
|
+
borderColor: color.border.textarea["default-hover"],
|
|
1282
|
+
bgColor: color.background.textarea.hover
|
|
1283
|
+
},
|
|
1266
1284
|
_focusVisible: {
|
|
1285
|
+
bgColor: color.background.textarea.active,
|
|
1286
|
+
boxShadow: `inset 0 0 0 1px ${color.border.ai}`,
|
|
1287
|
+
borderColor: color.border.ai,
|
|
1288
|
+
_invalid: {
|
|
1289
|
+
boxShadow: `inset 0 0 0 1px ${color.border.textarea.error}`,
|
|
1290
|
+
bgColor: color.background.textarea.error,
|
|
1291
|
+
borderColor: color.border.textarea.error
|
|
1292
|
+
}
|
|
1293
|
+
},
|
|
1294
|
+
_invalid: {
|
|
1295
|
+
bgColor: color.background.textarea.error,
|
|
1296
|
+
borderColor: color.border.textarea.error
|
|
1297
|
+
},
|
|
1298
|
+
_readOnly: {
|
|
1299
|
+
_focusVisible: {
|
|
1300
|
+
borderColor: color.border.textarea.readonly,
|
|
1301
|
+
bgColor: color.background.textarea.default
|
|
1302
|
+
},
|
|
1303
|
+
_hover: {
|
|
1304
|
+
borderColor: color.border.textarea.readonly
|
|
1305
|
+
}
|
|
1306
|
+
},
|
|
1307
|
+
_disabled: {
|
|
1308
|
+
bgColor: color.background.textarea.disabled,
|
|
1267
1309
|
_hover: {
|
|
1268
|
-
|
|
1269
|
-
borderColor: color.border.ai
|
|
1310
|
+
borderColor: color.border.textarea.default
|
|
1270
1311
|
}
|
|
1271
1312
|
}
|
|
1272
1313
|
})
|
|
@@ -9831,6 +9872,8 @@ forwardRef((props, ref) => {
|
|
|
9831
9872
|
);
|
|
9832
9873
|
});
|
|
9833
9874
|
|
|
9875
|
+
var _a;
|
|
9876
|
+
const userEvent = (_a = userEventImport.default) != null ? _a : userEventImport;
|
|
9834
9877
|
if (typeof window !== "undefined" && !window.matchMedia) {
|
|
9835
9878
|
window.matchMedia = (query) => ({
|
|
9836
9879
|
matches: false,
|
|
@@ -10541,7 +10584,7 @@ function SandboxViewerContent({
|
|
|
10541
10584
|
const container = getContainer();
|
|
10542
10585
|
if (!container)
|
|
10543
10586
|
return;
|
|
10544
|
-
const user =
|
|
10587
|
+
const user = userEventImport.setup();
|
|
10545
10588
|
const context = {
|
|
10546
10589
|
screen: within(container),
|
|
10547
10590
|
documentScreen: screen,
|