@splenddev/kreativ-ui 0.3.5 → 0.3.7

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.
Files changed (70) hide show
  1. package/dist/chunk-6ZVPNLAW.cjs +31 -0
  2. package/dist/chunk-6ZVPNLAW.cjs.map +1 -0
  3. package/dist/{chunk-AQF6OJPA.cjs → chunk-KGNJ2KLQ.cjs} +7 -7
  4. package/dist/chunk-KGNJ2KLQ.cjs.map +1 -0
  5. package/dist/chunk-PW2S3ZJG.js +28 -0
  6. package/dist/chunk-PW2S3ZJG.js.map +1 -0
  7. package/dist/{chunk-SGRBIUJ7.js → chunk-WF6Y3BRR.js} +7 -7
  8. package/dist/chunk-WF6Y3BRR.js.map +1 -0
  9. package/dist/{chunk-OC5MESTQ.cjs → components.cjs} +14 -36
  10. package/dist/components.cjs.map +1 -0
  11. package/dist/{components/index.d.ts → components.d.cts} +1 -1
  12. package/dist/{components/index.d.cts → components.d.ts} +1 -1
  13. package/dist/{chunk-3TZ7F7KW.js → components.js} +6 -26
  14. package/dist/components.js.map +1 -0
  15. package/dist/{core/index.cjs → core.cjs} +19 -19
  16. package/dist/core.cjs.map +1 -0
  17. package/dist/{core/index.js → core.js} +4 -4
  18. package/dist/core.js.map +1 -0
  19. package/dist/{hooks/index.cjs → hooks.cjs} +4 -4
  20. package/dist/hooks.cjs.map +1 -0
  21. package/dist/{hooks/index.d.cts → hooks.d.cts} +1 -1
  22. package/dist/{hooks/index.d.ts → hooks.d.ts} +1 -1
  23. package/dist/{hooks/index.js → hooks.js} +4 -4
  24. package/dist/hooks.js.map +1 -0
  25. package/dist/index.cjs +4 -367
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.cts +1 -10
  28. package/dist/index.d.ts +1 -10
  29. package/dist/index.js +2 -7
  30. package/dist/index.js.map +1 -1
  31. package/dist/styles/index.css +1 -1
  32. package/dist/types.cjs +4 -0
  33. package/dist/types.cjs.map +1 -0
  34. package/dist/types.js +3 -0
  35. package/dist/types.js.map +1 -0
  36. package/dist/{utils/index.cjs → utils.cjs} +4 -4
  37. package/dist/utils.cjs.map +1 -0
  38. package/dist/{utils/index.d.ts → utils.d.cts} +20 -4
  39. package/dist/{utils/index.d.cts → utils.d.ts} +20 -4
  40. package/dist/{utils/index.js → utils.js} +4 -4
  41. package/dist/utils.js.map +1 -0
  42. package/package.json +5 -4
  43. package/dist/chunk-2MCBBWEA.js +0 -3
  44. package/dist/chunk-2MCBBWEA.js.map +0 -1
  45. package/dist/chunk-3TZ7F7KW.js.map +0 -1
  46. package/dist/chunk-AQF6OJPA.cjs.map +0 -1
  47. package/dist/chunk-DHKRYKS7.cjs +0 -4
  48. package/dist/chunk-DHKRYKS7.cjs.map +0 -1
  49. package/dist/chunk-OC5MESTQ.cjs.map +0 -1
  50. package/dist/chunk-SGRBIUJ7.js.map +0 -1
  51. package/dist/color-C65EUdAl.d.cts +0 -20
  52. package/dist/color-C65EUdAl.d.ts +0 -20
  53. package/dist/components/index.cjs +0 -231
  54. package/dist/components/index.cjs.map +0 -1
  55. package/dist/components/index.js +0 -6
  56. package/dist/components/index.js.map +0 -1
  57. package/dist/core/index.cjs.map +0 -1
  58. package/dist/core/index.js.map +0 -1
  59. package/dist/hooks/index.cjs.map +0 -1
  60. package/dist/hooks/index.js.map +0 -1
  61. package/dist/types/index.cjs +0 -6
  62. package/dist/types/index.cjs.map +0 -1
  63. package/dist/types/index.js +0 -3
  64. package/dist/types/index.js.map +0 -1
  65. package/dist/utils/index.cjs.map +0 -1
  66. package/dist/utils/index.js.map +0 -1
  67. /package/dist/{core/index.d.cts → core.d.cts} +0 -0
  68. /package/dist/{core/index.d.ts → core.d.ts} +0 -0
  69. /package/dist/{types/index.d.cts → types.d.cts} +0 -0
  70. /package/dist/{types/index.d.ts → types.d.ts} +0 -0
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
 
3
+ var chunk6ZVPNLAW_cjs = require('./chunk-6ZVPNLAW.cjs');
3
4
  var chunk52AQLHWM_cjs = require('./chunk-52AQLHWM.cjs');
4
5
  var chunk4KNQFZZT_cjs = require('./chunk-4KNQFZZT.cjs');
5
6
  var chunkMAUKS2DZ_cjs = require('./chunk-MAUKS2DZ.cjs');
@@ -12,7 +13,6 @@ var lucideReact = require('lucide-react');
12
13
  var utils = require('@splenddev/kreativ-core/utils');
13
14
  var classVarianceAuthority = require('class-variance-authority');
14
15
 
15
- var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
16
16
  function _interopNamespace(e) {
17
17
  if (e && e.__esModule) return e;
18
18
  var n = Object.create(null);
@@ -983,6 +983,7 @@ function renderBaseInput({
983
983
  embedded,
984
984
  hasAdornment: Boolean(startIcon) || Boolean(endIcon) || clearable || isLoading || Boolean(extraEndAdornment)
985
985
  }),
986
+ "h-[var(--kui-input-height)] px-[var(--kui-input-padding-x)]",
986
987
  className
987
988
  ),
988
989
  [
@@ -1260,29 +1261,6 @@ var FormFieldMessage = kreativCore.createComponent({
1260
1261
  );
1261
1262
  }, "render")
1262
1263
  });
1263
-
1264
- // src/utils/env.ts
1265
- function readProcessEnv() {
1266
- try {
1267
- return typeof process !== "undefined" ? process.env?.NODE_ENV : void 0;
1268
- } catch {
1269
- return void 0;
1270
- }
1271
- }
1272
- chunkMAUKS2DZ_cjs.__name(readProcessEnv, "readProcessEnv");
1273
- function readImportMetaEnv() {
1274
- try {
1275
- return typeof ({ url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-OC5MESTQ.cjs', document.baseURI).href)) }) !== "undefined" ? undefined?.MODE : void 0;
1276
- } catch {
1277
- return void 0;
1278
- }
1279
- }
1280
- chunkMAUKS2DZ_cjs.__name(readImportMetaEnv, "readImportMetaEnv");
1281
- function isDev() {
1282
- const mode = readProcessEnv() ?? readImportMetaEnv();
1283
- return mode !== void 0 && mode !== "production";
1284
- }
1285
- chunkMAUKS2DZ_cjs.__name(isDev, "isDev");
1286
1264
  var FormContext = React2__namespace.createContext(null);
1287
1265
  function useFormContext() {
1288
1266
  return React2__namespace.useContext(FormContext);
@@ -16810,6 +16788,7 @@ var SelectTrigger = React2.forwardRef(
16810
16788
  disabled: ctx.disabled,
16811
16789
  hasAdornment: true
16812
16790
  }),
16791
+ "h-[var(--kui-select-height)] px-[var(--kui-select-padding-x)]",
16813
16792
  className
16814
16793
  );
16815
16794
  const showClear = ctx.clearable && ctx.value !== void 0 && !ctx.disabled;
@@ -17084,7 +17063,7 @@ chunkMAUKS2DZ_cjs.__name(SelectLabel, "SelectLabel");
17084
17063
  function SelectImpl({ options, children, label, ...rootProps }, ref) {
17085
17064
  const childArray = React2__namespace.Children.toArray(children);
17086
17065
  const compound = childArray.length > 0;
17087
- if (isDev() && compound && options?.length) {
17066
+ if (chunk6ZVPNLAW_cjs.isDev() && compound && options?.length) {
17088
17067
  console.warn(
17089
17068
  "[kreativ-ui/Select]: options and children were both passed. Children are rendered; options are ignored."
17090
17069
  );
@@ -17642,7 +17621,7 @@ var Checkbox = kreativCore.createComponent({
17642
17621
  const checked = isControlled ? checkedProp : internalChecked;
17643
17622
  const hasWarned = React2.useRef(false);
17644
17623
  React2.useEffect(() => {
17645
- if (!isDev() || hasWarned.current) return;
17624
+ if (!chunk6ZVPNLAW_cjs.isDev() || hasWarned.current) return;
17646
17625
  if (label && field?.hasExternalLabel) {
17647
17626
  console.warn(
17648
17627
  "[kreativ-ui/Checkbox]: this checkbox has both a label prop and a FormField.Label ancestor. Checkbox owns its label. Use the Checkbox label prop instead of FormField.Label."
@@ -18129,7 +18108,7 @@ chunkMAUKS2DZ_cjs.__name(resolveDefaultWidget, "resolveDefaultWidget");
18129
18108
  function resolveFormControl(component, sourceDescription) {
18130
18109
  const meta3 = component.__kui;
18131
18110
  if (!meta3?.formControl) {
18132
- if (isDev()) {
18111
+ if (chunk6ZVPNLAW_cjs.isDev()) {
18133
18112
  console.warn(
18134
18113
  `[kreativ-ui/Form.FromSchema]: ${sourceDescription} is missing __kui metadata (expected \`__kui: { formControl: "single" | "compound" }\`). Falling back to "single". Attach the metadata to the component to silence this.`
18135
18114
  );
@@ -18164,7 +18143,7 @@ function resolveWidget(zodType, uiField) {
18164
18143
  valuePropConvention: WIDGET_VALUE_CONVENTIONS[key] ?? "value"
18165
18144
  };
18166
18145
  }
18167
- if (isDev()) {
18146
+ if (chunk6ZVPNLAW_cjs.isDev()) {
18168
18147
  console.warn(
18169
18148
  `[kreativ-ui/Form.FromSchema]: widget key "${uiField.widget}" is not a key of ComponentPropsMap \u2014 falling back to the Zod-inferred default. Register a component under that key or use a direct component reference instead.`
18170
18149
  );
@@ -18317,7 +18296,7 @@ function defaultGetKey(item, index) {
18317
18296
  return String(id);
18318
18297
  }
18319
18298
  }
18320
- if (isDev()) {
18299
+ if (chunk6ZVPNLAW_cjs.isDev()) {
18321
18300
  console.warn(
18322
18301
  "[kreativ-ui/Repeater.Root]: no stable key could be derived for an item. Falling back to array index as the key, which can cause incorrect reconciliation on reorder/remove. Provide a `getKey` that derives a stable id from each item."
18323
18302
  );
@@ -19157,7 +19136,7 @@ var FormFieldRoot = kreativCore.createComponent({
19157
19136
  message || hasCustomMessage ? messageId : void 0
19158
19137
  ].filter(Boolean).join(" ") || void 0;
19159
19138
  React2__namespace.useEffect(() => {
19160
- if (!isDev()) {
19139
+ if (!chunk6ZVPNLAW_cjs.isDev()) {
19161
19140
  return;
19162
19141
  }
19163
19142
  if (countMessageComponents(children) > 1) {
@@ -19326,7 +19305,7 @@ var FormFieldControl = kreativCore.createComponent(
19326
19305
  }
19327
19306
  const child = children;
19328
19307
  const childType = child.type;
19329
- if (isDev() && !kreativCore.hasKuiMeta(childType)) {
19308
+ if (chunk6ZVPNLAW_cjs.isDev() && !kreativCore.hasKuiMeta(childType)) {
19330
19309
  console.warn(
19331
19310
  "[kreativ-ui/FormField.Control]: child component doesn't carry Kreativ UI's __kui metadata. Make sure it forwards both the injected form-control props (id, aria-invalid, aria-required, aria-describedby, disabled) AND its ref to its own actual interactive element, or it may not wire up to the field correctly."
19332
19311
  );
@@ -19743,7 +19722,7 @@ var MarkdownEditor = kreativCore.createComponent({
19743
19722
  [renderMarkdown, value]
19744
19723
  );
19745
19724
  React2.useEffect(() => {
19746
- if (isDev() && !renderMarkdown) {
19725
+ if (chunk6ZVPNLAW_cjs.isDev() && !renderMarkdown) {
19747
19726
  console.warn(
19748
19727
  "[kreativ-ui/MarkdownEditor]: no renderMarkdown prop was provided, so the Preview tab is showing plain text. Pass renderMarkdown={(value) => ReactNode}."
19749
19728
  );
@@ -21053,7 +21032,7 @@ var GridRoot = kreativCore.createComponent({
21053
21032
  ...rest
21054
21033
  }, ref) => {
21055
21034
  const { theme } = kreativCore.useTheme();
21056
- if (isDev() && [columns, minChildWidth, templateColumns].filter((v) => v != null).length > 1) {
21035
+ if (chunk6ZVPNLAW_cjs.isDev() && [columns, minChildWidth, templateColumns].filter((v) => v != null).length > 1) {
21057
21036
  console.warn(
21058
21037
  "[kreativ-ui/Grid]: columns, minChildWidth, and templateColumns are mutually exclusive. templateColumns wins, then columns, then minChildWidth."
21059
21038
  );
@@ -22370,7 +22349,6 @@ exports.Switch = Switch;
22370
22349
  exports.Textarea = Textarea;
22371
22350
  exports.ThemeToggler = ThemeToggler;
22372
22351
  exports.defineUIField = defineUIField;
22373
- exports.isDev = isDev;
22374
22352
  exports.useButtonGroupContext = useButtonGroupContext;
22375
22353
  exports.useButtonGroupItemContext = useButtonGroupItemContext;
22376
22354
  exports.useElementScrollProgress = useElementScrollProgress;
@@ -22378,5 +22356,5 @@ exports.useFormContext = useFormContext;
22378
22356
  exports.useOptionalButtonGroupContext = useOptionalButtonGroupContext;
22379
22357
  exports.useOptionalButtonGroupItemContext = useOptionalButtonGroupItemContext;
22380
22358
  exports.useScrollProgress = useScrollProgress;
22381
- //# sourceMappingURL=chunk-OC5MESTQ.cjs.map
22382
- //# sourceMappingURL=chunk-OC5MESTQ.cjs.map
22359
+ //# sourceMappingURL=components.cjs.map
22360
+ //# sourceMappingURL=components.cjs.map