@symbo.ls/uikit 2.11.66 → 2.11.72

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
@@ -11415,6 +11415,7 @@ __export(domql_exports, {
11415
11415
  Animation: () => Animation,
11416
11416
  Avatar: () => Avatar,
11417
11417
  AvatarBundle: () => AvatarBundle,
11418
+ AvatarChooser: () => AvatarChooser,
11418
11419
  Block: () => Block,
11419
11420
  Box: () => Box,
11420
11421
  Button: () => Button,
@@ -11435,7 +11436,6 @@ __export(domql_exports, {
11435
11436
  Dialog: () => Dialog,
11436
11437
  DialogFooter: () => DialogFooter,
11437
11438
  Direction: () => Direction,
11438
- DragNdropUser: () => DragNdropUser,
11439
11439
  DropdownList: () => DropdownList,
11440
11440
  DropdownParent: () => DropdownParent,
11441
11441
  Field: () => Field,
@@ -11467,6 +11467,7 @@ __export(domql_exports, {
11467
11467
  List: () => List,
11468
11468
  Media: () => Media,
11469
11469
  Notification: () => Notification,
11470
+ NumberInput: () => NumberInput,
11470
11471
  Overflow: () => Overflow,
11471
11472
  P: () => P,
11472
11473
  Picture: () => Picture,
@@ -11492,6 +11493,8 @@ __export(domql_exports, {
11492
11493
  Textarea: () => Textarea,
11493
11494
  Theme: () => Theme,
11494
11495
  TimePicker: () => TimePicker,
11496
+ TimePickerItem: () => TimePickerItem,
11497
+ TimeSwitcher: () => TimeSwitcher,
11495
11498
  Timing: () => Timing,
11496
11499
  ToggleSwitch: () => ToggleSwitch,
11497
11500
  ToggleSwithWithLabel: () => ToggleSwithWithLabel,
@@ -14039,34 +14042,6 @@ var Box = {
14039
14042
  }
14040
14043
  };
14041
14044
 
14042
- // Avatar/index.js
14043
- var Avatar = {
14044
- extend: Img,
14045
- props: {
14046
- display: "block",
14047
- avatarType: "initials",
14048
- borderRadius: "100%",
14049
- boxSize: "B",
14050
- cursor: "pointer"
14051
- },
14052
- attr: {
14053
- src: ({ key, props: props7 }) => props7.src || `https://avatars.dicebear.com/api/${props7.avatarType || "adventurer-neutral"}/${props7.key || key}.svg`
14054
- }
14055
- };
14056
- var AvatarBundle = {
14057
- extend: Flex,
14058
- childExtend: {
14059
- extend: Avatar,
14060
- props: {
14061
- boxSize: "B1",
14062
- border: "0.1312em, black .85, solid",
14063
- ":not(:last-child)": {
14064
- margin: "0 -Y2 0 0"
14065
- }
14066
- }
14067
- }
14068
- };
14069
-
14070
14045
  // Icon/index.js
14071
14046
  var Icon = {
14072
14047
  extend: Svg,
@@ -14157,7 +14132,7 @@ var SquareButton = {
14157
14132
  aspectRatio: "1 / 1",
14158
14133
  justifyContent: "center",
14159
14134
  round: "Z",
14160
- style: { boxSizing: "content-box" }
14135
+ boxSizing: "content-box"
14161
14136
  }
14162
14137
  };
14163
14138
  var CircleButton = {
@@ -14169,6 +14144,74 @@ var KangorooButton = {
14169
14144
  childExtend: IconText
14170
14145
  };
14171
14146
 
14147
+ // Avatar/index.js
14148
+ var Avatar = {
14149
+ extend: Img,
14150
+ props: {
14151
+ display: "block",
14152
+ avatarType: "initials",
14153
+ borderRadius: "100%",
14154
+ boxSize: "B",
14155
+ cursor: "pointer"
14156
+ },
14157
+ attr: {
14158
+ src: ({ key, props: props7 }) => props7.src || `https://avatars.dicebear.com/api/${props7.avatarType || "adventurer-neutral"}/${props7.key || key}.svg`
14159
+ }
14160
+ };
14161
+ var AvatarBundle = {
14162
+ extend: Flex,
14163
+ childExtend: {
14164
+ extend: Avatar,
14165
+ props: {
14166
+ boxSize: "B1",
14167
+ border: "0.1312em, black .85, solid",
14168
+ ":not(:last-child)": {
14169
+ margin: "0 -Y2 0 0"
14170
+ }
14171
+ }
14172
+ }
14173
+ };
14174
+ var AvatarChooser = {
14175
+ extend: Button,
14176
+ tag: "label",
14177
+ props: {
14178
+ round: "C",
14179
+ gap: "Y",
14180
+ padding: "W2 A W2 W2",
14181
+ theme: "tertiary",
14182
+ position: "relative",
14183
+ cursor: "pointer"
14184
+ },
14185
+ Avatar: {
14186
+ boxSize: "B1",
14187
+ pointerEvents: "none"
14188
+ },
14189
+ select: {
14190
+ props: {
14191
+ outline: "none",
14192
+ pointerEvents: "all",
14193
+ appearance: "none",
14194
+ border: "none",
14195
+ width: "100%",
14196
+ height: "100%",
14197
+ background: "none",
14198
+ color: "currentColor",
14199
+ fontSize: "A",
14200
+ lineHeight: 1,
14201
+ margin: "0 0 0 -B1+X",
14202
+ padding: "0 A 0 B1+X"
14203
+ },
14204
+ attr: { name: "avatar-chooser", id: "avatar-chooser" },
14205
+ childExtend: { tag: "option", text: ({ state }) => state.text },
14206
+ $setCollection: ({ parent }) => parent.props.options,
14207
+ on: {
14208
+ change: (ev, { parent }) => {
14209
+ parent.user.update({ key: ev.target.value });
14210
+ }
14211
+ }
14212
+ }
14213
+ };
14214
+
14172
14215
  // ButtonSet/index.js
14173
14216
  var ButtonSet = {
14174
14217
  tag: "nav",
@@ -14361,10 +14404,7 @@ var DatePickerMonthsSlider = {
14361
14404
  }
14362
14405
  }
14363
14406
  },
14364
- leftButton: {
14365
- extend: Button,
14366
- props: { icon: "arrowLeft" }
14367
- },
14407
+ Button_left: { icon: "arrowLeft" },
14368
14408
  Flex: {
14369
14409
  props: {
14370
14410
  flex: "1",
@@ -14408,7 +14448,7 @@ var DatePickerMonthsSlider = {
14408
14448
  ];
14409
14449
  }
14410
14450
  },
14411
- rightButton: { extend: Button, props: { icon: "arrowRight" } }
14451
+ Button_right: { icon: "arrowRight" }
14412
14452
  };
14413
14453
  var DatePickerWeekDays = {
14414
14454
  extend: Grid,
@@ -14567,64 +14607,32 @@ var DatePicker = {
14567
14607
  };
14568
14608
  var DatePickerTwoColumns = {
14569
14609
  extend: DatePicker,
14610
+ DatePickerYears: {},
14570
14611
  Flex: {
14571
14612
  DatePickerMonthsSlider: {
14572
- maxWidth: `${544 / 16}em`
14613
+ props: {
14614
+ maxWidth: `${544 / 16}em`
14615
+ }
14573
14616
  },
14574
14617
  DatePickerWeekDays: {
14575
- maxWidth: `${544 / 16}em`
14618
+ props: {
14619
+ maxWidth: `${544 / 16}em`
14620
+ }
14576
14621
  },
14577
14622
  monthNumbersContainer: {
14578
- maxWidth: `${544 / 16}em`
14623
+ props: {
14624
+ maxWidth: `${544 / 16}em`
14625
+ }
14579
14626
  }
14580
14627
  }
14581
14628
  };
14582
14629
 
14583
- // Input/index.js
14584
- var Input = {
14585
- extend: [Focusable],
14586
- tag: "input",
14587
- props: {
14588
- border: "none",
14589
- type: "input",
14590
- theme: "quaternary",
14591
- fontSize: "A",
14592
- round: "C",
14593
- lineHeight: 1,
14594
- fontFamily: "smbls",
14595
- padding: "Z A"
14596
- },
14597
- attr: {
14598
- pattern: ({ props: props7 }) => props7.pattern,
14599
- minlength: ({ props: props7 }) => props7.minlength,
14600
- maxlength: ({ props: props7 }) => props7.maxlength,
14601
- name: ({ props: props7 }) => props7.name,
14602
- autocomplete: ({ props: props7 }) => props7.autocomplete,
14603
- placeholder: ({ props: props7 }) => props7.placeholder,
14604
- value: ({ props: props7, state }) => props7.value,
14605
- disabled: ({ props: props7 }) => props7.disabled || null,
14606
- readonly: ({ props: props7 }) => props7.readonly,
14607
- required: ({ props: props7 }) => props7.required,
14608
- type: ({ props: props7 }) => props7.type
14609
- }
14610
- };
14611
-
14612
14630
  // TimePicker/TimePickerItem.js
14613
14631
  var props2 = {
14614
14632
  align: "center center",
14615
14633
  flow: "column",
14616
14634
  gap: "X",
14617
14635
  style: {
14618
- "input[type=number]::-webkit-inner-spin-button": {
14619
- "-webkit-appearance": "none",
14620
- margin: 0
14621
- },
14622
- "input[type=number]::-webkit-outer-spin-button": {
14623
- "-webkit-appearance": "none",
14624
- margin: 0
14625
- },
14626
- "input[type=number]": { "-webkit-appearance": "textfield" },
14627
- "input:focus < button": { border: "3px solid red" },
14628
14636
  "> button": {
14629
14637
  padding: "0",
14630
14638
  background: "transparent",
@@ -14632,50 +14640,130 @@ var props2 = {
14632
14640
  fontSize: `${12 / 16}em`,
14633
14641
  display: "none"
14634
14642
  }
14635
- },
14636
- input: {
14637
- boxSize: "C C",
14638
- round: "Z",
14639
- padding: "0",
14640
- align: "center center",
14641
- textAlign: "center",
14642
- color: "white",
14643
- background: "white .15"
14644
14643
  }
14645
14644
  };
14646
14645
  var TimePickerItem = {
14647
14646
  tag: "label",
14648
14647
  extend: Flex,
14649
14648
  props: props2,
14650
- upButton: { extend: Button, props: { icon: "plus" } },
14651
- input: { extend: [Input, Flex], attr: { type: "number", min: "1", max: "24", value: "1" } },
14652
- downButton: { extend: Button, props: { icon: "minus" } }
14649
+ Button_plus: { icon: "plus" },
14650
+ NumberInput: {
14651
+ boxSize: "C C",
14652
+ round: "Z",
14653
+ padding: "0",
14654
+ align: "center center",
14655
+ textAlign: "center",
14656
+ min: 0,
14657
+ max: 24,
14658
+ placeholder: "00",
14659
+ appearance: "textfield",
14660
+ theme: "secondary",
14661
+ "::-webkit-inner-spin-button": {
14662
+ style: { appearance: "none" },
14663
+ margin: 0
14664
+ },
14665
+ "::-webkit-outer-spin-button": {
14666
+ style: { appearance: "none" },
14667
+ margin: 0
14668
+ }
14669
+ },
14670
+ Button_minus: { icon: "minus" }
14653
14671
  };
14654
14672
 
14655
- // TimePicker/index.js
14673
+ // TimePicker/TimeSwitcher.js
14656
14674
  var props3 = {
14675
+ boxSize: "C B2",
14657
14676
  flow: "column",
14658
- width: "fit-content",
14659
- background: "rgba(255, 255, 255, .15)",
14660
- padding: "A A B A",
14677
+ overflow: "hidden",
14661
14678
  round: "Z",
14662
- title: {
14679
+ theme: "secondary"
14680
+ };
14681
+ var TimeSwitcher = {
14682
+ props: props3,
14683
+ extend: Flex,
14684
+ childExtend: {
14685
+ extend: Button,
14686
+ props: ({ state, key }) => ({
14687
+ active: state.activeShift === key,
14688
+ padding: "0",
14689
+ flex: "1",
14690
+ width: "100%",
14691
+ fontSize: "Y",
14692
+ textTransform: "uppercase",
14693
+ round: "0",
14694
+ background: "transparent",
14695
+ color: "currentColor",
14696
+ lineHeight: "1",
14697
+ ".active": { theme: "primary" }
14698
+ }),
14699
+ on: {
14700
+ click: (event, element, state) => {
14701
+ state.update({ activeShift: element.key });
14702
+ }
14703
+ }
14704
+ },
14705
+ am: { text: "am" },
14706
+ pm: { text: "pm" }
14707
+ };
14708
+
14709
+ // TimePicker/index.js
14710
+ var TimePicker = {
14711
+ extend: [Dialog, Flex],
14712
+ state: {
14713
+ activeShift: "am"
14714
+ },
14715
+ props: {
14716
+ flow: "column",
14717
+ width: "fit-content",
14718
+ padding: "Z A"
14719
+ },
14720
+ Title: {
14663
14721
  fontSize: "Z1",
14664
14722
  textTransform: "capitalize",
14665
- padding: "- - B -"
14723
+ padding: "- - A -",
14724
+ text: "enter time"
14666
14725
  },
14667
- content: {
14668
- align: "center center",
14669
- gap: "A",
14670
- timePickers: {
14726
+ Flex: {
14727
+ props: {
14671
14728
  align: "center center",
14672
- gap: "Y2"
14673
- }
14729
+ gap: "A"
14730
+ },
14731
+ Flex: {
14732
+ tag: "label",
14733
+ props: {
14734
+ align: "center center",
14735
+ gap: "Y2"
14736
+ },
14737
+ TimePickerItem_hh: {
14738
+ NumberInput: {
14739
+ placeholder: "HH",
14740
+ min: "0",
14741
+ max: "11"
14742
+ }
14743
+ },
14744
+ Span: ":",
14745
+ TimePickerItem_mm: {
14746
+ NumberInput: {
14747
+ placeholder: "MM",
14748
+ min: "0",
14749
+ max: "59"
14750
+ }
14751
+ },
14752
+ Span_2: ":",
14753
+ TimePickerItem_ss: {
14754
+ NumberInput: {
14755
+ placeholder: "SS",
14756
+ min: "0",
14757
+ max: "59"
14758
+ }
14759
+ }
14760
+ },
14761
+ TimeSwitcher: {}
14674
14762
  },
14675
- footButtons: {
14763
+ DialogFooter: {
14676
14764
  align: "center flex-end",
14677
- gap: "A1",
14678
- padding: "B1 - - -",
14765
+ gap: "X",
14766
+ margin: "Z2 -Z2 -Z",
14679
14767
  childProps: {
14680
14768
  background: "transparent",
14681
14769
  padding: "0",
@@ -14683,27 +14771,6 @@ var props3 = {
14683
14771
  }
14684
14772
  }
14685
14773
  };
14686
- var TimePicker = {
14687
- extend: [Dialog, Flex],
14688
- props: props3,
14689
- title: { text: "enter time" },
14690
- content: {
14691
- extend: Flex,
14692
- timePickers: {
14693
- tag: "label",
14694
- extend: Flex,
14695
- ...[
14696
- { extend: TimePickerItem },
14697
- ":",
14698
- { extend: TimePickerItem },
14699
- ":",
14700
- { extend: TimePickerItem }
14701
- ]
14702
- },
14703
- TimeSwitcher: {}
14704
- },
14705
- DialogFooter: {}
14706
- };
14707
14774
 
14708
14775
  // Dropdown/index.js
14709
14776
  var DropdownList = {
@@ -15027,6 +15094,46 @@ var RouteLink = {
15027
15094
  extend: [Link, RouterLink]
15028
15095
  };
15029
15096
 
15097
+ // Input/index.js
15098
+ var Input = {
15099
+ extend: [Focusable],
15100
+ tag: "input",
15101
+ props: {
15102
+ border: "none",
15103
+ type: "input",
15104
+ theme: "quaternary",
15105
+ fontSize: "A",
15106
+ round: "C",
15107
+ lineHeight: 1,
15108
+ fontFamily: "smbls",
15109
+ padding: "Z A"
15110
+ },
15111
+ attr: {
15112
+ pattern: ({ props: props7 }) => props7.pattern,
15113
+ minlength: ({ props: props7 }) => props7.minlength,
15114
+ maxlength: ({ props: props7 }) => props7.maxlength,
15115
+ name: ({ props: props7 }) => props7.name,
15116
+ autocomplete: ({ props: props7 }) => props7.autocomplete,
15117
+ placeholder: ({ props: props7 }) => props7.placeholder,
15118
+ value: ({ props: props7, state }) => props7.value,
15119
+ disabled: ({ props: props7 }) => props7.disabled || null,
15120
+ readonly: ({ props: props7 }) => props7.readonly,
15121
+ required: ({ props: props7 }) => props7.required,
15122
+ type: ({ props: props7 }) => props7.type
15123
+ }
15124
+ };
15125
+ var NumberInput = {
15126
+ extend: Input,
15127
+ props: {
15128
+ type: "number"
15129
+ },
15130
+ attr: {
15131
+ step: ({ props: props7 }) => props7.step,
15132
+ min: ({ props: props7 }) => props7.min,
15133
+ max: ({ props: props7 }) => props7.max
15134
+ }
15135
+ };
15136
+
15030
15137
  // Field/node_modules/@symbo.ls/atoms/Block.js
15031
15138
  var import_scratch10 = __toESM(require_cjs());
15032
15139
 
@@ -15572,7 +15679,7 @@ var Upload = {
15572
15679
  },
15573
15680
  Icon: {
15574
15681
  name: "upload",
15575
- fontSize: `${26 / 16}em`,
15682
+ fontSize: "B",
15576
15683
  opacity: ".2"
15577
15684
  },
15578
15685
  P: {
@@ -15589,39 +15696,6 @@ var Upload = {
15589
15696
  }
15590
15697
  }
15591
15698
  };
15592
- var DragNdropUser = {
15593
- extend: Flex,
15594
- props: {
15595
- flow: "column",
15596
- align: "center center",
15597
- gap: "A",
15598
- round: "A"
15599
- },
15600
- Avatar: {
15601
- props: ({ state }) => ({
15602
- boxSize: "C C",
15603
- src: state.src
15604
- })
15605
- },
15606
- Flex: {
15607
- props: {
15608
- gap: "Y",
15609
- childProps: {
15610
- padding: "0",
15611
- boxSize: "B B",
15612
- background: "gray3",
15613
- round: "Y1",
15614
- color: "gray6",
15615
- style: { "> svg": { fontSize: `${14 / 16}em` } }
15616
- }
15617
- },
15618
- childExtend: SquareButton,
15619
- ...[
15620
- { props: { icon: "reload" } },
15621
- { props: { icon: "trash" } }
15622
- ]
15623
- }
15624
- };
15625
15699
 
15626
15700
  // Label/index.js
15627
15701
  var Label = {
@@ -15645,21 +15719,19 @@ var Label = {
15645
15719
  // Pills/index.js
15646
15720
  var Pills = {
15647
15721
  extend: Flex,
15648
- props: (el, s) => ({
15649
- display: "flex",
15650
- gap: "Y2",
15651
- childProps: {
15652
- background: "gray6",
15653
- width: "Y2",
15654
- height: "Y2",
15722
+ props: {
15723
+ gap: "Y2"
15724
+ },
15725
+ childExtend: {
15726
+ props: (el, s) => ({
15727
+ active: parseInt(el.key) === (el.parent.props.active || s.active),
15728
+ theme: "tertiary",
15729
+ boxSize: "Y2",
15655
15730
  round: "A",
15656
15731
  ".active": {
15657
- background: "gray9"
15732
+ theme: "primary"
15658
15733
  }
15659
- }
15660
- }),
15661
- childExtend: {
15662
- props: (el, s) => ({ active: parseInt(el.key) === s.active })
15734
+ })
15663
15735
  }
15664
15736
  };
15665
15737