@symbo.ls/uikit 2.11.270 → 2.11.271

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.cjs.js CHANGED
@@ -9254,8 +9254,8 @@ var CommonFieldTemplate = {
9254
9254
 
9255
9255
  // Field/Field.js
9256
9256
  var Field = {
9257
+ extend: "Flex",
9257
9258
  tag: "label",
9258
- extend: [Focusable, IconText],
9259
9259
  props: {
9260
9260
  minWidth: "F2+Z2",
9261
9261
  maxWidth: "F2+Z2",
@@ -9263,14 +9263,10 @@ var Field = {
9263
9263
  align: "center flex-start",
9264
9264
  gap: "Y",
9265
9265
  boxSizing: "border-box",
9266
- padding: "- A - Z2",
9267
- round: "Z1",
9268
- border: "solid, gray .45 +80",
9269
- borderWidth: ".8px",
9270
9266
  position: "relative",
9271
- ":focus-within": { outline: "1px solid #0474F2" },
9272
- Icon: {
9273
- fontSize: "Z2"
9267
+ Input: {
9268
+ padding: "Z2 B2 Z2 B",
9269
+ flex: "1"
9274
9270
  },
9275
9271
  Button: {
9276
9272
  padding: "0",
@@ -9280,19 +9276,15 @@ var Field = {
9280
9276
  }
9281
9277
  },
9282
9278
  Input: {
9283
- props: {
9284
- fontWeight: "400",
9285
- padding: "0",
9286
- background: "rgba(0, 0, 0, 0)",
9287
- round: "0",
9288
- color: "title",
9289
- fontFamily: "avenir",
9290
- placeholder: "Placeholder",
9291
- flex: "1",
9292
- minHeight: "100%",
9293
- outline: "none !important",
9294
- "::placeholder": { color: "gray 1 +64" }
9295
- }
9279
+ placeholder: "Placeholder"
9280
+ },
9281
+ Icon: {
9282
+ props: ({ parent }) => ({
9283
+ name: parent.props.icon,
9284
+ minWidth: "A",
9285
+ margin: "- Z1 - -C",
9286
+ position: "relative"
9287
+ })
9296
9288
  }
9297
9289
  };
9298
9290
  var FieldTemplate = {
@@ -9348,25 +9340,35 @@ var FieldWithTitleTemplate = {
9348
9340
 
9349
9341
  // Field/Search.js
9350
9342
  var Search = {
9351
- extend: Field,
9352
9343
  tag: "search",
9353
9344
  props: {
9354
9345
  maxWidth: "G3",
9355
9346
  gap: "Z",
9356
- theme: "dialog",
9357
- padding: "Z+V Z+V2"
9347
+ onSubmit: (ev, el, s) => {
9348
+ }
9358
9349
  },
9359
9350
  Form: {
9360
- SquareButton: {
9361
- name: "search",
9362
- color: "title",
9363
- margin: "V - - -"
9351
+ extend: "Field",
9352
+ props: {
9353
+ flow: "row-reverse",
9354
+ Input: {
9355
+ padding: "Z2 B Z2 C"
9356
+ },
9357
+ Icon: {
9358
+ margin: "- -C - Z1",
9359
+ name: "search"
9360
+ }
9364
9361
  },
9365
9362
  Input: {
9366
9363
  props: {
9367
- placeholder: "type a command or search",
9364
+ type: "search",
9365
+ placeholder: "Search",
9368
9366
  "::placeholder": { color: "paragraph" }
9369
9367
  }
9368
+ },
9369
+ Icon: {},
9370
+ on: {
9371
+ submit: (ev, el, s) => el.parent.props.onSubmit(ev, el, s)
9370
9372
  }
9371
9373
  }
9372
9374
  };
@@ -9815,9 +9817,8 @@ var Input = {
9815
9817
  theme: "field",
9816
9818
  fontSize: "A",
9817
9819
  round: "C",
9818
- lineHeight: 1,
9819
- fontFamily: "smbls",
9820
- padding: "Z A"
9820
+ lineHeight: "1",
9821
+ padding: "Z2 B"
9821
9822
  },
9822
9823
  attr: {
9823
9824
  pattern: ({ props: props4 }) => props4.pattern,
@@ -10000,12 +10001,13 @@ var Textarea = {
10000
10001
  round: "Z1",
10001
10002
  placeholder: "Leave us a message...",
10002
10003
  padding: "A",
10003
- theme: "transparent",
10004
+ theme: "field",
10004
10005
  border: "none",
10005
10006
  maxWidth: "G1_default",
10006
10007
  minHeight: "E_default",
10007
10008
  width: "100%",
10008
10009
  height: "E1_default",
10010
+ fontFamily: "inherit",
10009
10011
  style: { resize: "none" }
10010
10012
  },
10011
10013
  ".simple": {
@@ -10017,10 +10019,11 @@ var Textarea = {
10017
10019
  },
10018
10020
  ".outlined": {
10019
10021
  props: {
10020
- background: "transparent",
10022
+ theme: "field",
10023
+ borderWidth: "1px",
10024
+ borderStyle: "solid",
10021
10025
  lineHeight: 1.4,
10022
10026
  placeholder: "Leave us a message...",
10023
- outline: "none !important",
10024
10027
  resize: "none"
10025
10028
  }
10026
10029
  }
@@ -10087,7 +10090,8 @@ var Button = {
10087
10090
  textDecoration: "none",
10088
10091
  lineHeight: "1",
10089
10092
  whiteSpace: "nowrap",
10090
- padding: "Z A1",
10093
+ padding: "Z B2",
10094
+ fontWeight: "500",
10091
10095
  fontFamily: "inherit",
10092
10096
  round: "C2"
10093
10097
  },
@@ -10123,12 +10127,11 @@ var FlexButton = {
10123
10127
  boxSize: "fit-content",
10124
10128
  padding: "Z2 A2",
10125
10129
  round: "Z1",
10126
- gap: "X1",
10127
- position: "relative"
10128
- },
10129
- Icon: {
10130
- props: { fontSize: "B1" }
10130
+ gap: "Z",
10131
+ position: "relative",
10132
+ Icon: { fontSize: "B1" }
10131
10133
  },
10134
+ Icon: {},
10132
10135
  Text: { text: "Button" }
10133
10136
  };
10134
10137
  var ButtonSet = {
@@ -10392,16 +10395,40 @@ var props = {
10392
10395
  }
10393
10396
  }
10394
10397
  };
10395
- var Range = {
10396
- props,
10397
- tag: "input",
10398
- attr: { type: "range" }
10399
- };
10400
10398
  var returnPropertyValue = (el, property, def) => {
10401
10399
  const val = el.props && el.props[property];
10402
- const r = (0, import_utils14.isFunction)(val) ? val(el, el.state) : val !== void 0 ? val : def !== void 0 ? def : 50;
10400
+ const r = (0, import_utils14.isFunction)(val) ? val(el, el.state) : val !== void 0 ? val : def !== void 0 ? def : 0;
10403
10401
  return r + "";
10404
10402
  };
10403
+ var Range = {
10404
+ props,
10405
+ tag: "input",
10406
+ attr: {
10407
+ type: "range",
10408
+ value: (el, s) => parseFloat(el.state.value || el.props.value || el.props.defaultValue),
10409
+ min: (el, s) => returnPropertyValue(el, "min", 0),
10410
+ max: (el, s) => returnPropertyValue(el, "max", 100),
10411
+ step: (el, s) => returnPropertyValue(el, "step", 1)
10412
+ },
10413
+ on: {
10414
+ input: (ev, el, s) => {
10415
+ const props4 = el.props;
10416
+ if ((0, import_utils14.isFunction)(props4.onInput)) {
10417
+ props4.onInput(ev, el, s);
10418
+ } else {
10419
+ s.update({ value: parseFloat(el.node.value) });
10420
+ }
10421
+ },
10422
+ change: (ev, el, s) => {
10423
+ const props4 = el.props;
10424
+ if ((0, import_utils14.isFunction)(props4.onChange)) {
10425
+ props4.onChange(ev, el, s);
10426
+ } else {
10427
+ s.update({ value: parseFloat(el.node.value) });
10428
+ }
10429
+ }
10430
+ }
10431
+ };
10405
10432
  var RangeWithButtons = {
10406
10433
  minus: {
10407
10434
  extend: SquareButton,
@@ -10427,13 +10454,13 @@ var RangeWithButtons = {
10427
10454
  tag: "span",
10428
10455
  text: ({ state, parent }) => {
10429
10456
  const unit = returnPropertyValue(parent, "unit", "");
10430
- return "" + (state.value || 50) + unit;
10457
+ return "" + (state.value || state.defaultValue || 0) + unit;
10431
10458
  }
10432
10459
  },
10433
10460
  input: {
10434
10461
  extend: Range,
10435
10462
  attr: {
10436
- value: (el, s) => parseFloat(el.state.value),
10463
+ value: (el, s) => parseFloat(s.value || s.defaultValue),
10437
10464
  min: (el, s) => returnPropertyValue(el.parent, "min", 0),
10438
10465
  max: (el, s) => returnPropertyValue(el.parent, "max", 100),
10439
10466
  step: (el, s) => returnPropertyValue(el.parent, "step", 1)
@@ -10917,6 +10944,8 @@ var Tab = {
10917
10944
  align: "center flex-start",
10918
10945
  position: "relative",
10919
10946
  padding: "Z Z1",
10947
+ theme: "field",
10948
+ borderRadius: "A A X2 X2",
10920
10949
  icon: "smile"
10921
10950
  },
10922
10951
  Icon: {},