@brightspace-ui/core 3.117.0 → 3.119.0

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.
@@ -0,0 +1,19 @@
1
+ import { ListItemNavButtonMixin } from './list-item-nav-button-mixin.js';
2
+ import { LitElement } from 'lit';
3
+
4
+ /**
5
+ * A component for a "listitem" child within a list. It provides semantics, basic layout, breakpoints for responsiveness, a link for navigation, and selection.
6
+ * @slot - Default content placed inside of the component
7
+ * @slot illustration - Image associated with the list item located at the left of the item
8
+ * @slot actions - Actions (e.g., button icons) associated with the listen item located at the right of the item
9
+ * @slot nested - Nested d2l-list element
10
+ */
11
+ class ListItemNavButton extends ListItemNavButtonMixin(LitElement) {
12
+
13
+ render() {
14
+ return this._renderListItem();
15
+ }
16
+
17
+ }
18
+
19
+ customElements.define('d2l-list-item-nav-button', ListItemNavButton);
@@ -370,8 +370,8 @@ class List extends PageableMixin(SelectionMixin(LitElement)) {
370
370
  }
371
371
 
372
372
  _handleListItemPropertyChange(e) {
373
- e.stopPropagation();
374
373
  if (e.detail.name === 'color') {
374
+ e.stopPropagation();
375
375
  if (e.detail.value) {
376
376
  this._childHasColor = true;
377
377
  this._listChildrenUpdatedSubscribers.updateSubscribers();
@@ -379,6 +379,46 @@ class List extends PageableMixin(SelectionMixin(LitElement)) {
379
379
  // if color has had its value removed then need to loop through all the items to determine if there are still others with colors
380
380
  this._handleListItemNestedChange(e);
381
381
  }
382
+ } else if (e.detail.name === 'current') {
383
+ if (this.slot === 'nested') return;
384
+ e.stopPropagation();
385
+
386
+ if (!e.detail.value) {
387
+ e.target.dispatchSetChildCurrentEvent(false);
388
+ return;
389
+ }
390
+
391
+ /**
392
+ * When a nav item is set to current, do the following:
393
+ * - If previous current item:
394
+ * - Set its current to FALSE
395
+ * - This triggers the d2l-list-item-nav-set-child-current with value of false, causing
396
+ * the previous current item to set its aria-current to undefined if it is not the current item
397
+ * - After the reset event has worked its way up OR if there is no previous current item:
398
+ * - Trigger the d2l-list-item-nav-set-child-current event with value of true, which sets all parent item aria-current to "location"
399
+ */
400
+ const currentItems = this.querySelectorAll('[current]');
401
+ // length of 2 is fine as long as one is e.target and the other is the previous current item
402
+ if (currentItems.length > 2) {
403
+ console.warn('d2l-list: More than one list item has been set to current. This is not allowed and will cause unexpected behavior.');
404
+ }
405
+ const target = e.target;
406
+
407
+ let prevCurrent = false;
408
+ currentItems.forEach((item) => {
409
+ if (item === target) return;
410
+ prevCurrent = item;
411
+ });
412
+
413
+ if (prevCurrent) {
414
+ this.addEventListener('d2l-list-item-nav-set-child-current', (e) => {
415
+ e.stopPropagation();
416
+ target.dispatchSetChildCurrentEvent(true);
417
+ }, { once: true });
418
+ prevCurrent.current = false;
419
+ } else {
420
+ target.dispatchSetChildCurrentEvent(true);
421
+ }
382
422
  }
383
423
  }
384
424
 
@@ -4,10 +4,10 @@
4
4
  The `d2l-validation-custom` component is used to add custom validation logic to native form elements like `input`, `select` and `textarea` or custom form elements created with the [`FormElementMixin`](../form/docs/form-element-mixin.md).
5
5
 
6
6
  **Native Form Elements:**
7
- - When attached to native form elements like `input`, `select` and `textarea`, both the `d2l-validation-custom` and native form element **must** be within a [`d2l-form`](../form/docs/form.md) or [`d2l-form-native`](../form/docs/form-native.md) for the validation custom to function.
7
+ - When attached to native form elements like `input`, `select` and `textarea`, both the `d2l-validation-custom` and native form element **must** be within a [`d2l-form`](../form/docs/form.md) for the validation custom to function.
8
8
 
9
9
  **Custom Form Elements:**
10
- - When attached to custom form elements created with the [`FormElementMixin`](../form/docs/form-element-mixin.md), the `d2l-validation-custom` will function even if no [`d2l-form`](../form/docs/form.md) or [`d2l-form-native`](../form/docs/form-native.md) is present.
10
+ - When attached to custom form elements created with the [`FormElementMixin`](../form/docs/form-element-mixin.md), the `d2l-validation-custom` will function even if no [`d2l-form`](../form/docs/form.md) is present.
11
11
 
12
12
  **Usage:**
13
13
  ```html
@@ -4759,10 +4759,6 @@
4759
4759
  "name": "d2l-form-dialog-demo",
4760
4760
  "path": "./components/form/demo/form-dialog-demo.js"
4761
4761
  },
4762
- {
4763
- "name": "d2l-form-native-demo",
4764
- "path": "./components/form/demo/form-native-demo.js"
4765
- },
4766
4762
  {
4767
4763
  "name": "d2l-form-panel-demo",
4768
4764
  "path": "./components/form/demo/form-panel-demo.js"
@@ -4778,100 +4774,6 @@
4778
4774
  }
4779
4775
  ]
4780
4776
  },
4781
- {
4782
- "name": "d2l-form-native",
4783
- "path": "./components/form/form-native.js",
4784
- "description": "A component that can be used to build sections containing interactive controls that are validated and submitted as a group.\nThese interactive controls are submitted using a native HTML form submission.",
4785
- "attributes": [
4786
- {
4787
- "name": "action",
4788
- "description": "The URL that processes the form submission.",
4789
- "type": "string",
4790
- "default": "\"\""
4791
- },
4792
- {
4793
- "name": "enctype",
4794
- "description": "If the value of the method attribute is post, enctype is the MIME type of the form submission.",
4795
- "type": "'application/x-www-form-urlencoded'|'multipart/form-data'|'text/plain'",
4796
- "default": "\"application/x-www-form-urlencoded\""
4797
- },
4798
- {
4799
- "name": "method",
4800
- "description": "The HTTP method to submit the form with.",
4801
- "type": "'get'|'post'",
4802
- "default": "\"get\""
4803
- },
4804
- {
4805
- "name": "target",
4806
- "description": "Indicates where to display the response after submitting the form.",
4807
- "type": "'_self '|'_blank'|'_parent'|'_top'",
4808
- "default": "\"_self\""
4809
- },
4810
- {
4811
- "name": "track-changes",
4812
- "description": "Indicates that the form should interrupt and warn on navigation if the user has unsaved changes on native elements.",
4813
- "type": "boolean",
4814
- "default": "false"
4815
- }
4816
- ],
4817
- "properties": [
4818
- {
4819
- "name": "action",
4820
- "attribute": "action",
4821
- "description": "The URL that processes the form submission.",
4822
- "type": "string",
4823
- "default": "\"\""
4824
- },
4825
- {
4826
- "name": "enctype",
4827
- "attribute": "enctype",
4828
- "description": "If the value of the method attribute is post, enctype is the MIME type of the form submission.",
4829
- "type": "'application/x-www-form-urlencoded'|'multipart/form-data'|'text/plain'",
4830
- "default": "\"application/x-www-form-urlencoded\""
4831
- },
4832
- {
4833
- "name": "method",
4834
- "attribute": "method",
4835
- "description": "The HTTP method to submit the form with.",
4836
- "type": "'get'|'post'",
4837
- "default": "\"get\""
4838
- },
4839
- {
4840
- "name": "target",
4841
- "attribute": "target",
4842
- "description": "Indicates where to display the response after submitting the form.",
4843
- "type": "'_self '|'_blank'|'_parent'|'_top'",
4844
- "default": "\"_self\""
4845
- },
4846
- {
4847
- "name": "trackChanges",
4848
- "attribute": "track-changes",
4849
- "description": "Indicates that the form should interrupt and warn on navigation if the user has unsaved changes on native elements.",
4850
- "type": "boolean",
4851
- "default": "false"
4852
- }
4853
- ],
4854
- "events": [
4855
- {
4856
- "name": "submit",
4857
- "description": "Dispatched when the form is submitted. Cancelling this event will prevent form submission."
4858
- },
4859
- {
4860
- "name": "formdata",
4861
- "description": "Dispatched after the entry list representing the form's data is constructed. This happens when the form is submitted just prior to submission. The form data can be obtained from the `detail`'s `formData` property."
4862
- },
4863
- {
4864
- "name": "d2l-form-dirty",
4865
- "description": "Dispatched whenever any form element fires an `input` or `change` event. Can be used to track whether the form is dirty or not."
4866
- }
4867
- ],
4868
- "slots": [
4869
- {
4870
- "name": "",
4871
- "description": "The native and custom form elements that participate in validation and submission"
4872
- }
4873
- ]
4874
- },
4875
4777
  {
4876
4778
  "name": "d2l-form",
4877
4779
  "path": "./components/form/form.js",
@@ -4913,13 +4815,13 @@
4913
4815
  "name": "d2l-form-invalid",
4914
4816
  "description": "Dispatched when the form fails validation. The error map can be obtained from the `detail`'s `errors` property."
4915
4817
  },
4916
- {
4917
- "name": "d2l-form-submit",
4918
- "description": "Dispatched when the form is submitted. The form data can be obtained from the `detail`'s `formData` property."
4919
- },
4920
4818
  {
4921
4819
  "name": "d2l-form-dirty",
4922
4820
  "description": "Dispatched whenever any form element fires an `input` or `change` event. Can be used to track whether the form is dirty or not."
4821
+ },
4822
+ {
4823
+ "name": "d2l-form-submit",
4824
+ "description": "Dispatched when the form is submitted. The form data can be obtained from the `detail`'s `formData` property."
4923
4825
  }
4924
4826
  ],
4925
4827
  "slots": [
@@ -9492,6 +9394,291 @@
9492
9394
  }
9493
9395
  ]
9494
9396
  },
9397
+ {
9398
+ "name": "d2l-list-item-nav-button",
9399
+ "path": "./components/list/list-item-nav-button.js",
9400
+ "description": "A component for a \"listitem\" child within a list. It provides semantics, basic layout, breakpoints for responsiveness, a link for navigation, and selection.",
9401
+ "attributes": [
9402
+ {
9403
+ "name": "current",
9404
+ "description": "Whether the list item is the current page in a navigation context",
9405
+ "type": "boolean",
9406
+ "default": "false"
9407
+ },
9408
+ {
9409
+ "name": "button-disabled",
9410
+ "description": "Disables the primary action button",
9411
+ "type": "boolean",
9412
+ "default": "false"
9413
+ },
9414
+ {
9415
+ "name": "drag-target-handle-only",
9416
+ "description": "Whether to allow the drag target to be the handle only rather than the entire cell",
9417
+ "type": "boolean"
9418
+ },
9419
+ {
9420
+ "name": "color",
9421
+ "description": "A color indicator to appear at the beginning of a list item. Expected value is a valid 3, 4, 6, or 8 character CSS color hex code (e.g., #006fbf).",
9422
+ "type": "string"
9423
+ },
9424
+ {
9425
+ "name": "no-primary-action",
9426
+ "description": "Whether to disable rendering the entire item as the primary action. Required if slotted content is interactive.",
9427
+ "type": "boolean",
9428
+ "default": "false"
9429
+ },
9430
+ {
9431
+ "name": "padding-type",
9432
+ "description": "How much padding to render list items with",
9433
+ "type": "'normal'|'none'",
9434
+ "default": "\"normal\""
9435
+ },
9436
+ {
9437
+ "name": "selectable",
9438
+ "description": "**Selection:** Indicates an input should be rendered for selecting the item",
9439
+ "type": "boolean",
9440
+ "default": "false"
9441
+ },
9442
+ {
9443
+ "name": "selected",
9444
+ "description": "**Selection:** Whether the item is selected",
9445
+ "type": "boolean",
9446
+ "default": "false"
9447
+ },
9448
+ {
9449
+ "name": "selection-disabled",
9450
+ "description": "**Selection:** Disables selection",
9451
+ "type": "boolean",
9452
+ "default": "false"
9453
+ },
9454
+ {
9455
+ "name": "drag-handle-text",
9456
+ "description": "**Drag & drop:** The drag-handle label for assistive technology. If implementing drag & drop, you should change this to dynamically announce what the drag-handle is moving for assistive technology in keyboard mode.",
9457
+ "type": "string"
9458
+ },
9459
+ {
9460
+ "name": "drop-text",
9461
+ "description": "**Drag & drop:** Text to drag and drop",
9462
+ "type": "string"
9463
+ },
9464
+ {
9465
+ "name": "key",
9466
+ "description": "**Selection:** Value to identify item if selectable",
9467
+ "type": "string"
9468
+ },
9469
+ {
9470
+ "name": "draggable",
9471
+ "description": "**Drag & drop:** Whether the item is draggable",
9472
+ "type": "boolean",
9473
+ "default": "false"
9474
+ },
9475
+ {
9476
+ "name": "drop-nested",
9477
+ "description": "**Drag & drop:** Whether nested items can be dropped on this item",
9478
+ "type": "boolean",
9479
+ "default": "false"
9480
+ },
9481
+ {
9482
+ "name": "expandable",
9483
+ "description": "Whether to show the expand collapse toggle",
9484
+ "type": "boolean"
9485
+ },
9486
+ {
9487
+ "name": "expanded",
9488
+ "description": "Default state for expand collapse toggle - if not set, collapsed will be the default state",
9489
+ "type": "boolean"
9490
+ },
9491
+ {
9492
+ "name": "skeleton",
9493
+ "description": "Render the component as a [skeleton loader](https://github.com/BrightspaceUI/core/tree/main/components/skeleton).",
9494
+ "type": "boolean"
9495
+ },
9496
+ {
9497
+ "name": "labelled-by",
9498
+ "description": "ACCESSIBILITY: The id of element that provides the label for this element. Use when another visible element should act as the label.",
9499
+ "type": "string"
9500
+ },
9501
+ {
9502
+ "name": "label",
9503
+ "description": "ACCESSIBILITY: REQUIRED: Explicitly defined label for the element",
9504
+ "type": "string"
9505
+ }
9506
+ ],
9507
+ "properties": [
9508
+ {
9509
+ "name": "current",
9510
+ "attribute": "current",
9511
+ "description": "Whether the list item is the current page in a navigation context",
9512
+ "type": "boolean",
9513
+ "default": "false"
9514
+ },
9515
+ {
9516
+ "name": "buttonDisabled",
9517
+ "attribute": "button-disabled",
9518
+ "description": "Disables the primary action button",
9519
+ "type": "boolean",
9520
+ "default": "false"
9521
+ },
9522
+ {
9523
+ "name": "dragTargetHandleOnly",
9524
+ "attribute": "drag-target-handle-only",
9525
+ "description": "Whether to allow the drag target to be the handle only rather than the entire cell",
9526
+ "type": "boolean"
9527
+ },
9528
+ {
9529
+ "name": "color",
9530
+ "attribute": "color",
9531
+ "description": "A color indicator to appear at the beginning of a list item. Expected value is a valid 3, 4, 6, or 8 character CSS color hex code (e.g., #006fbf).",
9532
+ "type": "string"
9533
+ },
9534
+ {
9535
+ "name": "first",
9536
+ "type": "boolean",
9537
+ "default": "false"
9538
+ },
9539
+ {
9540
+ "name": "noPrimaryAction",
9541
+ "attribute": "no-primary-action",
9542
+ "description": "Whether to disable rendering the entire item as the primary action. Required if slotted content is interactive.",
9543
+ "type": "boolean",
9544
+ "default": "false"
9545
+ },
9546
+ {
9547
+ "name": "paddingType",
9548
+ "attribute": "padding-type",
9549
+ "description": "How much padding to render list items with",
9550
+ "type": "'normal'|'none'",
9551
+ "default": "\"normal\""
9552
+ },
9553
+ {
9554
+ "name": "selectable",
9555
+ "attribute": "selectable",
9556
+ "description": "**Selection:** Indicates an input should be rendered for selecting the item",
9557
+ "type": "boolean",
9558
+ "default": "false"
9559
+ },
9560
+ {
9561
+ "name": "selected",
9562
+ "attribute": "selected",
9563
+ "description": "**Selection:** Whether the item is selected",
9564
+ "type": "boolean",
9565
+ "default": "false"
9566
+ },
9567
+ {
9568
+ "name": "selectionDisabled",
9569
+ "attribute": "selection-disabled",
9570
+ "description": "**Selection:** Disables selection",
9571
+ "type": "boolean",
9572
+ "default": "false"
9573
+ },
9574
+ {
9575
+ "name": "selectionInfo"
9576
+ },
9577
+ {
9578
+ "name": "dragHandleText",
9579
+ "attribute": "drag-handle-text",
9580
+ "description": "**Drag & drop:** The drag-handle label for assistive technology. If implementing drag & drop, you should change this to dynamically announce what the drag-handle is moving for assistive technology in keyboard mode.",
9581
+ "type": "string"
9582
+ },
9583
+ {
9584
+ "name": "dropText",
9585
+ "attribute": "drop-text",
9586
+ "description": "**Drag & drop:** Text to drag and drop",
9587
+ "type": "string"
9588
+ },
9589
+ {
9590
+ "name": "key",
9591
+ "attribute": "key",
9592
+ "description": "**Selection:** Value to identify item if selectable",
9593
+ "type": "string"
9594
+ },
9595
+ {
9596
+ "name": "draggable",
9597
+ "attribute": "draggable",
9598
+ "description": "**Drag & drop:** Whether the item is draggable",
9599
+ "type": "boolean",
9600
+ "default": "false"
9601
+ },
9602
+ {
9603
+ "name": "dropNested",
9604
+ "attribute": "drop-nested",
9605
+ "description": "**Drag & drop:** Whether nested items can be dropped on this item",
9606
+ "type": "boolean",
9607
+ "default": "false"
9608
+ },
9609
+ {
9610
+ "name": "expandable",
9611
+ "attribute": "expandable",
9612
+ "description": "Whether to show the expand collapse toggle",
9613
+ "type": "boolean"
9614
+ },
9615
+ {
9616
+ "name": "expanded",
9617
+ "attribute": "expanded",
9618
+ "description": "Default state for expand collapse toggle - if not set, collapsed will be the default state",
9619
+ "type": "boolean"
9620
+ },
9621
+ {
9622
+ "name": "skeleton",
9623
+ "attribute": "skeleton",
9624
+ "description": "Render the component as a [skeleton loader](https://github.com/BrightspaceUI/core/tree/main/components/skeleton).",
9625
+ "type": "boolean"
9626
+ },
9627
+ {
9628
+ "name": "labelledBy",
9629
+ "attribute": "labelled-by",
9630
+ "description": "ACCESSIBILITY: The id of element that provides the label for this element. Use when another visible element should act as the label.",
9631
+ "type": "string"
9632
+ },
9633
+ {
9634
+ "name": "label",
9635
+ "attribute": "label",
9636
+ "description": "ACCESSIBILITY: REQUIRED: Explicitly defined label for the element",
9637
+ "type": "string"
9638
+ },
9639
+ {
9640
+ "name": "labelRequired",
9641
+ "type": "boolean",
9642
+ "default": "true"
9643
+ }
9644
+ ],
9645
+ "events": [
9646
+ {
9647
+ "name": "d2l-list-item-button-click",
9648
+ "description": "Dispatched when the item's primary button action is clicked"
9649
+ },
9650
+ {
9651
+ "name": "d2l-list-item-selected",
9652
+ "description": "Dispatched when the component item is selected"
9653
+ },
9654
+ {
9655
+ "name": "d2l-list-item-position-change",
9656
+ "description": "Dispatched when a draggable list item's position changes in the list. See [Event Details: d2l-list-item-position-change](#event-details%3A-d2l-list-item-position-change)."
9657
+ },
9658
+ {
9659
+ "name": "d2l-list-item-expand-collapse-toggled",
9660
+ "description": "Dispatched whenever the list item expand state is toggled."
9661
+ }
9662
+ ],
9663
+ "slots": [
9664
+ {
9665
+ "name": "",
9666
+ "description": "Default content placed inside of the component"
9667
+ },
9668
+ {
9669
+ "name": "illustration",
9670
+ "description": "Image associated with the list item located at the left of the item"
9671
+ },
9672
+ {
9673
+ "name": "actions",
9674
+ "description": "Actions (e.g., button icons) associated with the listen item located at the right of the item"
9675
+ },
9676
+ {
9677
+ "name": "nested",
9678
+ "description": "Nested d2l-list element"
9679
+ }
9680
+ ]
9681
+ },
9495
9682
  {
9496
9683
  "name": "d2l-list-item-placement-marker",
9497
9684
  "path": "./components/list/list-item-placement-marker.js"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.117.0",
3
+ "version": "3.119.0",
4
4
  "description": "A collection of accessible, free, open-source web components for building Brightspace applications",
5
5
  "type": "module",
6
6
  "repository": "https://github.com/BrightspaceUI/core.git",
@@ -1,80 +0,0 @@
1
-
2
- import '../../button/button.js';
3
- import '../../inputs/input-date.js';
4
- import '../../inputs/input-date-time-range.js';
5
- import '../../inputs/input-text.js';
6
- import '../../validation/validation-custom.js';
7
- import '../form-native.js';
8
- import { css, html, LitElement } from 'lit';
9
- import { inputStyles } from '../../inputs/input-styles.js';
10
- import { selectStyles } from '../../inputs/input-select-styles.js';
11
-
12
- class FormNativeDemo extends LitElement {
13
-
14
- static get styles() {
15
- return [inputStyles, selectStyles, css`
16
- :first-child.d2l-form-demo-container {
17
- margin-top: 18px;
18
- }
19
- .d2l-form-demo-container {
20
- margin-bottom: 10px;
21
- }
22
- `];
23
- }
24
-
25
- render() {
26
- return html`
27
- <d2l-form-native>
28
- <div class="d2l-form-demo-container">
29
- <d2l-input-text label="Name" type="text" name="name" required minlength="4" maxlength="8"></d2l-input-text>
30
- </div>
31
- <div class="d2l-form-demo-container">
32
- <d2l-input-text label="Email" name="email" type="email"></d2l-input-text>
33
- </div>
34
- <div class="d2l-form-demo-container">
35
- <d2l-validation-custom for="password" @d2l-validation-custom-validate=${this._validatePassword} failure-text="Expected hunter2 or 12345" ></d2l-validation-custom>
36
- <d2l-input-text label="Password" id="password" name="password" required type="password"></d2l-input-text>
37
- </div>
38
- <fieldset class="d2l-form-demo-container">
39
- <legend>Choose your favorite monster</legend>
40
- <input type="radio" id="kraken" name="monster" value="kraken">
41
- <label for="kraken">Kraken</label><br />
42
- <input type="radio" id="sasquatch" name="monster" value="sasquatch">
43
- <label for="sasquatch">Sasquatch</label><br />
44
- </fieldset>
45
- <div class="d2l-form-demo-container">
46
- <label for="pet-select">Favorite Pet</label><br />
47
- <select class="d2l-input-select" name="pets" id="pet-select" required>
48
- <option value="">--Please choose an option--</option>
49
- <option value="porpoise">Porpoise</option>
50
- <option value="house hippo">House Hippo</option>
51
- <option value="spiker monkey">Spider Monkey</option>
52
- <option value="capybara">Capybara</option>
53
- </select>
54
- </div>
55
- <d2l-input-date label="Date" name="my-date" required></d2l-input-date>
56
- <div class="d2l-form-demo-container">
57
- <label for="story">Tell us your story</label>
58
- <textarea class="d2l-input" minlength="20" id="story" name="story" rows="5" cols="33">It was...</textarea>
59
- </label>
60
- </div>
61
- <d2l-input-date-time-range label="Assignment Dates" required min-value="2018-08-27T12:30:00Z" max-value="2018-09-30T12:30:00Z"></d2l-input-date-time-range>
62
- <div class="d2l-form-demo-container">
63
- <label for="file">Super Secret File</label><br />
64
- <input type="file" id="file" name="super-secret-file">
65
- </div>
66
- <button name="action" value="save" type="submit" @click=${this._onClick}>Save</button>
67
- </d2l-form-native>
68
- `;
69
- }
70
-
71
- _onClick(e) {
72
- if (this.shadowRoot) this.shadowRoot.querySelector('d2l-form-native').requestSubmit(e.target);
73
- }
74
-
75
- _validatePassword(e) {
76
- e.detail.resolve(e.detail.forElement.value === 'hunter2' || e.detail.forElement.value === '12345');
77
- }
78
-
79
- }
80
- customElements.define('d2l-form-native-demo', FormNativeDemo);
@@ -1,29 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
-
4
- <head>
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <meta charset="UTF-8">
7
- <link rel="stylesheet" href="../../demo/styles.css" type="text/css">
8
- <script type="module">
9
- import '../../demo/demo-page.js';
10
- import './form-native-demo.js';
11
- </script>
12
- </head>
13
-
14
- <body unresolved>
15
-
16
- <d2l-demo-page page-title="d2l-form-native">
17
-
18
- <h2>Basic</h2>
19
- <d2l-demo-snippet>
20
- <template>
21
- <d2l-form-native-demo></d2l-form-native-demo>
22
- </template>
23
- </d2l-demo-snippet>
24
-
25
- </d2l-demo-page>
26
-
27
- </body>
28
-
29
- </html>